From 0c2a2d4eff8e76829502ebd017cfe2eec305ec8c Mon Sep 17 00:00:00 2001 From: Ammar ELWazir Date: Fri, 2 Jun 2023 19:58:23 +0000 Subject: [PATCH] Fixing Perfetto Plugin & Updating Perfetto SDK Change-Id: Idad07448a70b0b17acee899c0265147455a9d87c [ROCm/rocprofiler commit: 5c8cb39b08c905e31d4ed0f3d52b86a876a65c4a] --- .../rocprofiler/plugin/perfetto/perfetto.cpp | 320 +- .../perfetto/perfetto_sdk/sdk/perfetto.cc | 15798 ++-- .../perfetto/perfetto_sdk/sdk/perfetto.h | 65828 ++++++++-------- .../rocprofiler/src/core/hsa/hsa_support.cpp | 25 +- 4 files changed, 43733 insertions(+), 38238 deletions(-) diff --git a/projects/rocprofiler/plugin/perfetto/perfetto.cpp b/projects/rocprofiler/plugin/perfetto/perfetto.cpp index c720a363f9..5b36b6cdaa 100644 --- a/projects/rocprofiler/plugin/perfetto/perfetto.cpp +++ b/projects/rocprofiler/plugin/perfetto/perfetto.cpp @@ -18,6 +18,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ +#include "perfetto.h" #include "rocprofiler.h" #include @@ -60,6 +61,7 @@ PERFETTO_DEFINE_CATEGORIES( perfetto::Category("External_API").SetDescription("ACTIVITY_DOMAIN_EXT_API"), perfetto::Category("HIP_OPS").SetDescription("ACTIVITY_DOMAIN_HIP_OPS"), perfetto::Category("HSA_OPS").SetDescription("ACTIVITY_DOMAIN_HSA_OPS"), + perfetto::Category("MEM_COPIES").SetDescription("MEMORY_COPY_ASYNCHRONOUS_ACTIVITY"), perfetto::Category("KERNELS").SetDescription("KERNEL_DISPATCHES"), perfetto::Category("COUNTERS").SetDescription("PERFORMANCE_COUNTERS")); @@ -97,8 +99,7 @@ class perfetto_plugin_t { const char* temp_file_name = getenv("OUT_FILE_NAME"); output_file_name = temp_file_name ? std::string(temp_file_name) + "_" : ""; - if (output_dir == nullptr) - output_dir = "./"; + if (output_dir == nullptr) output_dir = "./"; output_prefix_ = output_dir; if (!fs::is_directory(fs::status(output_prefix_))) { @@ -107,9 +108,11 @@ class perfetto_plugin_t { return; } + machine_id_ = gethostid(); + gethostname(hostname_, sizeof(hostname_)); + perfetto::TracingInitArgs args; args.backends |= perfetto::kInProcessBackend; - perfetto::Tracing::Initialize(args); perfetto::TrackEvent::Register(); @@ -122,13 +125,14 @@ class perfetto_plugin_t { track_event_cfg.add_enabled_categories("External_API"); track_event_cfg.add_enabled_categories("HIP_OPS"); track_event_cfg.add_enabled_categories("HSA_OPS"); + track_event_cfg.add_enabled_categories("MEM_COPIES"); track_event_cfg.add_enabled_categories("KERNELS"); track_event_cfg.add_enabled_categories("COUNTERS"); perfetto::TraceConfig trace_cfg; auto buffer_cfg = trace_cfg.add_buffers(); - uint32_t max_buffer_size = 10 * 1024 * 1024; // Default max buffer size is 10 GB + uint32_t max_buffer_size = 1024 * 1024; // Default max buffer size is 1 GB const char* max_buffer_size_str = getenv("rocprofiler_PERFETTO_MAX_BUFFER_SIZE_KIB"); if (max_buffer_size_str && std::atol(max_buffer_size_str) > 0) max_buffer_size = std::atol(max_buffer_size_str); @@ -148,26 +152,18 @@ class perfetto_plugin_t { tracing_session_->Setup(trace_cfg, file_descriptor_); tracing_session_->StartBlocking(); - machine_id = gethostid(); - { - std::lock_guard lock(thread_tracks_lock_); - process_name = - perfetto::ProcessTrack::Current().Serialize().mutable_process()->process_name(); - auto process_track_desc = perfetto::ProcessTrack::Current().Serialize(); - uint64_t track_id = - track_counter_.fetch_add((1 + machine_id) * GetPid(), std::memory_order_acquire); - for (uint64_t tid : track_ids_used_) { - while (track_id == tid) { - track_id = - track_counter_.fetch_add((1 + machine_id) * GetPid(), std::memory_order_acquire); - } - } - process_track_desc.mutable_process()->set_process_name(get_thread_track_str()); - perfetto::TrackEvent::SetTrackDescriptor(perfetto::ProcessTrack::Current(), - process_track_desc); - perfetto::ProcessTrack::Current().Serialize().set_uuid(track_id); - thread_tracks_.emplace(GetPid(), perfetto::ProcessTrack::Current()); - } + // Give a custom name for the traced process. + perfetto::ProcessTrack process_track = perfetto::ProcessTrack::Current(); + perfetto::protos::gen::TrackDescriptor desc = process_track.Serialize(); + desc.mutable_process()->set_process_name("Node: " + std::string(hostname_) + " Rank " + + std::to_string(MPI_rank)); + perfetto::TrackEvent::SetTrackDescriptor(process_track, desc); + + mem_copies_track_.emplace(perfetto::Track::ThreadScoped("Memory Copies Operations")); + perfetto::protos::gen::TrackDescriptor mem_copies_track_desc = mem_copies_track_->Serialize(); + mem_copies_track_desc.mutable_process()->set_process_name("Memory Copies Operations"); + mem_copies_track_desc.mutable_process()->set_pid(GetPid() * QUEUE_CONSTANT); + perfetto::TrackEvent::SetTrackDescriptor(mem_copies_track_.value(), mem_copies_track_desc); is_valid_ = true; } @@ -180,14 +176,13 @@ class perfetto_plugin_t { } std::string replace_MPI_macros(std::string output_file_name) { - std::vector MPI_BUILTINS = { - "MPI_RANK", "OMPI_COMM_WORLD_RANK", "MV2_COMM_WORLD_RANK" - }; + std::vector MPI_BUILTINS = {"MPI_RANK", "OMPI_COMM_WORLD_RANK", + "MV2_COMM_WORLD_RANK"}; bIsMPI = false; for (const char* envvar : MPI_BUILTINS) { const char* rank_env_var = getenv(envvar); - if (rank_env_var == nullptr) continue; // MPI var is does not exist + if (rank_env_var == nullptr) continue; // MPI var is does not exist MPI_rank = atoi(rank_env_var); bIsMPI = true; @@ -195,26 +190,13 @@ class perfetto_plugin_t { } size_t key_find = output_file_name.rfind("%rank"); - if (key_find != std::string::npos) { // Contains a %?rank string - output_file_name = output_file_name.substr(0, key_find) + std::to_string(MPI_rank) - + output_file_name.substr(key_find + std::string("%rank").size()); + if (key_find != std::string::npos) { // Contains a %?rank string + output_file_name = output_file_name.substr(0, key_find) + std::to_string(MPI_rank) + + output_file_name.substr(key_find + std::string("%rank").size()); } return output_file_name; } - std::string get_thread_track_str() { - if (!bIsMPI) - rocprofiler::string_printf("Node: %s Process ID: %lu Thread ID:", hostname_, GetPid()); - std::stringstream thread_track_str; - thread_track_str << "Rank: " << MPI_rank << " (" << hostname_ - << ") Process ID:" << GetPid() << " Thread ID:"; - return thread_track_str.str(); - } - - std::string get_device_track_str() { - return rocprofiler::string_printf("Node: %s Device:", hostname_); - } - const char* GetDomainName(rocprofiler_tracer_activity_domain_t domain) { switch (domain) { case ACTIVITY_DOMAIN_ROCTX: @@ -252,18 +234,20 @@ class perfetto_plugin_t { std::unordered_map::iterator device_track_it; { std::lock_guard lock(device_tracks_lock_); - device_track_it = device_tracks_.find(device_id); + uint64_t device_track_id = (device_id + 2) * (machine_id_ + 2); + device_track_it = device_tracks_.find(device_track_id); if (device_track_it == device_tracks_.end()) { /* Create a new perfetto::Track (Sub-Track) */ device_track_it = - device_tracks_ - .emplace(device_id, perfetto::ProcessTrack::Global(((device_id + 1) * machine_id))) - .first; + device_tracks_.emplace(device_track_id, perfetto::Track::Global(device_track_id)).first; auto gpu_desc = device_track_it->second.Serialize(); gpu_desc.mutable_process()->set_pid(device_id); - gpu_desc.mutable_process()->set_process_name(get_device_track_str()); + gpu_desc.mutable_process()->set_chrome_process_type( + perfetto::protos::gen::ProcessDescriptor::PROCESS_GPU); + gpu_desc.mutable_process()->set_process_name("Node: " + std::string(hostname_) + + " Device: "); perfetto::TrackEvent::SetTrackDescriptor(device_track_it->second, gpu_desc); - track_ids_used_.emplace_back(device_id + 1 + machine_id); + track_ids_used_.emplace_back(device_track_id); } } auto& gpu_track = device_track_it->second; @@ -272,25 +256,19 @@ class perfetto_plugin_t { auto queue_track_it = queue_tracks_.find(gpu_queue_id.first); { std::lock_guard lock(queue_tracks_lock_); - queue_track_it = queue_tracks_.find(gpu_queue_id.first); + uint64_t queue_track_id = (gpu_queue_id.first + 2) * (device_id + 2) * (machine_id_ + 2); + queue_track_it = queue_tracks_.find(queue_track_id); if (queue_track_it == queue_tracks_.end()) { /* Create a new perfetto::Track */ - queue_track_it = queue_tracks_ - .emplace(gpu_queue_id.first, - perfetto::Track((profiler_record.queue_id.handle + 1 + - profiler_record.gpu_id.handle) * - QUEUE_CONSTANT * machine_id * GetPid(), - gpu_track)) - .first; + queue_track_it = + queue_tracks_.emplace(queue_track_id, perfetto::Track(queue_track_id, gpu_track)).first; auto queue_desc = queue_track_it->second.Serialize(); - std::string queue_str = - rocprofiler::string_printf("Process ID: %lu Queue %ld", GetPid(), gpu_queue_id.second); + std::string queue_str = rocprofiler::string_printf("Queue %ld", gpu_queue_id.second); queue_desc.set_name(queue_str); perfetto::TrackEvent::SetTrackDescriptor(queue_track_it->second, queue_desc); } - track_ids_used_.emplace_back(profiler_record.queue_id.handle + machine_id + 1 + - profiler_record.gpu_id.handle); + track_ids_used_.emplace_back(queue_track_id); } auto& queue_track = queue_track_it->second; @@ -319,8 +297,7 @@ class perfetto_plugin_t { TRACE_EVENT_END("KERNELS", queue_track, profiler_record.timestamps.end.value); auto get_counter_track_fn = [&](std::string counter_name) { - std ::string counter_track_id = - std::to_string(machine_id) + std::to_string(GetPid()) + counter_name; + std ::string counter_track_id = hostname_ + std::to_string(GetPid()) + counter_name; std::pair gpu_counter_track_id = std::make_pair(device_id, counter_name); std::unordered_map::iterator counters_track_it; { @@ -335,8 +312,7 @@ class perfetto_plugin_t { .first; auto counter_track_desc = counters_track_it->second.Serialize(); - std::string counter_track_str = "Process ID " + std::to_string(GetPid()) + " - Counter " + - gpu_counter_track_id.second; + std::string counter_track_str = "Counter " + gpu_counter_track_id.second; counter_track_desc.set_name(counter_track_str); perfetto::TrackEvent::SetTrackDescriptor(counters_track_it->second, counter_track_desc); } @@ -386,42 +362,39 @@ class perfetto_plugin_t { if (tracer_record.domain == ACTIVITY_DOMAIN_HIP_OPS || tracer_record.domain == ACTIVITY_DOMAIN_HSA_OPS) { int device_id = tracer_record.agent_id.handle; - if (tracer_record.domain == ACTIVITY_DOMAIN_HIP_OPS && device_id > 0) device_id--; - { - std::lock_guard lock(device_tracks_lock_); - device_track_it = device_tracks_.find(device_id); - if (device_track_it == device_tracks_.end()) { - /* Create a new perfetto::Track (Sub-Track) */ - device_track_it = - device_tracks_ - .emplace(device_id, - perfetto::ProcessTrack::Global(((device_id + 1) * machine_id))) - .first; - auto gpu_desc = device_track_it->second.Serialize(); - gpu_desc.mutable_process()->set_pid(device_id); - gpu_desc.mutable_process()->set_process_name(get_device_track_str()); - perfetto::TrackEvent::SetTrackDescriptor(device_track_it->second, gpu_desc); - track_ids_used_.emplace_back(1 + machine_id + device_id); - } + + std::lock_guard lock(device_tracks_lock_); + uint64_t device_track_id = (device_id + 2) * (machine_id_ + 2); + device_track_it = device_tracks_.find(device_track_id); + if (device_track_it == device_tracks_.end()) { + /* Create a new perfetto::Track (Sub-Track) */ + device_track_it = + device_tracks_.emplace(device_track_id, perfetto::ProcessTrack::Global(device_track_id)) + .first; + auto gpu_desc = device_track_it->second.Serialize(); + gpu_desc.mutable_process()->set_pid(device_id); + gpu_desc.mutable_process()->set_chrome_process_type( + perfetto::protos::gen::ProcessDescriptor::PROCESS_GPU); + gpu_desc.mutable_process()->set_process_name("Node: " + std::string(hostname_) + + " Device: "); + perfetto::TrackEvent::SetTrackDescriptor(device_track_it->second, gpu_desc); + track_ids_used_.emplace_back(device_track_id); } } else { std::lock_guard lock(thread_tracks_lock_); - thread_track_it = thread_tracks_.find(thread_id); + uint64_t thread_track_id = (thread_id + 2) * GetPid() * (machine_id_ + 2); + thread_track_it = thread_tracks_.find(thread_track_id); if (thread_track_it == thread_tracks_.end()) { - uint64_t track_id = - track_counter_.fetch_add((1 + machine_id) * GetPid(), std::memory_order_acquire); - for (uint64_t tid : track_ids_used_) { - while (track_id == tid) { - track_id = - track_counter_.fetch_add((1 + machine_id) * GetPid(), std::memory_order_acquire); - } - } thread_track_it = - thread_tracks_.emplace(thread_id, perfetto::ProcessTrack::Global(track_id)).first; + thread_tracks_ + .emplace(thread_track_id, + perfetto::Track(thread_track_id, perfetto::ProcessTrack::Current())) + .first; auto thread_track_desc = thread_track_it->second.Serialize(); thread_track_desc.mutable_process()->set_pid(thread_id); - thread_track_desc.mutable_process()->set_process_name(get_thread_track_str()); + thread_track_desc.mutable_process()->set_process_name("Thread: "); perfetto::TrackEvent::SetTrackDescriptor(thread_track_it->second, thread_track_desc); + track_ids_used_.emplace_back(thread_track_id); } } auto& thread_track = thread_track_it->second; @@ -435,10 +408,10 @@ class perfetto_plugin_t { if (roctx_track_it == roctx_tracks_.end()) { /* Create a new perfetto::Track */ uint64_t track_id = - track_counter_.fetch_add((1 + machine_id) * GetPid(), std::memory_order_acquire); + track_counter_.fetch_add((1 + machine_id_) * GetPid(), std::memory_order_acquire); for (uint64_t tid : track_ids_used_) { while (track_id == tid) { - track_id = track_counter_.fetch_add((1 + machine_id) * GetPid(), + track_id = track_counter_.fetch_add((1 + machine_id_) * GetPid(), std::memory_order_acquire); } } @@ -475,10 +448,10 @@ class perfetto_plugin_t { if (hsa_track_it == hsa_tracks_.end()) { /* Create a new perfetto::Track */ uint64_t track_id = - track_counter_.fetch_add((1 + machine_id) * GetPid(), std::memory_order_acquire); + track_counter_.fetch_add((1 + machine_id_) * GetPid(), std::memory_order_acquire); for (uint64_t tid : track_ids_used_) { while (track_id == tid) { - track_id = track_counter_.fetch_add((1 + machine_id) * GetPid(), + track_id = track_counter_.fetch_add((1 + machine_id_) * GetPid(), std::memory_order_acquire); } } @@ -526,10 +499,10 @@ class perfetto_plugin_t { if (hip_track_it == hip_tracks_.end()) { /* Create a new perfetto::Track */ uint64_t track_id = - track_counter_.fetch_add((1 + machine_id) * GetPid(), std::memory_order_acquire); + track_counter_.fetch_add((1 + machine_id_) * GetPid(), std::memory_order_acquire); for (uint64_t tid : track_ids_used_) { while (track_id == tid) { - track_id = track_counter_.fetch_add((1 + machine_id) * GetPid(), + track_id = track_counter_.fetch_add((1 + machine_id_) * GetPid(), std::memory_order_acquire); } } @@ -591,36 +564,38 @@ class perfetto_plugin_t { case ACTIVITY_DOMAIN_HIP_OPS: { // TODO(aelwazir): Stream ID is removed from the API processing. // Waiting for better implementation to get the stream id. - uint64_t stream_id = 0; - std::unordered_map::iterator stream_track_it; - { - std::lock_guard lock(stream_tracks_lock_); - stream_track_it = stream_tracks_.find(stream_id); - if (stream_track_it == stream_tracks_.end()) { - /* Create a new perfetto::Track */ - uint64_t track_id = ((1 + stream_id + tracer_record.agent_id.handle) * machine_id * - STREAM_CONSTANT * GetPid()); - stream_track_it = - stream_tracks_.emplace(stream_id, perfetto::Track(track_id, gpu_track)).first; + // uint64_t stream_id = 0; + // std::unordered_map::iterator stream_track_it; + // { + // std::lock_guard lock(stream_tracks_lock_); + // uint64_t stream_track_id = (stream_id + STREAM_CONSTANT) * + // (tracer_record.agent_id.handle + 2) * (machine_id_ + 2); + // stream_track_it = stream_tracks_.find(stream_track_id); + // if (stream_track_it == stream_tracks_.end()) { + // /* Create a new perfetto::Track */ + // stream_track_it = + // stream_tracks_.emplace(stream_track_id, perfetto::Track(stream_track_id, + // gpu_track)) + // .first; - auto stream_desc = stream_track_it->second.Serialize(); - std::string stream_str = - rocprofiler::string_printf("Process ID: %lu Stream %d", GetPid(), stream_id); - stream_desc.set_name(stream_str); - perfetto::TrackEvent::SetTrackDescriptor(stream_track_it->second, stream_desc); - track_ids_used_.emplace_back(1 + machine_id + tracer_record.agent_id.handle); - } - } - auto& stream_track = stream_track_it->second; + // auto stream_desc = stream_track_it->second.Serialize(); + // std::string stream_str = rocprofiler::string_printf("Stream %d", stream_id); + // stream_desc.set_name(stream_str); + // perfetto::TrackEvent::SetTrackDescriptor(stream_track_it->second, stream_desc); + // track_ids_used_.emplace_back(stream_track_id); + // } + // } + // auto& stream_track = stream_track_it->second; rocprofiler_timestamp_t timestamp; rocprofiler_get_timestamp(×tamp); + std::string::size_type pos = std::string::npos; if (tracer_record.api_data_handle.handle && tracer_record.api_data_handle.size > 1) { kernel_name = rocprofiler::cxx_demangle( strdup(reinterpret_cast(tracer_record.api_data_handle.handle))); TRACE_EVENT_BEGIN( "HIP_OPS", perfetto::StaticString(strdup(rocprofiler::truncate_name(kernel_name).c_str())), - stream_track, tracer_record.timestamps.begin.value, "Agent ID", + gpu_track, tracer_record.timestamps.begin.value, "Agent ID", tracer_record.agent_id.handle, "Process ID", GetPid(), "Kernel Name", kernel_name, perfetto::Flow::ProcessScoped(tracer_record.correlation_id.value)); } else { @@ -636,49 +611,65 @@ class perfetto_plugin_t { } else { activity_name = const_cast(std::string("N/A").c_str()); } - if (tracer_record.phase == ROCPROFILER_PHASE_NONE) - TRACE_EVENT_BEGIN("HIP_OPS", perfetto::StaticString(activity_name), stream_track, - tracer_record.timestamps.begin.value, "Agent ID", - tracer_record.agent_id.handle, "Process ID", GetPid(), - perfetto::Flow::ProcessScoped(tracer_record.correlation_id.value)); - else if (tracer_record.phase == ROCPROFILER_PHASE_ENTER) - TRACE_EVENT_BEGIN("HIP_OPS", perfetto::StaticString(activity_name), stream_track, - timestamp.value, "Agent ID", tracer_record.agent_id.handle, - "Process ID", GetPid(), - perfetto::Flow::ProcessScoped(tracer_record.correlation_id.value)); + pos = std::string(activity_name).find("Copy"); + if (tracer_record.phase == ROCPROFILER_PHASE_NONE) { + if (std::string::npos == pos) + TRACE_EVENT_BEGIN("HIP_OPS", perfetto::StaticString(activity_name), gpu_track, + tracer_record.timestamps.begin.value, "Process ID", GetPid(), + perfetto::Flow::ProcessScoped(tracer_record.correlation_id.value)); + else + TRACE_EVENT_BEGIN("MEM_COPIES", perfetto::StaticString(activity_name), + mem_copies_track_.value(), tracer_record.timestamps.begin.value, + "Process ID", GetPid(), + perfetto::Flow::ProcessScoped(tracer_record.correlation_id.value)); + } else if (tracer_record.phase == ROCPROFILER_PHASE_ENTER) { + if (std::string::npos == pos) + TRACE_EVENT_BEGIN("HIP_OPS", perfetto::StaticString(activity_name), gpu_track, + timestamp.value, "Process ID", GetPid(), + perfetto::Flow::ProcessScoped(tracer_record.correlation_id.value)); + else + TRACE_EVENT_BEGIN("MEM_COPIES", perfetto::StaticString(activity_name), + mem_copies_track_.value(), timestamp.value, "Process ID", GetPid(), + perfetto::Flow::ProcessScoped(tracer_record.correlation_id.value)); + } + } + if (tracer_record.phase == ROCPROFILER_PHASE_NONE) { + if (std::string::npos == pos) + TRACE_EVENT_END("HIP_OPS", gpu_track, tracer_record.timestamps.end.value); + else + TRACE_EVENT_END("MEM_COPIES", mem_copies_track_.value(), + tracer_record.timestamps.end.value); + } else if (tracer_record.phase == ROCPROFILER_PHASE_EXIT) { + if (std::string::npos == pos) + TRACE_EVENT_END("HIP_OPS", gpu_track, timestamp.value); + else + TRACE_EVENT_END("MEM_COPIES", mem_copies_track_.value(), timestamp.value); } - if (tracer_record.phase == ROCPROFILER_PHASE_NONE) - TRACE_EVENT_END("HIP_OPS", stream_track, tracer_record.timestamps.end.value); - else if (tracer_record.phase == ROCPROFILER_PHASE_EXIT) - TRACE_EVENT_END("HIP_OPS", stream_track, timestamp.value); break; } case ACTIVITY_DOMAIN_HSA_OPS: { - std::pair gpu_queue_id = - std::make_pair(tracer_record.agent_id.handle, tracer_record.queue_id.handle); - std::unordered_map::iterator queue_track_it; - { - std::lock_guard lock(queue_tracks_lock_); - queue_track_it = queue_tracks_.find(gpu_queue_id.first); - if (queue_track_it == queue_tracks_.end()) { - /* Create a new perfetto::Track */ - uint64_t track_id = - ((1 + tracer_record.queue_id.handle + tracer_record.agent_id.handle) * machine_id * - QUEUE_CONSTANT * GetPid()); - queue_track_it = - queue_tracks_.emplace(gpu_queue_id.first, perfetto::Track(track_id, gpu_track)) - .first; + // std::pair gpu_queue_id = + // std::make_pair(tracer_record.agent_id.handle, tracer_record.queue_id.handle); + // std::unordered_map::iterator queue_track_it; + // { + // std::lock_guard lock(queue_tracks_lock_); + // uint64_t queue_track_id = (tracer_record.queue_id.handle + 2) * + // (tracer_record.agent_id.handle + 2) * (machine_id_ + 2); + // queue_track_it = queue_tracks_.find(queue_track_id); + // if (queue_track_it == queue_tracks_.end()) { + // /* Create a new perfetto::Track */ + // queue_track_it = + // queue_tracks_.emplace(queue_track_id, perfetto::Track(queue_track_id, gpu_track)) + // .first; - auto queue_desc = queue_track_it->second.Serialize(); - std::string queue_str = rocprofiler::string_printf("Process ID: %lu Queue %ld", GetPid(), - gpu_queue_id.second); - queue_desc.set_name(queue_str); - perfetto::TrackEvent::SetTrackDescriptor(queue_track_it->second, queue_desc); - } - track_ids_used_.emplace_back(tracer_record.queue_id.handle + machine_id + 1 + - tracer_record.agent_id.handle); - } - auto& queue_track = queue_track_it->second; + // auto queue_desc = queue_track_it->second.Serialize(); + // std::string queue_str = rocprofiler::string_printf("Queue %ld", gpu_queue_id.second); + // queue_desc.set_name(queue_str); + // perfetto::TrackEvent::SetTrackDescriptor(queue_track_it->second, queue_desc); + // } + // track_ids_used_.emplace_back(queue_track_id); + // } + // auto& queue_track = queue_track_it->second; size_t activity_name_size = 0; CHECK_ROCPROFILER(rocprofiler_query_hsa_tracer_api_data_info_size( session_id, ROCPROFILER_HSA_ACTIVITY_NAME, tracer_record.api_data_handle, @@ -689,12 +680,12 @@ class perfetto_plugin_t { session_id, ROCPROFILER_HSA_ACTIVITY_NAME, tracer_record.api_data_handle, tracer_record.operation_id, &activity_name)); } - TRACE_EVENT_BEGIN("HSA_OPS", perfetto::StaticString(activity_name), queue_track, - tracer_record.timestamps.begin.value, "Agent ID", - tracer_record.agent_id.handle, "Queue ID", tracer_record.queue_id.handle, + TRACE_EVENT_BEGIN("MEM_COPIES", perfetto::StaticString(activity_name), + mem_copies_track_.value(), tracer_record.timestamps.begin.value, "Process ID", GetPid(), perfetto::Flow::ProcessScoped(tracer_record.correlation_id.value)); - TRACE_EVENT_END("HSA_OPS", queue_track, tracer_record.timestamps.end.value); + TRACE_EVENT_END("MEM_COPIES", mem_copies_track_.value(), + tracer_record.timestamps.end.value); break; } default: { @@ -743,6 +734,7 @@ class perfetto_plugin_t { bool bIsMPI = false; int MPI_rank = 0; size_t roctx_track_entries_{0}; + std::optional mem_copies_track_; // Correlate stream id(s) with correlation id(s) to identify the stream id of every HIP activity std::unordered_map stream_ids_; @@ -766,7 +758,7 @@ class perfetto_plugin_t { stream_tracks_lock_, counter_tracks_lock_; char hostname_[1024]; - uint64_t machine_id; + uint64_t machine_id_; std::ofstream stream_; }; diff --git a/projects/rocprofiler/plugin/perfetto/perfetto_sdk/sdk/perfetto.cc b/projects/rocprofiler/plugin/perfetto/perfetto_sdk/sdk/perfetto.cc index 35ecdd6c94..9a07ce4a35 100644 --- a/projects/rocprofiler/plugin/perfetto/perfetto_sdk/sdk/perfetto.cc +++ b/projects/rocprofiler/plugin/perfetto/perfetto_sdk/sdk/perfetto.cc @@ -19,6 +19,81 @@ #define PERFETTO_IMPLEMENTATION #endif #include "perfetto.h" +// gen_amalgamated begin source: src/base/default_platform.cc +// gen_amalgamated begin header: include/perfetto/ext/base/platform.h +/* + * Copyright (C) 2023 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef INCLUDE_PERFETTO_EXT_BASE_PLATFORM_H_ +#define INCLUDE_PERFETTO_EXT_BASE_PLATFORM_H_ + +namespace perfetto { +namespace base { +namespace platform { + +// Executed before entering a syscall (e.g. poll, read, write etc) which might +// block. +// This is overridden in Google internal builds for dealing with userspace +// scheduling. +void BeforeMaybeBlockingSyscall(); + +// Executed after entering a syscall (e.g. poll, read, write etc) which might +// block. +// This is overridden in Google internal builds for dealing with userspace +// scheduling. +void AfterMaybeBlockingSyscall(); + +} // namespace platform +} // namespace base +} // namespace perfetto + +#endif // INCLUDE_PERFETTO_EXT_BASE_PLATFORM_H_ +/* + * Copyright (C) 2023 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// gen_amalgamated expanded: #include "perfetto/ext/base/platform.h" + +namespace perfetto { +namespace base { +namespace platform { + +// This is a no-op outside of Google3 where we have some custom logic to deal +// with the userspace scheduler. +void BeforeMaybeBlockingSyscall() {} + +// This is a no-op outside of Google3 where we have some custom logic to deal +// with the userspace scheduler. +void AfterMaybeBlockingSyscall() {} + +} // namespace platform +} // namespace base +} // namespace perfetto // gen_amalgamated begin source: src/base/android_utils.cc // gen_amalgamated begin header: include/perfetto/ext/base/android_utils.h /* @@ -124,905 +199,6 @@ std::string GetAndroidProp(const char* name) { } // namespace perfetto // gen_amalgamated begin source: src/base/base64.cc // gen_amalgamated begin header: include/perfetto/ext/base/base64.h -// gen_amalgamated begin header: include/perfetto/ext/base/optional.h -/* - * Copyright (C) 2018 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef INCLUDE_PERFETTO_EXT_BASE_OPTIONAL_H_ -#define INCLUDE_PERFETTO_EXT_BASE_OPTIONAL_H_ - -#include -#include -#include - -// gen_amalgamated expanded: #include "perfetto/base/logging.h" - -namespace perfetto { -namespace base { - -// Specification: -// http://en.cppreference.com/w/cpp/utility/optional/in_place_t -struct in_place_t {}; - -// Specification: -// http://en.cppreference.com/w/cpp/utility/optional/nullopt_t -struct nullopt_t { - constexpr explicit nullopt_t(int) {} -}; - -// Specification: -// http://en.cppreference.com/w/cpp/utility/optional/in_place -constexpr in_place_t in_place = {}; - -// Specification: -// http://en.cppreference.com/w/cpp/utility/optional/nullopt -constexpr nullopt_t nullopt(0); - -// Forward declaration, which is referred by following helpers. -template -class Optional; - -namespace internal { - -template ::value> -struct OptionalStorageBase { - // Initializing |empty_| here instead of using default member initializing - // to avoid errors in g++ 4.8. - constexpr OptionalStorageBase() : empty_('\0') {} - - template - constexpr explicit OptionalStorageBase(in_place_t, Args&&... args) - : is_populated_(true), value_(std::forward(args)...) {} - - // When T is not trivially destructible we must call its - // destructor before deallocating its memory. - // Note that this hides the (implicitly declared) move constructor, which - // would be used for constexpr move constructor in OptionalStorage. - // It is needed iff T is trivially move constructible. However, the current - // is_trivially_{copy,move}_constructible implementation requires - // is_trivially_destructible (which looks a bug, cf: - // https://gcc.gnu.org/bugzilla/show_bug.cgi?id=51452 and - // http://cplusplus.github.io/LWG/lwg-active.html#2116), so it is not - // necessary for this case at the moment. Please see also the destructor - // comment in "is_trivially_destructible = true" specialization below. - ~OptionalStorageBase() { - if (is_populated_) - value_.~T(); - } - - template - void Init(Args&&... args) { - PERFETTO_DCHECK(!is_populated_); - ::new (&value_) T(std::forward(args)...); - is_populated_ = true; - } - - bool is_populated_ = false; - union { - // |empty_| exists so that the union will always be initialized, even when - // it doesn't contain a value. Union members must be initialized for the - // constructor to be 'constexpr'. - char empty_; - T value_; - }; -}; - -template -struct OptionalStorageBase { - // Initializing |empty_| here instead of using default member initializing - // to avoid errors in g++ 4.8. - constexpr OptionalStorageBase() : empty_('\0') {} - - template - constexpr explicit OptionalStorageBase(in_place_t, Args&&... args) - : is_populated_(true), value_(std::forward(args)...) {} - - // When T is trivially destructible (i.e. its destructor does nothing) there - // is no need to call it. Implicitly defined destructor is trivial, because - // both members (bool and union containing only variants which are trivially - // destructible) are trivially destructible. - // Explicitly-defaulted destructor is also trivial, but do not use it here, - // because it hides the implicit move constructor. It is needed to implement - // constexpr move constructor in OptionalStorage iff T is trivially move - // constructible. Note that, if T is trivially move constructible, the move - // constructor of OptionalStorageBase is also implicitly defined and it is - // trivially move constructor. If T is not trivially move constructible, - // "not declaring move constructor without destructor declaration" here means - // "delete move constructor", which works because any move constructor of - // OptionalStorage will not refer to it in that case. - - template - void Init(Args&&... args) { - PERFETTO_DCHECK(!is_populated_); - ::new (&value_) T(std::forward(args)...); - is_populated_ = true; - } - - bool is_populated_ = false; - union { - // |empty_| exists so that the union will always be initialized, even when - // it doesn't contain a value. Union members must be initialized for the - // constructor to be 'constexpr'. - char empty_; - T value_; - }; -}; - -// Implement conditional constexpr copy and move constructors. These are -// constexpr if is_trivially_{copy,move}_constructible::value is true -// respectively. If each is true, the corresponding constructor is defined as -// "= default;", which generates a constexpr constructor (In this case, -// the condition of constexpr-ness is satisfied because the base class also has -// compiler generated constexpr {copy,move} constructors). Note that -// placement-new is prohibited in constexpr. -template ::value> -struct OptionalStorage : OptionalStorageBase { - // This is no trivially {copy,move} constructible case. Other cases are - // defined below as specializations. - - // Accessing the members of template base class requires explicit - // declaration. - using OptionalStorageBase::is_populated_; - using OptionalStorageBase::value_; - using OptionalStorageBase::Init; - - // Inherit constructors (specifically, the in_place constructor). - using OptionalStorageBase::OptionalStorageBase; - - // User defined constructor deletes the default constructor. - // Define it explicitly. - OptionalStorage() = default; - - OptionalStorage(const OptionalStorage& other) : OptionalStorageBase() { - if (other.is_populated_) - Init(other.value_); - } - - OptionalStorage(OptionalStorage&& other) noexcept( - std::is_nothrow_move_constructible::value) { - if (other.is_populated_) - Init(std::move(other.value_)); - } -}; - -template -struct OptionalStorage - : OptionalStorageBase { - using OptionalStorageBase::is_populated_; - using OptionalStorageBase::value_; - using OptionalStorageBase::Init; - using OptionalStorageBase::OptionalStorageBase; - - OptionalStorage() = default; - OptionalStorage(const OptionalStorage& other) = default; - - OptionalStorage(OptionalStorage&& other) noexcept( - std::is_nothrow_move_constructible::value) { - if (other.is_populated_) - Init(std::move(other.value_)); - } -}; - -// Base class to support conditionally usable copy-/move- constructors -// and assign operators. -template -class OptionalBase { - // This class provides implementation rather than public API, so everything - // should be hidden. Often we use composition, but we cannot in this case - // because of C++ language restriction. - protected: - constexpr OptionalBase() = default; - constexpr OptionalBase(const OptionalBase& other) = default; - constexpr OptionalBase(OptionalBase&& other) = default; - - template - constexpr explicit OptionalBase(in_place_t, Args&&... args) - : storage_(in_place, std::forward(args)...) {} - - // Implementation of converting constructors. - template - explicit OptionalBase(const OptionalBase& other) { - if (other.storage_.is_populated_) - storage_.Init(other.storage_.value_); - } - - template - explicit OptionalBase(OptionalBase&& other) { - if (other.storage_.is_populated_) - storage_.Init(std::move(other.storage_.value_)); - } - - ~OptionalBase() = default; - - OptionalBase& operator=(const OptionalBase& other) { - CopyAssign(other); - return *this; - } - - OptionalBase& operator=(OptionalBase&& other) noexcept( - std::is_nothrow_move_assignable::value&& - std::is_nothrow_move_constructible::value) { - MoveAssign(std::move(other)); - return *this; - } - - template - void CopyAssign(const OptionalBase& other) { - if (other.storage_.is_populated_) - InitOrAssign(other.storage_.value_); - else - FreeIfNeeded(); - } - - template - void MoveAssign(OptionalBase&& other) { - if (other.storage_.is_populated_) - InitOrAssign(std::move(other.storage_.value_)); - else - FreeIfNeeded(); - } - - template - void InitOrAssign(U&& value) { - if (storage_.is_populated_) - storage_.value_ = std::forward(value); - else - storage_.Init(std::forward(value)); - } - - void FreeIfNeeded() { - if (!storage_.is_populated_) - return; - storage_.value_.~T(); - storage_.is_populated_ = false; - } - - // For implementing conversion, allow access to other typed OptionalBase - // class. - template - friend class OptionalBase; - - OptionalStorage storage_; -}; - -// The following {Copy,Move}{Constructible,Assignable} structs are helpers to -// implement constructor/assign-operator overloading. Specifically, if T is -// is not movable but copyable, Optional's move constructor should not -// participate in overload resolution. This inheritance trick implements that. -template -struct CopyConstructible {}; - -template <> -struct CopyConstructible { - constexpr CopyConstructible() = default; - constexpr CopyConstructible(const CopyConstructible&) = delete; - constexpr CopyConstructible(CopyConstructible&&) = default; - CopyConstructible& operator=(const CopyConstructible&) = default; - CopyConstructible& operator=(CopyConstructible&&) = default; -}; - -template -struct MoveConstructible {}; - -template <> -struct MoveConstructible { - constexpr MoveConstructible() = default; - constexpr MoveConstructible(const MoveConstructible&) = default; - constexpr MoveConstructible(MoveConstructible&&) = delete; - MoveConstructible& operator=(const MoveConstructible&) = default; - MoveConstructible& operator=(MoveConstructible&&) = default; -}; - -template -struct CopyAssignable {}; - -template <> -struct CopyAssignable { - constexpr CopyAssignable() = default; - constexpr CopyAssignable(const CopyAssignable&) = default; - constexpr CopyAssignable(CopyAssignable&&) = default; - CopyAssignable& operator=(const CopyAssignable&) = delete; - CopyAssignable& operator=(CopyAssignable&&) = default; -}; - -template -struct MoveAssignable {}; - -template <> -struct MoveAssignable { - constexpr MoveAssignable() = default; - constexpr MoveAssignable(const MoveAssignable&) = default; - constexpr MoveAssignable(MoveAssignable&&) = default; - MoveAssignable& operator=(const MoveAssignable&) = default; - MoveAssignable& operator=(MoveAssignable&&) = delete; -}; - -// Helper to conditionally enable converting constructors and assign operators. -template -struct IsConvertibleFromOptional - : std::integral_constant< - bool, - std::is_constructible&>::value || - std::is_constructible&>::value || - std::is_constructible&&>::value || - std::is_constructible&&>::value || - std::is_convertible&, T>::value || - std::is_convertible&, T>::value || - std::is_convertible&&, T>::value || - std::is_convertible&&, T>::value> {}; - -template -struct IsAssignableFromOptional - : std::integral_constant< - bool, - IsConvertibleFromOptional::value || - std::is_assignable&>::value || - std::is_assignable&>::value || - std::is_assignable&&>::value || - std::is_assignable&&>::value> {}; - -// Forward compatibility for C++17. -// Introduce one more deeper nested namespace to avoid leaking using std::swap. -namespace swappable_impl { -using std::swap; - -struct IsSwappableImpl { - // Tests if swap can be called. Check(0) returns true_type iff swap is - // available for T. Otherwise, Check's overload resolution falls back to - // Check(...) declared below thanks to SFINAE, so returns false_type. - template - static auto Check(int) - -> decltype(swap(std::declval(), std::declval()), std::true_type()); - - template - static std::false_type Check(...); -}; -} // namespace swappable_impl - -template -struct IsSwappable : decltype(swappable_impl::IsSwappableImpl::Check(0)) {}; - -// Forward compatibility for C++20. -template -using RemoveCvRefT = - typename std::remove_cv::type>::type; - -} // namespace internal - -// On Windows, by default, empty-base class optimization does not work, -// which means even if the base class is empty struct, it still consumes one -// byte for its body. __declspec(empty_bases) enables the optimization. -// cf) -// https://blogs.msdn.microsoft.com/vcblog/2016/03/30/optimizing-the-layout-of-empty-base-classes-in-vs2015-update-2-3/ -#if PERFETTO_BUILDFLAG(PERFETTO_OS_WIN) && \ - !PERFETTO_BUILDFLAG(PERFETTO_COMPILER_GCC) -#define OPTIONAL_DECLSPEC_EMPTY_BASES __declspec(empty_bases) -#else -#define OPTIONAL_DECLSPEC_EMPTY_BASES -#endif - -// base::Optional is a Chromium version of the C++17 optional class: -// std::optional documentation: -// http://en.cppreference.com/w/cpp/utility/optional -// Chromium documentation: -// https://chromium.googlesource.com/chromium/src/+/master/docs/optional.md -// -// These are the differences between the specification and the implementation: -// - Constructors do not use 'constexpr' as it is a C++14 extension. -// - 'constexpr' might be missing in some places for reasons specified locally. -// - No exceptions are thrown, because they are banned from Chromium. -// Marked noexcept for only move constructor and move assign operators. -// - All the non-members are in the 'base' namespace instead of 'std'. -// -// Note that T cannot have a constructor T(Optional) etc. Optional -// PERFETTO_CHECKs T's constructor (specifically via IsConvertibleFromOptional), -// and in the PERFETTO_CHECK whether T can be constructible from Optional, -// which is recursive so it does not work. As of Feb 2018, std::optional C++17 -// implementation in both clang and gcc has same limitation. MSVC SFINAE looks -// to have different behavior, but anyway it reports an error, too. -// -// This file is a modified version of optional.h from Chromium at revision -// 5e71bd454e60511c1293c0c686544aaa76094424. The changes remove C++14/C++17 -// specific code and replace with C++11 counterparts. -template -class OPTIONAL_DECLSPEC_EMPTY_BASES Optional - : public internal::OptionalBase, - public internal::CopyConstructible::value>, - public internal::MoveConstructible::value>, - public internal::CopyAssignable::value && - std::is_copy_assignable::value>, - public internal::MoveAssignable::value && - std::is_move_assignable::value> { - public: -#undef OPTIONAL_DECLSPEC_EMPTY_BASES - using value_type = T; - - // Defer default/copy/move constructor implementation to OptionalBase. - constexpr Optional() = default; - constexpr Optional(const Optional& other) = default; - constexpr Optional(Optional&& other) noexcept( - std::is_nothrow_move_constructible::value) = default; - - constexpr Optional(nullopt_t) {} // NOLINT(runtime/explicit) - - // Converting copy constructor. "explicit" only if - // std::is_convertible::value is false. It is implemented by - // declaring two almost same constructors, but that condition in enable_if_t - // is different, so that either one is chosen, thanks to SFINAE. - template ::value && - !internal::IsConvertibleFromOptional::value && - std::is_convertible::value, - bool>::type = false> - Optional(const Optional& other) : internal::OptionalBase(other) {} - - template ::value && - !internal::IsConvertibleFromOptional::value && - !std::is_convertible::value, - bool>::type = false> - explicit Optional(const Optional& other) - : internal::OptionalBase(other) {} - - // Converting move constructor. Similar to converting copy constructor, - // declaring two (explicit and non-explicit) constructors. - template ::value && - !internal::IsConvertibleFromOptional::value && - std::is_convertible::value, - bool>::type = false> - Optional(Optional&& other) : internal::OptionalBase(std::move(other)) {} - - template ::value && - !internal::IsConvertibleFromOptional::value && - !std::is_convertible::value, - bool>::type = false> - explicit Optional(Optional&& other) - : internal::OptionalBase(std::move(other)) {} - - template - constexpr explicit Optional(in_place_t, Args&&... args) - : internal::OptionalBase(in_place, std::forward(args)...) {} - - template &, - Args...>::value>::type> - constexpr explicit Optional(in_place_t, - std::initializer_list il, - Args&&... args) - : internal::OptionalBase(in_place, il, std::forward(args)...) {} - - // Forward value constructor. Similar to converting constructors, - // conditionally explicit. - template < - typename U = value_type, - typename std::enable_if< - std::is_constructible::value && - !std::is_same, in_place_t>::value && - !std::is_same, Optional>::value && - std::is_convertible::value, - bool>::type = false> - constexpr Optional(U&& value) - : internal::OptionalBase(in_place, std::forward(value)) {} - - template < - typename U = value_type, - typename std::enable_if< - std::is_constructible::value && - !std::is_same, in_place_t>::value && - !std::is_same, Optional>::value && - !std::is_convertible::value, - bool>::type = false> - constexpr explicit Optional(U&& value) - : internal::OptionalBase(in_place, std::forward(value)) {} - - ~Optional() = default; - - // Defer copy-/move- assign operator implementation to OptionalBase. - Optional& operator=(const Optional& other) = default; - Optional& operator=(Optional&& other) noexcept( - std::is_nothrow_move_assignable::value&& - std::is_nothrow_move_constructible::value) = default; - - Optional& operator=(nullopt_t) { - FreeIfNeeded(); - return *this; - } - - // Perfect-forwarded assignment. - template - typename std::enable_if< - !std::is_same, Optional>::value && - std::is_constructible::value && - std::is_assignable::value && - (!std::is_scalar::value || - !std::is_same::type, T>::value), - Optional&>::type - operator=(U&& value) { - InitOrAssign(std::forward(value)); - return *this; - } - - // Copy assign the state of other. - template - typename std::enable_if::value && - std::is_constructible::value && - std::is_assignable::value, - Optional&>::type - operator=(const Optional& other) { - CopyAssign(other); - return *this; - } - - // Move assign the state of other. - template - typename std::enable_if::value && - std::is_constructible::value && - std::is_assignable::value, - Optional&>::type - operator=(Optional&& other) { - MoveAssign(std::move(other)); - return *this; - } - - const T* operator->() const { - PERFETTO_DCHECK(storage_.is_populated_); - return &storage_.value_; - } - - T* operator->() { - PERFETTO_DCHECK(storage_.is_populated_); - return &storage_.value_; - } - - const T& operator*() const& { - PERFETTO_DCHECK(storage_.is_populated_); - return storage_.value_; - } - - T& operator*() & { - PERFETTO_DCHECK(storage_.is_populated_); - return storage_.value_; - } - - const T&& operator*() const&& { - PERFETTO_DCHECK(storage_.is_populated_); - return std::move(storage_.value_); - } - - T&& operator*() && { - PERFETTO_DCHECK(storage_.is_populated_); - return std::move(storage_.value_); - } - - constexpr explicit operator bool() const { return storage_.is_populated_; } - - constexpr bool has_value() const { return storage_.is_populated_; } - - T& value() & { - PERFETTO_CHECK(storage_.is_populated_); - return storage_.value_; - } - - const T& value() const& { - PERFETTO_CHECK(storage_.is_populated_); - return storage_.value_; - } - - T&& value() && { - PERFETTO_CHECK(storage_.is_populated_); - return std::move(storage_.value_); - } - - const T&& value() const&& { - PERFETTO_CHECK(storage_.is_populated_); - return std::move(storage_.value_); - } - - template - constexpr T value_or(U&& default_value) const& { - static_assert(std::is_convertible::value, - "U must be convertible to T"); - return storage_.is_populated_ - ? storage_.value_ - : static_cast(std::forward(default_value)); - } - - template - T value_or(U&& default_value) && { - static_assert(std::is_convertible::value, - "U must be convertible to T"); - return storage_.is_populated_ - ? std::move(storage_.value_) - : static_cast(std::forward(default_value)); - } - - void swap(Optional& other) { - if (!storage_.is_populated_ && !other.storage_.is_populated_) - return; - - if (storage_.is_populated_ != other.storage_.is_populated_) { - if (storage_.is_populated_) { - other.storage_.Init(std::move(storage_.value_)); - FreeIfNeeded(); - } else { - storage_.Init(std::move(other.storage_.value_)); - other.FreeIfNeeded(); - } - return; - } - - PERFETTO_DCHECK(storage_.is_populated_ && other.storage_.is_populated_); - using std::swap; - swap(**this, *other); - } - - void reset() { FreeIfNeeded(); } - - template - T& emplace(Args&&... args) { - FreeIfNeeded(); - storage_.Init(std::forward(args)...); - return storage_.value_; - } - - template - typename std::enable_if< - std::is_constructible&, Args&&...>::value, - T&>::type - emplace(std::initializer_list il, Args&&... args) { - FreeIfNeeded(); - storage_.Init(il, std::forward(args)...); - return storage_.value_; - } - - private: - // Accessing template base class's protected member needs explicit - // declaration to do so. - using internal::OptionalBase::CopyAssign; - using internal::OptionalBase::FreeIfNeeded; - using internal::OptionalBase::InitOrAssign; - using internal::OptionalBase::MoveAssign; - using internal::OptionalBase::storage_; -}; - -// Here after defines comparation operators. The definition follows -// http://en.cppreference.com/w/cpp/utility/optional/operator_cmp -// while bool() casting is replaced by has_value() to meet the chromium -// style guide. -template -bool operator==(const Optional& lhs, const Optional& rhs) { - if (lhs.has_value() != rhs.has_value()) - return false; - if (!lhs.has_value()) - return true; - return *lhs == *rhs; -} - -template -bool operator!=(const Optional& lhs, const Optional& rhs) { - if (lhs.has_value() != rhs.has_value()) - return true; - if (!lhs.has_value()) - return false; - return *lhs != *rhs; -} - -template -bool operator<(const Optional& lhs, const Optional& rhs) { - if (!rhs.has_value()) - return false; - if (!lhs.has_value()) - return true; - return *lhs < *rhs; -} - -template -bool operator<=(const Optional& lhs, const Optional& rhs) { - if (!lhs.has_value()) - return true; - if (!rhs.has_value()) - return false; - return *lhs <= *rhs; -} - -template -bool operator>(const Optional& lhs, const Optional& rhs) { - if (!lhs.has_value()) - return false; - if (!rhs.has_value()) - return true; - return *lhs > *rhs; -} - -template -bool operator>=(const Optional& lhs, const Optional& rhs) { - if (!rhs.has_value()) - return true; - if (!lhs.has_value()) - return false; - return *lhs >= *rhs; -} - -template -constexpr bool operator==(const Optional& opt, nullopt_t) { - return !opt; -} - -template -constexpr bool operator==(nullopt_t, const Optional& opt) { - return !opt; -} - -template -constexpr bool operator!=(const Optional& opt, nullopt_t) { - return opt.has_value(); -} - -template -constexpr bool operator!=(nullopt_t, const Optional& opt) { - return opt.has_value(); -} - -template -constexpr bool operator<(const Optional&, nullopt_t) { - return false; -} - -template -constexpr bool operator<(nullopt_t, const Optional& opt) { - return opt.has_value(); -} - -template -constexpr bool operator<=(const Optional& opt, nullopt_t) { - return !opt; -} - -template -constexpr bool operator<=(nullopt_t, const Optional&) { - return true; -} - -template -constexpr bool operator>(const Optional& opt, nullopt_t) { - return opt.has_value(); -} - -template -constexpr bool operator>(nullopt_t, const Optional&) { - return false; -} - -template -constexpr bool operator>=(const Optional&, nullopt_t) { - return true; -} - -template -constexpr bool operator>=(nullopt_t, const Optional& opt) { - return !opt; -} - -template -constexpr bool operator==(const Optional& opt, const U& value) { - return opt.has_value() ? *opt == value : false; -} - -template -constexpr bool operator==(const U& value, const Optional& opt) { - return opt.has_value() ? value == *opt : false; -} - -template -constexpr bool operator!=(const Optional& opt, const U& value) { - return opt.has_value() ? *opt != value : true; -} - -template -constexpr bool operator!=(const U& value, const Optional& opt) { - return opt.has_value() ? value != *opt : true; -} - -template -constexpr bool operator<(const Optional& opt, const U& value) { - return opt.has_value() ? *opt < value : true; -} - -template -constexpr bool operator<(const U& value, const Optional& opt) { - return opt.has_value() ? value < *opt : false; -} - -template -constexpr bool operator<=(const Optional& opt, const U& value) { - return opt.has_value() ? *opt <= value : true; -} - -template -constexpr bool operator<=(const U& value, const Optional& opt) { - return opt.has_value() ? value <= *opt : false; -} - -template -constexpr bool operator>(const Optional& opt, const U& value) { - return opt.has_value() ? *opt > value : false; -} - -template -constexpr bool operator>(const U& value, const Optional& opt) { - return opt.has_value() ? value > *opt : true; -} - -template -constexpr bool operator>=(const Optional& opt, const U& value) { - return opt.has_value() ? *opt >= value : false; -} - -template -constexpr bool operator>=(const U& value, const Optional& opt) { - return opt.has_value() ? value >= *opt : true; -} - -template -constexpr Optional::type> make_optional(T&& value) { - return Optional::type>(std::forward(value)); -} - -template -constexpr Optional make_optional(Args&&... args) { - return Optional(in_place, std::forward(args)...); -} - -template -constexpr Optional make_optional(std::initializer_list il, - Args&&... args) { - return Optional(in_place, il, std::forward(args)...); -} - -// Partial specialization for a function template is not allowed. Also, it is -// not allowed to add overload function to std namespace, while it is allowed -// to specialize the template in std. Thus, swap() (kind of) overloading is -// defined in base namespace, instead. -template -typename std::enable_if::value && - internal::IsSwappable::value>::type -swap(Optional& lhs, Optional& rhs) { - lhs.swap(rhs); -} - -} // namespace base -} // namespace perfetto - -template -struct std::hash> { - size_t operator()(const perfetto::base::Optional& opt) const { - return opt == perfetto::base::nullopt ? 0 : std::hash()(*opt); - } -}; - -#endif // INCLUDE_PERFETTO_EXT_BASE_OPTIONAL_H_ // gen_amalgamated begin header: include/perfetto/ext/base/string_view.h // gen_amalgamated begin header: include/perfetto/ext/base/hash.h /* @@ -1046,6 +222,7 @@ struct std::hash> { #include #include +#include #include #include @@ -1056,10 +233,10 @@ namespace base { // The algorithm used is FNV-1a as it is fast and easy to implement and has // relatively few collisions. // WARNING: This hash function should not be used for any cryptographic purpose. -class Hash { +class Hasher { public: // Creates an empty hash object - Hash() {} + Hasher() {} // Hashes a numeric value. template < @@ -1086,13 +263,22 @@ class Hash { } } + // Allow hashing anything that has a |data| field, a |size| field, + // and has the kHashable trait (e.g., base::StringView). + template > + void Update(const T& t) { + Update(t.data(), t.size()); + } + + void Update(const std::string& s) { Update(s.data(), s.size()); } + uint64_t digest() const { return result_; } // Usage: // uint64_t hashed_value = Hash::Combine(33, false, "ABC", 458L, 3u, 'x'); template static uint64_t Combine(Ts&&... args) { - Hash hasher; + Hasher hasher; hasher.UpdateAll(std::forward(args)...); return hasher.digest(); } @@ -1122,6 +308,32 @@ struct AlreadyHashed { size_t operator()(const T& x) const { return static_cast(x); } }; +// base::Hash uses base::Hasher for integer values and falls base to std::hash +// for other types. This is needed as std::hash for integers is just the +// identity function and Perfetto uses open-addressing hash table, which are +// very sensitive to hash quality and are known to degrade in performance +// when using std::hash. +template +struct Hash { + // Version for ints, using base::Hasher. + template + auto operator()(const U& x) -> + typename std::enable_if::value, size_t>::type + const { + Hasher hash; + hash.Update(x); + return static_cast(hash.digest()); + } + + // Version for non-ints, falling back to std::hash. + template + auto operator()(const U& x) -> + typename std::enable_if::value, size_t>::type + const { + return std::hash()(x); + } +}; + } // namespace base } // namespace perfetto @@ -1161,6 +373,8 @@ namespace base { // Strings are internally NOT null terminated. class StringView { public: + // Allow hashing with base::Hash. + static constexpr bool kHashable = true; static constexpr size_t npos = static_cast(-1); StringView() : data_(nullptr), size_(0) {} @@ -1246,18 +460,25 @@ class StringView { #endif } - bool StartsWith(const StringView& other) { + bool StartsWith(const StringView& other) const { if (other.size() == 0) return true; if (size() == 0) return false; if (other.size() > size()) return false; - for (uint32_t i = 0; i < other.size(); ++i) { - if (at(i) != other.at(i)) - return false; - } - return true; + return memcmp(data(), other.data(), other.size()) == 0; + } + + bool EndsWith(const StringView& other) const { + if (other.size() == 0) + return true; + if (size() == 0) + return false; + if (other.size() > size()) + return false; + size_t off = size() - other.size(); + return memcmp(data() + off, other.data(), other.size()) == 0; } std::string ToStdString() const { @@ -1265,7 +486,7 @@ class StringView { } uint64_t Hash() const { - base::Hash hasher; + base::Hasher hasher; hasher.Update(data_, size_); return hasher.digest(); } @@ -1436,9 +657,9 @@ constexpr size_t kPageSize = 4096; // similar mm-related syscalls. uint32_t GetSysPageSize(); -template -constexpr size_t ArraySize(const T& array) { - return sizeof(array) / sizeof(array[0]); +template +constexpr size_t ArraySize(const T (&)[TSize]) { + return TSize; } // Function object which invokes 'free' on its parameter, which must be @@ -1472,6 +693,9 @@ inline bool IsAgain(int err) { // setenv(2)-equivalent. Deals with Windows vs Posix discrepancies. void SetEnv(const std::string& key, const std::string& value); +// unsetenv(2)-equivalent. Deals with Windows vs Posix discrepancies. +void UnsetEnv(const std::string& key); + // Calls mallopt(M_PURGE, 0) on Android. Does nothing on other platforms. // This forces the allocator to release freed memory. This is used to work // around various Scudo inefficiencies. See b/170217718. @@ -1574,9 +798,9 @@ inline std::string HexDump(const std::string& data, #ifndef INCLUDE_PERFETTO_EXT_BASE_BASE64_H_ #define INCLUDE_PERFETTO_EXT_BASE_BASE64_H_ +#include #include -// gen_amalgamated expanded: #include "perfetto/ext/base/optional.h" // gen_amalgamated expanded: #include "perfetto/ext/base/string_view.h" // gen_amalgamated expanded: #include "perfetto/ext/base/utils.h" // For ssize_t. @@ -1613,9 +837,9 @@ ssize_t Base64Decode(const char* src, uint8_t* dst, size_t dst_size); -Optional Base64Decode(const char* src, size_t src_size); +std::optional Base64Decode(const char* src, size_t src_size); -inline Optional Base64Decode(StringView sv) { +inline std::optional Base64Decode(StringView sv) { return Base64Decode(sv.data(), sv.size()); } @@ -1761,17 +985,17 @@ ssize_t Base64Decode(const char* src, return static_cast(wr_size); } -Optional Base64Decode(const char* src, size_t src_size) { +std::optional Base64Decode(const char* src, size_t src_size) { std::string dst; dst.resize(Base64DecSize(src_size)); auto res = Base64Decode(src, src_size, reinterpret_cast(&dst[0]), dst.size()); if (res < 0) - return nullopt; // Decoding error. + return std::nullopt; // Decoding error. PERFETTO_CHECK(res <= static_cast(dst.size())); dst.resize(static_cast(res)); - return base::make_optional(dst); + return std::make_optional(dst); } } // namespace base @@ -1965,10 +1189,10 @@ void UnregisterAllCrashKeysForTesting(); #include #include +#include #include #include -// gen_amalgamated expanded: #include "perfetto/ext/base/optional.h" // gen_amalgamated expanded: #include "perfetto/ext/base/string_view.h" namespace perfetto { @@ -1982,59 +1206,63 @@ inline char Uppercase(char c) { return ('a' <= c && c <= 'z') ? static_cast(c + ('A' - 'a')) : c; } -inline Optional CStringToUInt32(const char* s, int base = 10) { +inline std::optional CStringToUInt32(const char* s, int base = 10) { char* endptr = nullptr; auto value = static_cast(strtoul(s, &endptr, base)); - return (*s && !*endptr) ? base::make_optional(value) : base::nullopt; + return (*s && !*endptr) ? std::make_optional(value) : std::nullopt; } -inline Optional CStringToInt32(const char* s, int base = 10) { +inline std::optional CStringToInt32(const char* s, int base = 10) { char* endptr = nullptr; auto value = static_cast(strtol(s, &endptr, base)); - return (*s && !*endptr) ? base::make_optional(value) : base::nullopt; + return (*s && !*endptr) ? std::make_optional(value) : std::nullopt; } // Note: it saturates to 7fffffffffffffff if parsing a hex number >= 0x8000... -inline Optional CStringToInt64(const char* s, int base = 10) { +inline std::optional CStringToInt64(const char* s, int base = 10) { char* endptr = nullptr; auto value = static_cast(strtoll(s, &endptr, base)); - return (*s && !*endptr) ? base::make_optional(value) : base::nullopt; + return (*s && !*endptr) ? std::make_optional(value) : std::nullopt; } -inline Optional CStringToUInt64(const char* s, int base = 10) { +inline std::optional CStringToUInt64(const char* s, int base = 10) { char* endptr = nullptr; auto value = static_cast(strtoull(s, &endptr, base)); - return (*s && !*endptr) ? base::make_optional(value) : base::nullopt; + return (*s && !*endptr) ? std::make_optional(value) : std::nullopt; } double StrToD(const char* nptr, char** endptr); -inline Optional CStringToDouble(const char* s) { +inline std::optional CStringToDouble(const char* s) { char* endptr = nullptr; double value = StrToD(s, &endptr); - Optional result(base::nullopt); + std::optional result(std::nullopt); if (*s != '\0' && *endptr == '\0') result = value; return result; } -inline Optional StringToUInt32(const std::string& s, int base = 10) { +inline std::optional StringToUInt32(const std::string& s, + int base = 10) { return CStringToUInt32(s.c_str(), base); } -inline Optional StringToInt32(const std::string& s, int base = 10) { +inline std::optional StringToInt32(const std::string& s, + int base = 10) { return CStringToInt32(s.c_str(), base); } -inline Optional StringToUInt64(const std::string& s, int base = 10) { +inline std::optional StringToUInt64(const std::string& s, + int base = 10) { return CStringToUInt64(s.c_str(), base); } -inline Optional StringToInt64(const std::string& s, int base = 10) { +inline std::optional StringToInt64(const std::string& s, + int base = 10) { return CStringToInt64(s.c_str(), base); } -inline Optional StringToDouble(const std::string& s) { +inline std::optional StringToDouble(const std::string& s) { return CStringToDouble(s.c_str()); } @@ -2052,6 +1280,7 @@ std::vector SplitString(const std::string& text, const std::string& delimiter); std::string StripPrefix(const std::string& str, const std::string& prefix); std::string StripSuffix(const std::string& str, const std::string& suffix); +std::string TrimWhitespace(const std::string& str); std::string ToLower(const std::string& str); std::string ToUpper(const std::string& str); std::string StripChars(const std::string& str, @@ -2110,6 +1339,20 @@ inline void StringCopy(char* dst, const char* src, size_t dst_size) { size_t SprintfTrunc(char* dst, size_t dst_size, const char* fmt, ...) PERFETTO_PRINTF_FORMAT(3, 4); +// Line number starts from 1 +struct LineWithOffset { + base::StringView line; + uint32_t line_offset; + uint32_t line_num; +}; + +// For given string and offset Pfinds a line with character for +// which offset points, what number is this line (starts from 1), and the offset +// inside this line. returns std::nullopt if the offset points to +// line break character or exceeds string length. +std::optional FindLineWithOffset(base::StringView str, + uint32_t offset); + // A helper class to facilitate construction and usage of write-once stack // strings. // Example usage: @@ -2139,6 +1382,7 @@ class StackString { std::string ToStdString() const { return std::string(buf_, len_); } const char* c_str() const { return buf_; } size_t len() const { return len_; } + char* mutable_data() { return buf_; } private: char buf_[N]; @@ -2274,7 +1518,7 @@ namespace base { // On Windows: installs a SetConsoleCtrlHandler() handler. // The passed handler must be async safe. using CtrlCHandlerFunction = void (*)(); -void InstallCtrCHandler(CtrlCHandlerFunction); +void InstallCtrlCHandler(CtrlCHandlerFunction); } // namespace base } // namespace perfetto @@ -2317,7 +1561,7 @@ namespace { CtrlCHandlerFunction g_handler = nullptr; } -void InstallCtrCHandler(CtrlCHandlerFunction handler) { +void InstallCtrlCHandler(CtrlCHandlerFunction handler) { PERFETTO_CHECK(g_handler == nullptr); g_handler = handler; @@ -2870,7 +2114,6 @@ PERFETTO_PRINTF_FORMAT(1, 2) Status ErrStatus(const char* format, ...); // gen_amalgamated expanded: #include "perfetto/base/export.h" // gen_amalgamated expanded: #include "perfetto/base/status.h" // gen_amalgamated expanded: #include "perfetto/ext/base/scoped_file.h" -// gen_amalgamated expanded: #include "perfetto/ext/base/optional.h" // gen_amalgamated expanded: #include "perfetto/ext/base/utils.h" namespace perfetto { @@ -2907,6 +2150,7 @@ ssize_t WriteAllHandle(PlatformHandle, const void* buf, size_t count); ScopedFile OpenFile(const std::string& path, int flags, FileOpenMode = kFileModeInvalid); +ScopedFstream OpenFstream(const char* path, const char* mode); // This is an alias for close(). It's to avoid leaking Windows.h in headers. // Exported because ScopedFile is used in the /include/ext API by Chromium @@ -2936,9 +2180,6 @@ std::string GetFileExtension(const std::string& filename); base::Status ListFilesRecursive(const std::string& dir_path, std::vector& output); -// Returns the size of the file at `path` or nullopt in case of error. -Optional GetFileSize(const std::string& path); - } // namespace base } // namespace perfetto @@ -2966,6 +2207,7 @@ Optional GetFileSize(const std::string& path); #include #include +#include #include #include @@ -2973,6 +2215,7 @@ Optional GetFileSize(const std::string& path); // gen_amalgamated expanded: #include "perfetto/base/logging.h" // gen_amalgamated expanded: #include "perfetto/base/platform_handle.h" // gen_amalgamated expanded: #include "perfetto/base/status.h" +// gen_amalgamated expanded: #include "perfetto/ext/base/platform.h" // gen_amalgamated expanded: #include "perfetto/ext/base/scoped_file.h" // gen_amalgamated expanded: #include "perfetto/ext/base/utils.h" @@ -2980,6 +2223,7 @@ Optional GetFileSize(const std::string& path); #include #include #include +#include #else #include #include @@ -2995,16 +2239,40 @@ constexpr size_t kBufSize = 2048; int CloseFindHandle(HANDLE h) { return FindClose(h) ? 0 : -1; } + +std::optional ToUtf16(const std::string str) { + int len = MultiByteToWideChar(CP_UTF8, 0, str.data(), + static_cast(str.size()), nullptr, 0); + if (len < 0) { + return std::nullopt; + } + std::vector tmp; + tmp.resize(static_cast::size_type>(len)); + len = + MultiByteToWideChar(CP_UTF8, 0, str.data(), static_cast(str.size()), + tmp.data(), static_cast(tmp.size())); + if (len < 0) { + return std::nullopt; + } + PERFETTO_CHECK(static_cast::size_type>(len) == + tmp.size()); + return std::wstring(tmp.data(), tmp.size()); +} + #endif } // namespace ssize_t Read(int fd, void* dst, size_t dst_size) { + ssize_t ret; + platform::BeforeMaybeBlockingSyscall(); #if PERFETTO_BUILDFLAG(PERFETTO_OS_WIN) - return _read(fd, dst, static_cast(dst_size)); + ret = _read(fd, dst, static_cast(dst_size)); #else - return PERFETTO_EINTR(read(fd, dst, dst_size)); + ret = PERFETTO_EINTR(read(fd, dst, dst_size)); #endif + platform::AfterMaybeBlockingSyscall(); + return ret; } bool ReadFileDescriptor(int fd, std::string* out) { @@ -3079,8 +2347,10 @@ ssize_t WriteAll(int fd, const void* buf, size_t count) { // write() on windows takes an unsigned int size. uint32_t bytes_left = static_cast( std::min(count - written, static_cast(UINT32_MAX))); + platform::BeforeMaybeBlockingSyscall(); ssize_t wr = PERFETTO_EINTR( write(fd, static_cast(buf) + written, bytes_left)); + platform::AfterMaybeBlockingSyscall(); if (wr == 0) break; if (wr < 0) @@ -3136,7 +2406,9 @@ int CloseFile(int fd) { } ScopedFile OpenFile(const std::string& path, int flags, FileOpenMode mode) { - PERFETTO_DCHECK((flags & O_CREAT) == 0 || mode != kFileModeInvalid); + // If a new file might be created, ensure that the permissions for the new + // file are explicitly specified. + PERFETTO_CHECK((flags & O_CREAT) == 0 || mode != kFileModeInvalid); #if PERFETTO_BUILDFLAG(PERFETTO_OS_WIN) // Always use O_BINARY on Windows, to avoid silly EOL translations. ScopedFile fd(_open(path.c_str(), flags | O_BINARY, mode)); @@ -3147,6 +2419,23 @@ ScopedFile OpenFile(const std::string& path, int flags, FileOpenMode mode) { return fd; } +ScopedFstream OpenFstream(const char* path, const char* mode) { + ScopedFstream file; +// On Windows fopen interprets filename using the ANSI or OEM codepage but +// sqlite3_value_text returns a UTF-8 string. To make sure we interpret the +// filename correctly we use _wfopen and a UTF-16 string on windows. +#if PERFETTO_BUILDFLAG(PERFETTO_OS_WIN) + auto w_path = ToUtf16(path); + auto w_mode = ToUtf16(mode); + if (w_path && w_mode) { + file.reset(_wfopen(w_path->c_str(), w_mode->c_str())); + } +#else + file.reset(fopen(path, mode)); +#endif + return file; +} + bool FileExists(const std::string& path) { #if PERFETTO_BUILDFLAG(PERFETTO_OS_WIN) return _access(path.c_str(), 0) == 0; @@ -3243,35 +2532,6 @@ std::string GetFileExtension(const std::string& filename) { return filename.substr(ext_idx); } -base::Optional GetFileSize(const std::string& file_path) { -#if PERFETTO_BUILDFLAG(PERFETTO_OS_WIN) - HANDLE file = - CreateFileA(file_path.c_str(), GENERIC_READ, FILE_SHARE_READ, nullptr, - OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, nullptr); - if (file == INVALID_HANDLE_VALUE) { - return nullopt; - } - LARGE_INTEGER file_size; - file_size.QuadPart = 0; - BOOL ok = GetFileSizeEx(file, &file_size); - CloseHandle(file); - if (!ok) { - return nullopt; - } - return static_cast(file_size.QuadPart); -#else - base::ScopedFile fd(base::OpenFile(file_path, O_RDONLY | O_CLOEXEC)); - if (!fd) { - return nullopt; - } - struct stat buf {}; - if (fstat(*fd, &buf) == -1) { - return nullopt; - } - return static_cast(buf.st_size); -#endif -} - } // namespace base } // namespace perfetto // gen_amalgamated begin source: src/base/getopt_compat.cc @@ -4567,7 +3827,6 @@ std::atomic g_enabled_tags{0}; std::atomic g_enabled_timestamp{0}; // static members -constexpr size_t RingBuffer::kCapacity; std::array RingBuffer::records_; std::atomic RingBuffer::read_task_queued_; std::atomic RingBuffer::wr_index_; @@ -4575,10 +3834,6 @@ std::atomic RingBuffer::rd_index_; std::atomic RingBuffer::has_overruns_; Record RingBuffer::bankruptcy_record_; -constexpr uint16_t Record::kTypeMask; -constexpr uint16_t Record::kTypeCounter; -constexpr uint16_t Record::kTypeEvent; - namespace { // std::function<> is not trivially de/constructible. This struct wraps it in a @@ -4710,6 +3965,8 @@ bool RingBuffer::IsOnValidTaskRunner() { #if defined(ADDRESS_SANITIZER) && !PERFETTO_BUILDFLAG(PERFETTO_OS_WIN) && \ !defined(ADDRESS_SANITIZER_WITHOUT_INSTRUMENTATION) +#include + #define ANNOTATE_NEW_BUFFER(buffer, capacity, new_size) \ if (buffer) { \ __sanitizer_annotate_contiguous_container(buffer, (buffer) + (capacity), \ @@ -4761,6 +4018,7 @@ bool RingBuffer::IsOnValidTaskRunner() { #ifndef INCLUDE_PERFETTO_EXT_BASE_PAGED_MEMORY_H_ #define INCLUDE_PERFETTO_EXT_BASE_PAGED_MEMORY_H_ +#include #include // gen_amalgamated expanded: #include "perfetto/base/build_config.h" @@ -4866,6 +4124,7 @@ class PagedMemory { #include #include +#include #if PERFETTO_BUILDFLAG(PERFETTO_OS_WIN) #include @@ -5241,14 +4500,17 @@ class TaskRunner; // A periodic task utility class. It wraps the logic necessary to do periodic // tasks using a TaskRunner, taking care of subtleties like ensuring that // outstanding tasks are cancelled after reset/dtor. -// Tasks are aligned on wall time, this is to ensure that when using multiple -// periodic tasks, they happen at the same time, minimizing wakeups. +// Tasks are aligned on wall time (unless they are |one_shot|). This is to +// ensure that when using multiple periodic tasks, they happen at the same time, +// minimizing context switches. // On Linux/Android it also supports suspend-aware mode (via timerfd). On other // operating systems it falls back to PostDelayedTask, which is not // suspend-aware. // TODO(primiano): this should probably become a periodic timer scheduler, so we // can use one FD for everything rather than one FD per task. For now we take // the hit of a FD-per-task to keep this low-risk. +// TODO(primiano): consider renaming this class to TimerTask. When |one_shot| +// is set, the "Periodic" part of the class name becomes a lie. class PeriodicTask { public: explicit PeriodicTask(base::TaskRunner*); @@ -5259,6 +4521,7 @@ class PeriodicTask { std::function task = nullptr; bool start_first_task_immediately = false; bool use_suspend_aware_timer = false; + bool one_shot = false; }; void Start(Args); @@ -5329,34 +4592,49 @@ namespace perfetto { namespace base { namespace { -base::ScopedPlatformHandle CreateTimerFd(uint32_t period_ms) { + +uint32_t GetNextDelayMs(const TimeMillis& now_ms, + const PeriodicTask::Args& args) { + if (args.one_shot) + return args.period_ms; + + return args.period_ms - + static_cast(now_ms.count() % args.period_ms); +} + +ScopedPlatformHandle CreateTimerFd(const PeriodicTask::Args& args) { #if PERFETTO_BUILDFLAG(PERFETTO_OS_LINUX) || \ (PERFETTO_BUILDFLAG(PERFETTO_OS_ANDROID) && __ANDROID_API__ >= 19) - base::ScopedPlatformHandle tfd( + ScopedPlatformHandle tfd( timerfd_create(CLOCK_BOOTTIME, TFD_CLOEXEC | TFD_NONBLOCK)); - // The initial phase, aligned on wall clock. - uint32_t phase_ms = - period_ms - - static_cast(base::GetBootTimeNs().count() % period_ms); + uint32_t phase_ms = GetNextDelayMs(GetBootTimeMs(), args); + struct itimerspec its {}; // The "1 +" is to make sure that we never pass a zero it_value in the // unlikely case of phase_ms being 0. That would cause the timer to be // considered disarmed by timerfd_settime. its.it_value.tv_sec = static_cast(phase_ms / 1000u); its.it_value.tv_nsec = 1 + static_cast((phase_ms % 1000u) * 1000000u); - its.it_interval.tv_sec = static_cast(period_ms / 1000u); - its.it_interval.tv_nsec = static_cast((period_ms % 1000u) * 1000000u); + if (args.one_shot) { + its.it_interval.tv_sec = 0; + its.it_interval.tv_nsec = 0; + } else { + const uint32_t period_ms = args.period_ms; + its.it_interval.tv_sec = static_cast(period_ms / 1000u); + its.it_interval.tv_nsec = static_cast((period_ms % 1000u) * 1000000u); + } if (timerfd_settime(*tfd, 0, &its, nullptr) < 0) - return base::ScopedPlatformHandle(); + return ScopedPlatformHandle(); return tfd; #else - base::ignore_result(period_ms); - return base::ScopedPlatformHandle(); + ignore_result(args); + return ScopedPlatformHandle(); #endif } + } // namespace -PeriodicTask::PeriodicTask(base::TaskRunner* task_runner) +PeriodicTask::PeriodicTask(TaskRunner* task_runner) : task_runner_(task_runner), weak_ptr_factory_(this) {} PeriodicTask::~PeriodicTask() { @@ -5373,7 +4651,7 @@ void PeriodicTask::Start(Args args) { } args_ = std::move(args); if (args_.use_suspend_aware_timer) { - timer_fd_ = CreateTimerFd(args_.period_ms); + timer_fd_ = CreateTimerFd(args_); if (timer_fd_) { auto weak_this = weak_ptr_factory_.GetWeakPtr(); task_runner_->AddFileDescriptorWatch( @@ -5395,9 +4673,7 @@ void PeriodicTask::PostNextTask() { PERFETTO_DCHECK_THREAD(thread_checker_); PERFETTO_DCHECK(args_.period_ms > 0); PERFETTO_DCHECK(!timer_fd_); - uint32_t delay_ms = - args_.period_ms - - static_cast(base::GetWallTimeMs().count() % args_.period_ms); + uint32_t delay_ms = GetNextDelayMs(GetWallTimeMs(), args_); auto weak_this = weak_ptr_factory_.GetWeakPtr(); task_runner_->PostDelayedTask( std::bind(PeriodicTask::RunTaskAndPostNext, weak_this, generation_), @@ -5408,7 +4684,7 @@ void PeriodicTask::PostNextTask() { // This function can be called in two ways (both from the TaskRunner): // 1. When using a timerfd, this task is registered as a FD watch. // 2. When using PostDelayedTask, this is the task posted on the TaskRunner. -void PeriodicTask::RunTaskAndPostNext(base::WeakPtr thiz, +void PeriodicTask::RunTaskAndPostNext(WeakPtr thiz, uint32_t generation) { if (!thiz || !thiz->args_.task || generation != thiz->generation_) return; // Destroyed or Reset() in the meanwhile. @@ -5422,7 +4698,7 @@ void PeriodicTask::RunTaskAndPostNext(base::WeakPtr thiz, // just need to read() it. uint64_t ignored = 0; errno = 0; - auto rsize = base::Read(*thiz->timer_fd_, &ignored, sizeof(&ignored)); + auto rsize = Read(*thiz->timer_fd_, &ignored, sizeof(&ignored)); if (rsize != sizeof(uint64_t)) { if (errno == EAGAIN) return; // A spurious wakeup. Rare, but can happen, just ignore. @@ -5431,15 +4707,21 @@ void PeriodicTask::RunTaskAndPostNext(base::WeakPtr thiz, } #endif } + + // Create a copy of the task to deal with either: + // 1. one_shot causing a Reset(). + // 2. task() invoking internally Reset(). + // That would cause a reset of the args_.task itself, which would invalidate + // the task bind state while we are invoking it. + auto task = thiz->args_.task; + // The repetition of the if() is to deal with the ResetTimerFd() case above. - if (!thiz->timer_fd_) { + if (thiz->args_.one_shot) { + thiz->Reset(); + } else if (!thiz->timer_fd_) { thiz->PostNextTask(); } - // Create a copy of the task in the unlikely event that the task ends up - // up destroying the PeriodicTask object or calling Reset() on it. That would - // cause a reset of the args_.task itself, which would invalidate the task - // bind state while we are invoking it. - auto task = thiz->args_.task; + task(); } @@ -5602,19 +4884,34 @@ namespace base { // The token returned in output are valid as long as the input string is valid. class StringSplitter { public: + // Whether an empty string (two delimiters side-to-side) is a valid token. + enum class EmptyTokenMode { + DISALLOW_EMPTY_TOKENS, + ALLOW_EMPTY_TOKENS, + + DEFAULT = DISALLOW_EMPTY_TOKENS, + }; + // Can take ownership of the string if passed via std::move(), e.g.: // StringSplitter(std::move(str), '\n'); - StringSplitter(std::string, char delimiter); + StringSplitter(std::string, + char delimiter, + EmptyTokenMode empty_token_mode = EmptyTokenMode::DEFAULT); // Splits a C-string. The input string will be forcefully null-terminated (so // str[size - 1] should be == '\0' or the last char will be truncated). - StringSplitter(char* str, size_t size, char delimiter); + StringSplitter(char* str, + size_t size, + char delimiter, + EmptyTokenMode empty_token_mode = EmptyTokenMode::DEFAULT); // Splits the current token from an outer StringSplitter instance. This is to // chain splitters as follows: // for (base::StringSplitter lines(x, '\n'); ss.Next();) // for (base::StringSplitter words(&lines, ' '); words.Next();) - StringSplitter(StringSplitter*, char delimiter); + StringSplitter(StringSplitter*, + char delimiter, + EmptyTokenMode empty_token_mode = EmptyTokenMode::DEFAULT); // Returns true if a token is found (in which case it will be stored in // cur_token()), false if no more tokens are found. @@ -5640,6 +4937,7 @@ class StringSplitter { char* next_; char* end_; // STL-style, points one past the last char. const char delimiter_; + const EmptyTokenMode empty_token_mode_; }; } // namespace base @@ -5671,20 +4969,29 @@ class StringSplitter { namespace perfetto { namespace base { -StringSplitter::StringSplitter(std::string str, char delimiter) - : str_(std::move(str)), delimiter_(delimiter) { +StringSplitter::StringSplitter(std::string str, + char delimiter, + EmptyTokenMode empty_token_mode) + : str_(std::move(str)), + delimiter_(delimiter), + empty_token_mode_(empty_token_mode) { // It's legal to access str[str.size()] in C++11 (it always returns \0), // hence the +1 (which becomes just size() after the -1 in Initialize()). Initialize(&str_[0], str_.size() + 1); } -StringSplitter::StringSplitter(char* str, size_t size, char delimiter) - : delimiter_(delimiter) { +StringSplitter::StringSplitter(char* str, + size_t size, + char delimiter, + EmptyTokenMode empty_token_mode) + : delimiter_(delimiter), empty_token_mode_(empty_token_mode) { Initialize(str, size); } -StringSplitter::StringSplitter(StringSplitter* outer, char delimiter) - : delimiter_(delimiter) { +StringSplitter::StringSplitter(StringSplitter* outer, + char delimiter, + EmptyTokenMode empty_token_mode) + : delimiter_(delimiter), empty_token_mode_(empty_token_mode) { Initialize(outer->cur_token(), outer->cur_token_size() + 1); } @@ -5700,8 +5007,11 @@ void StringSplitter::Initialize(char* str, size_t size) { bool StringSplitter::Next() { for (; next_ < end_; next_++) { - if (*next_ == delimiter_) + if (*next_ == delimiter_ && + empty_token_mode_ == EmptyTokenMode::DISALLOW_EMPTY_TOKENS) { + // If empty tokens are disallowed, find fist non-delimiter character. continue; + } cur_ = next_; for (;; next_++) { if (*next_ == delimiter_) { @@ -5715,7 +5025,7 @@ bool StringSplitter::Next() { break; } } - if (*cur_) + if (*cur_ || empty_token_mode_ == EmptyTokenMode::ALLOW_EMPTY_TOKENS) return true; break; } @@ -5849,6 +5159,18 @@ std::vector SplitString(const std::string& text, return output; } +std::string TrimWhitespace(const std::string& str) { + std::string whitespaces = "\t\n "; + + size_t front_idx = str.find_first_not_of(whitespaces); + std::string front_trimmed = + front_idx == std::string::npos ? "" : str.substr(front_idx); + + size_t end_idx = front_trimmed.find_last_not_of(whitespaces); + return end_idx == std::string::npos ? "" + : front_trimmed.substr(0, end_idx + 1); +} + std::string StripPrefix(const std::string& str, const std::string& prefix) { return StartsWith(str, prefix) ? str.substr(prefix.size()) : str; } @@ -5962,6 +5284,29 @@ size_t SprintfTrunc(char* dst, size_t dst_size, const char* fmt, ...) { return res; } +std::optional FindLineWithOffset(base::StringView str, + uint32_t offset) { + static constexpr char kNewLine = '\n'; + uint32_t line_offset = 0; + uint32_t line_count = 1; + for (uint32_t i = 0; i < str.size(); ++i) { + if (str.at(i) == kNewLine) { + line_offset = i + 1; + line_count++; + continue; + } + if (i == offset) { + size_t end_offset = str.find(kNewLine, i); + if (end_offset == std::string::npos) { + end_offset = str.size(); + } + base::StringView line = str.substr(line_offset, end_offset - line_offset); + return LineWithOffset{line, offset - line_offset, line_count}; + } + } + return std::nullopt; +} + } // namespace base } // namespace perfetto // gen_amalgamated begin source: src/base/string_view.cc @@ -5986,9 +5331,22 @@ size_t SprintfTrunc(char* dst, size_t dst_size, const char* fmt, ...) { namespace perfetto { namespace base { +// Without ignoring this warning we get the message: +// error: out-of-line definition of constexpr static data member is redundant +// in C++17 and is deprecated +// when using clang-cl in Windows. +#if defined(__GNUC__) // GCC & clang +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdeprecated" +#endif // __GNUC__ + // static constexpr size_t StringView::npos; +#if defined(__GNUC__) +#pragma GCC diagnostic pop +#endif + } // namespace base } // namespace perfetto // gen_amalgamated begin source: src/base/temp_file.cc @@ -6296,6 +5654,52 @@ void ThreadChecker::DetachFromThread() { thread_id_.store(kDetached); } +} // namespace base +} // namespace perfetto +// gen_amalgamated begin source: src/base/thread_utils.cc +/* + * Copyright (C) 2022 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// gen_amalgamated expanded: #include "perfetto/base/thread_utils.h" + +// gen_amalgamated expanded: #include "perfetto/base/build_config.h" + +#if PERFETTO_BUILDFLAG(PERFETTO_OS_FUCHSIA) +#include +#include +#include +#endif // PERFETTO_BUILDFLAG(PERFETTO_OS_FUCHSIA) + +namespace perfetto { +namespace base { + +#if PERFETTO_BUILDFLAG(PERFETTO_OS_FUCHSIA) +static PlatformThreadId ResolveThreadId() { + zx_info_handle_basic_t basic; + return (zx_object_get_info(zx_thread_self(), ZX_INFO_HANDLE_BASIC, &basic, + sizeof(basic), nullptr, nullptr) == ZX_OK) + ? basic.koid + : ZX_KOID_INVALID; +} +PlatformThreadId GetThreadId() { + thread_local static PlatformThreadId thread_id = ResolveThreadId(); + return thread_id; +} +#endif // PERFETTO_BUILDFLAG(PERFETTO_OS_FUCHSIA) + } // namespace base } // namespace perfetto // gen_amalgamated begin source: src/base/time.cc @@ -6405,6 +5809,7 @@ std::string GetTimeFmt(const std::string& fmt) { // gen_amalgamated expanded: #include "perfetto/base/build_config.h" // gen_amalgamated expanded: #include "perfetto/base/logging.h" // gen_amalgamated expanded: #include "perfetto/ext/base/file_utils.h" +// gen_amalgamated expanded: #include "perfetto/ext/base/pipe.h" // gen_amalgamated expanded: #include "perfetto/ext/base/string_utils.h" #if PERFETTO_BUILDFLAG(PERFETTO_OS_LINUX) || \ @@ -6489,11 +5894,14 @@ CheckCpuOptimizations() { // Volume 2A: Instruction Set Reference, A-M CPUID). PERFETTO_GETCPUID(eax, ebx, ecx, edx, 7, 0); const bool have_avx2 = have_avx && ((ebx >> 5) & 0x1); + const bool have_bmi = (ebx >> 3) & 0x1; + const bool have_bmi2 = (ebx >> 8) & 0x1; - if (!have_sse4_2 || !have_popcnt || !have_avx2) { + if (!have_sse4_2 || !have_popcnt || !have_avx2 || !have_bmi || !have_bmi2) { fprintf( stderr, - "This executable requires a X86_64 cpu that supports SSE4.2 and AVX2.\n" + "This executable requires a x86_64 cpu that supports SSE4.2, BMI2 and " + "AVX2.\n" #if PERFETTO_BUILDFLAG(PERFETTO_OS_APPLE) "On MacOS, this might be caused by running x86_64 binaries on arm64.\n" "See https://github.com/google/perfetto/issues/294 for more.\n" @@ -6567,10 +5975,19 @@ void SetEnv(const std::string& key, const std::string& value) { #endif } +void UnsetEnv(const std::string& key) { +#if PERFETTO_BUILDFLAG(PERFETTO_OS_WIN) + PERFETTO_CHECK(::_putenv_s(key.c_str(), "") == 0); +#else + PERFETTO_CHECK(::unsetenv(key.c_str()) == 0); +#endif +} + void Daemonize(std::function parent_cb) { #if PERFETTO_BUILDFLAG(PERFETTO_OS_LINUX) || \ PERFETTO_BUILDFLAG(PERFETTO_OS_ANDROID) || \ PERFETTO_BUILDFLAG(PERFETTO_OS_APPLE) + Pipe pipe = Pipe::Create(Pipe::kBothBlock); pid_t pid; switch (pid = fork()) { case -1: @@ -6586,12 +6003,24 @@ void Daemonize(std::function parent_cb) { // Do not accidentally close stdin/stdout/stderr. if (*null <= 2) null.release(); + WriteAll(*pipe.wr, "1", 1); break; } - default: + default: { + // Wait for the child process to have reached the setsid() call. This is + // to avoid that 'adb shell perfetto -D' destroys the terminal (hence + // sending a SIGHUP to the child) before the child has detached from the + // terminal (see b/238644870). + + // This is to unblock the read() below (with EOF, which will fail the + // CHECK) in the unlikely case of the child crashing before WriteAll("1"). + pipe.wr.reset(); + char one = '\0'; + PERFETTO_CHECK(Read(*pipe.rd, &one, sizeof(one)) == 1 && one == '1'); printf("%d\n", pid); int err = parent_cb(); exit(err); + } } #else // Avoid -Wunreachable warnings. @@ -6709,11 +6138,12 @@ std::string HexDump(const void* data_void, size_t len, size_t bytes_per_line) { #ifndef INCLUDE_PERFETTO_EXT_BASE_UUID_H_ #define INCLUDE_PERFETTO_EXT_BASE_UUID_H_ +#include #include +#include +#include #include -// gen_amalgamated expanded: #include "perfetto/ext/base/optional.h" - namespace perfetto { namespace base { @@ -6730,6 +6160,8 @@ class Uuid { bool operator!=(const Uuid& other) const { return !(*this == other); } + explicit operator bool() const { return *this != Uuid(); } + int64_t msb() const { int64_t result; memcpy(&result, data_.data() + 8, 8); @@ -6837,92 +6269,6 @@ std::string Uuid::ToPrettyString() const { return s; } -} // namespace base -} // namespace perfetto -// gen_amalgamated begin source: src/base/version.cc -// gen_amalgamated begin header: include/perfetto/ext/base/version.h -/* - * Copyright (C) 2020 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef INCLUDE_PERFETTO_EXT_BASE_VERSION_H_ -#define INCLUDE_PERFETTO_EXT_BASE_VERSION_H_ - -namespace perfetto { -namespace base { - -// The returned pointer is a static string is safe to pass around. -const char* GetVersionString(); - -} // namespace base -} // namespace perfetto - -#endif // INCLUDE_PERFETTO_EXT_BASE_VERSION_H_ -// gen_amalgamated begin header: gen/perfetto_version.gen.h -// Generated by write_version_header.py - -#ifndef GEN_PERFETTO_VERSION_GEN_H_ -#define GEN_PERFETTO_VERSION_GEN_H_ - -#define PERFETTO_VERSION_STRING() "v26.0-4b6bd99fd" -#define PERFETTO_VERSION_SCM_REVISION() "4b6bd99fd77249235611bdf019131f3629d40801" - -#endif // GEN_PERFETTO_VERSION_GEN_H_ -/* - * Copyright (C) 2020 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// gen_amalgamated expanded: #include "perfetto/ext/base/version.h" - -// gen_amalgamated expanded: #include "perfetto/base/build_config.h" - -#include - -#if PERFETTO_BUILDFLAG(PERFETTO_VERSION_GEN) -// gen_amalgamated expanded: #include "perfetto_version.gen.h" -#else -#define PERFETTO_VERSION_STRING() "v0.0" -#define PERFETTO_VERSION_SCM_REVISION() "unknown" -#endif - -namespace perfetto { -namespace base { - -const char* GetVersionString() { - static const char* version_str = [] { - static constexpr size_t kMaxLen = 256; - char* version = new char[kMaxLen + 1]; - snprintf(version, kMaxLen, "Perfetto %s (%s)", PERFETTO_VERSION_STRING(), - PERFETTO_VERSION_SCM_REVISION()); - return version; - }(); - return version_str; -} - } // namespace base } // namespace perfetto // gen_amalgamated begin source: src/base/virtual_destructors.cc @@ -7194,6 +6540,7 @@ inline void RunTaskWithWatchdogGuard(const std::function& task) { * limitations under the License. */ +// gen_amalgamated expanded: #include "perfetto/ext/base/platform.h" // gen_amalgamated expanded: #include "perfetto/ext/base/watchdog.h" #if PERFETTO_BUILDFLAG(PERFETTO_WATCHDOG) @@ -7411,7 +6758,9 @@ void Watchdog::ThreadMain() { // We use the poll() timeout to drive the periodic ticks for the cpu/memory // checks. The only other case when the poll() unblocks is when we crash // (or have to quit via enabled_ == false, but that happens only in tests). + platform::BeforeMaybeBlockingSyscall(); auto ret = poll(fds, kFdCount, static_cast(polling_interval_ms_)); + platform::AfterMaybeBlockingSyscall(); if (!enabled_) return; if (ret < 0) { @@ -8077,6 +7426,7 @@ bool ThreadTaskRunner::RunsTasksOnCurrentThread() const { // gen_amalgamated expanded: #include "perfetto/base/build_config.h" +// gen_amalgamated expanded: #include "perfetto/ext/base/platform.h" // gen_amalgamated expanded: #include "perfetto/ext/base/unix_task_runner.h" #include @@ -8138,8 +7488,10 @@ void UnixTaskRunner::Run() { // returned. PostFileDescriptorWatches(ret); #else + platform::BeforeMaybeBlockingSyscall(); int ret = PERFETTO_EINTR(poll( &poll_fds_[0], static_cast(poll_fds_.size()), poll_timeout_ms)); + platform::AfterMaybeBlockingSyscall(); PERFETTO_CHECK(ret >= 0); PostFileDescriptorWatches(0 /*ignored*/); #endif @@ -8387,6 +7739,7 @@ bool UnixTaskRunner::RunsTasksOnCurrentThread() const { #include #include #include +#include #include #include #include @@ -8396,7 +7749,6 @@ bool UnixTaskRunner::RunsTasksOnCurrentThread() const { // gen_amalgamated expanded: #include "perfetto/base/platform_handle.h" // gen_amalgamated expanded: #include "perfetto/base/proc_utils.h" // gen_amalgamated expanded: #include "perfetto/ext/base/event_fd.h" -// gen_amalgamated expanded: #include "perfetto/ext/base/optional.h" // gen_amalgamated expanded: #include "perfetto/ext/base/pipe.h" // gen_amalgamated expanded: #include "perfetto/ext/base/scoped_file.h" @@ -8511,7 +7863,7 @@ class Subprocess { // setpgid(0 /*self_pid*/, posix_proc_group_id). // This can be used to avoid that subprocesses receive CTRL-C from the // terminal, while still living in the same session. - base::Optional posix_proc_group_id{}; + std::optional posix_proc_group_id{}; #endif // If non-empty, replaces the environment passed to exec(). @@ -8635,7 +7987,6 @@ class Subprocess { void TryPushStdin(); void TryReadStdoutAndErr(); void TryReadExitStatus(); - void KillAtMostOnce(); bool PollInternal(int poll_timeout_ms); #endif @@ -9600,6 +8951,263 @@ void Field::SerializeAndAppendTo(std::vector* dst) const { SerializeAndAppendToInternal(dst); } +} // namespace protozero +// gen_amalgamated begin source: src/protozero/gen_field_helpers.cc +// gen_amalgamated begin header: include/perfetto/protozero/gen_field_helpers.h +/* + * Copyright (C) 2023 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef INCLUDE_PERFETTO_PROTOZERO_GEN_FIELD_HELPERS_H_ +#define INCLUDE_PERFETTO_PROTOZERO_GEN_FIELD_HELPERS_H_ + +// gen_amalgamated expanded: #include "perfetto/protozero/message.h" +// gen_amalgamated expanded: #include "perfetto/protozero/proto_decoder.h" +// gen_amalgamated expanded: #include "perfetto/protozero/proto_utils.h" +// gen_amalgamated expanded: #include "perfetto/protozero/scattered_heap_buffer.h" + +namespace protozero { +namespace internal { +namespace gen_helpers { + +// This file implements some helpers used by the protobuf generated code in the +// .gen.cc files. +// +// The .gen.cc generated protobuf implementation (as opposed to the .pbzero.h +// implementation) is not zero-copy and is not supposed to be used in fast +// paths, so most of these helpers are designed to reduce binary size. + +void DeserializeString(const protozero::Field& field, std::string* dst); + +// Read packed repeated elements (serialized as `wire_type`) from `field` into +// the `*dst` vector. Returns false if some bytes of `field` could not be +// interpreted correctly as `wire_type`. +template +bool DeserializePackedRepeated(const protozero::Field& field, + std::vector* dst) { + bool parse_error = false; + for (::protozero::PackedRepeatedFieldIterator rep( + field.data(), field.size(), &parse_error); + rep; ++rep) { + dst->emplace_back(*rep); + } + return !parse_error; +} + +extern template bool +DeserializePackedRepeated( + const protozero::Field& field, + std::vector* dst); + +extern template bool +DeserializePackedRepeated( + const protozero::Field& field, + std::vector* dst); + +extern template bool +DeserializePackedRepeated( + const protozero::Field& field, + std::vector* dst); + +extern template bool +DeserializePackedRepeated( + const protozero::Field& field, + std::vector* dst); + +// Serializers for different type of fields + +void SerializeTinyVarInt(uint32_t field_id, bool value, Message* msg); + +template +void SerializeExtendedVarInt(uint32_t field_id, T value, Message* msg) { + msg->AppendVarInt(field_id, value); +} + +extern template void SerializeExtendedVarInt(uint32_t field_id, + uint64_t value, + Message* msg); + +extern template void SerializeExtendedVarInt(uint32_t field_id, + uint32_t value, + Message* msg); + +template +void SerializeVarInt(uint32_t field_id, T value, Message* msg) { + SerializeExtendedVarInt( + field_id, proto_utils::ExtendValueForVarIntSerialization(value), msg); +} + +template +void SerializeSignedVarInt(uint32_t field_id, T value, Message* msg) { + SerializeVarInt(field_id, proto_utils::ZigZagEncode(value), msg); +} + +template +void SerializeFixed(uint32_t field_id, T value, Message* msg) { + msg->AppendFixed(field_id, value); +} + +extern template void SerializeFixed(uint32_t field_id, + double value, + Message* msg); + +extern template void SerializeFixed(uint32_t field_id, + float value, + Message* msg); + +extern template void SerializeFixed(uint32_t field_id, + uint64_t value, + Message* msg); + +extern template void SerializeFixed(uint32_t field_id, + int64_t value, + Message* msg); + +extern template void SerializeFixed(uint32_t field_id, + uint32_t value, + Message* msg); + +extern template void SerializeFixed(uint32_t field_id, + int32_t value, + Message* msg); + +void SerializeString(uint32_t field_id, const std::string& value, Message* msg); + +void SerializeUnknownFields(const std::string& unknown_fields, Message* msg); + +// Wrapper around HeapBuffered that avoids inlining. +class MessageSerializer { + public: + MessageSerializer(); + ~MessageSerializer(); + + Message* get() { return msg_.get(); } + std::vector SerializeAsArray(); + std::string SerializeAsString(); + + private: + HeapBuffered msg_; +}; + +} // namespace gen_helpers +} // namespace internal +} // namespace protozero + +#endif // INCLUDE_PERFETTO_PROTOZERO_GEN_FIELD_HELPERS_H_ +/* + * Copyright (C) 2023 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// gen_amalgamated expanded: #include "perfetto/protozero/gen_field_helpers.h" + +namespace protozero { +namespace internal { +namespace gen_helpers { + +void DeserializeString(const protozero::Field& field, std::string* dst) { + field.get(dst); +} + +template bool DeserializePackedRepeated(const protozero::Field& field, + std::vector* dst); + +template bool DeserializePackedRepeated(const protozero::Field& field, + std::vector* dst); + +template bool DeserializePackedRepeated(const protozero::Field& field, + std::vector* dst); + +template bool DeserializePackedRepeated(const protozero::Field& field, + std::vector* dst); + +void SerializeTinyVarInt(uint32_t field_id, bool value, Message* msg) { + msg->AppendTinyVarInt(field_id, value); +} + +template void SerializeExtendedVarInt(uint32_t field_id, + uint64_t value, + Message* msg); + +template void SerializeExtendedVarInt(uint32_t field_id, + uint32_t value, + Message* msg); + +template void SerializeFixed(uint32_t field_id, + double value, + Message* msg); + +template void SerializeFixed(uint32_t field_id, + float value, + Message* msg); + +template void SerializeFixed(uint32_t field_id, + uint64_t value, + Message* msg); + +template void SerializeFixed(uint32_t field_id, + int64_t value, + Message* msg); + +template void SerializeFixed(uint32_t field_id, + uint32_t value, + Message* msg); + +template void SerializeFixed(uint32_t field_id, + int32_t value, + Message* msg); + +void SerializeString(uint32_t field_id, + const std::string& value, + Message* msg) { + msg->AppendString(field_id, value); +} + +void SerializeUnknownFields(const std::string& unknown_fields, Message* msg) { + msg->AppendRawProtoBytes(unknown_fields.data(), unknown_fields.size()); +} + +MessageSerializer::MessageSerializer() = default; + +MessageSerializer::~MessageSerializer() = default; + +std::vector MessageSerializer::SerializeAsArray() { + return msg_.SerializeAsArray(); +} + +std::string MessageSerializer::SerializeAsString() { + return msg_.SerializeAsString(); +} + +} // namespace gen_helpers +} // namespace internal } // namespace protozero // gen_amalgamated begin source: src/protozero/message.cc /* @@ -9803,9 +9411,10 @@ namespace protozero { MessageArena::MessageArena() { // The code below assumes that there is always at least one block. blocks_.emplace_front(); - static_assert(std::alignment_of::value >= - alignof(Message), - "MessageArea's storage is not properly aligned"); + static_assert( + std::alignment_of::value >= + alignof(Message), + "MessageArea's storage is not properly aligned"); } MessageArena::~MessageArena() = default; @@ -9813,10 +9422,10 @@ MessageArena::~MessageArena() = default; Message* MessageArena::NewMessage() { PERFETTO_DCHECK(!blocks_.empty()); // Should never become empty. - Block* block = &blocks_.back(); + Block* block = &blocks_.front(); if (PERFETTO_UNLIKELY(block->entries >= Block::kCapacity)) { - blocks_.emplace_back(); - block = &blocks_.back(); + blocks_.emplace_front(); + block = &blocks_.front(); } const auto idx = block->entries++; void* storage = &block->storage[idx]; @@ -9826,7 +9435,7 @@ Message* MessageArena::NewMessage() { void MessageArena::DeleteLastMessageInternal() { PERFETTO_DCHECK(!blocks_.empty()); // Should never be empty, see below. - Block* block = &blocks_.back(); + Block* block = &blocks_.front(); PERFETTO_DCHECK(block->entries > 0); // This is the reason why there is no ~Message() call here. @@ -9839,79 +9448,11 @@ void MessageArena::DeleteLastMessageInternal() { // Don't remove the first block to avoid malloc/free calls when the root // message is reset. Hitting the allocator all the times is a waste of time. - if (block->entries == 0 && blocks_.size() > 1) { - blocks_.pop_back(); + if (block->entries == 0 && std::next(blocks_.cbegin()) != blocks_.cend()) { + blocks_.pop_front(); } } -} // namespace protozero -// gen_amalgamated begin source: src/protozero/message_handle.cc -/* - * Copyright (C) 2017 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// gen_amalgamated expanded: #include "perfetto/protozero/message_handle.h" - -#include - -// gen_amalgamated expanded: #include "perfetto/protozero/message.h" - -namespace protozero { - -MessageHandleBase::MessageHandleBase(Message* message) : message_(message) { -#if PERFETTO_DCHECK_IS_ON() - generation_ = message_ ? message->generation_ : 0; - if (message_) - message_->set_handle(this); -#endif -} - -MessageHandleBase::~MessageHandleBase() { - if (message_) { -#if PERFETTO_DCHECK_IS_ON() - PERFETTO_DCHECK(generation_ == message_->generation_); -#endif - FinalizeMessage(); - } -} - -MessageHandleBase::MessageHandleBase(MessageHandleBase&& other) noexcept { - Move(std::move(other)); -} - -MessageHandleBase& MessageHandleBase::operator=(MessageHandleBase&& other) { - // If the current handle was pointing to a message and is being reset to a new - // one, finalize the old message. However, if the other message is the same as - // the one we point to, don't finalize. - if (message_ && message_ != other.message_) - FinalizeMessage(); - Move(std::move(other)); - return *this; -} - -void MessageHandleBase::Move(MessageHandleBase&& other) { - message_ = other.message_; - other.message_ = nullptr; -#if PERFETTO_DCHECK_IS_ON() - if (message_) { - generation_ = message_->generation_; - message_->set_handle(this); - } -#endif -} - } // namespace protozero // gen_amalgamated begin source: src/protozero/packed_repeated_fields.cc /* @@ -9936,9 +9477,6 @@ void MessageHandleBase::Move(MessageHandleBase&& other) { namespace protozero { -// static -constexpr size_t PackedBufferBase::kOnStackStorageSize; - void PackedBufferBase::GrowSlowpath() { size_t write_off = static_cast(write_ptr_ - storage_begin_); size_t old_size = static_cast(storage_end_ - storage_begin_); @@ -10009,8 +9547,8 @@ struct ParseFieldResult { // Parses one field and returns the field itself and a pointer to the next // field to parse. If parsing fails, the returned |next| == |buffer|. -PERFETTO_ALWAYS_INLINE ParseFieldResult -ParseOneField(const uint8_t* const buffer, const uint8_t* const end) { +ParseFieldResult ParseOneField(const uint8_t* const buffer, + const uint8_t* const end) { ParseFieldResult res{ParseFieldResult::kAbort, buffer, Field{}}; // The first byte of a proto field is structured as follows: @@ -10135,7 +9673,6 @@ Field ProtoDecoder::FindField(uint32_t field_id) { return res; } -PERFETTO_ALWAYS_INLINE Field ProtoDecoder::ReadField() { ParseFieldResult res; do { @@ -10460,6 +9997,14 @@ namespace protozero { ScatteredStreamWriter::Delegate::~Delegate() {} +uint8_t* ScatteredStreamWriter::Delegate::AnnotatePatch(uint8_t* patch_addr) { + // In most cases, a patch is transparent. The caller can write directly into + // `to_patch`, because its memory is not going away. TraceWriterImpl, however, + // requires a more complicated logic, because the chunks might be copied + // earlier. + return patch_addr; +} + ScatteredStreamWriter::ScatteredStreamWriter(Delegate* delegate) : delegate_(delegate), cur_range_({nullptr, nullptr}), @@ -10808,6 +10353,7 @@ class PERFETTO_EXPORT_COMPONENT AndroidEnergyConsumer : public ::protozero::CppM } // namespace gen #endif // PERFETTO_PROTOS_PROTOS_PERFETTO_COMMON_ANDROID_ENERGY_CONSUMER_DESCRIPTOR_PROTO_CPP_H_ +// gen_amalgamated expanded: #include "perfetto/protozero/gen_field_helpers.h" // gen_amalgamated expanded: #include "perfetto/protozero/message.h" // gen_amalgamated expanded: #include "perfetto/protozero/packed_repeated_fields.h" // gen_amalgamated expanded: #include "perfetto/protozero/proto_decoder.h" @@ -10862,13 +10408,13 @@ bool AndroidEnergyConsumerDescriptor::ParseFromArray(const void* raw, size_t siz } std::string AndroidEnergyConsumerDescriptor::SerializeAsString() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsString(); } std::vector AndroidEnergyConsumerDescriptor::SerializeAsArray() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsArray(); } @@ -10879,7 +10425,7 @@ void AndroidEnergyConsumerDescriptor::Serialize(::protozero::Message* msg) const it.Serialize(msg->BeginNestedMessage<::protozero::Message>(1)); } - msg->AppendRawProtoBytes(unknown_fields_.data(), unknown_fields_.size()); + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); } @@ -10915,10 +10461,10 @@ bool AndroidEnergyConsumer::ParseFromArray(const void* raw, size_t size) { field.get(&ordinal_); break; case 3 /* type */: - field.get(&type_); + ::protozero::internal::gen_helpers::DeserializeString(field, &type_); break; case 4 /* name */: - field.get(&name_); + ::protozero::internal::gen_helpers::DeserializeString(field, &name_); break; default: field.SerializeAndAppendTo(&unknown_fields_); @@ -10929,13 +10475,13 @@ bool AndroidEnergyConsumer::ParseFromArray(const void* raw, size_t size) { } std::string AndroidEnergyConsumer::SerializeAsString() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsString(); } std::vector AndroidEnergyConsumer::SerializeAsArray() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsArray(); } @@ -10943,25 +10489,25 @@ std::vector AndroidEnergyConsumer::SerializeAsArray() const { void AndroidEnergyConsumer::Serialize(::protozero::Message* msg) const { // Field 1: energy_consumer_id if (_has_field_[1]) { - msg->AppendVarInt(1, energy_consumer_id_); + ::protozero::internal::gen_helpers::SerializeVarInt(1, energy_consumer_id_, msg); } // Field 2: ordinal if (_has_field_[2]) { - msg->AppendVarInt(2, ordinal_); + ::protozero::internal::gen_helpers::SerializeVarInt(2, ordinal_, msg); } // Field 3: type if (_has_field_[3]) { - msg->AppendString(3, type_); + ::protozero::internal::gen_helpers::SerializeString(3, type_, msg); } // Field 4: name if (_has_field_[4]) { - msg->AppendString(4, name_); + ::protozero::internal::gen_helpers::SerializeString(4, name_, msg); } - msg->AppendRawProtoBytes(unknown_fields_.data(), unknown_fields_.size()); + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); } } // namespace perfetto @@ -11027,6 +10573,7 @@ enum AndroidLogPriority : int { } // namespace gen #endif // PERFETTO_PROTOS_PROTOS_PERFETTO_COMMON_ANDROID_LOG_CONSTANTS_PROTO_CPP_H_ +// gen_amalgamated expanded: #include "perfetto/protozero/gen_field_helpers.h" // gen_amalgamated expanded: #include "perfetto/protozero/message.h" // gen_amalgamated expanded: #include "perfetto/protozero/packed_repeated_fields.h" // gen_amalgamated expanded: #include "perfetto/protozero/proto_decoder.h" @@ -11093,6 +10640,7 @@ enum BuiltinClock : int { } // namespace gen #endif // PERFETTO_PROTOS_PROTOS_PERFETTO_COMMON_BUILTIN_CLOCK_PROTO_CPP_H_ +// gen_amalgamated expanded: #include "perfetto/protozero/gen_field_helpers.h" // gen_amalgamated expanded: #include "perfetto/protozero/message.h" // gen_amalgamated expanded: #include "perfetto/protozero/packed_repeated_fields.h" // gen_amalgamated expanded: #include "perfetto/protozero/proto_decoder.h" @@ -11356,6 +10904,7 @@ class PERFETTO_EXPORT_COMPONENT CommitDataRequest_ChunksToMove : public ::protoz } // namespace gen #endif // PERFETTO_PROTOS_PROTOS_PERFETTO_COMMON_COMMIT_DATA_REQUEST_PROTO_CPP_H_ +// gen_amalgamated expanded: #include "perfetto/protozero/gen_field_helpers.h" // gen_amalgamated expanded: #include "perfetto/protozero/message.h" // gen_amalgamated expanded: #include "perfetto/protozero/packed_repeated_fields.h" // gen_amalgamated expanded: #include "perfetto/protozero/proto_decoder.h" @@ -11423,13 +10972,13 @@ bool CommitDataRequest::ParseFromArray(const void* raw, size_t size) { } std::string CommitDataRequest::SerializeAsString() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsString(); } std::vector CommitDataRequest::SerializeAsArray() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsArray(); } @@ -11447,10 +10996,10 @@ void CommitDataRequest::Serialize(::protozero::Message* msg) const { // Field 3: flush_request_id if (_has_field_[3]) { - msg->AppendVarInt(3, flush_request_id_); + ::protozero::internal::gen_helpers::SerializeVarInt(3, flush_request_id_, msg); } - msg->AppendRawProtoBytes(unknown_fields_.data(), unknown_fields_.size()); + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); } @@ -11509,13 +11058,13 @@ bool CommitDataRequest_ChunkToPatch::ParseFromArray(const void* raw, size_t size } std::string CommitDataRequest_ChunkToPatch::SerializeAsString() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsString(); } std::vector CommitDataRequest_ChunkToPatch::SerializeAsArray() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsArray(); } @@ -11523,17 +11072,17 @@ std::vector CommitDataRequest_ChunkToPatch::SerializeAsArray() const { void CommitDataRequest_ChunkToPatch::Serialize(::protozero::Message* msg) const { // Field 1: target_buffer if (_has_field_[1]) { - msg->AppendVarInt(1, target_buffer_); + ::protozero::internal::gen_helpers::SerializeVarInt(1, target_buffer_, msg); } // Field 2: writer_id if (_has_field_[2]) { - msg->AppendVarInt(2, writer_id_); + ::protozero::internal::gen_helpers::SerializeVarInt(2, writer_id_, msg); } // Field 3: chunk_id if (_has_field_[3]) { - msg->AppendVarInt(3, chunk_id_); + ::protozero::internal::gen_helpers::SerializeVarInt(3, chunk_id_, msg); } // Field 4: patches @@ -11543,10 +11092,10 @@ void CommitDataRequest_ChunkToPatch::Serialize(::protozero::Message* msg) const // Field 5: has_more_patches if (_has_field_[5]) { - msg->AppendTinyVarInt(5, has_more_patches_); + ::protozero::internal::gen_helpers::SerializeTinyVarInt(5, has_more_patches_, msg); } - msg->AppendRawProtoBytes(unknown_fields_.data(), unknown_fields_.size()); + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); } @@ -11588,13 +11137,13 @@ bool CommitDataRequest_ChunkToPatch_Patch::ParseFromArray(const void* raw, size_ } std::string CommitDataRequest_ChunkToPatch_Patch::SerializeAsString() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsString(); } std::vector CommitDataRequest_ChunkToPatch_Patch::SerializeAsArray() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsArray(); } @@ -11602,15 +11151,15 @@ std::vector CommitDataRequest_ChunkToPatch_Patch::SerializeAsArray() co void CommitDataRequest_ChunkToPatch_Patch::Serialize(::protozero::Message* msg) const { // Field 1: offset if (_has_field_[1]) { - msg->AppendVarInt(1, offset_); + ::protozero::internal::gen_helpers::SerializeVarInt(1, offset_, msg); } // Field 2: data if (_has_field_[2]) { - msg->AppendString(2, data_); + ::protozero::internal::gen_helpers::SerializeString(2, data_, msg); } - msg->AppendRawProtoBytes(unknown_fields_.data(), unknown_fields_.size()); + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); } @@ -11656,13 +11205,13 @@ bool CommitDataRequest_ChunksToMove::ParseFromArray(const void* raw, size_t size } std::string CommitDataRequest_ChunksToMove::SerializeAsString() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsString(); } std::vector CommitDataRequest_ChunksToMove::SerializeAsArray() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsArray(); } @@ -11670,20 +11219,20 @@ std::vector CommitDataRequest_ChunksToMove::SerializeAsArray() const { void CommitDataRequest_ChunksToMove::Serialize(::protozero::Message* msg) const { // Field 1: page if (_has_field_[1]) { - msg->AppendVarInt(1, page_); + ::protozero::internal::gen_helpers::SerializeVarInt(1, page_, msg); } // Field 2: chunk if (_has_field_[2]) { - msg->AppendVarInt(2, chunk_); + ::protozero::internal::gen_helpers::SerializeVarInt(2, chunk_, msg); } // Field 3: target_buffer if (_has_field_[3]) { - msg->AppendVarInt(3, target_buffer_); + ::protozero::internal::gen_helpers::SerializeVarInt(3, target_buffer_, msg); } - msg->AppendRawProtoBytes(unknown_fields_.data(), unknown_fields_.size()); + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); } } // namespace perfetto @@ -11693,6 +11242,7 @@ void CommitDataRequest_ChunksToMove::Serialize(::protozero::Message* msg) const #pragma GCC diagnostic pop #endif // gen_amalgamated begin source: gen/protos/perfetto/common/data_source_descriptor.gen.cc +// gen_amalgamated expanded: #include "perfetto/protozero/gen_field_helpers.h" // gen_amalgamated expanded: #include "perfetto/protozero/message.h" // gen_amalgamated expanded: #include "perfetto/protozero/packed_repeated_fields.h" // gen_amalgamated expanded: #include "perfetto/protozero/proto_decoder.h" @@ -11738,7 +11288,7 @@ bool DataSourceDescriptor::ParseFromArray(const void* raw, size_t size) { } switch (field.id()) { case 1 /* name */: - field.get(&name_); + ::protozero::internal::gen_helpers::DeserializeString(field, &name_); break; case 7 /* id */: field.get(&id_); @@ -11753,13 +11303,13 @@ bool DataSourceDescriptor::ParseFromArray(const void* raw, size_t size) { field.get(&handles_incremental_state_clear_); break; case 5 /* gpu_counter_descriptor */: - gpu_counter_descriptor_ = field.as_std_string(); + ::protozero::internal::gen_helpers::DeserializeString(field, &gpu_counter_descriptor_); break; case 6 /* track_event_descriptor */: - track_event_descriptor_ = field.as_std_string(); + ::protozero::internal::gen_helpers::DeserializeString(field, &track_event_descriptor_); break; case 8 /* ftrace_descriptor */: - ftrace_descriptor_ = field.as_std_string(); + ::protozero::internal::gen_helpers::DeserializeString(field, &ftrace_descriptor_); break; default: field.SerializeAndAppendTo(&unknown_fields_); @@ -11770,13 +11320,13 @@ bool DataSourceDescriptor::ParseFromArray(const void* raw, size_t size) { } std::string DataSourceDescriptor::SerializeAsString() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsString(); } std::vector DataSourceDescriptor::SerializeAsArray() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsArray(); } @@ -11784,27 +11334,27 @@ std::vector DataSourceDescriptor::SerializeAsArray() const { void DataSourceDescriptor::Serialize(::protozero::Message* msg) const { // Field 1: name if (_has_field_[1]) { - msg->AppendString(1, name_); + ::protozero::internal::gen_helpers::SerializeString(1, name_, msg); } // Field 7: id if (_has_field_[7]) { - msg->AppendVarInt(7, id_); + ::protozero::internal::gen_helpers::SerializeVarInt(7, id_, msg); } // Field 2: will_notify_on_stop if (_has_field_[2]) { - msg->AppendTinyVarInt(2, will_notify_on_stop_); + ::protozero::internal::gen_helpers::SerializeTinyVarInt(2, will_notify_on_stop_, msg); } // Field 3: will_notify_on_start if (_has_field_[3]) { - msg->AppendTinyVarInt(3, will_notify_on_start_); + ::protozero::internal::gen_helpers::SerializeTinyVarInt(3, will_notify_on_start_, msg); } // Field 4: handles_incremental_state_clear if (_has_field_[4]) { - msg->AppendTinyVarInt(4, handles_incremental_state_clear_); + ::protozero::internal::gen_helpers::SerializeTinyVarInt(4, handles_incremental_state_clear_, msg); } // Field 5: gpu_counter_descriptor @@ -11822,7 +11372,7 @@ void DataSourceDescriptor::Serialize(::protozero::Message* msg) const { msg->AppendString(8, ftrace_descriptor_); } - msg->AppendRawProtoBytes(unknown_fields_.data(), unknown_fields_.size()); + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); } } // namespace perfetto @@ -11855,6 +11405,7 @@ class EnumValueDescriptorProto; class EnumDescriptorProto; class OneofDescriptorProto; class FieldDescriptorProto; +class FieldOptions; class DescriptorProto; class DescriptorProto_ReservedRange; class FileDescriptorProto; @@ -12098,6 +11649,7 @@ class PERFETTO_EXPORT_COMPONENT FieldDescriptorProto : public ::protozero::CppMe kTypeNameFieldNumber = 6, kExtendeeFieldNumber = 2, kDefaultValueFieldNumber = 7, + kOptionsFieldNumber = 8, kOneofIndexFieldNumber = 9, }; @@ -12143,6 +11695,10 @@ class PERFETTO_EXPORT_COMPONENT FieldDescriptorProto : public ::protozero::CppMe const std::string& default_value() const { return default_value_; } void set_default_value(const std::string& value) { default_value_ = value; _has_field_.set(7); } + bool has_options() const { return _has_field_[8]; } + const FieldOptions& options() const { return *options_; } + FieldOptions* mutable_options() { _has_field_.set(8); return options_.get(); } + bool has_oneof_index() const { return _has_field_[9]; } int32_t oneof_index() const { return oneof_index_; } void set_oneof_index(int32_t value) { oneof_index_ = value; _has_field_.set(9); } @@ -12155,6 +11711,7 @@ class PERFETTO_EXPORT_COMPONENT FieldDescriptorProto : public ::protozero::CppMe std::string type_name_{}; std::string extendee_{}; std::string default_value_{}; + ::protozero::CopyablePtr options_; int32_t oneof_index_{}; // Allows to preserve unknown protobuf fields for compatibility @@ -12165,6 +11722,41 @@ class PERFETTO_EXPORT_COMPONENT FieldDescriptorProto : public ::protozero::CppMe }; +class PERFETTO_EXPORT_COMPONENT FieldOptions : public ::protozero::CppMessageObj { + public: + enum FieldNumbers { + kPackedFieldNumber = 2, + }; + + FieldOptions(); + ~FieldOptions() override; + FieldOptions(FieldOptions&&) noexcept; + FieldOptions& operator=(FieldOptions&&); + FieldOptions(const FieldOptions&); + FieldOptions& operator=(const FieldOptions&); + bool operator==(const FieldOptions&) const; + bool operator!=(const FieldOptions& other) const { return !(*this == other); } + + bool ParseFromArray(const void*, size_t) override; + std::string SerializeAsString() const override; + std::vector SerializeAsArray() const override; + void Serialize(::protozero::Message*) const; + + bool has_packed() const { return _has_field_[2]; } + bool packed() const { return packed_; } + void set_packed(bool value) { packed_ = value; _has_field_.set(2); } + + private: + bool packed_{}; + + // Allows to preserve unknown protobuf fields for compatibility + // with future versions of .proto files. + std::string unknown_fields_; + + std::bitset<3> _has_field_{}; +}; + + class PERFETTO_EXPORT_COMPONENT DescriptorProto : public ::protozero::CppMessageObj { public: using ReservedRange = DescriptorProto_ReservedRange; @@ -12432,6 +12024,7 @@ class PERFETTO_EXPORT_COMPONENT FileDescriptorSet : public ::protozero::CppMessa } // namespace gen #endif // PERFETTO_PROTOS_PROTOS_PERFETTO_COMMON_DESCRIPTOR_PROTO_CPP_H_ +// gen_amalgamated expanded: #include "perfetto/protozero/gen_field_helpers.h" // gen_amalgamated expanded: #include "perfetto/protozero/message.h" // gen_amalgamated expanded: #include "perfetto/protozero/packed_repeated_fields.h" // gen_amalgamated expanded: #include "perfetto/protozero/proto_decoder.h" @@ -12477,19 +12070,19 @@ bool OneofOptions::ParseFromArray(const void* raw, size_t size) { } std::string OneofOptions::SerializeAsString() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsString(); } std::vector OneofOptions::SerializeAsArray() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsArray(); } void OneofOptions::Serialize(::protozero::Message* msg) const { - msg->AppendRawProtoBytes(unknown_fields_.data(), unknown_fields_.size()); + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); } @@ -12517,7 +12110,7 @@ bool EnumValueDescriptorProto::ParseFromArray(const void* raw, size_t size) { } switch (field.id()) { case 1 /* name */: - field.get(&name_); + ::protozero::internal::gen_helpers::DeserializeString(field, &name_); break; case 2 /* number */: field.get(&number_); @@ -12531,13 +12124,13 @@ bool EnumValueDescriptorProto::ParseFromArray(const void* raw, size_t size) { } std::string EnumValueDescriptorProto::SerializeAsString() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsString(); } std::vector EnumValueDescriptorProto::SerializeAsArray() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsArray(); } @@ -12545,15 +12138,15 @@ std::vector EnumValueDescriptorProto::SerializeAsArray() const { void EnumValueDescriptorProto::Serialize(::protozero::Message* msg) const { // Field 1: name if (_has_field_[1]) { - msg->AppendString(1, name_); + ::protozero::internal::gen_helpers::SerializeString(1, name_, msg); } // Field 2: number if (_has_field_[2]) { - msg->AppendVarInt(2, number_); + ::protozero::internal::gen_helpers::SerializeVarInt(2, number_, msg); } - msg->AppendRawProtoBytes(unknown_fields_.data(), unknown_fields_.size()); + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); } @@ -12587,7 +12180,7 @@ bool EnumDescriptorProto::ParseFromArray(const void* raw, size_t size) { } switch (field.id()) { case 1 /* name */: - field.get(&name_); + ::protozero::internal::gen_helpers::DeserializeString(field, &name_); break; case 2 /* value */: value_.emplace_back(); @@ -12595,7 +12188,7 @@ bool EnumDescriptorProto::ParseFromArray(const void* raw, size_t size) { break; case 5 /* reserved_name */: reserved_name_.emplace_back(); - field.get(&reserved_name_.back()); + ::protozero::internal::gen_helpers::DeserializeString(field, &reserved_name_.back()); break; default: field.SerializeAndAppendTo(&unknown_fields_); @@ -12606,13 +12199,13 @@ bool EnumDescriptorProto::ParseFromArray(const void* raw, size_t size) { } std::string EnumDescriptorProto::SerializeAsString() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsString(); } std::vector EnumDescriptorProto::SerializeAsArray() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsArray(); } @@ -12620,7 +12213,7 @@ std::vector EnumDescriptorProto::SerializeAsArray() const { void EnumDescriptorProto::Serialize(::protozero::Message* msg) const { // Field 1: name if (_has_field_[1]) { - msg->AppendString(1, name_); + ::protozero::internal::gen_helpers::SerializeString(1, name_, msg); } // Field 2: value @@ -12630,10 +12223,10 @@ void EnumDescriptorProto::Serialize(::protozero::Message* msg) const { // Field 5: reserved_name for (auto& it : reserved_name_) { - msg->AppendString(5, it); + ::protozero::internal::gen_helpers::SerializeString(5, it, msg); } - msg->AppendRawProtoBytes(unknown_fields_.data(), unknown_fields_.size()); + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); } @@ -12661,7 +12254,7 @@ bool OneofDescriptorProto::ParseFromArray(const void* raw, size_t size) { } switch (field.id()) { case 1 /* name */: - field.get(&name_); + ::protozero::internal::gen_helpers::DeserializeString(field, &name_); break; case 2 /* options */: (*options_).ParseFromArray(field.data(), field.size()); @@ -12675,13 +12268,13 @@ bool OneofDescriptorProto::ParseFromArray(const void* raw, size_t size) { } std::string OneofDescriptorProto::SerializeAsString() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsString(); } std::vector OneofDescriptorProto::SerializeAsArray() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsArray(); } @@ -12689,7 +12282,7 @@ std::vector OneofDescriptorProto::SerializeAsArray() const { void OneofDescriptorProto::Serialize(::protozero::Message* msg) const { // Field 1: name if (_has_field_[1]) { - msg->AppendString(1, name_); + ::protozero::internal::gen_helpers::SerializeString(1, name_, msg); } // Field 2: options @@ -12697,7 +12290,7 @@ void OneofDescriptorProto::Serialize(::protozero::Message* msg) const { (*options_).Serialize(msg->BeginNestedMessage<::protozero::Message>(2)); } - msg->AppendRawProtoBytes(unknown_fields_.data(), unknown_fields_.size()); + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); } @@ -12717,6 +12310,7 @@ bool FieldDescriptorProto::operator==(const FieldDescriptorProto& other) const { && type_name_ == other.type_name_ && extendee_ == other.extendee_ && default_value_ == other.default_value_ + && options_ == other.options_ && oneof_index_ == other.oneof_index_; } @@ -12731,7 +12325,7 @@ bool FieldDescriptorProto::ParseFromArray(const void* raw, size_t size) { } switch (field.id()) { case 1 /* name */: - field.get(&name_); + ::protozero::internal::gen_helpers::DeserializeString(field, &name_); break; case 3 /* number */: field.get(&number_); @@ -12743,13 +12337,16 @@ bool FieldDescriptorProto::ParseFromArray(const void* raw, size_t size) { field.get(&type_); break; case 6 /* type_name */: - field.get(&type_name_); + ::protozero::internal::gen_helpers::DeserializeString(field, &type_name_); break; case 2 /* extendee */: - field.get(&extendee_); + ::protozero::internal::gen_helpers::DeserializeString(field, &extendee_); break; case 7 /* default_value */: - field.get(&default_value_); + ::protozero::internal::gen_helpers::DeserializeString(field, &default_value_); + break; + case 8 /* options */: + (*options_).ParseFromArray(field.data(), field.size()); break; case 9 /* oneof_index */: field.get(&oneof_index_); @@ -12763,13 +12360,13 @@ bool FieldDescriptorProto::ParseFromArray(const void* raw, size_t size) { } std::string FieldDescriptorProto::SerializeAsString() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsString(); } std::vector FieldDescriptorProto::SerializeAsArray() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsArray(); } @@ -12777,45 +12374,105 @@ std::vector FieldDescriptorProto::SerializeAsArray() const { void FieldDescriptorProto::Serialize(::protozero::Message* msg) const { // Field 1: name if (_has_field_[1]) { - msg->AppendString(1, name_); + ::protozero::internal::gen_helpers::SerializeString(1, name_, msg); } // Field 3: number if (_has_field_[3]) { - msg->AppendVarInt(3, number_); + ::protozero::internal::gen_helpers::SerializeVarInt(3, number_, msg); } // Field 4: label if (_has_field_[4]) { - msg->AppendVarInt(4, label_); + ::protozero::internal::gen_helpers::SerializeVarInt(4, label_, msg); } // Field 5: type if (_has_field_[5]) { - msg->AppendVarInt(5, type_); + ::protozero::internal::gen_helpers::SerializeVarInt(5, type_, msg); } // Field 6: type_name if (_has_field_[6]) { - msg->AppendString(6, type_name_); + ::protozero::internal::gen_helpers::SerializeString(6, type_name_, msg); } // Field 2: extendee if (_has_field_[2]) { - msg->AppendString(2, extendee_); + ::protozero::internal::gen_helpers::SerializeString(2, extendee_, msg); } // Field 7: default_value if (_has_field_[7]) { - msg->AppendString(7, default_value_); + ::protozero::internal::gen_helpers::SerializeString(7, default_value_, msg); + } + + // Field 8: options + if (_has_field_[8]) { + (*options_).Serialize(msg->BeginNestedMessage<::protozero::Message>(8)); } // Field 9: oneof_index if (_has_field_[9]) { - msg->AppendVarInt(9, oneof_index_); + ::protozero::internal::gen_helpers::SerializeVarInt(9, oneof_index_, msg); } - msg->AppendRawProtoBytes(unknown_fields_.data(), unknown_fields_.size()); + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); +} + + +FieldOptions::FieldOptions() = default; +FieldOptions::~FieldOptions() = default; +FieldOptions::FieldOptions(const FieldOptions&) = default; +FieldOptions& FieldOptions::operator=(const FieldOptions&) = default; +FieldOptions::FieldOptions(FieldOptions&&) noexcept = default; +FieldOptions& FieldOptions::operator=(FieldOptions&&) = default; + +bool FieldOptions::operator==(const FieldOptions& other) const { + return unknown_fields_ == other.unknown_fields_ + && packed_ == other.packed_; +} + +bool FieldOptions::ParseFromArray(const void* raw, size_t size) { + unknown_fields_.clear(); + bool packed_error = false; + + ::protozero::ProtoDecoder dec(raw, size); + for (auto field = dec.ReadField(); field.valid(); field = dec.ReadField()) { + if (field.id() < _has_field_.size()) { + _has_field_.set(field.id()); + } + switch (field.id()) { + case 2 /* packed */: + field.get(&packed_); + break; + default: + field.SerializeAndAppendTo(&unknown_fields_); + break; + } + } + return !packed_error && !dec.bytes_left(); +} + +std::string FieldOptions::SerializeAsString() const { + ::protozero::internal::gen_helpers::MessageSerializer msg; + Serialize(msg.get()); + return msg.SerializeAsString(); +} + +std::vector FieldOptions::SerializeAsArray() const { + ::protozero::internal::gen_helpers::MessageSerializer msg; + Serialize(msg.get()); + return msg.SerializeAsArray(); +} + +void FieldOptions::Serialize(::protozero::Message* msg) const { + // Field 2: packed + if (_has_field_[2]) { + ::protozero::internal::gen_helpers::SerializeTinyVarInt(2, packed_, msg); + } + + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); } @@ -12874,7 +12531,7 @@ bool DescriptorProto::ParseFromArray(const void* raw, size_t size) { } switch (field.id()) { case 1 /* name */: - field.get(&name_); + ::protozero::internal::gen_helpers::DeserializeString(field, &name_); break; case 2 /* field */: field_.emplace_back(); @@ -12902,7 +12559,7 @@ bool DescriptorProto::ParseFromArray(const void* raw, size_t size) { break; case 10 /* reserved_name */: reserved_name_.emplace_back(); - field.get(&reserved_name_.back()); + ::protozero::internal::gen_helpers::DeserializeString(field, &reserved_name_.back()); break; default: field.SerializeAndAppendTo(&unknown_fields_); @@ -12913,13 +12570,13 @@ bool DescriptorProto::ParseFromArray(const void* raw, size_t size) { } std::string DescriptorProto::SerializeAsString() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsString(); } std::vector DescriptorProto::SerializeAsArray() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsArray(); } @@ -12927,7 +12584,7 @@ std::vector DescriptorProto::SerializeAsArray() const { void DescriptorProto::Serialize(::protozero::Message* msg) const { // Field 1: name if (_has_field_[1]) { - msg->AppendString(1, name_); + ::protozero::internal::gen_helpers::SerializeString(1, name_, msg); } // Field 2: field @@ -12962,10 +12619,10 @@ void DescriptorProto::Serialize(::protozero::Message* msg) const { // Field 10: reserved_name for (auto& it : reserved_name_) { - msg->AppendString(10, it); + ::protozero::internal::gen_helpers::SerializeString(10, it, msg); } - msg->AppendRawProtoBytes(unknown_fields_.data(), unknown_fields_.size()); + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); } @@ -13007,13 +12664,13 @@ bool DescriptorProto_ReservedRange::ParseFromArray(const void* raw, size_t size) } std::string DescriptorProto_ReservedRange::SerializeAsString() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsString(); } std::vector DescriptorProto_ReservedRange::SerializeAsArray() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsArray(); } @@ -13021,15 +12678,15 @@ std::vector DescriptorProto_ReservedRange::SerializeAsArray() const { void DescriptorProto_ReservedRange::Serialize(::protozero::Message* msg) const { // Field 1: start if (_has_field_[1]) { - msg->AppendVarInt(1, start_); + ::protozero::internal::gen_helpers::SerializeVarInt(1, start_, msg); } // Field 2: end if (_has_field_[2]) { - msg->AppendVarInt(2, end_); + ::protozero::internal::gen_helpers::SerializeVarInt(2, end_, msg); } - msg->AppendRawProtoBytes(unknown_fields_.data(), unknown_fields_.size()); + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); } @@ -13078,14 +12735,14 @@ bool FileDescriptorProto::ParseFromArray(const void* raw, size_t size) { } switch (field.id()) { case 1 /* name */: - field.get(&name_); + ::protozero::internal::gen_helpers::DeserializeString(field, &name_); break; case 2 /* package */: - field.get(&package_); + ::protozero::internal::gen_helpers::DeserializeString(field, &package_); break; case 3 /* dependency */: dependency_.emplace_back(); - field.get(&dependency_.back()); + ::protozero::internal::gen_helpers::DeserializeString(field, &dependency_.back()); break; case 10 /* public_dependency */: public_dependency_.emplace_back(); @@ -13116,13 +12773,13 @@ bool FileDescriptorProto::ParseFromArray(const void* raw, size_t size) { } std::string FileDescriptorProto::SerializeAsString() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsString(); } std::vector FileDescriptorProto::SerializeAsArray() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsArray(); } @@ -13130,27 +12787,27 @@ std::vector FileDescriptorProto::SerializeAsArray() const { void FileDescriptorProto::Serialize(::protozero::Message* msg) const { // Field 1: name if (_has_field_[1]) { - msg->AppendString(1, name_); + ::protozero::internal::gen_helpers::SerializeString(1, name_, msg); } // Field 2: package if (_has_field_[2]) { - msg->AppendString(2, package_); + ::protozero::internal::gen_helpers::SerializeString(2, package_, msg); } // Field 3: dependency for (auto& it : dependency_) { - msg->AppendString(3, it); + ::protozero::internal::gen_helpers::SerializeString(3, it, msg); } // Field 10: public_dependency for (auto& it : public_dependency_) { - msg->AppendVarInt(10, it); + ::protozero::internal::gen_helpers::SerializeVarInt(10, it, msg); } // Field 11: weak_dependency for (auto& it : weak_dependency_) { - msg->AppendVarInt(11, it); + ::protozero::internal::gen_helpers::SerializeVarInt(11, it, msg); } // Field 4: message_type @@ -13168,7 +12825,7 @@ void FileDescriptorProto::Serialize(::protozero::Message* msg) const { it.Serialize(msg->BeginNestedMessage<::protozero::Message>(7)); } - msg->AppendRawProtoBytes(unknown_fields_.data(), unknown_fields_.size()); + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); } @@ -13211,13 +12868,13 @@ bool FileDescriptorSet::ParseFromArray(const void* raw, size_t size) { } std::string FileDescriptorSet::SerializeAsString() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsString(); } std::vector FileDescriptorSet::SerializeAsArray() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsArray(); } @@ -13228,7 +12885,7 @@ void FileDescriptorSet::Serialize(::protozero::Message* msg) const { it.Serialize(msg->BeginNestedMessage<::protozero::Message>(1)); } - msg->AppendRawProtoBytes(unknown_fields_.data(), unknown_fields_.size()); + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); } } // namespace perfetto @@ -13353,6 +13010,7 @@ class PERFETTO_EXPORT_COMPONENT FtraceDescriptor_AtraceCategory : public ::proto } // namespace gen #endif // PERFETTO_PROTOS_PROTOS_PERFETTO_COMMON_FTRACE_DESCRIPTOR_PROTO_CPP_H_ +// gen_amalgamated expanded: #include "perfetto/protozero/gen_field_helpers.h" // gen_amalgamated expanded: #include "perfetto/protozero/message.h" // gen_amalgamated expanded: #include "perfetto/protozero/packed_repeated_fields.h" // gen_amalgamated expanded: #include "perfetto/protozero/proto_decoder.h" @@ -13407,13 +13065,13 @@ bool FtraceDescriptor::ParseFromArray(const void* raw, size_t size) { } std::string FtraceDescriptor::SerializeAsString() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsString(); } std::vector FtraceDescriptor::SerializeAsArray() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsArray(); } @@ -13424,7 +13082,7 @@ void FtraceDescriptor::Serialize(::protozero::Message* msg) const { it.Serialize(msg->BeginNestedMessage<::protozero::Message>(1)); } - msg->AppendRawProtoBytes(unknown_fields_.data(), unknown_fields_.size()); + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); } @@ -13452,10 +13110,10 @@ bool FtraceDescriptor_AtraceCategory::ParseFromArray(const void* raw, size_t siz } switch (field.id()) { case 1 /* name */: - field.get(&name_); + ::protozero::internal::gen_helpers::DeserializeString(field, &name_); break; case 2 /* description */: - field.get(&description_); + ::protozero::internal::gen_helpers::DeserializeString(field, &description_); break; default: field.SerializeAndAppendTo(&unknown_fields_); @@ -13466,13 +13124,13 @@ bool FtraceDescriptor_AtraceCategory::ParseFromArray(const void* raw, size_t siz } std::string FtraceDescriptor_AtraceCategory::SerializeAsString() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsString(); } std::vector FtraceDescriptor_AtraceCategory::SerializeAsArray() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsArray(); } @@ -13480,15 +13138,15 @@ std::vector FtraceDescriptor_AtraceCategory::SerializeAsArray() const { void FtraceDescriptor_AtraceCategory::Serialize(::protozero::Message* msg) const { // Field 1: name if (_has_field_[1]) { - msg->AppendString(1, name_); + ::protozero::internal::gen_helpers::SerializeString(1, name_, msg); } // Field 2: description if (_has_field_[2]) { - msg->AppendString(2, description_); + ::protozero::internal::gen_helpers::SerializeString(2, description_, msg); } - msg->AppendRawProtoBytes(unknown_fields_.data(), unknown_fields_.size()); + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); } } // namespace perfetto @@ -13862,6 +13520,7 @@ class PERFETTO_EXPORT_COMPONENT GpuCounterDescriptor_GpuCounterSpec : public ::p } // namespace gen #endif // PERFETTO_PROTOS_PROTOS_PERFETTO_COMMON_GPU_COUNTER_DESCRIPTOR_PROTO_CPP_H_ +// gen_amalgamated expanded: #include "perfetto/protozero/gen_field_helpers.h" // gen_amalgamated expanded: #include "perfetto/protozero/message.h" // gen_amalgamated expanded: #include "perfetto/protozero/packed_repeated_fields.h" // gen_amalgamated expanded: #include "perfetto/protozero/proto_decoder.h" @@ -13937,13 +13596,13 @@ bool GpuCounterDescriptor::ParseFromArray(const void* raw, size_t size) { } std::string GpuCounterDescriptor::SerializeAsString() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsString(); } std::vector GpuCounterDescriptor::SerializeAsArray() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsArray(); } @@ -13961,20 +13620,20 @@ void GpuCounterDescriptor::Serialize(::protozero::Message* msg) const { // Field 3: min_sampling_period_ns if (_has_field_[3]) { - msg->AppendVarInt(3, min_sampling_period_ns_); + ::protozero::internal::gen_helpers::SerializeVarInt(3, min_sampling_period_ns_, msg); } // Field 4: max_sampling_period_ns if (_has_field_[4]) { - msg->AppendVarInt(4, max_sampling_period_ns_); + ::protozero::internal::gen_helpers::SerializeVarInt(4, max_sampling_period_ns_, msg); } // Field 5: supports_instrumented_sampling if (_has_field_[5]) { - msg->AppendTinyVarInt(5, supports_instrumented_sampling_); + ::protozero::internal::gen_helpers::SerializeTinyVarInt(5, supports_instrumented_sampling_, msg); } - msg->AppendRawProtoBytes(unknown_fields_.data(), unknown_fields_.size()); + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); } @@ -14012,10 +13671,10 @@ bool GpuCounterDescriptor_GpuCounterBlock::ParseFromArray(const void* raw, size_ field.get(&block_capacity_); break; case 3 /* name */: - field.get(&name_); + ::protozero::internal::gen_helpers::DeserializeString(field, &name_); break; case 4 /* description */: - field.get(&description_); + ::protozero::internal::gen_helpers::DeserializeString(field, &description_); break; case 5 /* counter_ids */: counter_ids_.emplace_back(); @@ -14030,13 +13689,13 @@ bool GpuCounterDescriptor_GpuCounterBlock::ParseFromArray(const void* raw, size_ } std::string GpuCounterDescriptor_GpuCounterBlock::SerializeAsString() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsString(); } std::vector GpuCounterDescriptor_GpuCounterBlock::SerializeAsArray() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsArray(); } @@ -14044,30 +13703,30 @@ std::vector GpuCounterDescriptor_GpuCounterBlock::SerializeAsArray() co void GpuCounterDescriptor_GpuCounterBlock::Serialize(::protozero::Message* msg) const { // Field 1: block_id if (_has_field_[1]) { - msg->AppendVarInt(1, block_id_); + ::protozero::internal::gen_helpers::SerializeVarInt(1, block_id_, msg); } // Field 2: block_capacity if (_has_field_[2]) { - msg->AppendVarInt(2, block_capacity_); + ::protozero::internal::gen_helpers::SerializeVarInt(2, block_capacity_, msg); } // Field 3: name if (_has_field_[3]) { - msg->AppendString(3, name_); + ::protozero::internal::gen_helpers::SerializeString(3, name_, msg); } // Field 4: description if (_has_field_[4]) { - msg->AppendString(4, description_); + ::protozero::internal::gen_helpers::SerializeString(4, description_, msg); } // Field 5: counter_ids for (auto& it : counter_ids_) { - msg->AppendVarInt(5, it); + ::protozero::internal::gen_helpers::SerializeVarInt(5, it, msg); } - msg->AppendRawProtoBytes(unknown_fields_.data(), unknown_fields_.size()); + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); } @@ -14108,10 +13767,10 @@ bool GpuCounterDescriptor_GpuCounterSpec::ParseFromArray(const void* raw, size_t field.get(&counter_id_); break; case 2 /* name */: - field.get(&name_); + ::protozero::internal::gen_helpers::DeserializeString(field, &name_); break; case 3 /* description */: - field.get(&description_); + ::protozero::internal::gen_helpers::DeserializeString(field, &description_); break; case 5 /* int_peak_value */: field.get(&int_peak_value_); @@ -14143,13 +13802,13 @@ bool GpuCounterDescriptor_GpuCounterSpec::ParseFromArray(const void* raw, size_t } std::string GpuCounterDescriptor_GpuCounterSpec::SerializeAsString() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsString(); } std::vector GpuCounterDescriptor_GpuCounterSpec::SerializeAsArray() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsArray(); } @@ -14157,50 +13816,50 @@ std::vector GpuCounterDescriptor_GpuCounterSpec::SerializeAsArray() con void GpuCounterDescriptor_GpuCounterSpec::Serialize(::protozero::Message* msg) const { // Field 1: counter_id if (_has_field_[1]) { - msg->AppendVarInt(1, counter_id_); + ::protozero::internal::gen_helpers::SerializeVarInt(1, counter_id_, msg); } // Field 2: name if (_has_field_[2]) { - msg->AppendString(2, name_); + ::protozero::internal::gen_helpers::SerializeString(2, name_, msg); } // Field 3: description if (_has_field_[3]) { - msg->AppendString(3, description_); + ::protozero::internal::gen_helpers::SerializeString(3, description_, msg); } // Field 5: int_peak_value if (_has_field_[5]) { - msg->AppendVarInt(5, int_peak_value_); + ::protozero::internal::gen_helpers::SerializeVarInt(5, int_peak_value_, msg); } // Field 6: double_peak_value if (_has_field_[6]) { - msg->AppendFixed(6, double_peak_value_); + ::protozero::internal::gen_helpers::SerializeFixed(6, double_peak_value_, msg); } // Field 7: numerator_units for (auto& it : numerator_units_) { - msg->AppendVarInt(7, it); + ::protozero::internal::gen_helpers::SerializeVarInt(7, it, msg); } // Field 8: denominator_units for (auto& it : denominator_units_) { - msg->AppendVarInt(8, it); + ::protozero::internal::gen_helpers::SerializeVarInt(8, it, msg); } // Field 9: select_by_default if (_has_field_[9]) { - msg->AppendTinyVarInt(9, select_by_default_); + ::protozero::internal::gen_helpers::SerializeTinyVarInt(9, select_by_default_, msg); } // Field 10: groups for (auto& it : groups_) { - msg->AppendVarInt(10, it); + ::protozero::internal::gen_helpers::SerializeVarInt(10, it, msg); } - msg->AppendRawProtoBytes(unknown_fields_.data(), unknown_fields_.size()); + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); } } // namespace perfetto @@ -14280,6 +13939,7 @@ class PERFETTO_EXPORT_COMPONENT InterceptorDescriptor : public ::protozero::CppM } // namespace gen #endif // PERFETTO_PROTOS_PROTOS_PERFETTO_COMMON_INTERCEPTOR_DESCRIPTOR_PROTO_CPP_H_ +// gen_amalgamated expanded: #include "perfetto/protozero/gen_field_helpers.h" // gen_amalgamated expanded: #include "perfetto/protozero/message.h" // gen_amalgamated expanded: #include "perfetto/protozero/packed_repeated_fields.h" // gen_amalgamated expanded: #include "perfetto/protozero/proto_decoder.h" @@ -14318,7 +13978,7 @@ bool InterceptorDescriptor::ParseFromArray(const void* raw, size_t size) { } switch (field.id()) { case 1 /* name */: - field.get(&name_); + ::protozero::internal::gen_helpers::DeserializeString(field, &name_); break; default: field.SerializeAndAppendTo(&unknown_fields_); @@ -14329,13 +13989,13 @@ bool InterceptorDescriptor::ParseFromArray(const void* raw, size_t size) { } std::string InterceptorDescriptor::SerializeAsString() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsString(); } std::vector InterceptorDescriptor::SerializeAsArray() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsArray(); } @@ -14343,10 +14003,10 @@ std::vector InterceptorDescriptor::SerializeAsArray() const { void InterceptorDescriptor::Serialize(::protozero::Message* msg) const { // Field 1: name if (_has_field_[1]) { - msg->AppendString(1, name_); + ::protozero::internal::gen_helpers::SerializeString(1, name_, msg); } - msg->AppendRawProtoBytes(unknown_fields_.data(), unknown_fields_.size()); + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); } } // namespace perfetto @@ -14505,6 +14165,7 @@ class PERFETTO_EXPORT_COMPONENT ObservableEvents_DataSourceInstanceStateChange : } // namespace gen #endif // PERFETTO_PROTOS_PROTOS_PERFETTO_COMMON_OBSERVABLE_EVENTS_PROTO_CPP_H_ +// gen_amalgamated expanded: #include "perfetto/protozero/gen_field_helpers.h" // gen_amalgamated expanded: #include "perfetto/protozero/message.h" // gen_amalgamated expanded: #include "perfetto/protozero/packed_repeated_fields.h" // gen_amalgamated expanded: #include "perfetto/protozero/proto_decoder.h" @@ -14563,13 +14224,13 @@ bool ObservableEvents::ParseFromArray(const void* raw, size_t size) { } std::string ObservableEvents::SerializeAsString() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsString(); } std::vector ObservableEvents::SerializeAsArray() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsArray(); } @@ -14582,10 +14243,10 @@ void ObservableEvents::Serialize(::protozero::Message* msg) const { // Field 2: all_data_sources_started if (_has_field_[2]) { - msg->AppendTinyVarInt(2, all_data_sources_started_); + ::protozero::internal::gen_helpers::SerializeTinyVarInt(2, all_data_sources_started_, msg); } - msg->AppendRawProtoBytes(unknown_fields_.data(), unknown_fields_.size()); + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); } @@ -14614,10 +14275,10 @@ bool ObservableEvents_DataSourceInstanceStateChange::ParseFromArray(const void* } switch (field.id()) { case 1 /* producer_name */: - field.get(&producer_name_); + ::protozero::internal::gen_helpers::DeserializeString(field, &producer_name_); break; case 2 /* data_source_name */: - field.get(&data_source_name_); + ::protozero::internal::gen_helpers::DeserializeString(field, &data_source_name_); break; case 3 /* state */: field.get(&state_); @@ -14631,13 +14292,13 @@ bool ObservableEvents_DataSourceInstanceStateChange::ParseFromArray(const void* } std::string ObservableEvents_DataSourceInstanceStateChange::SerializeAsString() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsString(); } std::vector ObservableEvents_DataSourceInstanceStateChange::SerializeAsArray() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsArray(); } @@ -14645,20 +14306,20 @@ std::vector ObservableEvents_DataSourceInstanceStateChange::SerializeAs void ObservableEvents_DataSourceInstanceStateChange::Serialize(::protozero::Message* msg) const { // Field 1: producer_name if (_has_field_[1]) { - msg->AppendString(1, producer_name_); + ::protozero::internal::gen_helpers::SerializeString(1, producer_name_, msg); } // Field 2: data_source_name if (_has_field_[2]) { - msg->AppendString(2, data_source_name_); + ::protozero::internal::gen_helpers::SerializeString(2, data_source_name_, msg); } // Field 3: state if (_has_field_[3]) { - msg->AppendVarInt(3, state_); + ::protozero::internal::gen_helpers::SerializeVarInt(3, state_, msg); } - msg->AppendRawProtoBytes(unknown_fields_.data(), unknown_fields_.size()); + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); } } // namespace perfetto @@ -14967,6 +14628,7 @@ class PERFETTO_EXPORT_COMPONENT PerfEvents_Timebase : public ::protozero::CppMes } // namespace gen #endif // PERFETTO_PROTOS_PROTOS_PERFETTO_COMMON_PERF_EVENTS_PROTO_CPP_H_ +// gen_amalgamated expanded: #include "perfetto/protozero/gen_field_helpers.h" // gen_amalgamated expanded: #include "perfetto/protozero/message.h" // gen_amalgamated expanded: #include "perfetto/protozero/packed_repeated_fields.h" // gen_amalgamated expanded: #include "perfetto/protozero/proto_decoder.h" @@ -15012,19 +14674,19 @@ bool PerfEvents::ParseFromArray(const void* raw, size_t size) { } std::string PerfEvents::SerializeAsString() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsString(); } std::vector PerfEvents::SerializeAsArray() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsArray(); } void PerfEvents::Serialize(::protozero::Message* msg) const { - msg->AppendRawProtoBytes(unknown_fields_.data(), unknown_fields_.size()); + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); } @@ -15074,13 +14736,13 @@ bool PerfEvents_RawEvent::ParseFromArray(const void* raw, size_t size) { } std::string PerfEvents_RawEvent::SerializeAsString() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsString(); } std::vector PerfEvents_RawEvent::SerializeAsArray() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsArray(); } @@ -15088,25 +14750,25 @@ std::vector PerfEvents_RawEvent::SerializeAsArray() const { void PerfEvents_RawEvent::Serialize(::protozero::Message* msg) const { // Field 1: type if (_has_field_[1]) { - msg->AppendVarInt(1, type_); + ::protozero::internal::gen_helpers::SerializeVarInt(1, type_, msg); } // Field 2: config if (_has_field_[2]) { - msg->AppendVarInt(2, config_); + ::protozero::internal::gen_helpers::SerializeVarInt(2, config_, msg); } // Field 3: config1 if (_has_field_[3]) { - msg->AppendVarInt(3, config1_); + ::protozero::internal::gen_helpers::SerializeVarInt(3, config1_, msg); } // Field 4: config2 if (_has_field_[4]) { - msg->AppendVarInt(4, config2_); + ::protozero::internal::gen_helpers::SerializeVarInt(4, config2_, msg); } - msg->AppendRawProtoBytes(unknown_fields_.data(), unknown_fields_.size()); + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); } @@ -15134,10 +14796,10 @@ bool PerfEvents_Tracepoint::ParseFromArray(const void* raw, size_t size) { } switch (field.id()) { case 1 /* name */: - field.get(&name_); + ::protozero::internal::gen_helpers::DeserializeString(field, &name_); break; case 2 /* filter */: - field.get(&filter_); + ::protozero::internal::gen_helpers::DeserializeString(field, &filter_); break; default: field.SerializeAndAppendTo(&unknown_fields_); @@ -15148,13 +14810,13 @@ bool PerfEvents_Tracepoint::ParseFromArray(const void* raw, size_t size) { } std::string PerfEvents_Tracepoint::SerializeAsString() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsString(); } std::vector PerfEvents_Tracepoint::SerializeAsArray() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsArray(); } @@ -15162,15 +14824,15 @@ std::vector PerfEvents_Tracepoint::SerializeAsArray() const { void PerfEvents_Tracepoint::Serialize(::protozero::Message* msg) const { // Field 1: name if (_has_field_[1]) { - msg->AppendString(1, name_); + ::protozero::internal::gen_helpers::SerializeString(1, name_, msg); } // Field 2: filter if (_has_field_[2]) { - msg->AppendString(2, filter_); + ::protozero::internal::gen_helpers::SerializeString(2, filter_, msg); } - msg->AppendRawProtoBytes(unknown_fields_.data(), unknown_fields_.size()); + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); } @@ -15221,7 +14883,7 @@ bool PerfEvents_Timebase::ParseFromArray(const void* raw, size_t size) { field.get(×tamp_clock_); break; case 10 /* name */: - field.get(&name_); + ::protozero::internal::gen_helpers::DeserializeString(field, &name_); break; default: field.SerializeAndAppendTo(&unknown_fields_); @@ -15232,13 +14894,13 @@ bool PerfEvents_Timebase::ParseFromArray(const void* raw, size_t size) { } std::string PerfEvents_Timebase::SerializeAsString() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsString(); } std::vector PerfEvents_Timebase::SerializeAsArray() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsArray(); } @@ -15246,17 +14908,17 @@ std::vector PerfEvents_Timebase::SerializeAsArray() const { void PerfEvents_Timebase::Serialize(::protozero::Message* msg) const { // Field 2: frequency if (_has_field_[2]) { - msg->AppendVarInt(2, frequency_); + ::protozero::internal::gen_helpers::SerializeVarInt(2, frequency_, msg); } // Field 1: period if (_has_field_[1]) { - msg->AppendVarInt(1, period_); + ::protozero::internal::gen_helpers::SerializeVarInt(1, period_, msg); } // Field 4: counter if (_has_field_[4]) { - msg->AppendVarInt(4, counter_); + ::protozero::internal::gen_helpers::SerializeVarInt(4, counter_, msg); } // Field 3: tracepoint @@ -15271,15 +14933,15 @@ void PerfEvents_Timebase::Serialize(::protozero::Message* msg) const { // Field 11: timestamp_clock if (_has_field_[11]) { - msg->AppendVarInt(11, timestamp_clock_); + ::protozero::internal::gen_helpers::SerializeVarInt(11, timestamp_clock_, msg); } // Field 10: name if (_has_field_[10]) { - msg->AppendString(10, name_); + ::protozero::internal::gen_helpers::SerializeString(10, name_, msg); } - msg->AppendRawProtoBytes(unknown_fields_.data(), unknown_fields_.size()); + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); } } // namespace perfetto @@ -15492,6 +15154,7 @@ enum VmstatCounters : int { } // namespace gen #endif // PERFETTO_PROTOS_PROTOS_PERFETTO_COMMON_SYS_STATS_COUNTERS_PROTO_CPP_H_ +// gen_amalgamated expanded: #include "perfetto/protozero/gen_field_helpers.h" // gen_amalgamated expanded: #include "perfetto/protozero/message.h" // gen_amalgamated expanded: #include "perfetto/protozero/packed_repeated_fields.h" // gen_amalgamated expanded: #include "perfetto/protozero/proto_decoder.h" @@ -15533,6 +15196,7 @@ namespace protos { namespace gen { class TraceStats; class TraceStats_FilterStats; +class TraceStats_WriterStats; class TraceStats_BufferStats; enum TraceStats_FinalFlushOutcome : int; } // namespace perfetto @@ -15555,6 +15219,7 @@ enum TraceStats_FinalFlushOutcome : int { class PERFETTO_EXPORT_COMPONENT TraceStats : public ::protozero::CppMessageObj { public: using BufferStats = TraceStats_BufferStats; + using WriterStats = TraceStats_WriterStats; using FilterStats = TraceStats_FilterStats; using FinalFlushOutcome = TraceStats_FinalFlushOutcome; static constexpr auto FINAL_FLUSH_UNSPECIFIED = TraceStats_FinalFlushOutcome_FINAL_FLUSH_UNSPECIFIED; @@ -15564,6 +15229,8 @@ class PERFETTO_EXPORT_COMPONENT TraceStats : public ::protozero::CppMessageObj { static constexpr auto FinalFlushOutcome_MAX = TraceStats_FinalFlushOutcome_FINAL_FLUSH_FAILED; enum FieldNumbers { kBufferStatsFieldNumber = 1, + kChunkPayloadHistogramDefFieldNumber = 17, + kWriterStatsFieldNumber = 18, kProducersConnectedFieldNumber = 2, kProducersSeenFieldNumber = 3, kDataSourcesRegisteredFieldNumber = 4, @@ -15600,6 +15267,19 @@ class PERFETTO_EXPORT_COMPONENT TraceStats : public ::protozero::CppMessageObj { void clear_buffer_stats(); TraceStats_BufferStats* add_buffer_stats(); + const std::vector& chunk_payload_histogram_def() const { return chunk_payload_histogram_def_; } + std::vector* mutable_chunk_payload_histogram_def() { return &chunk_payload_histogram_def_; } + int chunk_payload_histogram_def_size() const { return static_cast(chunk_payload_histogram_def_.size()); } + void clear_chunk_payload_histogram_def() { chunk_payload_histogram_def_.clear(); } + void add_chunk_payload_histogram_def(int64_t value) { chunk_payload_histogram_def_.emplace_back(value); } + int64_t* add_chunk_payload_histogram_def() { chunk_payload_histogram_def_.emplace_back(); return &chunk_payload_histogram_def_.back(); } + + const std::vector& writer_stats() const { return writer_stats_; } + std::vector* mutable_writer_stats() { return &writer_stats_; } + int writer_stats_size() const; + void clear_writer_stats(); + TraceStats_WriterStats* add_writer_stats(); + bool has_producers_connected() const { return _has_field_[2]; } uint32_t producers_connected() const { return producers_connected_; } void set_producers_connected(uint32_t value) { producers_connected_ = value; _has_field_.set(2); } @@ -15658,6 +15338,8 @@ class PERFETTO_EXPORT_COMPONENT TraceStats : public ::protozero::CppMessageObj { private: std::vector buffer_stats_; + std::vector chunk_payload_histogram_def_; + std::vector writer_stats_; uint32_t producers_connected_{}; uint64_t producers_seen_{}; uint32_t data_sources_registered_{}; @@ -15677,7 +15359,7 @@ class PERFETTO_EXPORT_COMPONENT TraceStats : public ::protozero::CppMessageObj { // with future versions of .proto files. std::string unknown_fields_; - std::bitset<16> _has_field_{}; + std::bitset<19> _has_field_{}; }; @@ -15734,6 +15416,59 @@ class PERFETTO_EXPORT_COMPONENT TraceStats_FilterStats : public ::protozero::Cpp }; +class PERFETTO_EXPORT_COMPONENT TraceStats_WriterStats : public ::protozero::CppMessageObj { + public: + enum FieldNumbers { + kSequenceIdFieldNumber = 1, + kChunkPayloadHistogramCountsFieldNumber = 2, + kChunkPayloadHistogramSumFieldNumber = 3, + }; + + TraceStats_WriterStats(); + ~TraceStats_WriterStats() override; + TraceStats_WriterStats(TraceStats_WriterStats&&) noexcept; + TraceStats_WriterStats& operator=(TraceStats_WriterStats&&); + TraceStats_WriterStats(const TraceStats_WriterStats&); + TraceStats_WriterStats& operator=(const TraceStats_WriterStats&); + bool operator==(const TraceStats_WriterStats&) const; + bool operator!=(const TraceStats_WriterStats& other) const { return !(*this == other); } + + bool ParseFromArray(const void*, size_t) override; + std::string SerializeAsString() const override; + std::vector SerializeAsArray() const override; + void Serialize(::protozero::Message*) const; + + bool has_sequence_id() const { return _has_field_[1]; } + uint64_t sequence_id() const { return sequence_id_; } + void set_sequence_id(uint64_t value) { sequence_id_ = value; _has_field_.set(1); } + + const std::vector& chunk_payload_histogram_counts() const { return chunk_payload_histogram_counts_; } + std::vector* mutable_chunk_payload_histogram_counts() { return &chunk_payload_histogram_counts_; } + int chunk_payload_histogram_counts_size() const { return static_cast(chunk_payload_histogram_counts_.size()); } + void clear_chunk_payload_histogram_counts() { chunk_payload_histogram_counts_.clear(); } + void add_chunk_payload_histogram_counts(uint64_t value) { chunk_payload_histogram_counts_.emplace_back(value); } + uint64_t* add_chunk_payload_histogram_counts() { chunk_payload_histogram_counts_.emplace_back(); return &chunk_payload_histogram_counts_.back(); } + + const std::vector& chunk_payload_histogram_sum() const { return chunk_payload_histogram_sum_; } + std::vector* mutable_chunk_payload_histogram_sum() { return &chunk_payload_histogram_sum_; } + int chunk_payload_histogram_sum_size() const { return static_cast(chunk_payload_histogram_sum_.size()); } + void clear_chunk_payload_histogram_sum() { chunk_payload_histogram_sum_.clear(); } + void add_chunk_payload_histogram_sum(int64_t value) { chunk_payload_histogram_sum_.emplace_back(value); } + int64_t* add_chunk_payload_histogram_sum() { chunk_payload_histogram_sum_.emplace_back(); return &chunk_payload_histogram_sum_.back(); } + + private: + uint64_t sequence_id_{}; + std::vector chunk_payload_histogram_counts_; + std::vector chunk_payload_histogram_sum_; + + // Allows to preserve unknown protobuf fields for compatibility + // with future versions of .proto files. + std::string unknown_fields_; + + std::bitset<4> _has_field_{}; +}; + + class PERFETTO_EXPORT_COMPONENT TraceStats_BufferStats : public ::protozero::CppMessageObj { public: enum FieldNumbers { @@ -15881,6 +15616,7 @@ class PERFETTO_EXPORT_COMPONENT TraceStats_BufferStats : public ::protozero::Cpp } // namespace gen #endif // PERFETTO_PROTOS_PROTOS_PERFETTO_COMMON_TRACE_STATS_PROTO_CPP_H_ +// gen_amalgamated expanded: #include "perfetto/protozero/gen_field_helpers.h" // gen_amalgamated expanded: #include "perfetto/protozero/message.h" // gen_amalgamated expanded: #include "perfetto/protozero/packed_repeated_fields.h" // gen_amalgamated expanded: #include "perfetto/protozero/proto_decoder.h" @@ -15906,6 +15642,8 @@ TraceStats& TraceStats::operator=(TraceStats&&) = default; bool TraceStats::operator==(const TraceStats& other) const { return unknown_fields_ == other.unknown_fields_ && buffer_stats_ == other.buffer_stats_ + && chunk_payload_histogram_def_ == other.chunk_payload_histogram_def_ + && writer_stats_ == other.writer_stats_ && producers_connected_ == other.producers_connected_ && producers_seen_ == other.producers_seen_ && data_sources_registered_ == other.data_sources_registered_ @@ -15925,8 +15663,13 @@ bool TraceStats::operator==(const TraceStats& other) const { int TraceStats::buffer_stats_size() const { return static_cast(buffer_stats_.size()); } void TraceStats::clear_buffer_stats() { buffer_stats_.clear(); } TraceStats_BufferStats* TraceStats::add_buffer_stats() { buffer_stats_.emplace_back(); return &buffer_stats_.back(); } +int TraceStats::writer_stats_size() const { return static_cast(writer_stats_.size()); } +void TraceStats::clear_writer_stats() { writer_stats_.clear(); } +TraceStats_WriterStats* TraceStats::add_writer_stats() { writer_stats_.emplace_back(); return &writer_stats_.back(); } bool TraceStats::ParseFromArray(const void* raw, size_t size) { buffer_stats_.clear(); + chunk_payload_histogram_def_.clear(); + writer_stats_.clear(); unknown_fields_.clear(); bool packed_error = false; @@ -15940,6 +15683,14 @@ bool TraceStats::ParseFromArray(const void* raw, size_t size) { buffer_stats_.emplace_back(); buffer_stats_.back().ParseFromArray(field.data(), field.size()); break; + case 17 /* chunk_payload_histogram_def */: + chunk_payload_histogram_def_.emplace_back(); + field.get(&chunk_payload_histogram_def_.back()); + break; + case 18 /* writer_stats */: + writer_stats_.emplace_back(); + writer_stats_.back().ParseFromArray(field.data(), field.size()); + break; case 2 /* producers_connected */: field.get(&producers_connected_); break; @@ -15991,13 +15742,13 @@ bool TraceStats::ParseFromArray(const void* raw, size_t size) { } std::string TraceStats::SerializeAsString() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsString(); } std::vector TraceStats::SerializeAsArray() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsArray(); } @@ -16008,49 +15759,59 @@ void TraceStats::Serialize(::protozero::Message* msg) const { it.Serialize(msg->BeginNestedMessage<::protozero::Message>(1)); } + // Field 17: chunk_payload_histogram_def + for (auto& it : chunk_payload_histogram_def_) { + ::protozero::internal::gen_helpers::SerializeVarInt(17, it, msg); + } + + // Field 18: writer_stats + for (auto& it : writer_stats_) { + it.Serialize(msg->BeginNestedMessage<::protozero::Message>(18)); + } + // Field 2: producers_connected if (_has_field_[2]) { - msg->AppendVarInt(2, producers_connected_); + ::protozero::internal::gen_helpers::SerializeVarInt(2, producers_connected_, msg); } // Field 3: producers_seen if (_has_field_[3]) { - msg->AppendVarInt(3, producers_seen_); + ::protozero::internal::gen_helpers::SerializeVarInt(3, producers_seen_, msg); } // Field 4: data_sources_registered if (_has_field_[4]) { - msg->AppendVarInt(4, data_sources_registered_); + ::protozero::internal::gen_helpers::SerializeVarInt(4, data_sources_registered_, msg); } // Field 5: data_sources_seen if (_has_field_[5]) { - msg->AppendVarInt(5, data_sources_seen_); + ::protozero::internal::gen_helpers::SerializeVarInt(5, data_sources_seen_, msg); } // Field 6: tracing_sessions if (_has_field_[6]) { - msg->AppendVarInt(6, tracing_sessions_); + ::protozero::internal::gen_helpers::SerializeVarInt(6, tracing_sessions_, msg); } // Field 7: total_buffers if (_has_field_[7]) { - msg->AppendVarInt(7, total_buffers_); + ::protozero::internal::gen_helpers::SerializeVarInt(7, total_buffers_, msg); } // Field 8: chunks_discarded if (_has_field_[8]) { - msg->AppendVarInt(8, chunks_discarded_); + ::protozero::internal::gen_helpers::SerializeVarInt(8, chunks_discarded_, msg); } // Field 9: patches_discarded if (_has_field_[9]) { - msg->AppendVarInt(9, patches_discarded_); + ::protozero::internal::gen_helpers::SerializeVarInt(9, patches_discarded_, msg); } // Field 10: invalid_packets if (_has_field_[10]) { - msg->AppendVarInt(10, invalid_packets_); + ::protozero::internal::gen_helpers::SerializeVarInt(10, invalid_packets_, msg); } // Field 11: filter_stats @@ -16060,25 +15821,25 @@ void TraceStats::Serialize(::protozero::Message* msg) const { // Field 12: flushes_requested if (_has_field_[12]) { - msg->AppendVarInt(12, flushes_requested_); + ::protozero::internal::gen_helpers::SerializeVarInt(12, flushes_requested_, msg); } // Field 13: flushes_succeeded if (_has_field_[13]) { - msg->AppendVarInt(13, flushes_succeeded_); + ::protozero::internal::gen_helpers::SerializeVarInt(13, flushes_succeeded_, msg); } // Field 14: flushes_failed if (_has_field_[14]) { - msg->AppendVarInt(14, flushes_failed_); + ::protozero::internal::gen_helpers::SerializeVarInt(14, flushes_failed_, msg); } // Field 15: final_flush_outcome if (_has_field_[15]) { - msg->AppendVarInt(15, final_flush_outcome_); + ::protozero::internal::gen_helpers::SerializeVarInt(15, final_flush_outcome_, msg); } - msg->AppendRawProtoBytes(unknown_fields_.data(), unknown_fields_.size()); + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); } @@ -16128,13 +15889,13 @@ bool TraceStats_FilterStats::ParseFromArray(const void* raw, size_t size) { } std::string TraceStats_FilterStats::SerializeAsString() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsString(); } std::vector TraceStats_FilterStats::SerializeAsArray() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsArray(); } @@ -16142,25 +15903,108 @@ std::vector TraceStats_FilterStats::SerializeAsArray() const { void TraceStats_FilterStats::Serialize(::protozero::Message* msg) const { // Field 1: input_packets if (_has_field_[1]) { - msg->AppendVarInt(1, input_packets_); + ::protozero::internal::gen_helpers::SerializeVarInt(1, input_packets_, msg); } // Field 2: input_bytes if (_has_field_[2]) { - msg->AppendVarInt(2, input_bytes_); + ::protozero::internal::gen_helpers::SerializeVarInt(2, input_bytes_, msg); } // Field 3: output_bytes if (_has_field_[3]) { - msg->AppendVarInt(3, output_bytes_); + ::protozero::internal::gen_helpers::SerializeVarInt(3, output_bytes_, msg); } // Field 4: errors if (_has_field_[4]) { - msg->AppendVarInt(4, errors_); + ::protozero::internal::gen_helpers::SerializeVarInt(4, errors_, msg); } - msg->AppendRawProtoBytes(unknown_fields_.data(), unknown_fields_.size()); + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); +} + + +TraceStats_WriterStats::TraceStats_WriterStats() = default; +TraceStats_WriterStats::~TraceStats_WriterStats() = default; +TraceStats_WriterStats::TraceStats_WriterStats(const TraceStats_WriterStats&) = default; +TraceStats_WriterStats& TraceStats_WriterStats::operator=(const TraceStats_WriterStats&) = default; +TraceStats_WriterStats::TraceStats_WriterStats(TraceStats_WriterStats&&) noexcept = default; +TraceStats_WriterStats& TraceStats_WriterStats::operator=(TraceStats_WriterStats&&) = default; + +bool TraceStats_WriterStats::operator==(const TraceStats_WriterStats& other) const { + return unknown_fields_ == other.unknown_fields_ + && sequence_id_ == other.sequence_id_ + && chunk_payload_histogram_counts_ == other.chunk_payload_histogram_counts_ + && chunk_payload_histogram_sum_ == other.chunk_payload_histogram_sum_; +} + +bool TraceStats_WriterStats::ParseFromArray(const void* raw, size_t size) { + chunk_payload_histogram_counts_.clear(); + chunk_payload_histogram_sum_.clear(); + unknown_fields_.clear(); + bool packed_error = false; + + ::protozero::ProtoDecoder dec(raw, size); + for (auto field = dec.ReadField(); field.valid(); field = dec.ReadField()) { + if (field.id() < _has_field_.size()) { + _has_field_.set(field.id()); + } + switch (field.id()) { + case 1 /* sequence_id */: + field.get(&sequence_id_); + break; + case 2 /* chunk_payload_histogram_counts */: + if (!::protozero::internal::gen_helpers::DeserializePackedRepeated<::protozero::proto_utils::ProtoWireType::kVarInt, uint64_t>(field, &chunk_payload_histogram_counts_)) { + packed_error = true;} + break; + case 3 /* chunk_payload_histogram_sum */: + if (!::protozero::internal::gen_helpers::DeserializePackedRepeated<::protozero::proto_utils::ProtoWireType::kVarInt, int64_t>(field, &chunk_payload_histogram_sum_)) { + packed_error = true;} + break; + default: + field.SerializeAndAppendTo(&unknown_fields_); + break; + } + } + return !packed_error && !dec.bytes_left(); +} + +std::string TraceStats_WriterStats::SerializeAsString() const { + ::protozero::internal::gen_helpers::MessageSerializer msg; + Serialize(msg.get()); + return msg.SerializeAsString(); +} + +std::vector TraceStats_WriterStats::SerializeAsArray() const { + ::protozero::internal::gen_helpers::MessageSerializer msg; + Serialize(msg.get()); + return msg.SerializeAsArray(); +} + +void TraceStats_WriterStats::Serialize(::protozero::Message* msg) const { + // Field 1: sequence_id + if (_has_field_[1]) { + ::protozero::internal::gen_helpers::SerializeVarInt(1, sequence_id_, msg); + } + + // Field 2: chunk_payload_histogram_counts + { + ::protozero::PackedVarInt pack; + for (auto& it : chunk_payload_histogram_counts_) + pack.Append(it); + msg->AppendBytes(2, pack.data(), pack.size()); + } + + // Field 3: chunk_payload_histogram_sum + { + ::protozero::PackedVarInt pack; + for (auto& it : chunk_payload_histogram_sum_) + pack.Append(it); + msg->AppendBytes(3, pack.data(), pack.size()); + } + + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); } @@ -16270,13 +16114,13 @@ bool TraceStats_BufferStats::ParseFromArray(const void* raw, size_t size) { } std::string TraceStats_BufferStats::SerializeAsString() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsString(); } std::vector TraceStats_BufferStats::SerializeAsArray() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsArray(); } @@ -16284,100 +16128,100 @@ std::vector TraceStats_BufferStats::SerializeAsArray() const { void TraceStats_BufferStats::Serialize(::protozero::Message* msg) const { // Field 12: buffer_size if (_has_field_[12]) { - msg->AppendVarInt(12, buffer_size_); + ::protozero::internal::gen_helpers::SerializeVarInt(12, buffer_size_, msg); } // Field 1: bytes_written if (_has_field_[1]) { - msg->AppendVarInt(1, bytes_written_); + ::protozero::internal::gen_helpers::SerializeVarInt(1, bytes_written_, msg); } // Field 13: bytes_overwritten if (_has_field_[13]) { - msg->AppendVarInt(13, bytes_overwritten_); + ::protozero::internal::gen_helpers::SerializeVarInt(13, bytes_overwritten_, msg); } // Field 14: bytes_read if (_has_field_[14]) { - msg->AppendVarInt(14, bytes_read_); + ::protozero::internal::gen_helpers::SerializeVarInt(14, bytes_read_, msg); } // Field 15: padding_bytes_written if (_has_field_[15]) { - msg->AppendVarInt(15, padding_bytes_written_); + ::protozero::internal::gen_helpers::SerializeVarInt(15, padding_bytes_written_, msg); } // Field 16: padding_bytes_cleared if (_has_field_[16]) { - msg->AppendVarInt(16, padding_bytes_cleared_); + ::protozero::internal::gen_helpers::SerializeVarInt(16, padding_bytes_cleared_, msg); } // Field 2: chunks_written if (_has_field_[2]) { - msg->AppendVarInt(2, chunks_written_); + ::protozero::internal::gen_helpers::SerializeVarInt(2, chunks_written_, msg); } // Field 10: chunks_rewritten if (_has_field_[10]) { - msg->AppendVarInt(10, chunks_rewritten_); + ::protozero::internal::gen_helpers::SerializeVarInt(10, chunks_rewritten_, msg); } // Field 3: chunks_overwritten if (_has_field_[3]) { - msg->AppendVarInt(3, chunks_overwritten_); + ::protozero::internal::gen_helpers::SerializeVarInt(3, chunks_overwritten_, msg); } // Field 18: chunks_discarded if (_has_field_[18]) { - msg->AppendVarInt(18, chunks_discarded_); + ::protozero::internal::gen_helpers::SerializeVarInt(18, chunks_discarded_, msg); } // Field 17: chunks_read if (_has_field_[17]) { - msg->AppendVarInt(17, chunks_read_); + ::protozero::internal::gen_helpers::SerializeVarInt(17, chunks_read_, msg); } // Field 11: chunks_committed_out_of_order if (_has_field_[11]) { - msg->AppendVarInt(11, chunks_committed_out_of_order_); + ::protozero::internal::gen_helpers::SerializeVarInt(11, chunks_committed_out_of_order_, msg); } // Field 4: write_wrap_count if (_has_field_[4]) { - msg->AppendVarInt(4, write_wrap_count_); + ::protozero::internal::gen_helpers::SerializeVarInt(4, write_wrap_count_, msg); } // Field 5: patches_succeeded if (_has_field_[5]) { - msg->AppendVarInt(5, patches_succeeded_); + ::protozero::internal::gen_helpers::SerializeVarInt(5, patches_succeeded_, msg); } // Field 6: patches_failed if (_has_field_[6]) { - msg->AppendVarInt(6, patches_failed_); + ::protozero::internal::gen_helpers::SerializeVarInt(6, patches_failed_, msg); } // Field 7: readaheads_succeeded if (_has_field_[7]) { - msg->AppendVarInt(7, readaheads_succeeded_); + ::protozero::internal::gen_helpers::SerializeVarInt(7, readaheads_succeeded_, msg); } // Field 8: readaheads_failed if (_has_field_[8]) { - msg->AppendVarInt(8, readaheads_failed_); + ::protozero::internal::gen_helpers::SerializeVarInt(8, readaheads_failed_, msg); } // Field 9: abi_violations if (_has_field_[9]) { - msg->AppendVarInt(9, abi_violations_); + ::protozero::internal::gen_helpers::SerializeVarInt(9, abi_violations_, msg); } // Field 19: trace_writer_packet_loss if (_has_field_[19]) { - msg->AppendVarInt(19, trace_writer_packet_loss_); + ::protozero::internal::gen_helpers::SerializeVarInt(19, trace_writer_packet_loss_, msg); } - msg->AppendRawProtoBytes(unknown_fields_.data(), unknown_fields_.size()); + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); } } // namespace perfetto @@ -16473,6 +16317,7 @@ class PERFETTO_EXPORT_COMPONENT TracingServiceCapabilities : public ::protozero: } // namespace gen #endif // PERFETTO_PROTOS_PROTOS_PERFETTO_COMMON_TRACING_SERVICE_CAPABILITIES_PROTO_CPP_H_ +// gen_amalgamated expanded: #include "perfetto/protozero/gen_field_helpers.h" // gen_amalgamated expanded: #include "perfetto/protozero/message.h" // gen_amalgamated expanded: #include "perfetto/protozero/packed_repeated_fields.h" // gen_amalgamated expanded: #include "perfetto/protozero/proto_decoder.h" @@ -16533,13 +16378,13 @@ bool TracingServiceCapabilities::ParseFromArray(const void* raw, size_t size) { } std::string TracingServiceCapabilities::SerializeAsString() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsString(); } std::vector TracingServiceCapabilities::SerializeAsArray() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsArray(); } @@ -16547,20 +16392,20 @@ std::vector TracingServiceCapabilities::SerializeAsArray() const { void TracingServiceCapabilities::Serialize(::protozero::Message* msg) const { // Field 1: has_query_capabilities if (_has_field_[1]) { - msg->AppendTinyVarInt(1, has_query_capabilities_); + ::protozero::internal::gen_helpers::SerializeTinyVarInt(1, has_query_capabilities_, msg); } // Field 2: observable_events for (auto& it : observable_events_) { - msg->AppendVarInt(2, it); + ::protozero::internal::gen_helpers::SerializeVarInt(2, it, msg); } // Field 3: has_trace_config_output_path if (_has_field_[3]) { - msg->AppendTinyVarInt(3, has_trace_config_output_path_); + ::protozero::internal::gen_helpers::SerializeTinyVarInt(3, has_trace_config_output_path_, msg); } - msg->AppendRawProtoBytes(unknown_fields_.data(), unknown_fields_.size()); + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); } } // namespace perfetto @@ -16992,6 +16837,7 @@ class PERFETTO_EXPORT_COMPONENT TrackEventCategory : public ::protozero::CppMess } // namespace gen #endif // PERFETTO_PROTOS_PROTOS_PERFETTO_COMMON_TRACK_EVENT_DESCRIPTOR_PROTO_CPP_H_ +// gen_amalgamated expanded: #include "perfetto/protozero/gen_field_helpers.h" // gen_amalgamated expanded: #include "perfetto/protozero/message.h" // gen_amalgamated expanded: #include "perfetto/protozero/packed_repeated_fields.h" // gen_amalgamated expanded: #include "perfetto/protozero/proto_decoder.h" @@ -17073,7 +16919,7 @@ bool TracingServiceState::ParseFromArray(const void* raw, size_t size) { field.get(&num_sessions_started_); break; case 5 /* tracing_service_version */: - field.get(&tracing_service_version_); + ::protozero::internal::gen_helpers::DeserializeString(field, &tracing_service_version_); break; default: field.SerializeAndAppendTo(&unknown_fields_); @@ -17084,13 +16930,13 @@ bool TracingServiceState::ParseFromArray(const void* raw, size_t size) { } std::string TracingServiceState::SerializeAsString() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsString(); } std::vector TracingServiceState::SerializeAsArray() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsArray(); } @@ -17113,25 +16959,25 @@ void TracingServiceState::Serialize(::protozero::Message* msg) const { // Field 7: supports_tracing_sessions if (_has_field_[7]) { - msg->AppendTinyVarInt(7, supports_tracing_sessions_); + ::protozero::internal::gen_helpers::SerializeTinyVarInt(7, supports_tracing_sessions_, msg); } // Field 3: num_sessions if (_has_field_[3]) { - msg->AppendVarInt(3, num_sessions_); + ::protozero::internal::gen_helpers::SerializeVarInt(3, num_sessions_, msg); } // Field 4: num_sessions_started if (_has_field_[4]) { - msg->AppendVarInt(4, num_sessions_started_); + ::protozero::internal::gen_helpers::SerializeVarInt(4, num_sessions_started_, msg); } // Field 5: tracing_service_version if (_has_field_[5]) { - msg->AppendString(5, tracing_service_version_); + ::protozero::internal::gen_helpers::SerializeString(5, tracing_service_version_, msg); } - msg->AppendRawProtoBytes(unknown_fields_.data(), unknown_fields_.size()); + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); } @@ -17172,10 +17018,10 @@ bool TracingServiceState_TracingSession::ParseFromArray(const void* raw, size_t field.get(&consumer_uid_); break; case 3 /* state */: - field.get(&state_); + ::protozero::internal::gen_helpers::DeserializeString(field, &state_); break; case 4 /* unique_session_name */: - field.get(&unique_session_name_); + ::protozero::internal::gen_helpers::DeserializeString(field, &unique_session_name_); break; case 5 /* buffer_size_kb */: buffer_size_kb_.emplace_back(); @@ -17199,13 +17045,13 @@ bool TracingServiceState_TracingSession::ParseFromArray(const void* raw, size_t } std::string TracingServiceState_TracingSession::SerializeAsString() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsString(); } std::vector TracingServiceState_TracingSession::SerializeAsArray() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsArray(); } @@ -17213,45 +17059,45 @@ std::vector TracingServiceState_TracingSession::SerializeAsArray() cons void TracingServiceState_TracingSession::Serialize(::protozero::Message* msg) const { // Field 1: id if (_has_field_[1]) { - msg->AppendVarInt(1, id_); + ::protozero::internal::gen_helpers::SerializeVarInt(1, id_, msg); } // Field 2: consumer_uid if (_has_field_[2]) { - msg->AppendVarInt(2, consumer_uid_); + ::protozero::internal::gen_helpers::SerializeVarInt(2, consumer_uid_, msg); } // Field 3: state if (_has_field_[3]) { - msg->AppendString(3, state_); + ::protozero::internal::gen_helpers::SerializeString(3, state_, msg); } // Field 4: unique_session_name if (_has_field_[4]) { - msg->AppendString(4, unique_session_name_); + ::protozero::internal::gen_helpers::SerializeString(4, unique_session_name_, msg); } // Field 5: buffer_size_kb for (auto& it : buffer_size_kb_) { - msg->AppendVarInt(5, it); + ::protozero::internal::gen_helpers::SerializeVarInt(5, it, msg); } // Field 6: duration_ms if (_has_field_[6]) { - msg->AppendVarInt(6, duration_ms_); + ::protozero::internal::gen_helpers::SerializeVarInt(6, duration_ms_, msg); } // Field 7: num_data_sources if (_has_field_[7]) { - msg->AppendVarInt(7, num_data_sources_); + ::protozero::internal::gen_helpers::SerializeVarInt(7, num_data_sources_, msg); } // Field 8: start_realtime_ns if (_has_field_[8]) { - msg->AppendVarInt(8, start_realtime_ns_); + ::protozero::internal::gen_helpers::SerializeVarInt(8, start_realtime_ns_, msg); } - msg->AppendRawProtoBytes(unknown_fields_.data(), unknown_fields_.size()); + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); } @@ -17293,13 +17139,13 @@ bool TracingServiceState_DataSource::ParseFromArray(const void* raw, size_t size } std::string TracingServiceState_DataSource::SerializeAsString() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsString(); } std::vector TracingServiceState_DataSource::SerializeAsArray() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsArray(); } @@ -17312,10 +17158,10 @@ void TracingServiceState_DataSource::Serialize(::protozero::Message* msg) const // Field 2: producer_id if (_has_field_[2]) { - msg->AppendVarInt(2, producer_id_); + ::protozero::internal::gen_helpers::SerializeVarInt(2, producer_id_, msg); } - msg->AppendRawProtoBytes(unknown_fields_.data(), unknown_fields_.size()); + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); } @@ -17349,7 +17195,7 @@ bool TracingServiceState_Producer::ParseFromArray(const void* raw, size_t size) field.get(&id_); break; case 2 /* name */: - field.get(&name_); + ::protozero::internal::gen_helpers::DeserializeString(field, &name_); break; case 5 /* pid */: field.get(&pid_); @@ -17358,7 +17204,7 @@ bool TracingServiceState_Producer::ParseFromArray(const void* raw, size_t size) field.get(&uid_); break; case 4 /* sdk_version */: - field.get(&sdk_version_); + ::protozero::internal::gen_helpers::DeserializeString(field, &sdk_version_); break; default: field.SerializeAndAppendTo(&unknown_fields_); @@ -17369,13 +17215,13 @@ bool TracingServiceState_Producer::ParseFromArray(const void* raw, size_t size) } std::string TracingServiceState_Producer::SerializeAsString() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsString(); } std::vector TracingServiceState_Producer::SerializeAsArray() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsArray(); } @@ -17383,30 +17229,30 @@ std::vector TracingServiceState_Producer::SerializeAsArray() const { void TracingServiceState_Producer::Serialize(::protozero::Message* msg) const { // Field 1: id if (_has_field_[1]) { - msg->AppendVarInt(1, id_); + ::protozero::internal::gen_helpers::SerializeVarInt(1, id_, msg); } // Field 2: name if (_has_field_[2]) { - msg->AppendString(2, name_); + ::protozero::internal::gen_helpers::SerializeString(2, name_, msg); } // Field 5: pid if (_has_field_[5]) { - msg->AppendVarInt(5, pid_); + ::protozero::internal::gen_helpers::SerializeVarInt(5, pid_, msg); } // Field 3: uid if (_has_field_[3]) { - msg->AppendVarInt(3, uid_); + ::protozero::internal::gen_helpers::SerializeVarInt(3, uid_, msg); } // Field 4: sdk_version if (_has_field_[4]) { - msg->AppendString(4, sdk_version_); + ::protozero::internal::gen_helpers::SerializeString(4, sdk_version_, msg); } - msg->AppendRawProtoBytes(unknown_fields_.data(), unknown_fields_.size()); + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); } } // namespace perfetto @@ -17416,6 +17262,7 @@ void TracingServiceState_Producer::Serialize(::protozero::Message* msg) const { #pragma GCC diagnostic pop #endif // gen_amalgamated begin source: gen/protos/perfetto/common/track_event_descriptor.gen.cc +// gen_amalgamated expanded: #include "perfetto/protozero/gen_field_helpers.h" // gen_amalgamated expanded: #include "perfetto/protozero/message.h" // gen_amalgamated expanded: #include "perfetto/protozero/packed_repeated_fields.h" // gen_amalgamated expanded: #include "perfetto/protozero/proto_decoder.h" @@ -17470,13 +17317,13 @@ bool TrackEventDescriptor::ParseFromArray(const void* raw, size_t size) { } std::string TrackEventDescriptor::SerializeAsString() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsString(); } std::vector TrackEventDescriptor::SerializeAsArray() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsArray(); } @@ -17487,7 +17334,7 @@ void TrackEventDescriptor::Serialize(::protozero::Message* msg) const { it.Serialize(msg->BeginNestedMessage<::protozero::Message>(1)); } - msg->AppendRawProtoBytes(unknown_fields_.data(), unknown_fields_.size()); + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); } @@ -17517,14 +17364,14 @@ bool TrackEventCategory::ParseFromArray(const void* raw, size_t size) { } switch (field.id()) { case 1 /* name */: - field.get(&name_); + ::protozero::internal::gen_helpers::DeserializeString(field, &name_); break; case 2 /* description */: - field.get(&description_); + ::protozero::internal::gen_helpers::DeserializeString(field, &description_); break; case 3 /* tags */: tags_.emplace_back(); - field.get(&tags_.back()); + ::protozero::internal::gen_helpers::DeserializeString(field, &tags_.back()); break; default: field.SerializeAndAppendTo(&unknown_fields_); @@ -17535,13 +17382,13 @@ bool TrackEventCategory::ParseFromArray(const void* raw, size_t size) { } std::string TrackEventCategory::SerializeAsString() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsString(); } std::vector TrackEventCategory::SerializeAsArray() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsArray(); } @@ -17549,20 +17396,20 @@ std::vector TrackEventCategory::SerializeAsArray() const { void TrackEventCategory::Serialize(::protozero::Message* msg) const { // Field 1: name if (_has_field_[1]) { - msg->AppendString(1, name_); + ::protozero::internal::gen_helpers::SerializeString(1, name_, msg); } // Field 2: description if (_has_field_[2]) { - msg->AppendString(2, description_); + ::protozero::internal::gen_helpers::SerializeString(2, description_, msg); } // Field 3: tags for (auto& it : tags_) { - msg->AppendString(3, it); + ::protozero::internal::gen_helpers::SerializeString(3, it, msg); } - msg->AppendRawProtoBytes(unknown_fields_.data(), unknown_fields_.size()); + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); } } // namespace perfetto @@ -17645,6 +17492,7 @@ class PERFETTO_EXPORT_COMPONENT AndroidGameInterventionListConfig : public ::pro } // namespace gen #endif // PERFETTO_PROTOS_PROTOS_PERFETTO_CONFIG_ANDROID_ANDROID_GAME_INTERVENTION_LIST_CONFIG_PROTO_CPP_H_ +// gen_amalgamated expanded: #include "perfetto/protozero/gen_field_helpers.h" // gen_amalgamated expanded: #include "perfetto/protozero/message.h" // gen_amalgamated expanded: #include "perfetto/protozero/packed_repeated_fields.h" // gen_amalgamated expanded: #include "perfetto/protozero/proto_decoder.h" @@ -17685,7 +17533,7 @@ bool AndroidGameInterventionListConfig::ParseFromArray(const void* raw, size_t s switch (field.id()) { case 1 /* package_name_filter */: package_name_filter_.emplace_back(); - field.get(&package_name_filter_.back()); + ::protozero::internal::gen_helpers::DeserializeString(field, &package_name_filter_.back()); break; default: field.SerializeAndAppendTo(&unknown_fields_); @@ -17696,13 +17544,13 @@ bool AndroidGameInterventionListConfig::ParseFromArray(const void* raw, size_t s } std::string AndroidGameInterventionListConfig::SerializeAsString() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsString(); } std::vector AndroidGameInterventionListConfig::SerializeAsArray() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsArray(); } @@ -17710,10 +17558,10 @@ std::vector AndroidGameInterventionListConfig::SerializeAsArray() const void AndroidGameInterventionListConfig::Serialize(::protozero::Message* msg) const { // Field 1: package_name_filter for (auto& it : package_name_filter_) { - msg->AppendString(1, it); + ::protozero::internal::gen_helpers::SerializeString(1, it, msg); } - msg->AppendRawProtoBytes(unknown_fields_.data(), unknown_fields_.size()); + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); } } // namespace perfetto @@ -17813,6 +17661,7 @@ class PERFETTO_EXPORT_COMPONENT AndroidLogConfig : public ::protozero::CppMessag } // namespace gen #endif // PERFETTO_PROTOS_PROTOS_PERFETTO_CONFIG_ANDROID_ANDROID_LOG_CONFIG_PROTO_CPP_H_ +// gen_amalgamated expanded: #include "perfetto/protozero/gen_field_helpers.h" // gen_amalgamated expanded: #include "perfetto/protozero/message.h" // gen_amalgamated expanded: #include "perfetto/protozero/packed_repeated_fields.h" // gen_amalgamated expanded: #include "perfetto/protozero/proto_decoder.h" @@ -17864,7 +17713,7 @@ bool AndroidLogConfig::ParseFromArray(const void* raw, size_t size) { break; case 4 /* filter_tags */: filter_tags_.emplace_back(); - field.get(&filter_tags_.back()); + ::protozero::internal::gen_helpers::DeserializeString(field, &filter_tags_.back()); break; default: field.SerializeAndAppendTo(&unknown_fields_); @@ -17875,13 +17724,13 @@ bool AndroidLogConfig::ParseFromArray(const void* raw, size_t size) { } std::string AndroidLogConfig::SerializeAsString() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsString(); } std::vector AndroidLogConfig::SerializeAsArray() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsArray(); } @@ -17889,20 +17738,20 @@ std::vector AndroidLogConfig::SerializeAsArray() const { void AndroidLogConfig::Serialize(::protozero::Message* msg) const { // Field 1: log_ids for (auto& it : log_ids_) { - msg->AppendVarInt(1, it); + ::protozero::internal::gen_helpers::SerializeVarInt(1, it, msg); } // Field 3: min_prio if (_has_field_[3]) { - msg->AppendVarInt(3, min_prio_); + ::protozero::internal::gen_helpers::SerializeVarInt(3, min_prio_, msg); } // Field 4: filter_tags for (auto& it : filter_tags_) { - msg->AppendString(4, it); + ::protozero::internal::gen_helpers::SerializeString(4, it, msg); } - msg->AppendRawProtoBytes(unknown_fields_.data(), unknown_fields_.size()); + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); } } // namespace perfetto @@ -17982,6 +17831,7 @@ class PERFETTO_EXPORT_COMPONENT AndroidPolledStateConfig : public ::protozero::C } // namespace gen #endif // PERFETTO_PROTOS_PROTOS_PERFETTO_CONFIG_ANDROID_ANDROID_POLLED_STATE_CONFIG_PROTO_CPP_H_ +// gen_amalgamated expanded: #include "perfetto/protozero/gen_field_helpers.h" // gen_amalgamated expanded: #include "perfetto/protozero/message.h" // gen_amalgamated expanded: #include "perfetto/protozero/packed_repeated_fields.h" // gen_amalgamated expanded: #include "perfetto/protozero/proto_decoder.h" @@ -18031,13 +17881,13 @@ bool AndroidPolledStateConfig::ParseFromArray(const void* raw, size_t size) { } std::string AndroidPolledStateConfig::SerializeAsString() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsString(); } std::vector AndroidPolledStateConfig::SerializeAsArray() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsArray(); } @@ -18045,10 +17895,399 @@ std::vector AndroidPolledStateConfig::SerializeAsArray() const { void AndroidPolledStateConfig::Serialize(::protozero::Message* msg) const { // Field 1: poll_ms if (_has_field_[1]) { - msg->AppendVarInt(1, poll_ms_); + ::protozero::internal::gen_helpers::SerializeVarInt(1, poll_ms_, msg); } - msg->AppendRawProtoBytes(unknown_fields_.data(), unknown_fields_.size()); + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); +} + +} // namespace perfetto +} // namespace protos +} // namespace gen +#if defined(__GNUC__) || defined(__clang__) +#pragma GCC diagnostic pop +#endif +// gen_amalgamated begin source: gen/protos/perfetto/config/android/android_system_property_config.gen.cc +// gen_amalgamated begin header: gen/protos/perfetto/config/android/android_system_property_config.gen.h +// DO NOT EDIT. Autogenerated by Perfetto cppgen_plugin +#ifndef PERFETTO_PROTOS_PROTOS_PERFETTO_CONFIG_ANDROID_ANDROID_SYSTEM_PROPERTY_CONFIG_PROTO_CPP_H_ +#define PERFETTO_PROTOS_PROTOS_PERFETTO_CONFIG_ANDROID_ANDROID_SYSTEM_PROPERTY_CONFIG_PROTO_CPP_H_ + +#include +#include +#include +#include +#include + +// gen_amalgamated expanded: #include "perfetto/protozero/cpp_message_obj.h" +// gen_amalgamated expanded: #include "perfetto/protozero/copyable_ptr.h" +// gen_amalgamated expanded: #include "perfetto/base/export.h" + +namespace perfetto { +namespace protos { +namespace gen { +class AndroidSystemPropertyConfig; +} // namespace perfetto +} // namespace protos +} // namespace gen + +namespace protozero { +class Message; +} // namespace protozero + +namespace perfetto { +namespace protos { +namespace gen { + +class PERFETTO_EXPORT_COMPONENT AndroidSystemPropertyConfig : public ::protozero::CppMessageObj { + public: + enum FieldNumbers { + kPollMsFieldNumber = 1, + kPropertyNameFieldNumber = 2, + }; + + AndroidSystemPropertyConfig(); + ~AndroidSystemPropertyConfig() override; + AndroidSystemPropertyConfig(AndroidSystemPropertyConfig&&) noexcept; + AndroidSystemPropertyConfig& operator=(AndroidSystemPropertyConfig&&); + AndroidSystemPropertyConfig(const AndroidSystemPropertyConfig&); + AndroidSystemPropertyConfig& operator=(const AndroidSystemPropertyConfig&); + bool operator==(const AndroidSystemPropertyConfig&) const; + bool operator!=(const AndroidSystemPropertyConfig& other) const { return !(*this == other); } + + bool ParseFromArray(const void*, size_t) override; + std::string SerializeAsString() const override; + std::vector SerializeAsArray() const override; + void Serialize(::protozero::Message*) const; + + bool has_poll_ms() const { return _has_field_[1]; } + uint32_t poll_ms() const { return poll_ms_; } + void set_poll_ms(uint32_t value) { poll_ms_ = value; _has_field_.set(1); } + + const std::vector& property_name() const { return property_name_; } + std::vector* mutable_property_name() { return &property_name_; } + int property_name_size() const { return static_cast(property_name_.size()); } + void clear_property_name() { property_name_.clear(); } + void add_property_name(std::string value) { property_name_.emplace_back(value); } + std::string* add_property_name() { property_name_.emplace_back(); return &property_name_.back(); } + + private: + uint32_t poll_ms_{}; + std::vector property_name_; + + // Allows to preserve unknown protobuf fields for compatibility + // with future versions of .proto files. + std::string unknown_fields_; + + std::bitset<3> _has_field_{}; +}; + +} // namespace perfetto +} // namespace protos +} // namespace gen + +#endif // PERFETTO_PROTOS_PROTOS_PERFETTO_CONFIG_ANDROID_ANDROID_SYSTEM_PROPERTY_CONFIG_PROTO_CPP_H_ +// gen_amalgamated expanded: #include "perfetto/protozero/gen_field_helpers.h" +// gen_amalgamated expanded: #include "perfetto/protozero/message.h" +// gen_amalgamated expanded: #include "perfetto/protozero/packed_repeated_fields.h" +// gen_amalgamated expanded: #include "perfetto/protozero/proto_decoder.h" +// gen_amalgamated expanded: #include "perfetto/protozero/scattered_heap_buffer.h" +// DO NOT EDIT. Autogenerated by Perfetto cppgen_plugin +#if defined(__GNUC__) || defined(__clang__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wfloat-equal" +#endif +// gen_amalgamated expanded: #include "protos/perfetto/config/android/android_system_property_config.gen.h" + +namespace perfetto { +namespace protos { +namespace gen { + +AndroidSystemPropertyConfig::AndroidSystemPropertyConfig() = default; +AndroidSystemPropertyConfig::~AndroidSystemPropertyConfig() = default; +AndroidSystemPropertyConfig::AndroidSystemPropertyConfig(const AndroidSystemPropertyConfig&) = default; +AndroidSystemPropertyConfig& AndroidSystemPropertyConfig::operator=(const AndroidSystemPropertyConfig&) = default; +AndroidSystemPropertyConfig::AndroidSystemPropertyConfig(AndroidSystemPropertyConfig&&) noexcept = default; +AndroidSystemPropertyConfig& AndroidSystemPropertyConfig::operator=(AndroidSystemPropertyConfig&&) = default; + +bool AndroidSystemPropertyConfig::operator==(const AndroidSystemPropertyConfig& other) const { + return unknown_fields_ == other.unknown_fields_ + && poll_ms_ == other.poll_ms_ + && property_name_ == other.property_name_; +} + +bool AndroidSystemPropertyConfig::ParseFromArray(const void* raw, size_t size) { + property_name_.clear(); + unknown_fields_.clear(); + bool packed_error = false; + + ::protozero::ProtoDecoder dec(raw, size); + for (auto field = dec.ReadField(); field.valid(); field = dec.ReadField()) { + if (field.id() < _has_field_.size()) { + _has_field_.set(field.id()); + } + switch (field.id()) { + case 1 /* poll_ms */: + field.get(&poll_ms_); + break; + case 2 /* property_name */: + property_name_.emplace_back(); + ::protozero::internal::gen_helpers::DeserializeString(field, &property_name_.back()); + break; + default: + field.SerializeAndAppendTo(&unknown_fields_); + break; + } + } + return !packed_error && !dec.bytes_left(); +} + +std::string AndroidSystemPropertyConfig::SerializeAsString() const { + ::protozero::internal::gen_helpers::MessageSerializer msg; + Serialize(msg.get()); + return msg.SerializeAsString(); +} + +std::vector AndroidSystemPropertyConfig::SerializeAsArray() const { + ::protozero::internal::gen_helpers::MessageSerializer msg; + Serialize(msg.get()); + return msg.SerializeAsArray(); +} + +void AndroidSystemPropertyConfig::Serialize(::protozero::Message* msg) const { + // Field 1: poll_ms + if (_has_field_[1]) { + ::protozero::internal::gen_helpers::SerializeVarInt(1, poll_ms_, msg); + } + + // Field 2: property_name + for (auto& it : property_name_) { + ::protozero::internal::gen_helpers::SerializeString(2, it, msg); + } + + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); +} + +} // namespace perfetto +} // namespace protos +} // namespace gen +#if defined(__GNUC__) || defined(__clang__) +#pragma GCC diagnostic pop +#endif +// gen_amalgamated begin source: gen/protos/perfetto/config/android/network_trace_config.gen.cc +// gen_amalgamated begin header: gen/protos/perfetto/config/android/network_trace_config.gen.h +// DO NOT EDIT. Autogenerated by Perfetto cppgen_plugin +#ifndef PERFETTO_PROTOS_PROTOS_PERFETTO_CONFIG_ANDROID_NETWORK_TRACE_CONFIG_PROTO_CPP_H_ +#define PERFETTO_PROTOS_PROTOS_PERFETTO_CONFIG_ANDROID_NETWORK_TRACE_CONFIG_PROTO_CPP_H_ + +#include +#include +#include +#include +#include + +// gen_amalgamated expanded: #include "perfetto/protozero/cpp_message_obj.h" +// gen_amalgamated expanded: #include "perfetto/protozero/copyable_ptr.h" +// gen_amalgamated expanded: #include "perfetto/base/export.h" + +namespace perfetto { +namespace protos { +namespace gen { +class NetworkPacketTraceConfig; +} // namespace perfetto +} // namespace protos +} // namespace gen + +namespace protozero { +class Message; +} // namespace protozero + +namespace perfetto { +namespace protos { +namespace gen { + +class PERFETTO_EXPORT_COMPONENT NetworkPacketTraceConfig : public ::protozero::CppMessageObj { + public: + enum FieldNumbers { + kPollMsFieldNumber = 1, + kAggregationThresholdFieldNumber = 2, + kInternLimitFieldNumber = 3, + kDropLocalPortFieldNumber = 4, + kDropRemotePortFieldNumber = 5, + kDropTcpFlagsFieldNumber = 6, + }; + + NetworkPacketTraceConfig(); + ~NetworkPacketTraceConfig() override; + NetworkPacketTraceConfig(NetworkPacketTraceConfig&&) noexcept; + NetworkPacketTraceConfig& operator=(NetworkPacketTraceConfig&&); + NetworkPacketTraceConfig(const NetworkPacketTraceConfig&); + NetworkPacketTraceConfig& operator=(const NetworkPacketTraceConfig&); + bool operator==(const NetworkPacketTraceConfig&) const; + bool operator!=(const NetworkPacketTraceConfig& other) const { return !(*this == other); } + + bool ParseFromArray(const void*, size_t) override; + std::string SerializeAsString() const override; + std::vector SerializeAsArray() const override; + void Serialize(::protozero::Message*) const; + + bool has_poll_ms() const { return _has_field_[1]; } + uint32_t poll_ms() const { return poll_ms_; } + void set_poll_ms(uint32_t value) { poll_ms_ = value; _has_field_.set(1); } + + bool has_aggregation_threshold() const { return _has_field_[2]; } + uint32_t aggregation_threshold() const { return aggregation_threshold_; } + void set_aggregation_threshold(uint32_t value) { aggregation_threshold_ = value; _has_field_.set(2); } + + bool has_intern_limit() const { return _has_field_[3]; } + uint32_t intern_limit() const { return intern_limit_; } + void set_intern_limit(uint32_t value) { intern_limit_ = value; _has_field_.set(3); } + + bool has_drop_local_port() const { return _has_field_[4]; } + bool drop_local_port() const { return drop_local_port_; } + void set_drop_local_port(bool value) { drop_local_port_ = value; _has_field_.set(4); } + + bool has_drop_remote_port() const { return _has_field_[5]; } + bool drop_remote_port() const { return drop_remote_port_; } + void set_drop_remote_port(bool value) { drop_remote_port_ = value; _has_field_.set(5); } + + bool has_drop_tcp_flags() const { return _has_field_[6]; } + bool drop_tcp_flags() const { return drop_tcp_flags_; } + void set_drop_tcp_flags(bool value) { drop_tcp_flags_ = value; _has_field_.set(6); } + + private: + uint32_t poll_ms_{}; + uint32_t aggregation_threshold_{}; + uint32_t intern_limit_{}; + bool drop_local_port_{}; + bool drop_remote_port_{}; + bool drop_tcp_flags_{}; + + // Allows to preserve unknown protobuf fields for compatibility + // with future versions of .proto files. + std::string unknown_fields_; + + std::bitset<7> _has_field_{}; +}; + +} // namespace perfetto +} // namespace protos +} // namespace gen + +#endif // PERFETTO_PROTOS_PROTOS_PERFETTO_CONFIG_ANDROID_NETWORK_TRACE_CONFIG_PROTO_CPP_H_ +// gen_amalgamated expanded: #include "perfetto/protozero/gen_field_helpers.h" +// gen_amalgamated expanded: #include "perfetto/protozero/message.h" +// gen_amalgamated expanded: #include "perfetto/protozero/packed_repeated_fields.h" +// gen_amalgamated expanded: #include "perfetto/protozero/proto_decoder.h" +// gen_amalgamated expanded: #include "perfetto/protozero/scattered_heap_buffer.h" +// DO NOT EDIT. Autogenerated by Perfetto cppgen_plugin +#if defined(__GNUC__) || defined(__clang__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wfloat-equal" +#endif +// gen_amalgamated expanded: #include "protos/perfetto/config/android/network_trace_config.gen.h" + +namespace perfetto { +namespace protos { +namespace gen { + +NetworkPacketTraceConfig::NetworkPacketTraceConfig() = default; +NetworkPacketTraceConfig::~NetworkPacketTraceConfig() = default; +NetworkPacketTraceConfig::NetworkPacketTraceConfig(const NetworkPacketTraceConfig&) = default; +NetworkPacketTraceConfig& NetworkPacketTraceConfig::operator=(const NetworkPacketTraceConfig&) = default; +NetworkPacketTraceConfig::NetworkPacketTraceConfig(NetworkPacketTraceConfig&&) noexcept = default; +NetworkPacketTraceConfig& NetworkPacketTraceConfig::operator=(NetworkPacketTraceConfig&&) = default; + +bool NetworkPacketTraceConfig::operator==(const NetworkPacketTraceConfig& other) const { + return unknown_fields_ == other.unknown_fields_ + && poll_ms_ == other.poll_ms_ + && aggregation_threshold_ == other.aggregation_threshold_ + && intern_limit_ == other.intern_limit_ + && drop_local_port_ == other.drop_local_port_ + && drop_remote_port_ == other.drop_remote_port_ + && drop_tcp_flags_ == other.drop_tcp_flags_; +} + +bool NetworkPacketTraceConfig::ParseFromArray(const void* raw, size_t size) { + unknown_fields_.clear(); + bool packed_error = false; + + ::protozero::ProtoDecoder dec(raw, size); + for (auto field = dec.ReadField(); field.valid(); field = dec.ReadField()) { + if (field.id() < _has_field_.size()) { + _has_field_.set(field.id()); + } + switch (field.id()) { + case 1 /* poll_ms */: + field.get(&poll_ms_); + break; + case 2 /* aggregation_threshold */: + field.get(&aggregation_threshold_); + break; + case 3 /* intern_limit */: + field.get(&intern_limit_); + break; + case 4 /* drop_local_port */: + field.get(&drop_local_port_); + break; + case 5 /* drop_remote_port */: + field.get(&drop_remote_port_); + break; + case 6 /* drop_tcp_flags */: + field.get(&drop_tcp_flags_); + break; + default: + field.SerializeAndAppendTo(&unknown_fields_); + break; + } + } + return !packed_error && !dec.bytes_left(); +} + +std::string NetworkPacketTraceConfig::SerializeAsString() const { + ::protozero::internal::gen_helpers::MessageSerializer msg; + Serialize(msg.get()); + return msg.SerializeAsString(); +} + +std::vector NetworkPacketTraceConfig::SerializeAsArray() const { + ::protozero::internal::gen_helpers::MessageSerializer msg; + Serialize(msg.get()); + return msg.SerializeAsArray(); +} + +void NetworkPacketTraceConfig::Serialize(::protozero::Message* msg) const { + // Field 1: poll_ms + if (_has_field_[1]) { + ::protozero::internal::gen_helpers::SerializeVarInt(1, poll_ms_, msg); + } + + // Field 2: aggregation_threshold + if (_has_field_[2]) { + ::protozero::internal::gen_helpers::SerializeVarInt(2, aggregation_threshold_, msg); + } + + // Field 3: intern_limit + if (_has_field_[3]) { + ::protozero::internal::gen_helpers::SerializeVarInt(3, intern_limit_, msg); + } + + // Field 4: drop_local_port + if (_has_field_[4]) { + ::protozero::internal::gen_helpers::SerializeTinyVarInt(4, drop_local_port_, msg); + } + + // Field 5: drop_remote_port + if (_has_field_[5]) { + ::protozero::internal::gen_helpers::SerializeTinyVarInt(5, drop_remote_port_, msg); + } + + // Field 6: drop_tcp_flags + if (_has_field_[6]) { + ::protozero::internal::gen_helpers::SerializeTinyVarInt(6, drop_tcp_flags_, msg); + } + + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); } } // namespace perfetto @@ -18131,6 +18370,7 @@ class PERFETTO_EXPORT_COMPONENT PackagesListConfig : public ::protozero::CppMess } // namespace gen #endif // PERFETTO_PROTOS_PROTOS_PERFETTO_CONFIG_ANDROID_PACKAGES_LIST_CONFIG_PROTO_CPP_H_ +// gen_amalgamated expanded: #include "perfetto/protozero/gen_field_helpers.h" // gen_amalgamated expanded: #include "perfetto/protozero/message.h" // gen_amalgamated expanded: #include "perfetto/protozero/packed_repeated_fields.h" // gen_amalgamated expanded: #include "perfetto/protozero/proto_decoder.h" @@ -18171,7 +18411,7 @@ bool PackagesListConfig::ParseFromArray(const void* raw, size_t size) { switch (field.id()) { case 1 /* package_name_filter */: package_name_filter_.emplace_back(); - field.get(&package_name_filter_.back()); + ::protozero::internal::gen_helpers::DeserializeString(field, &package_name_filter_.back()); break; default: field.SerializeAndAppendTo(&unknown_fields_); @@ -18182,13 +18422,13 @@ bool PackagesListConfig::ParseFromArray(const void* raw, size_t size) { } std::string PackagesListConfig::SerializeAsString() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsString(); } std::vector PackagesListConfig::SerializeAsArray() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsArray(); } @@ -18196,10 +18436,10 @@ std::vector PackagesListConfig::SerializeAsArray() const { void PackagesListConfig::Serialize(::protozero::Message* msg) const { // Field 1: package_name_filter for (auto& it : package_name_filter_) { - msg->AppendString(1, it); + ::protozero::internal::gen_helpers::SerializeString(1, it, msg); } - msg->AppendRawProtoBytes(unknown_fields_.data(), unknown_fields_.size()); + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); } } // namespace perfetto @@ -18228,7 +18468,11 @@ namespace perfetto { namespace protos { namespace gen { class FtraceConfig; +class FtraceConfig_PrintFilter; +class FtraceConfig_PrintFilter_Rule; +class FtraceConfig_PrintFilter_Rule_AtraceMessage; class FtraceConfig_CompactSchedConfig; +enum FtraceConfig_KsymsMemPolicy : int; } // namespace perfetto } // namespace protos } // namespace gen @@ -18240,10 +18484,22 @@ class Message; namespace perfetto { namespace protos { namespace gen { +enum FtraceConfig_KsymsMemPolicy : int { + FtraceConfig_KsymsMemPolicy_KSYMS_UNSPECIFIED = 0, + FtraceConfig_KsymsMemPolicy_KSYMS_CLEANUP_ON_STOP = 1, + FtraceConfig_KsymsMemPolicy_KSYMS_RETAIN = 2, +}; class PERFETTO_EXPORT_COMPONENT FtraceConfig : public ::protozero::CppMessageObj { public: using CompactSchedConfig = FtraceConfig_CompactSchedConfig; + using PrintFilter = FtraceConfig_PrintFilter; + using KsymsMemPolicy = FtraceConfig_KsymsMemPolicy; + static constexpr auto KSYMS_UNSPECIFIED = FtraceConfig_KsymsMemPolicy_KSYMS_UNSPECIFIED; + static constexpr auto KSYMS_CLEANUP_ON_STOP = FtraceConfig_KsymsMemPolicy_KSYMS_CLEANUP_ON_STOP; + static constexpr auto KSYMS_RETAIN = FtraceConfig_KsymsMemPolicy_KSYMS_RETAIN; + static constexpr auto KsymsMemPolicy_MIN = FtraceConfig_KsymsMemPolicy_KSYMS_UNSPECIFIED; + static constexpr auto KsymsMemPolicy_MAX = FtraceConfig_KsymsMemPolicy_KSYMS_RETAIN; enum FieldNumbers { kFtraceEventsFieldNumber = 1, kAtraceCategoriesFieldNumber = 2, @@ -18251,10 +18507,19 @@ class PERFETTO_EXPORT_COMPONENT FtraceConfig : public ::protozero::CppMessageObj kBufferSizeKbFieldNumber = 10, kDrainPeriodMsFieldNumber = 11, kCompactSchedFieldNumber = 12, + kPrintFilterFieldNumber = 22, kSymbolizeKsymsFieldNumber = 13, + kKsymsMemPolicyFieldNumber = 17, kInitializeKsymsSynchronouslyForTestingFieldNumber = 14, kThrottleRssStatFieldNumber = 15, kDisableGenericEventsFieldNumber = 16, + kSyscallEventsFieldNumber = 18, + kEnableFunctionGraphFieldNumber = 19, + kFunctionFiltersFieldNumber = 20, + kFunctionGraphRootsFieldNumber = 21, + kPreserveFtraceBufferFieldNumber = 23, + kUseMonotonicRawClockFieldNumber = 24, + kInstanceNameFieldNumber = 25, }; FtraceConfig(); @@ -18304,10 +18569,18 @@ class PERFETTO_EXPORT_COMPONENT FtraceConfig : public ::protozero::CppMessageObj const FtraceConfig_CompactSchedConfig& compact_sched() const { return *compact_sched_; } FtraceConfig_CompactSchedConfig* mutable_compact_sched() { _has_field_.set(12); return compact_sched_.get(); } + bool has_print_filter() const { return _has_field_[22]; } + const FtraceConfig_PrintFilter& print_filter() const { return *print_filter_; } + FtraceConfig_PrintFilter* mutable_print_filter() { _has_field_.set(22); return print_filter_.get(); } + bool has_symbolize_ksyms() const { return _has_field_[13]; } bool symbolize_ksyms() const { return symbolize_ksyms_; } void set_symbolize_ksyms(bool value) { symbolize_ksyms_ = value; _has_field_.set(13); } + bool has_ksyms_mem_policy() const { return _has_field_[17]; } + FtraceConfig_KsymsMemPolicy ksyms_mem_policy() const { return ksyms_mem_policy_; } + void set_ksyms_mem_policy(FtraceConfig_KsymsMemPolicy value) { ksyms_mem_policy_ = value; _has_field_.set(17); } + bool has_initialize_ksyms_synchronously_for_testing() const { return _has_field_[14]; } bool initialize_ksyms_synchronously_for_testing() const { return initialize_ksyms_synchronously_for_testing_; } void set_initialize_ksyms_synchronously_for_testing(bool value) { initialize_ksyms_synchronously_for_testing_ = value; _has_field_.set(14); } @@ -18320,6 +18593,43 @@ class PERFETTO_EXPORT_COMPONENT FtraceConfig : public ::protozero::CppMessageObj bool disable_generic_events() const { return disable_generic_events_; } void set_disable_generic_events(bool value) { disable_generic_events_ = value; _has_field_.set(16); } + const std::vector& syscall_events() const { return syscall_events_; } + std::vector* mutable_syscall_events() { return &syscall_events_; } + int syscall_events_size() const { return static_cast(syscall_events_.size()); } + void clear_syscall_events() { syscall_events_.clear(); } + void add_syscall_events(std::string value) { syscall_events_.emplace_back(value); } + std::string* add_syscall_events() { syscall_events_.emplace_back(); return &syscall_events_.back(); } + + bool has_enable_function_graph() const { return _has_field_[19]; } + bool enable_function_graph() const { return enable_function_graph_; } + void set_enable_function_graph(bool value) { enable_function_graph_ = value; _has_field_.set(19); } + + const std::vector& function_filters() const { return function_filters_; } + std::vector* mutable_function_filters() { return &function_filters_; } + int function_filters_size() const { return static_cast(function_filters_.size()); } + void clear_function_filters() { function_filters_.clear(); } + void add_function_filters(std::string value) { function_filters_.emplace_back(value); } + std::string* add_function_filters() { function_filters_.emplace_back(); return &function_filters_.back(); } + + const std::vector& function_graph_roots() const { return function_graph_roots_; } + std::vector* mutable_function_graph_roots() { return &function_graph_roots_; } + int function_graph_roots_size() const { return static_cast(function_graph_roots_.size()); } + void clear_function_graph_roots() { function_graph_roots_.clear(); } + void add_function_graph_roots(std::string value) { function_graph_roots_.emplace_back(value); } + std::string* add_function_graph_roots() { function_graph_roots_.emplace_back(); return &function_graph_roots_.back(); } + + bool has_preserve_ftrace_buffer() const { return _has_field_[23]; } + bool preserve_ftrace_buffer() const { return preserve_ftrace_buffer_; } + void set_preserve_ftrace_buffer(bool value) { preserve_ftrace_buffer_ = value; _has_field_.set(23); } + + bool has_use_monotonic_raw_clock() const { return _has_field_[24]; } + bool use_monotonic_raw_clock() const { return use_monotonic_raw_clock_; } + void set_use_monotonic_raw_clock(bool value) { use_monotonic_raw_clock_ = value; _has_field_.set(24); } + + bool has_instance_name() const { return _has_field_[25]; } + const std::string& instance_name() const { return instance_name_; } + void set_instance_name(const std::string& value) { instance_name_ = value; _has_field_.set(25); } + private: std::vector ftrace_events_; std::vector atrace_categories_; @@ -18327,16 +18637,152 @@ class PERFETTO_EXPORT_COMPONENT FtraceConfig : public ::protozero::CppMessageObj uint32_t buffer_size_kb_{}; uint32_t drain_period_ms_{}; ::protozero::CopyablePtr compact_sched_; + ::protozero::CopyablePtr print_filter_; bool symbolize_ksyms_{}; + FtraceConfig_KsymsMemPolicy ksyms_mem_policy_{}; bool initialize_ksyms_synchronously_for_testing_{}; bool throttle_rss_stat_{}; bool disable_generic_events_{}; + std::vector syscall_events_; + bool enable_function_graph_{}; + std::vector function_filters_; + std::vector function_graph_roots_; + bool preserve_ftrace_buffer_{}; + bool use_monotonic_raw_clock_{}; + std::string instance_name_{}; // Allows to preserve unknown protobuf fields for compatibility // with future versions of .proto files. std::string unknown_fields_; - std::bitset<17> _has_field_{}; + std::bitset<26> _has_field_{}; +}; + + +class PERFETTO_EXPORT_COMPONENT FtraceConfig_PrintFilter : public ::protozero::CppMessageObj { + public: + using Rule = FtraceConfig_PrintFilter_Rule; + enum FieldNumbers { + kRulesFieldNumber = 1, + }; + + FtraceConfig_PrintFilter(); + ~FtraceConfig_PrintFilter() override; + FtraceConfig_PrintFilter(FtraceConfig_PrintFilter&&) noexcept; + FtraceConfig_PrintFilter& operator=(FtraceConfig_PrintFilter&&); + FtraceConfig_PrintFilter(const FtraceConfig_PrintFilter&); + FtraceConfig_PrintFilter& operator=(const FtraceConfig_PrintFilter&); + bool operator==(const FtraceConfig_PrintFilter&) const; + bool operator!=(const FtraceConfig_PrintFilter& other) const { return !(*this == other); } + + bool ParseFromArray(const void*, size_t) override; + std::string SerializeAsString() const override; + std::vector SerializeAsArray() const override; + void Serialize(::protozero::Message*) const; + + const std::vector& rules() const { return rules_; } + std::vector* mutable_rules() { return &rules_; } + int rules_size() const; + void clear_rules(); + FtraceConfig_PrintFilter_Rule* add_rules(); + + private: + std::vector rules_; + + // Allows to preserve unknown protobuf fields for compatibility + // with future versions of .proto files. + std::string unknown_fields_; + + std::bitset<2> _has_field_{}; +}; + + +class PERFETTO_EXPORT_COMPONENT FtraceConfig_PrintFilter_Rule : public ::protozero::CppMessageObj { + public: + using AtraceMessage = FtraceConfig_PrintFilter_Rule_AtraceMessage; + enum FieldNumbers { + kPrefixFieldNumber = 1, + kAtraceMsgFieldNumber = 3, + kAllowFieldNumber = 2, + }; + + FtraceConfig_PrintFilter_Rule(); + ~FtraceConfig_PrintFilter_Rule() override; + FtraceConfig_PrintFilter_Rule(FtraceConfig_PrintFilter_Rule&&) noexcept; + FtraceConfig_PrintFilter_Rule& operator=(FtraceConfig_PrintFilter_Rule&&); + FtraceConfig_PrintFilter_Rule(const FtraceConfig_PrintFilter_Rule&); + FtraceConfig_PrintFilter_Rule& operator=(const FtraceConfig_PrintFilter_Rule&); + bool operator==(const FtraceConfig_PrintFilter_Rule&) const; + bool operator!=(const FtraceConfig_PrintFilter_Rule& other) const { return !(*this == other); } + + bool ParseFromArray(const void*, size_t) override; + std::string SerializeAsString() const override; + std::vector SerializeAsArray() const override; + void Serialize(::protozero::Message*) const; + + bool has_prefix() const { return _has_field_[1]; } + const std::string& prefix() const { return prefix_; } + void set_prefix(const std::string& value) { prefix_ = value; _has_field_.set(1); } + + bool has_atrace_msg() const { return _has_field_[3]; } + const FtraceConfig_PrintFilter_Rule_AtraceMessage& atrace_msg() const { return *atrace_msg_; } + FtraceConfig_PrintFilter_Rule_AtraceMessage* mutable_atrace_msg() { _has_field_.set(3); return atrace_msg_.get(); } + + bool has_allow() const { return _has_field_[2]; } + bool allow() const { return allow_; } + void set_allow(bool value) { allow_ = value; _has_field_.set(2); } + + private: + std::string prefix_{}; + ::protozero::CopyablePtr atrace_msg_; + bool allow_{}; + + // Allows to preserve unknown protobuf fields for compatibility + // with future versions of .proto files. + std::string unknown_fields_; + + std::bitset<4> _has_field_{}; +}; + + +class PERFETTO_EXPORT_COMPONENT FtraceConfig_PrintFilter_Rule_AtraceMessage : public ::protozero::CppMessageObj { + public: + enum FieldNumbers { + kTypeFieldNumber = 1, + kPrefixFieldNumber = 2, + }; + + FtraceConfig_PrintFilter_Rule_AtraceMessage(); + ~FtraceConfig_PrintFilter_Rule_AtraceMessage() override; + FtraceConfig_PrintFilter_Rule_AtraceMessage(FtraceConfig_PrintFilter_Rule_AtraceMessage&&) noexcept; + FtraceConfig_PrintFilter_Rule_AtraceMessage& operator=(FtraceConfig_PrintFilter_Rule_AtraceMessage&&); + FtraceConfig_PrintFilter_Rule_AtraceMessage(const FtraceConfig_PrintFilter_Rule_AtraceMessage&); + FtraceConfig_PrintFilter_Rule_AtraceMessage& operator=(const FtraceConfig_PrintFilter_Rule_AtraceMessage&); + bool operator==(const FtraceConfig_PrintFilter_Rule_AtraceMessage&) const; + bool operator!=(const FtraceConfig_PrintFilter_Rule_AtraceMessage& other) const { return !(*this == other); } + + bool ParseFromArray(const void*, size_t) override; + std::string SerializeAsString() const override; + std::vector SerializeAsArray() const override; + void Serialize(::protozero::Message*) const; + + bool has_type() const { return _has_field_[1]; } + const std::string& type() const { return type_; } + void set_type(const std::string& value) { type_ = value; _has_field_.set(1); } + + bool has_prefix() const { return _has_field_[2]; } + const std::string& prefix() const { return prefix_; } + void set_prefix(const std::string& value) { prefix_ = value; _has_field_.set(2); } + + private: + std::string type_{}; + std::string prefix_{}; + + // Allows to preserve unknown protobuf fields for compatibility + // with future versions of .proto files. + std::string unknown_fields_; + + std::bitset<3> _has_field_{}; }; @@ -18379,6 +18825,7 @@ class PERFETTO_EXPORT_COMPONENT FtraceConfig_CompactSchedConfig : public ::proto } // namespace gen #endif // PERFETTO_PROTOS_PROTOS_PERFETTO_CONFIG_FTRACE_FTRACE_CONFIG_PROTO_CPP_H_ +// gen_amalgamated expanded: #include "perfetto/protozero/gen_field_helpers.h" // gen_amalgamated expanded: #include "perfetto/protozero/message.h" // gen_amalgamated expanded: #include "perfetto/protozero/packed_repeated_fields.h" // gen_amalgamated expanded: #include "perfetto/protozero/proto_decoder.h" @@ -18409,16 +18856,28 @@ bool FtraceConfig::operator==(const FtraceConfig& other) const { && buffer_size_kb_ == other.buffer_size_kb_ && drain_period_ms_ == other.drain_period_ms_ && compact_sched_ == other.compact_sched_ + && print_filter_ == other.print_filter_ && symbolize_ksyms_ == other.symbolize_ksyms_ + && ksyms_mem_policy_ == other.ksyms_mem_policy_ && initialize_ksyms_synchronously_for_testing_ == other.initialize_ksyms_synchronously_for_testing_ && throttle_rss_stat_ == other.throttle_rss_stat_ - && disable_generic_events_ == other.disable_generic_events_; + && disable_generic_events_ == other.disable_generic_events_ + && syscall_events_ == other.syscall_events_ + && enable_function_graph_ == other.enable_function_graph_ + && function_filters_ == other.function_filters_ + && function_graph_roots_ == other.function_graph_roots_ + && preserve_ftrace_buffer_ == other.preserve_ftrace_buffer_ + && use_monotonic_raw_clock_ == other.use_monotonic_raw_clock_ + && instance_name_ == other.instance_name_; } bool FtraceConfig::ParseFromArray(const void* raw, size_t size) { ftrace_events_.clear(); atrace_categories_.clear(); atrace_apps_.clear(); + syscall_events_.clear(); + function_filters_.clear(); + function_graph_roots_.clear(); unknown_fields_.clear(); bool packed_error = false; @@ -18430,15 +18889,15 @@ bool FtraceConfig::ParseFromArray(const void* raw, size_t size) { switch (field.id()) { case 1 /* ftrace_events */: ftrace_events_.emplace_back(); - field.get(&ftrace_events_.back()); + ::protozero::internal::gen_helpers::DeserializeString(field, &ftrace_events_.back()); break; case 2 /* atrace_categories */: atrace_categories_.emplace_back(); - field.get(&atrace_categories_.back()); + ::protozero::internal::gen_helpers::DeserializeString(field, &atrace_categories_.back()); break; case 3 /* atrace_apps */: atrace_apps_.emplace_back(); - field.get(&atrace_apps_.back()); + ::protozero::internal::gen_helpers::DeserializeString(field, &atrace_apps_.back()); break; case 10 /* buffer_size_kb */: field.get(&buffer_size_kb_); @@ -18449,9 +18908,15 @@ bool FtraceConfig::ParseFromArray(const void* raw, size_t size) { case 12 /* compact_sched */: (*compact_sched_).ParseFromArray(field.data(), field.size()); break; + case 22 /* print_filter */: + (*print_filter_).ParseFromArray(field.data(), field.size()); + break; case 13 /* symbolize_ksyms */: field.get(&symbolize_ksyms_); break; + case 17 /* ksyms_mem_policy */: + field.get(&ksyms_mem_policy_); + break; case 14 /* initialize_ksyms_synchronously_for_testing */: field.get(&initialize_ksyms_synchronously_for_testing_); break; @@ -18461,6 +18926,30 @@ bool FtraceConfig::ParseFromArray(const void* raw, size_t size) { case 16 /* disable_generic_events */: field.get(&disable_generic_events_); break; + case 18 /* syscall_events */: + syscall_events_.emplace_back(); + ::protozero::internal::gen_helpers::DeserializeString(field, &syscall_events_.back()); + break; + case 19 /* enable_function_graph */: + field.get(&enable_function_graph_); + break; + case 20 /* function_filters */: + function_filters_.emplace_back(); + ::protozero::internal::gen_helpers::DeserializeString(field, &function_filters_.back()); + break; + case 21 /* function_graph_roots */: + function_graph_roots_.emplace_back(); + ::protozero::internal::gen_helpers::DeserializeString(field, &function_graph_roots_.back()); + break; + case 23 /* preserve_ftrace_buffer */: + field.get(&preserve_ftrace_buffer_); + break; + case 24 /* use_monotonic_raw_clock */: + field.get(&use_monotonic_raw_clock_); + break; + case 25 /* instance_name */: + ::protozero::internal::gen_helpers::DeserializeString(field, &instance_name_); + break; default: field.SerializeAndAppendTo(&unknown_fields_); break; @@ -18470,13 +18959,13 @@ bool FtraceConfig::ParseFromArray(const void* raw, size_t size) { } std::string FtraceConfig::SerializeAsString() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsString(); } std::vector FtraceConfig::SerializeAsArray() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsArray(); } @@ -18484,27 +18973,27 @@ std::vector FtraceConfig::SerializeAsArray() const { void FtraceConfig::Serialize(::protozero::Message* msg) const { // Field 1: ftrace_events for (auto& it : ftrace_events_) { - msg->AppendString(1, it); + ::protozero::internal::gen_helpers::SerializeString(1, it, msg); } // Field 2: atrace_categories for (auto& it : atrace_categories_) { - msg->AppendString(2, it); + ::protozero::internal::gen_helpers::SerializeString(2, it, msg); } // Field 3: atrace_apps for (auto& it : atrace_apps_) { - msg->AppendString(3, it); + ::protozero::internal::gen_helpers::SerializeString(3, it, msg); } // Field 10: buffer_size_kb if (_has_field_[10]) { - msg->AppendVarInt(10, buffer_size_kb_); + ::protozero::internal::gen_helpers::SerializeVarInt(10, buffer_size_kb_, msg); } // Field 11: drain_period_ms if (_has_field_[11]) { - msg->AppendVarInt(11, drain_period_ms_); + ::protozero::internal::gen_helpers::SerializeVarInt(11, drain_period_ms_, msg); } // Field 12: compact_sched @@ -18512,27 +19001,269 @@ void FtraceConfig::Serialize(::protozero::Message* msg) const { (*compact_sched_).Serialize(msg->BeginNestedMessage<::protozero::Message>(12)); } + // Field 22: print_filter + if (_has_field_[22]) { + (*print_filter_).Serialize(msg->BeginNestedMessage<::protozero::Message>(22)); + } + // Field 13: symbolize_ksyms if (_has_field_[13]) { - msg->AppendTinyVarInt(13, symbolize_ksyms_); + ::protozero::internal::gen_helpers::SerializeTinyVarInt(13, symbolize_ksyms_, msg); + } + + // Field 17: ksyms_mem_policy + if (_has_field_[17]) { + ::protozero::internal::gen_helpers::SerializeVarInt(17, ksyms_mem_policy_, msg); } // Field 14: initialize_ksyms_synchronously_for_testing if (_has_field_[14]) { - msg->AppendTinyVarInt(14, initialize_ksyms_synchronously_for_testing_); + ::protozero::internal::gen_helpers::SerializeTinyVarInt(14, initialize_ksyms_synchronously_for_testing_, msg); } // Field 15: throttle_rss_stat if (_has_field_[15]) { - msg->AppendTinyVarInt(15, throttle_rss_stat_); + ::protozero::internal::gen_helpers::SerializeTinyVarInt(15, throttle_rss_stat_, msg); } // Field 16: disable_generic_events if (_has_field_[16]) { - msg->AppendTinyVarInt(16, disable_generic_events_); + ::protozero::internal::gen_helpers::SerializeTinyVarInt(16, disable_generic_events_, msg); } - msg->AppendRawProtoBytes(unknown_fields_.data(), unknown_fields_.size()); + // Field 18: syscall_events + for (auto& it : syscall_events_) { + ::protozero::internal::gen_helpers::SerializeString(18, it, msg); + } + + // Field 19: enable_function_graph + if (_has_field_[19]) { + ::protozero::internal::gen_helpers::SerializeTinyVarInt(19, enable_function_graph_, msg); + } + + // Field 20: function_filters + for (auto& it : function_filters_) { + ::protozero::internal::gen_helpers::SerializeString(20, it, msg); + } + + // Field 21: function_graph_roots + for (auto& it : function_graph_roots_) { + ::protozero::internal::gen_helpers::SerializeString(21, it, msg); + } + + // Field 23: preserve_ftrace_buffer + if (_has_field_[23]) { + ::protozero::internal::gen_helpers::SerializeTinyVarInt(23, preserve_ftrace_buffer_, msg); + } + + // Field 24: use_monotonic_raw_clock + if (_has_field_[24]) { + ::protozero::internal::gen_helpers::SerializeTinyVarInt(24, use_monotonic_raw_clock_, msg); + } + + // Field 25: instance_name + if (_has_field_[25]) { + ::protozero::internal::gen_helpers::SerializeString(25, instance_name_, msg); + } + + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); +} + + +FtraceConfig_PrintFilter::FtraceConfig_PrintFilter() = default; +FtraceConfig_PrintFilter::~FtraceConfig_PrintFilter() = default; +FtraceConfig_PrintFilter::FtraceConfig_PrintFilter(const FtraceConfig_PrintFilter&) = default; +FtraceConfig_PrintFilter& FtraceConfig_PrintFilter::operator=(const FtraceConfig_PrintFilter&) = default; +FtraceConfig_PrintFilter::FtraceConfig_PrintFilter(FtraceConfig_PrintFilter&&) noexcept = default; +FtraceConfig_PrintFilter& FtraceConfig_PrintFilter::operator=(FtraceConfig_PrintFilter&&) = default; + +bool FtraceConfig_PrintFilter::operator==(const FtraceConfig_PrintFilter& other) const { + return unknown_fields_ == other.unknown_fields_ + && rules_ == other.rules_; +} + +int FtraceConfig_PrintFilter::rules_size() const { return static_cast(rules_.size()); } +void FtraceConfig_PrintFilter::clear_rules() { rules_.clear(); } +FtraceConfig_PrintFilter_Rule* FtraceConfig_PrintFilter::add_rules() { rules_.emplace_back(); return &rules_.back(); } +bool FtraceConfig_PrintFilter::ParseFromArray(const void* raw, size_t size) { + rules_.clear(); + unknown_fields_.clear(); + bool packed_error = false; + + ::protozero::ProtoDecoder dec(raw, size); + for (auto field = dec.ReadField(); field.valid(); field = dec.ReadField()) { + if (field.id() < _has_field_.size()) { + _has_field_.set(field.id()); + } + switch (field.id()) { + case 1 /* rules */: + rules_.emplace_back(); + rules_.back().ParseFromArray(field.data(), field.size()); + break; + default: + field.SerializeAndAppendTo(&unknown_fields_); + break; + } + } + return !packed_error && !dec.bytes_left(); +} + +std::string FtraceConfig_PrintFilter::SerializeAsString() const { + ::protozero::internal::gen_helpers::MessageSerializer msg; + Serialize(msg.get()); + return msg.SerializeAsString(); +} + +std::vector FtraceConfig_PrintFilter::SerializeAsArray() const { + ::protozero::internal::gen_helpers::MessageSerializer msg; + Serialize(msg.get()); + return msg.SerializeAsArray(); +} + +void FtraceConfig_PrintFilter::Serialize(::protozero::Message* msg) const { + // Field 1: rules + for (auto& it : rules_) { + it.Serialize(msg->BeginNestedMessage<::protozero::Message>(1)); + } + + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); +} + + +FtraceConfig_PrintFilter_Rule::FtraceConfig_PrintFilter_Rule() = default; +FtraceConfig_PrintFilter_Rule::~FtraceConfig_PrintFilter_Rule() = default; +FtraceConfig_PrintFilter_Rule::FtraceConfig_PrintFilter_Rule(const FtraceConfig_PrintFilter_Rule&) = default; +FtraceConfig_PrintFilter_Rule& FtraceConfig_PrintFilter_Rule::operator=(const FtraceConfig_PrintFilter_Rule&) = default; +FtraceConfig_PrintFilter_Rule::FtraceConfig_PrintFilter_Rule(FtraceConfig_PrintFilter_Rule&&) noexcept = default; +FtraceConfig_PrintFilter_Rule& FtraceConfig_PrintFilter_Rule::operator=(FtraceConfig_PrintFilter_Rule&&) = default; + +bool FtraceConfig_PrintFilter_Rule::operator==(const FtraceConfig_PrintFilter_Rule& other) const { + return unknown_fields_ == other.unknown_fields_ + && prefix_ == other.prefix_ + && atrace_msg_ == other.atrace_msg_ + && allow_ == other.allow_; +} + +bool FtraceConfig_PrintFilter_Rule::ParseFromArray(const void* raw, size_t size) { + unknown_fields_.clear(); + bool packed_error = false; + + ::protozero::ProtoDecoder dec(raw, size); + for (auto field = dec.ReadField(); field.valid(); field = dec.ReadField()) { + if (field.id() < _has_field_.size()) { + _has_field_.set(field.id()); + } + switch (field.id()) { + case 1 /* prefix */: + ::protozero::internal::gen_helpers::DeserializeString(field, &prefix_); + break; + case 3 /* atrace_msg */: + (*atrace_msg_).ParseFromArray(field.data(), field.size()); + break; + case 2 /* allow */: + field.get(&allow_); + break; + default: + field.SerializeAndAppendTo(&unknown_fields_); + break; + } + } + return !packed_error && !dec.bytes_left(); +} + +std::string FtraceConfig_PrintFilter_Rule::SerializeAsString() const { + ::protozero::internal::gen_helpers::MessageSerializer msg; + Serialize(msg.get()); + return msg.SerializeAsString(); +} + +std::vector FtraceConfig_PrintFilter_Rule::SerializeAsArray() const { + ::protozero::internal::gen_helpers::MessageSerializer msg; + Serialize(msg.get()); + return msg.SerializeAsArray(); +} + +void FtraceConfig_PrintFilter_Rule::Serialize(::protozero::Message* msg) const { + // Field 1: prefix + if (_has_field_[1]) { + ::protozero::internal::gen_helpers::SerializeString(1, prefix_, msg); + } + + // Field 3: atrace_msg + if (_has_field_[3]) { + (*atrace_msg_).Serialize(msg->BeginNestedMessage<::protozero::Message>(3)); + } + + // Field 2: allow + if (_has_field_[2]) { + ::protozero::internal::gen_helpers::SerializeTinyVarInt(2, allow_, msg); + } + + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); +} + + +FtraceConfig_PrintFilter_Rule_AtraceMessage::FtraceConfig_PrintFilter_Rule_AtraceMessage() = default; +FtraceConfig_PrintFilter_Rule_AtraceMessage::~FtraceConfig_PrintFilter_Rule_AtraceMessage() = default; +FtraceConfig_PrintFilter_Rule_AtraceMessage::FtraceConfig_PrintFilter_Rule_AtraceMessage(const FtraceConfig_PrintFilter_Rule_AtraceMessage&) = default; +FtraceConfig_PrintFilter_Rule_AtraceMessage& FtraceConfig_PrintFilter_Rule_AtraceMessage::operator=(const FtraceConfig_PrintFilter_Rule_AtraceMessage&) = default; +FtraceConfig_PrintFilter_Rule_AtraceMessage::FtraceConfig_PrintFilter_Rule_AtraceMessage(FtraceConfig_PrintFilter_Rule_AtraceMessage&&) noexcept = default; +FtraceConfig_PrintFilter_Rule_AtraceMessage& FtraceConfig_PrintFilter_Rule_AtraceMessage::operator=(FtraceConfig_PrintFilter_Rule_AtraceMessage&&) = default; + +bool FtraceConfig_PrintFilter_Rule_AtraceMessage::operator==(const FtraceConfig_PrintFilter_Rule_AtraceMessage& other) const { + return unknown_fields_ == other.unknown_fields_ + && type_ == other.type_ + && prefix_ == other.prefix_; +} + +bool FtraceConfig_PrintFilter_Rule_AtraceMessage::ParseFromArray(const void* raw, size_t size) { + unknown_fields_.clear(); + bool packed_error = false; + + ::protozero::ProtoDecoder dec(raw, size); + for (auto field = dec.ReadField(); field.valid(); field = dec.ReadField()) { + if (field.id() < _has_field_.size()) { + _has_field_.set(field.id()); + } + switch (field.id()) { + case 1 /* type */: + ::protozero::internal::gen_helpers::DeserializeString(field, &type_); + break; + case 2 /* prefix */: + ::protozero::internal::gen_helpers::DeserializeString(field, &prefix_); + break; + default: + field.SerializeAndAppendTo(&unknown_fields_); + break; + } + } + return !packed_error && !dec.bytes_left(); +} + +std::string FtraceConfig_PrintFilter_Rule_AtraceMessage::SerializeAsString() const { + ::protozero::internal::gen_helpers::MessageSerializer msg; + Serialize(msg.get()); + return msg.SerializeAsString(); +} + +std::vector FtraceConfig_PrintFilter_Rule_AtraceMessage::SerializeAsArray() const { + ::protozero::internal::gen_helpers::MessageSerializer msg; + Serialize(msg.get()); + return msg.SerializeAsArray(); +} + +void FtraceConfig_PrintFilter_Rule_AtraceMessage::Serialize(::protozero::Message* msg) const { + // Field 1: type + if (_has_field_[1]) { + ::protozero::internal::gen_helpers::SerializeString(1, type_, msg); + } + + // Field 2: prefix + if (_has_field_[2]) { + ::protozero::internal::gen_helpers::SerializeString(2, prefix_, msg); + } + + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); } @@ -18570,13 +19301,13 @@ bool FtraceConfig_CompactSchedConfig::ParseFromArray(const void* raw, size_t siz } std::string FtraceConfig_CompactSchedConfig::SerializeAsString() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsString(); } std::vector FtraceConfig_CompactSchedConfig::SerializeAsArray() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsArray(); } @@ -18584,10 +19315,10 @@ std::vector FtraceConfig_CompactSchedConfig::SerializeAsArray() const { void FtraceConfig_CompactSchedConfig::Serialize(::protozero::Message* msg) const { // Field 1: enabled if (_has_field_[1]) { - msg->AppendTinyVarInt(1, enabled_); + ::protozero::internal::gen_helpers::SerializeTinyVarInt(1, enabled_, msg); } - msg->AppendRawProtoBytes(unknown_fields_.data(), unknown_fields_.size()); + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); } } // namespace perfetto @@ -18688,6 +19419,7 @@ class PERFETTO_EXPORT_COMPONENT GpuCounterConfig : public ::protozero::CppMessag } // namespace gen #endif // PERFETTO_PROTOS_PROTOS_PERFETTO_CONFIG_GPU_GPU_COUNTER_CONFIG_PROTO_CPP_H_ +// gen_amalgamated expanded: #include "perfetto/protozero/gen_field_helpers.h" // gen_amalgamated expanded: #include "perfetto/protozero/message.h" // gen_amalgamated expanded: #include "perfetto/protozero/packed_repeated_fields.h" // gen_amalgamated expanded: #include "perfetto/protozero/proto_decoder.h" @@ -18751,13 +19483,13 @@ bool GpuCounterConfig::ParseFromArray(const void* raw, size_t size) { } std::string GpuCounterConfig::SerializeAsString() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsString(); } std::vector GpuCounterConfig::SerializeAsArray() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsArray(); } @@ -18765,25 +19497,25 @@ std::vector GpuCounterConfig::SerializeAsArray() const { void GpuCounterConfig::Serialize(::protozero::Message* msg) const { // Field 1: counter_period_ns if (_has_field_[1]) { - msg->AppendVarInt(1, counter_period_ns_); + ::protozero::internal::gen_helpers::SerializeVarInt(1, counter_period_ns_, msg); } // Field 2: counter_ids for (auto& it : counter_ids_) { - msg->AppendVarInt(2, it); + ::protozero::internal::gen_helpers::SerializeVarInt(2, it, msg); } // Field 3: instrumented_sampling if (_has_field_[3]) { - msg->AppendTinyVarInt(3, instrumented_sampling_); + ::protozero::internal::gen_helpers::SerializeTinyVarInt(3, instrumented_sampling_, msg); } // Field 4: fix_gpu_clock if (_has_field_[4]) { - msg->AppendTinyVarInt(4, fix_gpu_clock_); + ::protozero::internal::gen_helpers::SerializeTinyVarInt(4, fix_gpu_clock_, msg); } - msg->AppendRawProtoBytes(unknown_fields_.data(), unknown_fields_.size()); + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); } } // namespace perfetto @@ -18869,6 +19601,7 @@ class PERFETTO_EXPORT_COMPONENT VulkanMemoryConfig : public ::protozero::CppMess } // namespace gen #endif // PERFETTO_PROTOS_PROTOS_PERFETTO_CONFIG_GPU_VULKAN_MEMORY_CONFIG_PROTO_CPP_H_ +// gen_amalgamated expanded: #include "perfetto/protozero/gen_field_helpers.h" // gen_amalgamated expanded: #include "perfetto/protozero/message.h" // gen_amalgamated expanded: #include "perfetto/protozero/packed_repeated_fields.h" // gen_amalgamated expanded: #include "perfetto/protozero/proto_decoder.h" @@ -18922,13 +19655,13 @@ bool VulkanMemoryConfig::ParseFromArray(const void* raw, size_t size) { } std::string VulkanMemoryConfig::SerializeAsString() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsString(); } std::vector VulkanMemoryConfig::SerializeAsArray() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsArray(); } @@ -18936,15 +19669,15 @@ std::vector VulkanMemoryConfig::SerializeAsArray() const { void VulkanMemoryConfig::Serialize(::protozero::Message* msg) const { // Field 1: track_driver_memory_usage if (_has_field_[1]) { - msg->AppendTinyVarInt(1, track_driver_memory_usage_); + ::protozero::internal::gen_helpers::SerializeTinyVarInt(1, track_driver_memory_usage_, msg); } // Field 2: track_device_memory_usage if (_has_field_[2]) { - msg->AppendTinyVarInt(2, track_device_memory_usage_); + ::protozero::internal::gen_helpers::SerializeTinyVarInt(2, track_device_memory_usage_, msg); } - msg->AppendRawProtoBytes(unknown_fields_.data(), unknown_fields_.size()); + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); } } // namespace perfetto @@ -19105,6 +19838,7 @@ class PERFETTO_EXPORT_COMPONENT InodeFileConfig_MountPointMappingEntry : public } // namespace gen #endif // PERFETTO_PROTOS_PROTOS_PERFETTO_CONFIG_INODE_FILE_INODE_FILE_CONFIG_PROTO_CPP_H_ +// gen_amalgamated expanded: #include "perfetto/protozero/gen_field_helpers.h" // gen_amalgamated expanded: #include "perfetto/protozero/message.h" // gen_amalgamated expanded: #include "perfetto/protozero/packed_repeated_fields.h" // gen_amalgamated expanded: #include "perfetto/protozero/proto_decoder.h" @@ -19166,7 +19900,7 @@ bool InodeFileConfig::ParseFromArray(const void* raw, size_t size) { break; case 5 /* scan_mount_points */: scan_mount_points_.emplace_back(); - field.get(&scan_mount_points_.back()); + ::protozero::internal::gen_helpers::DeserializeString(field, &scan_mount_points_.back()); break; case 6 /* mount_point_mapping */: mount_point_mapping_.emplace_back(); @@ -19181,13 +19915,13 @@ bool InodeFileConfig::ParseFromArray(const void* raw, size_t size) { } std::string InodeFileConfig::SerializeAsString() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsString(); } std::vector InodeFileConfig::SerializeAsArray() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsArray(); } @@ -19195,27 +19929,27 @@ std::vector InodeFileConfig::SerializeAsArray() const { void InodeFileConfig::Serialize(::protozero::Message* msg) const { // Field 1: scan_interval_ms if (_has_field_[1]) { - msg->AppendVarInt(1, scan_interval_ms_); + ::protozero::internal::gen_helpers::SerializeVarInt(1, scan_interval_ms_, msg); } // Field 2: scan_delay_ms if (_has_field_[2]) { - msg->AppendVarInt(2, scan_delay_ms_); + ::protozero::internal::gen_helpers::SerializeVarInt(2, scan_delay_ms_, msg); } // Field 3: scan_batch_size if (_has_field_[3]) { - msg->AppendVarInt(3, scan_batch_size_); + ::protozero::internal::gen_helpers::SerializeVarInt(3, scan_batch_size_, msg); } // Field 4: do_not_scan if (_has_field_[4]) { - msg->AppendTinyVarInt(4, do_not_scan_); + ::protozero::internal::gen_helpers::SerializeTinyVarInt(4, do_not_scan_, msg); } // Field 5: scan_mount_points for (auto& it : scan_mount_points_) { - msg->AppendString(5, it); + ::protozero::internal::gen_helpers::SerializeString(5, it, msg); } // Field 6: mount_point_mapping @@ -19223,7 +19957,7 @@ void InodeFileConfig::Serialize(::protozero::Message* msg) const { it.Serialize(msg->BeginNestedMessage<::protozero::Message>(6)); } - msg->AppendRawProtoBytes(unknown_fields_.data(), unknown_fields_.size()); + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); } @@ -19252,11 +19986,11 @@ bool InodeFileConfig_MountPointMappingEntry::ParseFromArray(const void* raw, siz } switch (field.id()) { case 1 /* mountpoint */: - field.get(&mountpoint_); + ::protozero::internal::gen_helpers::DeserializeString(field, &mountpoint_); break; case 2 /* scan_roots */: scan_roots_.emplace_back(); - field.get(&scan_roots_.back()); + ::protozero::internal::gen_helpers::DeserializeString(field, &scan_roots_.back()); break; default: field.SerializeAndAppendTo(&unknown_fields_); @@ -19267,13 +20001,13 @@ bool InodeFileConfig_MountPointMappingEntry::ParseFromArray(const void* raw, siz } std::string InodeFileConfig_MountPointMappingEntry::SerializeAsString() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsString(); } std::vector InodeFileConfig_MountPointMappingEntry::SerializeAsArray() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsArray(); } @@ -19281,15 +20015,15 @@ std::vector InodeFileConfig_MountPointMappingEntry::SerializeAsArray() void InodeFileConfig_MountPointMappingEntry::Serialize(::protozero::Message* msg) const { // Field 1: mountpoint if (_has_field_[1]) { - msg->AppendString(1, mountpoint_); + ::protozero::internal::gen_helpers::SerializeString(1, mountpoint_, msg); } // Field 2: scan_roots for (auto& it : scan_roots_) { - msg->AppendString(2, it); + ::protozero::internal::gen_helpers::SerializeString(2, it, msg); } - msg->AppendRawProtoBytes(unknown_fields_.data(), unknown_fields_.size()); + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); } } // namespace perfetto @@ -19387,6 +20121,7 @@ class PERFETTO_EXPORT_COMPONENT ConsoleConfig : public ::protozero::CppMessageOb } // namespace gen #endif // PERFETTO_PROTOS_PROTOS_PERFETTO_CONFIG_INTERCEPTORS_CONSOLE_CONFIG_PROTO_CPP_H_ +// gen_amalgamated expanded: #include "perfetto/protozero/gen_field_helpers.h" // gen_amalgamated expanded: #include "perfetto/protozero/message.h" // gen_amalgamated expanded: #include "perfetto/protozero/packed_repeated_fields.h" // gen_amalgamated expanded: #include "perfetto/protozero/proto_decoder.h" @@ -19440,13 +20175,13 @@ bool ConsoleConfig::ParseFromArray(const void* raw, size_t size) { } std::string ConsoleConfig::SerializeAsString() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsString(); } std::vector ConsoleConfig::SerializeAsArray() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsArray(); } @@ -19454,15 +20189,15 @@ std::vector ConsoleConfig::SerializeAsArray() const { void ConsoleConfig::Serialize(::protozero::Message* msg) const { // Field 1: output if (_has_field_[1]) { - msg->AppendVarInt(1, output_); + ::protozero::internal::gen_helpers::SerializeVarInt(1, output_, msg); } // Field 2: enable_colors if (_has_field_[2]) { - msg->AppendTinyVarInt(2, enable_colors_); + ::protozero::internal::gen_helpers::SerializeTinyVarInt(2, enable_colors_, msg); } - msg->AppendRawProtoBytes(unknown_fields_.data(), unknown_fields_.size()); + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); } } // namespace perfetto @@ -19526,6 +20261,7 @@ class PERFETTO_EXPORT_COMPONENT AndroidPowerConfig : public ::protozero::CppMess kBatteryCountersFieldNumber = 2, kCollectPowerRailsFieldNumber = 3, kCollectEnergyEstimationBreakdownFieldNumber = 4, + kCollectEntityStateResidencyFieldNumber = 5, }; AndroidPowerConfig(); @@ -19561,17 +20297,22 @@ class PERFETTO_EXPORT_COMPONENT AndroidPowerConfig : public ::protozero::CppMess bool collect_energy_estimation_breakdown() const { return collect_energy_estimation_breakdown_; } void set_collect_energy_estimation_breakdown(bool value) { collect_energy_estimation_breakdown_ = value; _has_field_.set(4); } + bool has_collect_entity_state_residency() const { return _has_field_[5]; } + bool collect_entity_state_residency() const { return collect_entity_state_residency_; } + void set_collect_entity_state_residency(bool value) { collect_entity_state_residency_ = value; _has_field_.set(5); } + private: uint32_t battery_poll_ms_{}; std::vector battery_counters_; bool collect_power_rails_{}; bool collect_energy_estimation_breakdown_{}; + bool collect_entity_state_residency_{}; // Allows to preserve unknown protobuf fields for compatibility // with future versions of .proto files. std::string unknown_fields_; - std::bitset<5> _has_field_{}; + std::bitset<6> _has_field_{}; }; } // namespace perfetto @@ -19579,6 +20320,7 @@ class PERFETTO_EXPORT_COMPONENT AndroidPowerConfig : public ::protozero::CppMess } // namespace gen #endif // PERFETTO_PROTOS_PROTOS_PERFETTO_CONFIG_POWER_ANDROID_POWER_CONFIG_PROTO_CPP_H_ +// gen_amalgamated expanded: #include "perfetto/protozero/gen_field_helpers.h" // gen_amalgamated expanded: #include "perfetto/protozero/message.h" // gen_amalgamated expanded: #include "perfetto/protozero/packed_repeated_fields.h" // gen_amalgamated expanded: #include "perfetto/protozero/proto_decoder.h" @@ -19606,7 +20348,8 @@ bool AndroidPowerConfig::operator==(const AndroidPowerConfig& other) const { && battery_poll_ms_ == other.battery_poll_ms_ && battery_counters_ == other.battery_counters_ && collect_power_rails_ == other.collect_power_rails_ - && collect_energy_estimation_breakdown_ == other.collect_energy_estimation_breakdown_; + && collect_energy_estimation_breakdown_ == other.collect_energy_estimation_breakdown_ + && collect_entity_state_residency_ == other.collect_entity_state_residency_; } bool AndroidPowerConfig::ParseFromArray(const void* raw, size_t size) { @@ -19633,6 +20376,9 @@ bool AndroidPowerConfig::ParseFromArray(const void* raw, size_t size) { case 4 /* collect_energy_estimation_breakdown */: field.get(&collect_energy_estimation_breakdown_); break; + case 5 /* collect_entity_state_residency */: + field.get(&collect_entity_state_residency_); + break; default: field.SerializeAndAppendTo(&unknown_fields_); break; @@ -19642,13 +20388,13 @@ bool AndroidPowerConfig::ParseFromArray(const void* raw, size_t size) { } std::string AndroidPowerConfig::SerializeAsString() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsString(); } std::vector AndroidPowerConfig::SerializeAsArray() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsArray(); } @@ -19656,25 +20402,30 @@ std::vector AndroidPowerConfig::SerializeAsArray() const { void AndroidPowerConfig::Serialize(::protozero::Message* msg) const { // Field 1: battery_poll_ms if (_has_field_[1]) { - msg->AppendVarInt(1, battery_poll_ms_); + ::protozero::internal::gen_helpers::SerializeVarInt(1, battery_poll_ms_, msg); } // Field 2: battery_counters for (auto& it : battery_counters_) { - msg->AppendVarInt(2, it); + ::protozero::internal::gen_helpers::SerializeVarInt(2, it, msg); } // Field 3: collect_power_rails if (_has_field_[3]) { - msg->AppendTinyVarInt(3, collect_power_rails_); + ::protozero::internal::gen_helpers::SerializeTinyVarInt(3, collect_power_rails_, msg); } // Field 4: collect_energy_estimation_breakdown if (_has_field_[4]) { - msg->AppendTinyVarInt(4, collect_energy_estimation_breakdown_); + ::protozero::internal::gen_helpers::SerializeTinyVarInt(4, collect_energy_estimation_breakdown_, msg); } - msg->AppendRawProtoBytes(unknown_fields_.data(), unknown_fields_.size()); + // Field 5: collect_entity_state_residency + if (_has_field_[5]) { + ::protozero::internal::gen_helpers::SerializeTinyVarInt(5, collect_entity_state_residency_, msg); + } + + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); } } // namespace perfetto @@ -19735,6 +20486,7 @@ class PERFETTO_EXPORT_COMPONENT ProcessStatsConfig : public ::protozero::CppMess kRecordThreadNamesFieldNumber = 3, kProcStatsPollMsFieldNumber = 4, kProcStatsCacheTtlMsFieldNumber = 6, + kResolveProcessFdsFieldNumber = 9, }; ProcessStatsConfig(); @@ -19774,18 +20526,23 @@ class PERFETTO_EXPORT_COMPONENT ProcessStatsConfig : public ::protozero::CppMess uint32_t proc_stats_cache_ttl_ms() const { return proc_stats_cache_ttl_ms_; } void set_proc_stats_cache_ttl_ms(uint32_t value) { proc_stats_cache_ttl_ms_ = value; _has_field_.set(6); } + bool has_resolve_process_fds() const { return _has_field_[9]; } + bool resolve_process_fds() const { return resolve_process_fds_; } + void set_resolve_process_fds(bool value) { resolve_process_fds_ = value; _has_field_.set(9); } + private: std::vector quirks_; bool scan_all_processes_on_start_{}; bool record_thread_names_{}; uint32_t proc_stats_poll_ms_{}; uint32_t proc_stats_cache_ttl_ms_{}; + bool resolve_process_fds_{}; // Allows to preserve unknown protobuf fields for compatibility // with future versions of .proto files. std::string unknown_fields_; - std::bitset<7> _has_field_{}; + std::bitset<10> _has_field_{}; }; } // namespace perfetto @@ -19793,6 +20550,7 @@ class PERFETTO_EXPORT_COMPONENT ProcessStatsConfig : public ::protozero::CppMess } // namespace gen #endif // PERFETTO_PROTOS_PROTOS_PERFETTO_CONFIG_PROCESS_STATS_PROCESS_STATS_CONFIG_PROTO_CPP_H_ +// gen_amalgamated expanded: #include "perfetto/protozero/gen_field_helpers.h" // gen_amalgamated expanded: #include "perfetto/protozero/message.h" // gen_amalgamated expanded: #include "perfetto/protozero/packed_repeated_fields.h" // gen_amalgamated expanded: #include "perfetto/protozero/proto_decoder.h" @@ -19821,7 +20579,8 @@ bool ProcessStatsConfig::operator==(const ProcessStatsConfig& other) const { && scan_all_processes_on_start_ == other.scan_all_processes_on_start_ && record_thread_names_ == other.record_thread_names_ && proc_stats_poll_ms_ == other.proc_stats_poll_ms_ - && proc_stats_cache_ttl_ms_ == other.proc_stats_cache_ttl_ms_; + && proc_stats_cache_ttl_ms_ == other.proc_stats_cache_ttl_ms_ + && resolve_process_fds_ == other.resolve_process_fds_; } bool ProcessStatsConfig::ParseFromArray(const void* raw, size_t size) { @@ -19851,6 +20610,9 @@ bool ProcessStatsConfig::ParseFromArray(const void* raw, size_t size) { case 6 /* proc_stats_cache_ttl_ms */: field.get(&proc_stats_cache_ttl_ms_); break; + case 9 /* resolve_process_fds */: + field.get(&resolve_process_fds_); + break; default: field.SerializeAndAppendTo(&unknown_fields_); break; @@ -19860,13 +20622,13 @@ bool ProcessStatsConfig::ParseFromArray(const void* raw, size_t size) { } std::string ProcessStatsConfig::SerializeAsString() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsString(); } std::vector ProcessStatsConfig::SerializeAsArray() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsArray(); } @@ -19874,30 +20636,35 @@ std::vector ProcessStatsConfig::SerializeAsArray() const { void ProcessStatsConfig::Serialize(::protozero::Message* msg) const { // Field 1: quirks for (auto& it : quirks_) { - msg->AppendVarInt(1, it); + ::protozero::internal::gen_helpers::SerializeVarInt(1, it, msg); } // Field 2: scan_all_processes_on_start if (_has_field_[2]) { - msg->AppendTinyVarInt(2, scan_all_processes_on_start_); + ::protozero::internal::gen_helpers::SerializeTinyVarInt(2, scan_all_processes_on_start_, msg); } // Field 3: record_thread_names if (_has_field_[3]) { - msg->AppendTinyVarInt(3, record_thread_names_); + ::protozero::internal::gen_helpers::SerializeTinyVarInt(3, record_thread_names_, msg); } // Field 4: proc_stats_poll_ms if (_has_field_[4]) { - msg->AppendVarInt(4, proc_stats_poll_ms_); + ::protozero::internal::gen_helpers::SerializeVarInt(4, proc_stats_poll_ms_, msg); } // Field 6: proc_stats_cache_ttl_ms if (_has_field_[6]) { - msg->AppendVarInt(6, proc_stats_cache_ttl_ms_); + ::protozero::internal::gen_helpers::SerializeVarInt(6, proc_stats_cache_ttl_ms_, msg); } - msg->AppendRawProtoBytes(unknown_fields_.data(), unknown_fields_.size()); + // Field 9: resolve_process_fds + if (_has_field_[9]) { + ::protozero::internal::gen_helpers::SerializeTinyVarInt(9, resolve_process_fds_, msg); + } + + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); } } // namespace perfetto @@ -20185,6 +20952,7 @@ class PERFETTO_EXPORT_COMPONENT HeapprofdConfig_ContinuousDumpConfig : public :: } // namespace gen #endif // PERFETTO_PROTOS_PROTOS_PERFETTO_CONFIG_PROFILING_HEAPPROFD_CONFIG_PROTO_CPP_H_ +// gen_amalgamated expanded: #include "perfetto/protozero/gen_field_helpers.h" // gen_amalgamated expanded: #include "perfetto/protozero/message.h" // gen_amalgamated expanded: #include "perfetto/protozero/packed_repeated_fields.h" // gen_amalgamated expanded: #include "perfetto/protozero/proto_decoder.h" @@ -20264,7 +21032,7 @@ bool HeapprofdConfig::ParseFromArray(const void* raw, size_t size) { break; case 2 /* process_cmdline */: process_cmdline_.emplace_back(); - field.get(&process_cmdline_.back()); + ::protozero::internal::gen_helpers::DeserializeString(field, &process_cmdline_.back()); break; case 4 /* pid */: pid_.emplace_back(); @@ -20272,15 +21040,15 @@ bool HeapprofdConfig::ParseFromArray(const void* raw, size_t size) { break; case 26 /* target_installed_by */: target_installed_by_.emplace_back(); - field.get(&target_installed_by_.back()); + ::protozero::internal::gen_helpers::DeserializeString(field, &target_installed_by_.back()); break; case 20 /* heaps */: heaps_.emplace_back(); - field.get(&heaps_.back()); + ::protozero::internal::gen_helpers::DeserializeString(field, &heaps_.back()); break; case 27 /* exclude_heaps */: exclude_heaps_.emplace_back(); - field.get(&exclude_heaps_.back()); + ::protozero::internal::gen_helpers::DeserializeString(field, &exclude_heaps_.back()); break; case 23 /* stream_allocations */: field.get(&stream_allocations_); @@ -20306,7 +21074,7 @@ bool HeapprofdConfig::ParseFromArray(const void* raw, size_t size) { break; case 7 /* skip_symbol_prefix */: skip_symbol_prefix_.emplace_back(); - field.get(&skip_symbol_prefix_.back()); + ::protozero::internal::gen_helpers::DeserializeString(field, &skip_symbol_prefix_.back()); break; case 6 /* continuous_dump_config */: (*continuous_dump_config_).ParseFromArray(field.data(), field.size()); @@ -20344,13 +21112,13 @@ bool HeapprofdConfig::ParseFromArray(const void* raw, size_t size) { } std::string HeapprofdConfig::SerializeAsString() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsString(); } std::vector HeapprofdConfig::SerializeAsArray() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsArray(); } @@ -20358,82 +21126,82 @@ std::vector HeapprofdConfig::SerializeAsArray() const { void HeapprofdConfig::Serialize(::protozero::Message* msg) const { // Field 1: sampling_interval_bytes if (_has_field_[1]) { - msg->AppendVarInt(1, sampling_interval_bytes_); + ::protozero::internal::gen_helpers::SerializeVarInt(1, sampling_interval_bytes_, msg); } // Field 24: adaptive_sampling_shmem_threshold if (_has_field_[24]) { - msg->AppendVarInt(24, adaptive_sampling_shmem_threshold_); + ::protozero::internal::gen_helpers::SerializeVarInt(24, adaptive_sampling_shmem_threshold_, msg); } // Field 25: adaptive_sampling_max_sampling_interval_bytes if (_has_field_[25]) { - msg->AppendVarInt(25, adaptive_sampling_max_sampling_interval_bytes_); + ::protozero::internal::gen_helpers::SerializeVarInt(25, adaptive_sampling_max_sampling_interval_bytes_, msg); } // Field 2: process_cmdline for (auto& it : process_cmdline_) { - msg->AppendString(2, it); + ::protozero::internal::gen_helpers::SerializeString(2, it, msg); } // Field 4: pid for (auto& it : pid_) { - msg->AppendVarInt(4, it); + ::protozero::internal::gen_helpers::SerializeVarInt(4, it, msg); } // Field 26: target_installed_by for (auto& it : target_installed_by_) { - msg->AppendString(26, it); + ::protozero::internal::gen_helpers::SerializeString(26, it, msg); } // Field 20: heaps for (auto& it : heaps_) { - msg->AppendString(20, it); + ::protozero::internal::gen_helpers::SerializeString(20, it, msg); } // Field 27: exclude_heaps for (auto& it : exclude_heaps_) { - msg->AppendString(27, it); + ::protozero::internal::gen_helpers::SerializeString(27, it, msg); } // Field 23: stream_allocations if (_has_field_[23]) { - msg->AppendTinyVarInt(23, stream_allocations_); + ::protozero::internal::gen_helpers::SerializeTinyVarInt(23, stream_allocations_, msg); } // Field 22: heap_sampling_intervals for (auto& it : heap_sampling_intervals_) { - msg->AppendVarInt(22, it); + ::protozero::internal::gen_helpers::SerializeVarInt(22, it, msg); } // Field 21: all_heaps if (_has_field_[21]) { - msg->AppendTinyVarInt(21, all_heaps_); + ::protozero::internal::gen_helpers::SerializeTinyVarInt(21, all_heaps_, msg); } // Field 5: all if (_has_field_[5]) { - msg->AppendTinyVarInt(5, all_); + ::protozero::internal::gen_helpers::SerializeTinyVarInt(5, all_, msg); } // Field 15: min_anonymous_memory_kb if (_has_field_[15]) { - msg->AppendVarInt(15, min_anonymous_memory_kb_); + ::protozero::internal::gen_helpers::SerializeVarInt(15, min_anonymous_memory_kb_, msg); } // Field 16: max_heapprofd_memory_kb if (_has_field_[16]) { - msg->AppendVarInt(16, max_heapprofd_memory_kb_); + ::protozero::internal::gen_helpers::SerializeVarInt(16, max_heapprofd_memory_kb_, msg); } // Field 17: max_heapprofd_cpu_secs if (_has_field_[17]) { - msg->AppendVarInt(17, max_heapprofd_cpu_secs_); + ::protozero::internal::gen_helpers::SerializeVarInt(17, max_heapprofd_cpu_secs_, msg); } // Field 7: skip_symbol_prefix for (auto& it : skip_symbol_prefix_) { - msg->AppendString(7, it); + ::protozero::internal::gen_helpers::SerializeString(7, it, msg); } // Field 6: continuous_dump_config @@ -20443,45 +21211,45 @@ void HeapprofdConfig::Serialize(::protozero::Message* msg) const { // Field 8: shmem_size_bytes if (_has_field_[8]) { - msg->AppendVarInt(8, shmem_size_bytes_); + ::protozero::internal::gen_helpers::SerializeVarInt(8, shmem_size_bytes_, msg); } // Field 9: block_client if (_has_field_[9]) { - msg->AppendTinyVarInt(9, block_client_); + ::protozero::internal::gen_helpers::SerializeTinyVarInt(9, block_client_, msg); } // Field 14: block_client_timeout_us if (_has_field_[14]) { - msg->AppendVarInt(14, block_client_timeout_us_); + ::protozero::internal::gen_helpers::SerializeVarInt(14, block_client_timeout_us_, msg); } // Field 10: no_startup if (_has_field_[10]) { - msg->AppendTinyVarInt(10, no_startup_); + ::protozero::internal::gen_helpers::SerializeTinyVarInt(10, no_startup_, msg); } // Field 11: no_running if (_has_field_[11]) { - msg->AppendTinyVarInt(11, no_running_); + ::protozero::internal::gen_helpers::SerializeTinyVarInt(11, no_running_, msg); } // Field 13: dump_at_max if (_has_field_[13]) { - msg->AppendTinyVarInt(13, dump_at_max_); + ::protozero::internal::gen_helpers::SerializeTinyVarInt(13, dump_at_max_, msg); } // Field 18: disable_fork_teardown if (_has_field_[18]) { - msg->AppendTinyVarInt(18, disable_fork_teardown_); + ::protozero::internal::gen_helpers::SerializeTinyVarInt(18, disable_fork_teardown_, msg); } // Field 19: disable_vfork_detection if (_has_field_[19]) { - msg->AppendTinyVarInt(19, disable_vfork_detection_); + ::protozero::internal::gen_helpers::SerializeTinyVarInt(19, disable_vfork_detection_, msg); } - msg->AppendRawProtoBytes(unknown_fields_.data(), unknown_fields_.size()); + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); } @@ -20523,13 +21291,13 @@ bool HeapprofdConfig_ContinuousDumpConfig::ParseFromArray(const void* raw, size_ } std::string HeapprofdConfig_ContinuousDumpConfig::SerializeAsString() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsString(); } std::vector HeapprofdConfig_ContinuousDumpConfig::SerializeAsArray() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsArray(); } @@ -20537,15 +21305,15 @@ std::vector HeapprofdConfig_ContinuousDumpConfig::SerializeAsArray() co void HeapprofdConfig_ContinuousDumpConfig::Serialize(::protozero::Message* msg) const { // Field 5: dump_phase_ms if (_has_field_[5]) { - msg->AppendVarInt(5, dump_phase_ms_); + ::protozero::internal::gen_helpers::SerializeVarInt(5, dump_phase_ms_, msg); } // Field 6: dump_interval_ms if (_has_field_[6]) { - msg->AppendVarInt(6, dump_interval_ms_); + ::protozero::internal::gen_helpers::SerializeVarInt(6, dump_interval_ms_, msg); } - msg->AppendRawProtoBytes(unknown_fields_.data(), unknown_fields_.size()); + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); } } // namespace perfetto @@ -20722,6 +21490,7 @@ class PERFETTO_EXPORT_COMPONENT JavaHprofConfig_ContinuousDumpConfig : public :: } // namespace gen #endif // PERFETTO_PROTOS_PROTOS_PERFETTO_CONFIG_PROFILING_JAVA_HPROF_CONFIG_PROTO_CPP_H_ +// gen_amalgamated expanded: #include "perfetto/protozero/gen_field_helpers.h" // gen_amalgamated expanded: #include "perfetto/protozero/message.h" // gen_amalgamated expanded: #include "perfetto/protozero/packed_repeated_fields.h" // gen_amalgamated expanded: #include "perfetto/protozero/proto_decoder.h" @@ -20771,7 +21540,7 @@ bool JavaHprofConfig::ParseFromArray(const void* raw, size_t size) { switch (field.id()) { case 1 /* process_cmdline */: process_cmdline_.emplace_back(); - field.get(&process_cmdline_.back()); + ::protozero::internal::gen_helpers::DeserializeString(field, &process_cmdline_.back()); break; case 2 /* pid */: pid_.emplace_back(); @@ -20779,7 +21548,7 @@ bool JavaHprofConfig::ParseFromArray(const void* raw, size_t size) { break; case 7 /* target_installed_by */: target_installed_by_.emplace_back(); - field.get(&target_installed_by_.back()); + ::protozero::internal::gen_helpers::DeserializeString(field, &target_installed_by_.back()); break; case 3 /* continuous_dump_config */: (*continuous_dump_config_).ParseFromArray(field.data(), field.size()); @@ -20792,7 +21561,7 @@ bool JavaHprofConfig::ParseFromArray(const void* raw, size_t size) { break; case 6 /* ignored_types */: ignored_types_.emplace_back(); - field.get(&ignored_types_.back()); + ::protozero::internal::gen_helpers::DeserializeString(field, &ignored_types_.back()); break; default: field.SerializeAndAppendTo(&unknown_fields_); @@ -20803,13 +21572,13 @@ bool JavaHprofConfig::ParseFromArray(const void* raw, size_t size) { } std::string JavaHprofConfig::SerializeAsString() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsString(); } std::vector JavaHprofConfig::SerializeAsArray() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsArray(); } @@ -20817,17 +21586,17 @@ std::vector JavaHprofConfig::SerializeAsArray() const { void JavaHprofConfig::Serialize(::protozero::Message* msg) const { // Field 1: process_cmdline for (auto& it : process_cmdline_) { - msg->AppendString(1, it); + ::protozero::internal::gen_helpers::SerializeString(1, it, msg); } // Field 2: pid for (auto& it : pid_) { - msg->AppendVarInt(2, it); + ::protozero::internal::gen_helpers::SerializeVarInt(2, it, msg); } // Field 7: target_installed_by for (auto& it : target_installed_by_) { - msg->AppendString(7, it); + ::protozero::internal::gen_helpers::SerializeString(7, it, msg); } // Field 3: continuous_dump_config @@ -20837,20 +21606,20 @@ void JavaHprofConfig::Serialize(::protozero::Message* msg) const { // Field 4: min_anonymous_memory_kb if (_has_field_[4]) { - msg->AppendVarInt(4, min_anonymous_memory_kb_); + ::protozero::internal::gen_helpers::SerializeVarInt(4, min_anonymous_memory_kb_, msg); } // Field 5: dump_smaps if (_has_field_[5]) { - msg->AppendTinyVarInt(5, dump_smaps_); + ::protozero::internal::gen_helpers::SerializeTinyVarInt(5, dump_smaps_, msg); } // Field 6: ignored_types for (auto& it : ignored_types_) { - msg->AppendString(6, it); + ::protozero::internal::gen_helpers::SerializeString(6, it, msg); } - msg->AppendRawProtoBytes(unknown_fields_.data(), unknown_fields_.size()); + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); } @@ -20896,13 +21665,13 @@ bool JavaHprofConfig_ContinuousDumpConfig::ParseFromArray(const void* raw, size_ } std::string JavaHprofConfig_ContinuousDumpConfig::SerializeAsString() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsString(); } std::vector JavaHprofConfig_ContinuousDumpConfig::SerializeAsArray() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsArray(); } @@ -20910,20 +21679,20 @@ std::vector JavaHprofConfig_ContinuousDumpConfig::SerializeAsArray() co void JavaHprofConfig_ContinuousDumpConfig::Serialize(::protozero::Message* msg) const { // Field 1: dump_phase_ms if (_has_field_[1]) { - msg->AppendVarInt(1, dump_phase_ms_); + ::protozero::internal::gen_helpers::SerializeVarInt(1, dump_phase_ms_, msg); } // Field 2: dump_interval_ms if (_has_field_[2]) { - msg->AppendVarInt(2, dump_interval_ms_); + ::protozero::internal::gen_helpers::SerializeVarInt(2, dump_interval_ms_, msg); } // Field 3: scan_pids_only_on_start if (_has_field_[3]) { - msg->AppendTinyVarInt(3, scan_pids_only_on_start_); + ::protozero::internal::gen_helpers::SerializeTinyVarInt(3, scan_pids_only_on_start_, msg); } - msg->AppendRawProtoBytes(unknown_fields_.data(), unknown_fields_.size()); + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); } } // namespace perfetto @@ -21186,6 +21955,7 @@ class PERFETTO_EXPORT_COMPONENT PerfEventConfig_Scope : public ::protozero::CppM kExcludePidFieldNumber = 3, kExcludeCmdlineFieldNumber = 4, kAdditionalCmdlineCountFieldNumber = 5, + kProcessShardCountFieldNumber = 6, }; PerfEventConfig_Scope(); @@ -21234,18 +22004,23 @@ class PERFETTO_EXPORT_COMPONENT PerfEventConfig_Scope : public ::protozero::CppM uint32_t additional_cmdline_count() const { return additional_cmdline_count_; } void set_additional_cmdline_count(uint32_t value) { additional_cmdline_count_ = value; _has_field_.set(5); } + bool has_process_shard_count() const { return _has_field_[6]; } + uint32_t process_shard_count() const { return process_shard_count_; } + void set_process_shard_count(uint32_t value) { process_shard_count_ = value; _has_field_.set(6); } + private: std::vector target_pid_; std::vector target_cmdline_; std::vector exclude_pid_; std::vector exclude_cmdline_; uint32_t additional_cmdline_count_{}; + uint32_t process_shard_count_{}; // Allows to preserve unknown protobuf fields for compatibility // with future versions of .proto files. std::string unknown_fields_; - std::bitset<6> _has_field_{}; + std::bitset<7> _has_field_{}; }; } // namespace perfetto @@ -21253,6 +22028,7 @@ class PERFETTO_EXPORT_COMPONENT PerfEventConfig_Scope : public ::protozero::CppM } // namespace gen #endif // PERFETTO_PROTOS_PROTOS_PERFETTO_CONFIG_PROFILING_PERF_EVENT_CONFIG_PROTO_CPP_H_ +// gen_amalgamated expanded: #include "perfetto/protozero/gen_field_helpers.h" // gen_amalgamated expanded: #include "perfetto/protozero/message.h" // gen_amalgamated expanded: #include "perfetto/protozero/packed_repeated_fields.h" // gen_amalgamated expanded: #include "perfetto/protozero/proto_decoder.h" @@ -21338,7 +22114,7 @@ bool PerfEventConfig::ParseFromArray(const void* raw, size_t size) { break; case 18 /* target_installed_by */: target_installed_by_.emplace_back(); - field.get(&target_installed_by_.back()); + ::protozero::internal::gen_helpers::DeserializeString(field, &target_installed_by_.back()); break; case 1 /* all_cpus */: field.get(&all_cpus_); @@ -21355,7 +22131,7 @@ bool PerfEventConfig::ParseFromArray(const void* raw, size_t size) { break; case 5 /* target_cmdline */: target_cmdline_.emplace_back(); - field.get(&target_cmdline_.back()); + ::protozero::internal::gen_helpers::DeserializeString(field, &target_cmdline_.back()); break; case 6 /* exclude_pid */: exclude_pid_.emplace_back(); @@ -21363,7 +22139,7 @@ bool PerfEventConfig::ParseFromArray(const void* raw, size_t size) { break; case 7 /* exclude_cmdline */: exclude_cmdline_.emplace_back(); - field.get(&exclude_cmdline_.back()); + ::protozero::internal::gen_helpers::DeserializeString(field, &exclude_cmdline_.back()); break; case 11 /* additional_cmdline_count */: field.get(&additional_cmdline_count_); @@ -21377,13 +22153,13 @@ bool PerfEventConfig::ParseFromArray(const void* raw, size_t size) { } std::string PerfEventConfig::SerializeAsString() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsString(); } std::vector PerfEventConfig::SerializeAsArray() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsArray(); } @@ -21401,80 +22177,80 @@ void PerfEventConfig::Serialize(::protozero::Message* msg) const { // Field 8: ring_buffer_read_period_ms if (_has_field_[8]) { - msg->AppendVarInt(8, ring_buffer_read_period_ms_); + ::protozero::internal::gen_helpers::SerializeVarInt(8, ring_buffer_read_period_ms_, msg); } // Field 3: ring_buffer_pages if (_has_field_[3]) { - msg->AppendVarInt(3, ring_buffer_pages_); + ::protozero::internal::gen_helpers::SerializeVarInt(3, ring_buffer_pages_, msg); } // Field 17: max_enqueued_footprint_kb if (_has_field_[17]) { - msg->AppendVarInt(17, max_enqueued_footprint_kb_); + ::protozero::internal::gen_helpers::SerializeVarInt(17, max_enqueued_footprint_kb_, msg); } // Field 13: max_daemon_memory_kb if (_has_field_[13]) { - msg->AppendVarInt(13, max_daemon_memory_kb_); + ::protozero::internal::gen_helpers::SerializeVarInt(13, max_daemon_memory_kb_, msg); } // Field 9: remote_descriptor_timeout_ms if (_has_field_[9]) { - msg->AppendVarInt(9, remote_descriptor_timeout_ms_); + ::protozero::internal::gen_helpers::SerializeVarInt(9, remote_descriptor_timeout_ms_, msg); } // Field 10: unwind_state_clear_period_ms if (_has_field_[10]) { - msg->AppendVarInt(10, unwind_state_clear_period_ms_); + ::protozero::internal::gen_helpers::SerializeVarInt(10, unwind_state_clear_period_ms_, msg); } // Field 18: target_installed_by for (auto& it : target_installed_by_) { - msg->AppendString(18, it); + ::protozero::internal::gen_helpers::SerializeString(18, it, msg); } // Field 1: all_cpus if (_has_field_[1]) { - msg->AppendTinyVarInt(1, all_cpus_); + ::protozero::internal::gen_helpers::SerializeTinyVarInt(1, all_cpus_, msg); } // Field 2: sampling_frequency if (_has_field_[2]) { - msg->AppendVarInt(2, sampling_frequency_); + ::protozero::internal::gen_helpers::SerializeVarInt(2, sampling_frequency_, msg); } // Field 12: kernel_frames if (_has_field_[12]) { - msg->AppendTinyVarInt(12, kernel_frames_); + ::protozero::internal::gen_helpers::SerializeTinyVarInt(12, kernel_frames_, msg); } // Field 4: target_pid for (auto& it : target_pid_) { - msg->AppendVarInt(4, it); + ::protozero::internal::gen_helpers::SerializeVarInt(4, it, msg); } // Field 5: target_cmdline for (auto& it : target_cmdline_) { - msg->AppendString(5, it); + ::protozero::internal::gen_helpers::SerializeString(5, it, msg); } // Field 6: exclude_pid for (auto& it : exclude_pid_) { - msg->AppendVarInt(6, it); + ::protozero::internal::gen_helpers::SerializeVarInt(6, it, msg); } // Field 7: exclude_cmdline for (auto& it : exclude_cmdline_) { - msg->AppendString(7, it); + ::protozero::internal::gen_helpers::SerializeString(7, it, msg); } // Field 11: additional_cmdline_count if (_has_field_[11]) { - msg->AppendVarInt(11, additional_cmdline_count_); + ::protozero::internal::gen_helpers::SerializeVarInt(11, additional_cmdline_count_, msg); } - msg->AppendRawProtoBytes(unknown_fields_.data(), unknown_fields_.size()); + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); } @@ -21520,13 +22296,13 @@ bool PerfEventConfig_CallstackSampling::ParseFromArray(const void* raw, size_t s } std::string PerfEventConfig_CallstackSampling::SerializeAsString() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsString(); } std::vector PerfEventConfig_CallstackSampling::SerializeAsArray() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsArray(); } @@ -21539,15 +22315,15 @@ void PerfEventConfig_CallstackSampling::Serialize(::protozero::Message* msg) con // Field 2: kernel_frames if (_has_field_[2]) { - msg->AppendTinyVarInt(2, kernel_frames_); + ::protozero::internal::gen_helpers::SerializeTinyVarInt(2, kernel_frames_, msg); } // Field 3: user_frames if (_has_field_[3]) { - msg->AppendVarInt(3, user_frames_); + ::protozero::internal::gen_helpers::SerializeVarInt(3, user_frames_, msg); } - msg->AppendRawProtoBytes(unknown_fields_.data(), unknown_fields_.size()); + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); } @@ -21564,7 +22340,8 @@ bool PerfEventConfig_Scope::operator==(const PerfEventConfig_Scope& other) const && target_cmdline_ == other.target_cmdline_ && exclude_pid_ == other.exclude_pid_ && exclude_cmdline_ == other.exclude_cmdline_ - && additional_cmdline_count_ == other.additional_cmdline_count_; + && additional_cmdline_count_ == other.additional_cmdline_count_ + && process_shard_count_ == other.process_shard_count_; } bool PerfEventConfig_Scope::ParseFromArray(const void* raw, size_t size) { @@ -21587,7 +22364,7 @@ bool PerfEventConfig_Scope::ParseFromArray(const void* raw, size_t size) { break; case 2 /* target_cmdline */: target_cmdline_.emplace_back(); - field.get(&target_cmdline_.back()); + ::protozero::internal::gen_helpers::DeserializeString(field, &target_cmdline_.back()); break; case 3 /* exclude_pid */: exclude_pid_.emplace_back(); @@ -21595,11 +22372,14 @@ bool PerfEventConfig_Scope::ParseFromArray(const void* raw, size_t size) { break; case 4 /* exclude_cmdline */: exclude_cmdline_.emplace_back(); - field.get(&exclude_cmdline_.back()); + ::protozero::internal::gen_helpers::DeserializeString(field, &exclude_cmdline_.back()); break; case 5 /* additional_cmdline_count */: field.get(&additional_cmdline_count_); break; + case 6 /* process_shard_count */: + field.get(&process_shard_count_); + break; default: field.SerializeAndAppendTo(&unknown_fields_); break; @@ -21609,13 +22389,13 @@ bool PerfEventConfig_Scope::ParseFromArray(const void* raw, size_t size) { } std::string PerfEventConfig_Scope::SerializeAsString() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsString(); } std::vector PerfEventConfig_Scope::SerializeAsArray() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsArray(); } @@ -21623,30 +22403,1106 @@ std::vector PerfEventConfig_Scope::SerializeAsArray() const { void PerfEventConfig_Scope::Serialize(::protozero::Message* msg) const { // Field 1: target_pid for (auto& it : target_pid_) { - msg->AppendVarInt(1, it); + ::protozero::internal::gen_helpers::SerializeVarInt(1, it, msg); } // Field 2: target_cmdline for (auto& it : target_cmdline_) { - msg->AppendString(2, it); + ::protozero::internal::gen_helpers::SerializeString(2, it, msg); } // Field 3: exclude_pid for (auto& it : exclude_pid_) { - msg->AppendVarInt(3, it); + ::protozero::internal::gen_helpers::SerializeVarInt(3, it, msg); } // Field 4: exclude_cmdline for (auto& it : exclude_cmdline_) { - msg->AppendString(4, it); + ::protozero::internal::gen_helpers::SerializeString(4, it, msg); } // Field 5: additional_cmdline_count if (_has_field_[5]) { - msg->AppendVarInt(5, additional_cmdline_count_); + ::protozero::internal::gen_helpers::SerializeVarInt(5, additional_cmdline_count_, msg); } - msg->AppendRawProtoBytes(unknown_fields_.data(), unknown_fields_.size()); + // Field 6: process_shard_count + if (_has_field_[6]) { + ::protozero::internal::gen_helpers::SerializeVarInt(6, process_shard_count_, msg); + } + + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); +} + +} // namespace perfetto +} // namespace protos +} // namespace gen +#if defined(__GNUC__) || defined(__clang__) +#pragma GCC diagnostic pop +#endif +// gen_amalgamated begin source: gen/protos/perfetto/config/statsd/atom_ids.gen.cc +// gen_amalgamated begin header: gen/protos/perfetto/config/statsd/atom_ids.gen.h +// DO NOT EDIT. Autogenerated by Perfetto cppgen_plugin +#ifndef PERFETTO_PROTOS_PROTOS_PERFETTO_CONFIG_STATSD_ATOM_IDS_PROTO_CPP_H_ +#define PERFETTO_PROTOS_PROTOS_PERFETTO_CONFIG_STATSD_ATOM_IDS_PROTO_CPP_H_ + +#include +#include +#include +#include +#include + +// gen_amalgamated expanded: #include "perfetto/protozero/cpp_message_obj.h" +// gen_amalgamated expanded: #include "perfetto/protozero/copyable_ptr.h" +// gen_amalgamated expanded: #include "perfetto/base/export.h" + +namespace perfetto { +namespace protos { +namespace gen { +enum AtomId : int; +} // namespace perfetto +} // namespace protos +} // namespace gen + +namespace protozero { +class Message; +} // namespace protozero + +namespace perfetto { +namespace protos { +namespace gen { +enum AtomId : int { + ATOM_UNSPECIFIED = 0, + ATOM_BLE_SCAN_STATE_CHANGED = 2, + ATOM_PROCESS_STATE_CHANGED = 3, + ATOM_BLE_SCAN_RESULT_RECEIVED = 4, + ATOM_SENSOR_STATE_CHANGED = 5, + ATOM_GPS_SCAN_STATE_CHANGED = 6, + ATOM_SYNC_STATE_CHANGED = 7, + ATOM_SCHEDULED_JOB_STATE_CHANGED = 8, + ATOM_SCREEN_BRIGHTNESS_CHANGED = 9, + ATOM_WAKELOCK_STATE_CHANGED = 10, + ATOM_LONG_PARTIAL_WAKELOCK_STATE_CHANGED = 11, + ATOM_MOBILE_RADIO_POWER_STATE_CHANGED = 12, + ATOM_WIFI_RADIO_POWER_STATE_CHANGED = 13, + ATOM_ACTIVITY_MANAGER_SLEEP_STATE_CHANGED = 14, + ATOM_MEMORY_FACTOR_STATE_CHANGED = 15, + ATOM_EXCESSIVE_CPU_USAGE_REPORTED = 16, + ATOM_CACHED_KILL_REPORTED = 17, + ATOM_PROCESS_MEMORY_STAT_REPORTED = 18, + ATOM_LAUNCHER_EVENT = 19, + ATOM_BATTERY_SAVER_MODE_STATE_CHANGED = 20, + ATOM_DEVICE_IDLE_MODE_STATE_CHANGED = 21, + ATOM_DEVICE_IDLING_MODE_STATE_CHANGED = 22, + ATOM_AUDIO_STATE_CHANGED = 23, + ATOM_MEDIA_CODEC_STATE_CHANGED = 24, + ATOM_CAMERA_STATE_CHANGED = 25, + ATOM_FLASHLIGHT_STATE_CHANGED = 26, + ATOM_UID_PROCESS_STATE_CHANGED = 27, + ATOM_PROCESS_LIFE_CYCLE_STATE_CHANGED = 28, + ATOM_SCREEN_STATE_CHANGED = 29, + ATOM_BATTERY_LEVEL_CHANGED = 30, + ATOM_CHARGING_STATE_CHANGED = 31, + ATOM_PLUGGED_STATE_CHANGED = 32, + ATOM_INTERACTIVE_STATE_CHANGED = 33, + ATOM_TOUCH_EVENT_REPORTED = 34, + ATOM_WAKEUP_ALARM_OCCURRED = 35, + ATOM_KERNEL_WAKEUP_REPORTED = 36, + ATOM_WIFI_LOCK_STATE_CHANGED = 37, + ATOM_WIFI_SIGNAL_STRENGTH_CHANGED = 38, + ATOM_WIFI_SCAN_STATE_CHANGED = 39, + ATOM_PHONE_SIGNAL_STRENGTH_CHANGED = 40, + ATOM_SETTING_CHANGED = 41, + ATOM_ACTIVITY_FOREGROUND_STATE_CHANGED = 42, + ATOM_ISOLATED_UID_CHANGED = 43, + ATOM_PACKET_WAKEUP_OCCURRED = 44, + ATOM_WALL_CLOCK_TIME_SHIFTED = 45, + ATOM_ANOMALY_DETECTED = 46, + ATOM_APP_BREADCRUMB_REPORTED = 47, + ATOM_APP_START_OCCURRED = 48, + ATOM_APP_START_CANCELED = 49, + ATOM_APP_START_FULLY_DRAWN = 50, + ATOM_LMK_KILL_OCCURRED = 51, + ATOM_PICTURE_IN_PICTURE_STATE_CHANGED = 52, + ATOM_WIFI_MULTICAST_LOCK_STATE_CHANGED = 53, + ATOM_LMK_STATE_CHANGED = 54, + ATOM_APP_START_MEMORY_STATE_CAPTURED = 55, + ATOM_SHUTDOWN_SEQUENCE_REPORTED = 56, + ATOM_BOOT_SEQUENCE_REPORTED = 57, + ATOM_DAVEY_OCCURRED = 58, + ATOM_OVERLAY_STATE_CHANGED = 59, + ATOM_FOREGROUND_SERVICE_STATE_CHANGED = 60, + ATOM_CALL_STATE_CHANGED = 61, + ATOM_KEYGUARD_STATE_CHANGED = 62, + ATOM_KEYGUARD_BOUNCER_STATE_CHANGED = 63, + ATOM_KEYGUARD_BOUNCER_PASSWORD_ENTERED = 64, + ATOM_APP_DIED = 65, + ATOM_RESOURCE_CONFIGURATION_CHANGED = 66, + ATOM_BLUETOOTH_ENABLED_STATE_CHANGED = 67, + ATOM_BLUETOOTH_CONNECTION_STATE_CHANGED = 68, + ATOM_GPS_SIGNAL_QUALITY_CHANGED = 69, + ATOM_USB_CONNECTOR_STATE_CHANGED = 70, + ATOM_SPEAKER_IMPEDANCE_REPORTED = 71, + ATOM_HARDWARE_FAILED = 72, + ATOM_PHYSICAL_DROP_DETECTED = 73, + ATOM_CHARGE_CYCLES_REPORTED = 74, + ATOM_MOBILE_CONNECTION_STATE_CHANGED = 75, + ATOM_MOBILE_RADIO_TECHNOLOGY_CHANGED = 76, + ATOM_USB_DEVICE_ATTACHED = 77, + ATOM_APP_CRASH_OCCURRED = 78, + ATOM_ANR_OCCURRED = 79, + ATOM_WTF_OCCURRED = 80, + ATOM_LOW_MEM_REPORTED = 81, + ATOM_GENERIC_ATOM = 82, + ATOM_VIBRATOR_STATE_CHANGED = 84, + ATOM_DEFERRED_JOB_STATS_REPORTED = 85, + ATOM_THERMAL_THROTTLING = 86, + ATOM_BIOMETRIC_ACQUIRED = 87, + ATOM_BIOMETRIC_AUTHENTICATED = 88, + ATOM_BIOMETRIC_ERROR_OCCURRED = 89, + ATOM_UI_EVENT_REPORTED = 90, + ATOM_BATTERY_HEALTH_SNAPSHOT = 91, + ATOM_SLOW_IO = 92, + ATOM_BATTERY_CAUSED_SHUTDOWN = 93, + ATOM_PHONE_SERVICE_STATE_CHANGED = 94, + ATOM_PHONE_STATE_CHANGED = 95, + ATOM_USER_RESTRICTION_CHANGED = 96, + ATOM_SETTINGS_UI_CHANGED = 97, + ATOM_CONNECTIVITY_STATE_CHANGED = 98, + ATOM_SERVICE_STATE_CHANGED = 99, + ATOM_SERVICE_LAUNCH_REPORTED = 100, + ATOM_FLAG_FLIP_UPDATE_OCCURRED = 101, + ATOM_BINARY_PUSH_STATE_CHANGED = 102, + ATOM_DEVICE_POLICY_EVENT = 103, + ATOM_DOCS_UI_FILE_OP_CANCELED = 104, + ATOM_DOCS_UI_FILE_OP_COPY_MOVE_MODE_REPORTED = 105, + ATOM_DOCS_UI_FILE_OP_FAILURE = 106, + ATOM_DOCS_UI_PROVIDER_FILE_OP = 107, + ATOM_DOCS_UI_INVALID_SCOPED_ACCESS_REQUEST = 108, + ATOM_DOCS_UI_LAUNCH_REPORTED = 109, + ATOM_DOCS_UI_ROOT_VISITED = 110, + ATOM_DOCS_UI_STARTUP_MS = 111, + ATOM_DOCS_UI_USER_ACTION_REPORTED = 112, + ATOM_WIFI_ENABLED_STATE_CHANGED = 113, + ATOM_WIFI_RUNNING_STATE_CHANGED = 114, + ATOM_APP_COMPACTED = 115, + ATOM_NETWORK_DNS_EVENT_REPORTED = 116, + ATOM_DOCS_UI_PICKER_LAUNCHED_FROM_REPORTED = 117, + ATOM_DOCS_UI_PICK_RESULT_REPORTED = 118, + ATOM_DOCS_UI_SEARCH_MODE_REPORTED = 119, + ATOM_DOCS_UI_SEARCH_TYPE_REPORTED = 120, + ATOM_DATA_STALL_EVENT = 121, + ATOM_RESCUE_PARTY_RESET_REPORTED = 122, + ATOM_SIGNED_CONFIG_REPORTED = 123, + ATOM_GNSS_NI_EVENT_REPORTED = 124, + ATOM_BLUETOOTH_LINK_LAYER_CONNECTION_EVENT = 125, + ATOM_BLUETOOTH_ACL_CONNECTION_STATE_CHANGED = 126, + ATOM_BLUETOOTH_SCO_CONNECTION_STATE_CHANGED = 127, + ATOM_APP_DOWNGRADED = 128, + ATOM_APP_OPTIMIZED_AFTER_DOWNGRADED = 129, + ATOM_LOW_STORAGE_STATE_CHANGED = 130, + ATOM_GNSS_NFW_NOTIFICATION_REPORTED = 131, + ATOM_GNSS_CONFIGURATION_REPORTED = 132, + ATOM_USB_PORT_OVERHEAT_EVENT_REPORTED = 133, + ATOM_NFC_ERROR_OCCURRED = 134, + ATOM_NFC_STATE_CHANGED = 135, + ATOM_NFC_BEAM_OCCURRED = 136, + ATOM_NFC_CARDEMULATION_OCCURRED = 137, + ATOM_NFC_TAG_OCCURRED = 138, + ATOM_NFC_HCE_TRANSACTION_OCCURRED = 139, + ATOM_SE_STATE_CHANGED = 140, + ATOM_SE_OMAPI_REPORTED = 141, + ATOM_BROADCAST_DISPATCH_LATENCY_REPORTED = 142, + ATOM_ATTENTION_MANAGER_SERVICE_RESULT_REPORTED = 143, + ATOM_ADB_CONNECTION_CHANGED = 144, + ATOM_SPEECH_DSP_STAT_REPORTED = 145, + ATOM_USB_CONTAMINANT_REPORTED = 146, + ATOM_WATCHDOG_ROLLBACK_OCCURRED = 147, + ATOM_BIOMETRIC_SYSTEM_HEALTH_ISSUE_DETECTED = 148, + ATOM_BUBBLE_UI_CHANGED = 149, + ATOM_SCHEDULED_JOB_CONSTRAINT_CHANGED = 150, + ATOM_BLUETOOTH_ACTIVE_DEVICE_CHANGED = 151, + ATOM_BLUETOOTH_A2DP_PLAYBACK_STATE_CHANGED = 152, + ATOM_BLUETOOTH_A2DP_CODEC_CONFIG_CHANGED = 153, + ATOM_BLUETOOTH_A2DP_CODEC_CAPABILITY_CHANGED = 154, + ATOM_BLUETOOTH_A2DP_AUDIO_UNDERRUN_REPORTED = 155, + ATOM_BLUETOOTH_A2DP_AUDIO_OVERRUN_REPORTED = 156, + ATOM_BLUETOOTH_DEVICE_RSSI_REPORTED = 157, + ATOM_BLUETOOTH_DEVICE_FAILED_CONTACT_COUNTER_REPORTED = 158, + ATOM_BLUETOOTH_DEVICE_TX_POWER_LEVEL_REPORTED = 159, + ATOM_BLUETOOTH_HCI_TIMEOUT_REPORTED = 160, + ATOM_BLUETOOTH_QUALITY_REPORT_REPORTED = 161, + ATOM_BLUETOOTH_DEVICE_INFO_REPORTED = 162, + ATOM_BLUETOOTH_REMOTE_VERSION_INFO_REPORTED = 163, + ATOM_BLUETOOTH_SDP_ATTRIBUTE_REPORTED = 164, + ATOM_BLUETOOTH_BOND_STATE_CHANGED = 165, + ATOM_BLUETOOTH_CLASSIC_PAIRING_EVENT_REPORTED = 166, + ATOM_BLUETOOTH_SMP_PAIRING_EVENT_REPORTED = 167, + ATOM_SCREEN_TIMEOUT_EXTENSION_REPORTED = 168, + ATOM_PROCESS_START_TIME = 169, + ATOM_PERMISSION_GRANT_REQUEST_RESULT_REPORTED = 170, + ATOM_BLUETOOTH_SOCKET_CONNECTION_STATE_CHANGED = 171, + ATOM_DEVICE_IDENTIFIER_ACCESS_DENIED = 172, + ATOM_BUBBLE_DEVELOPER_ERROR_REPORTED = 173, + ATOM_ASSIST_GESTURE_STAGE_REPORTED = 174, + ATOM_ASSIST_GESTURE_FEEDBACK_REPORTED = 175, + ATOM_ASSIST_GESTURE_PROGRESS_REPORTED = 176, + ATOM_TOUCH_GESTURE_CLASSIFIED = 177, + ATOM_HIDDEN_API_USED = 178, + ATOM_STYLE_UI_CHANGED = 179, + ATOM_PRIVACY_INDICATORS_INTERACTED = 180, + ATOM_APP_INSTALL_ON_EXTERNAL_STORAGE_REPORTED = 181, + ATOM_NETWORK_STACK_REPORTED = 182, + ATOM_APP_MOVED_STORAGE_REPORTED = 183, + ATOM_BIOMETRIC_ENROLLED = 184, + ATOM_SYSTEM_SERVER_WATCHDOG_OCCURRED = 185, + ATOM_TOMB_STONE_OCCURRED = 186, + ATOM_BLUETOOTH_CLASS_OF_DEVICE_REPORTED = 187, + ATOM_INTELLIGENCE_EVENT_REPORTED = 188, + ATOM_THERMAL_THROTTLING_SEVERITY_STATE_CHANGED = 189, + ATOM_ROLE_REQUEST_RESULT_REPORTED = 190, + ATOM_MEDIAMETRICS_AUDIOPOLICY_REPORTED = 191, + ATOM_MEDIAMETRICS_AUDIORECORD_REPORTED = 192, + ATOM_MEDIAMETRICS_AUDIOTHREAD_REPORTED = 193, + ATOM_MEDIAMETRICS_AUDIOTRACK_REPORTED = 194, + ATOM_MEDIAMETRICS_CODEC_REPORTED = 195, + ATOM_MEDIAMETRICS_DRM_WIDEVINE_REPORTED = 196, + ATOM_MEDIAMETRICS_EXTRACTOR_REPORTED = 197, + ATOM_MEDIAMETRICS_MEDIADRM_REPORTED = 198, + ATOM_MEDIAMETRICS_NUPLAYER_REPORTED = 199, + ATOM_MEDIAMETRICS_RECORDER_REPORTED = 200, + ATOM_MEDIAMETRICS_DRMMANAGER_REPORTED = 201, + ATOM_CAR_POWER_STATE_CHANGED = 203, + ATOM_GARAGE_MODE_INFO = 204, + ATOM_TEST_ATOM_REPORTED = 205, + ATOM_CONTENT_CAPTURE_CALLER_MISMATCH_REPORTED = 206, + ATOM_CONTENT_CAPTURE_SERVICE_EVENTS = 207, + ATOM_CONTENT_CAPTURE_SESSION_EVENTS = 208, + ATOM_CONTENT_CAPTURE_FLUSHED = 209, + ATOM_LOCATION_MANAGER_API_USAGE_REPORTED = 210, + ATOM_REVIEW_PERMISSIONS_FRAGMENT_RESULT_REPORTED = 211, + ATOM_RUNTIME_PERMISSIONS_UPGRADE_RESULT = 212, + ATOM_GRANT_PERMISSIONS_ACTIVITY_BUTTON_ACTIONS = 213, + ATOM_LOCATION_ACCESS_CHECK_NOTIFICATION_ACTION = 214, + ATOM_APP_PERMISSION_FRAGMENT_ACTION_REPORTED = 215, + ATOM_APP_PERMISSION_FRAGMENT_VIEWED = 216, + ATOM_APP_PERMISSIONS_FRAGMENT_VIEWED = 217, + ATOM_PERMISSION_APPS_FRAGMENT_VIEWED = 218, + ATOM_TEXT_SELECTION_EVENT = 219, + ATOM_TEXT_LINKIFY_EVENT = 220, + ATOM_CONVERSATION_ACTIONS_EVENT = 221, + ATOM_LANGUAGE_DETECTION_EVENT = 222, + ATOM_EXCLUSION_RECT_STATE_CHANGED = 223, + ATOM_BACK_GESTURE_REPORTED_REPORTED = 224, + ATOM_UPDATE_ENGINE_UPDATE_ATTEMPT_REPORTED = 225, + ATOM_UPDATE_ENGINE_SUCCESSFUL_UPDATE_REPORTED = 226, + ATOM_CAMERA_ACTION_EVENT = 227, + ATOM_APP_COMPATIBILITY_CHANGE_REPORTED = 228, + ATOM_PERFETTO_UPLOADED = 229, + ATOM_VMS_CLIENT_CONNECTION_STATE_CHANGED = 230, + ATOM_MEDIA_PROVIDER_SCAN_OCCURRED = 233, + ATOM_MEDIA_CONTENT_DELETED = 234, + ATOM_MEDIA_PROVIDER_PERMISSION_REQUESTED = 235, + ATOM_MEDIA_PROVIDER_SCHEMA_CHANGED = 236, + ATOM_MEDIA_PROVIDER_IDLE_MAINTENANCE_FINISHED = 237, + ATOM_REBOOT_ESCROW_RECOVERY_REPORTED = 238, + ATOM_BOOT_TIME_EVENT_DURATION_REPORTED = 239, + ATOM_BOOT_TIME_EVENT_ELAPSED_TIME_REPORTED = 240, + ATOM_BOOT_TIME_EVENT_UTC_TIME_REPORTED = 241, + ATOM_BOOT_TIME_EVENT_ERROR_CODE_REPORTED = 242, + ATOM_USERSPACE_REBOOT_REPORTED = 243, + ATOM_NOTIFICATION_REPORTED = 244, + ATOM_NOTIFICATION_PANEL_REPORTED = 245, + ATOM_NOTIFICATION_CHANNEL_MODIFIED = 246, + ATOM_INTEGRITY_CHECK_RESULT_REPORTED = 247, + ATOM_INTEGRITY_RULES_PUSHED = 248, + ATOM_CB_MESSAGE_REPORTED = 249, + ATOM_CB_MESSAGE_ERROR = 250, + ATOM_WIFI_HEALTH_STAT_REPORTED = 251, + ATOM_WIFI_FAILURE_STAT_REPORTED = 252, + ATOM_WIFI_CONNECTION_RESULT_REPORTED = 253, + ATOM_APP_FREEZE_CHANGED = 254, + ATOM_SNAPSHOT_MERGE_REPORTED = 255, + ATOM_FOREGROUND_SERVICE_APP_OP_SESSION_ENDED = 256, + ATOM_DISPLAY_JANK_REPORTED = 257, + ATOM_APP_STANDBY_BUCKET_CHANGED = 258, + ATOM_SHARESHEET_STARTED = 259, + ATOM_RANKING_SELECTED = 260, + ATOM_TVSETTINGS_UI_INTERACTED = 261, + ATOM_LAUNCHER_SNAPSHOT = 262, + ATOM_PACKAGE_INSTALLER_V2_REPORTED = 263, + ATOM_USER_LIFECYCLE_JOURNEY_REPORTED = 264, + ATOM_USER_LIFECYCLE_EVENT_OCCURRED = 265, + ATOM_ACCESSIBILITY_SHORTCUT_REPORTED = 266, + ATOM_ACCESSIBILITY_SERVICE_REPORTED = 267, + ATOM_DOCS_UI_DRAG_AND_DROP_REPORTED = 268, + ATOM_APP_USAGE_EVENT_OCCURRED = 269, + ATOM_AUTO_REVOKE_NOTIFICATION_CLICKED = 270, + ATOM_AUTO_REVOKE_FRAGMENT_APP_VIEWED = 271, + ATOM_AUTO_REVOKED_APP_INTERACTION = 272, + ATOM_APP_PERMISSION_GROUPS_FRAGMENT_AUTO_REVOKE_ACTION = 273, + ATOM_EVS_USAGE_STATS_REPORTED = 274, + ATOM_AUDIO_POWER_USAGE_DATA_REPORTED = 275, + ATOM_TV_TUNER_STATE_CHANGED = 276, + ATOM_MEDIAOUTPUT_OP_SWITCH_REPORTED = 277, + ATOM_CB_MESSAGE_FILTERED = 278, + ATOM_TV_TUNER_DVR_STATUS = 279, + ATOM_TV_CAS_SESSION_OPEN_STATUS = 280, + ATOM_ASSISTANT_INVOCATION_REPORTED = 281, + ATOM_DISPLAY_WAKE_REPORTED = 282, + ATOM_CAR_USER_HAL_MODIFY_USER_REQUEST_REPORTED = 283, + ATOM_CAR_USER_HAL_MODIFY_USER_RESPONSE_REPORTED = 284, + ATOM_CAR_USER_HAL_POST_SWITCH_RESPONSE_REPORTED = 285, + ATOM_CAR_USER_HAL_INITIAL_USER_INFO_REQUEST_REPORTED = 286, + ATOM_CAR_USER_HAL_INITIAL_USER_INFO_RESPONSE_REPORTED = 287, + ATOM_CAR_USER_HAL_USER_ASSOCIATION_REQUEST_REPORTED = 288, + ATOM_CAR_USER_HAL_SET_USER_ASSOCIATION_RESPONSE_REPORTED = 289, + ATOM_NETWORK_IP_PROVISIONING_REPORTED = 290, + ATOM_NETWORK_DHCP_RENEW_REPORTED = 291, + ATOM_NETWORK_VALIDATION_REPORTED = 292, + ATOM_NETWORK_STACK_QUIRK_REPORTED = 293, + ATOM_MEDIAMETRICS_AUDIORECORDDEVICEUSAGE_REPORTED = 294, + ATOM_MEDIAMETRICS_AUDIOTHREADDEVICEUSAGE_REPORTED = 295, + ATOM_MEDIAMETRICS_AUDIOTRACKDEVICEUSAGE_REPORTED = 296, + ATOM_MEDIAMETRICS_AUDIODEVICECONNECTION_REPORTED = 297, + ATOM_BLOB_COMMITTED = 298, + ATOM_BLOB_LEASED = 299, + ATOM_BLOB_OPENED = 300, + ATOM_CONTACTS_PROVIDER_STATUS_REPORTED = 301, + ATOM_KEYSTORE_KEY_EVENT_REPORTED = 302, + ATOM_NETWORK_TETHERING_REPORTED = 303, + ATOM_IME_TOUCH_REPORTED = 304, + ATOM_UI_INTERACTION_FRAME_INFO_REPORTED = 305, + ATOM_UI_ACTION_LATENCY_REPORTED = 306, + ATOM_WIFI_DISCONNECT_REPORTED = 307, + ATOM_WIFI_CONNECTION_STATE_CHANGED = 308, + ATOM_HDMI_CEC_ACTIVE_SOURCE_CHANGED = 309, + ATOM_HDMI_CEC_MESSAGE_REPORTED = 310, + ATOM_AIRPLANE_MODE = 311, + ATOM_MODEM_RESTART = 312, + ATOM_CARRIER_ID_MISMATCH_REPORTED = 313, + ATOM_CARRIER_ID_TABLE_UPDATED = 314, + ATOM_DATA_STALL_RECOVERY_REPORTED = 315, + ATOM_MEDIAMETRICS_MEDIAPARSER_REPORTED = 316, + ATOM_TLS_HANDSHAKE_REPORTED = 317, + ATOM_TEXT_CLASSIFIER_API_USAGE_REPORTED = 318, + ATOM_CAR_WATCHDOG_KILL_STATS_REPORTED = 319, + ATOM_MEDIAMETRICS_PLAYBACK_REPORTED = 320, + ATOM_MEDIA_NETWORK_INFO_CHANGED = 321, + ATOM_MEDIA_PLAYBACK_STATE_CHANGED = 322, + ATOM_MEDIA_PLAYBACK_ERROR_REPORTED = 323, + ATOM_MEDIA_PLAYBACK_TRACK_CHANGED = 324, + ATOM_WIFI_SCAN_REPORTED = 325, + ATOM_WIFI_PNO_SCAN_REPORTED = 326, + ATOM_TIF_TUNE_CHANGED = 327, + ATOM_AUTO_ROTATE_REPORTED = 328, + ATOM_PERFETTO_TRIGGER = 329, + ATOM_TRANSCODING_DATA = 330, + ATOM_IMS_SERVICE_ENTITLEMENT_UPDATED = 331, + ATOM_ART_DATUM_REPORTED = 332, + ATOM_DEVICE_ROTATED = 333, + ATOM_SIM_SPECIFIC_SETTINGS_RESTORED = 334, + ATOM_TEXT_CLASSIFIER_DOWNLOAD_REPORTED = 335, + ATOM_PIN_STORAGE_EVENT = 336, + ATOM_FACE_DOWN_REPORTED = 337, + ATOM_BLUETOOTH_HAL_CRASH_REASON_REPORTED = 338, + ATOM_REBOOT_ESCROW_PREPARATION_REPORTED = 339, + ATOM_REBOOT_ESCROW_LSKF_CAPTURE_REPORTED = 340, + ATOM_REBOOT_ESCROW_REBOOT_REPORTED = 341, + ATOM_BINDER_LATENCY_REPORTED = 342, + ATOM_MEDIAMETRICS_AAUDIOSTREAM_REPORTED = 343, + ATOM_MEDIA_TRANSCODING_SESSION_ENDED = 344, + ATOM_MAGNIFICATION_USAGE_REPORTED = 345, + ATOM_MAGNIFICATION_MODE_WITH_IME_ON_REPORTED = 346, + ATOM_APP_SEARCH_CALL_STATS_REPORTED = 347, + ATOM_APP_SEARCH_PUT_DOCUMENT_STATS_REPORTED = 348, + ATOM_DEVICE_CONTROL_CHANGED = 349, + ATOM_DEVICE_STATE_CHANGED = 350, + ATOM_INPUTDEVICE_REGISTERED = 351, + ATOM_SMARTSPACE_CARD_REPORTED = 352, + ATOM_AUTH_PROMPT_AUTHENTICATE_INVOKED = 353, + ATOM_AUTH_MANAGER_CAN_AUTHENTICATE_INVOKED = 354, + ATOM_AUTH_ENROLL_ACTION_INVOKED = 355, + ATOM_AUTH_DEPRECATED_API_USED = 356, + ATOM_UNATTENDED_REBOOT_OCCURRED = 357, + ATOM_LONG_REBOOT_BLOCKING_REPORTED = 358, + ATOM_LOCATION_TIME_ZONE_PROVIDER_STATE_CHANGED = 359, + ATOM_FDTRACK_EVENT_OCCURRED = 364, + ATOM_TIMEOUT_AUTO_EXTENDED_REPORTED = 365, + ATOM_ODREFRESH_REPORTED = 366, + ATOM_ALARM_BATCH_DELIVERED = 367, + ATOM_ALARM_SCHEDULED = 368, + ATOM_CAR_WATCHDOG_IO_OVERUSE_STATS_REPORTED = 369, + ATOM_USER_LEVEL_HIBERNATION_STATE_CHANGED = 370, + ATOM_APP_SEARCH_INITIALIZE_STATS_REPORTED = 371, + ATOM_APP_SEARCH_QUERY_STATS_REPORTED = 372, + ATOM_APP_PROCESS_DIED = 373, + ATOM_NETWORK_IP_REACHABILITY_MONITOR_REPORTED = 374, + ATOM_SLOW_INPUT_EVENT_REPORTED = 375, + ATOM_ANR_OCCURRED_PROCESSING_STARTED = 376, + ATOM_APP_SEARCH_REMOVE_STATS_REPORTED = 377, + ATOM_MEDIA_CODEC_REPORTED = 378, + ATOM_PERMISSION_USAGE_FRAGMENT_INTERACTION = 379, + ATOM_PERMISSION_DETAILS_INTERACTION = 380, + ATOM_PRIVACY_SENSOR_TOGGLE_INTERACTION = 381, + ATOM_PRIVACY_TOGGLE_DIALOG_INTERACTION = 382, + ATOM_APP_SEARCH_OPTIMIZE_STATS_REPORTED = 383, + ATOM_NON_A11Y_TOOL_SERVICE_WARNING_REPORT = 384, + ATOM_APP_SEARCH_SET_SCHEMA_STATS_REPORTED = 385, + ATOM_APP_COMPAT_STATE_CHANGED = 386, + ATOM_SIZE_COMPAT_RESTART_BUTTON_EVENT_REPORTED = 387, + ATOM_SPLITSCREEN_UI_CHANGED = 388, + ATOM_NETWORK_DNS_HANDSHAKE_REPORTED = 389, + ATOM_BLUETOOTH_CODE_PATH_COUNTER = 390, + ATOM_BLUETOOTH_LE_BATCH_SCAN_REPORT_DELAY = 392, + ATOM_ACCESSIBILITY_FLOATING_MENU_UI_CHANGED = 393, + ATOM_NEURALNETWORKS_COMPILATION_COMPLETED = 394, + ATOM_NEURALNETWORKS_EXECUTION_COMPLETED = 395, + ATOM_NEURALNETWORKS_COMPILATION_FAILED = 396, + ATOM_NEURALNETWORKS_EXECUTION_FAILED = 397, + ATOM_CONTEXT_HUB_BOOTED = 398, + ATOM_CONTEXT_HUB_RESTARTED = 399, + ATOM_CONTEXT_HUB_LOADED_NANOAPP_SNAPSHOT_REPORTED = 400, + ATOM_CHRE_CODE_DOWNLOAD_TRANSACTED = 401, + ATOM_UWB_SESSION_INITED = 402, + ATOM_UWB_SESSION_CLOSED = 403, + ATOM_UWB_FIRST_RANGING_RECEIVED = 404, + ATOM_UWB_RANGING_MEASUREMENT_RECEIVED = 405, + ATOM_TEXT_CLASSIFIER_DOWNLOAD_WORK_SCHEDULED = 406, + ATOM_TEXT_CLASSIFIER_DOWNLOAD_WORK_COMPLETED = 407, + ATOM_CLIPBOARD_CLEARED = 408, + ATOM_VM_CREATION_REQUESTED = 409, + ATOM_NEARBY_DEVICE_SCAN_STATE_CHANGED = 410, + ATOM_CAMERA_COMPAT_CONTROL_EVENT_REPORTED = 411, + ATOM_APPLICATION_LOCALES_CHANGED = 412, + ATOM_MEDIAMETRICS_AUDIOTRACKSTATUS_REPORTED = 413, + ATOM_FOLD_STATE_DURATION_REPORTED = 414, + ATOM_LOCATION_TIME_ZONE_PROVIDER_CONTROLLER_STATE_CHANGED = 415, + ATOM_DISPLAY_HBM_STATE_CHANGED = 416, + ATOM_DISPLAY_HBM_BRIGHTNESS_CHANGED = 417, + ATOM_PERSISTENT_URI_PERMISSIONS_FLUSHED = 418, + ATOM_EARLY_BOOT_COMP_OS_ARTIFACTS_CHECK_REPORTED = 419, + ATOM_VBMETA_DIGEST_REPORTED = 420, + ATOM_APEX_INFO_GATHERED = 421, + ATOM_PVM_INFO_GATHERED = 422, + ATOM_WEAR_SETTINGS_UI_INTERACTED = 423, + ATOM_TRACING_SERVICE_REPORT_EVENT = 424, + ATOM_MEDIAMETRICS_AUDIORECORDSTATUS_REPORTED = 425, + ATOM_LAUNCHER_LATENCY = 426, + ATOM_DROPBOX_ENTRY_DROPPED = 427, + ATOM_WIFI_P2P_CONNECTION_REPORTED = 428, + ATOM_GAME_STATE_CHANGED = 429, + ATOM_HOTWORD_DETECTOR_CREATE_REQUESTED = 430, + ATOM_HOTWORD_DETECTION_SERVICE_INIT_RESULT_REPORTED = 431, + ATOM_HOTWORD_DETECTION_SERVICE_RESTARTED = 432, + ATOM_HOTWORD_DETECTOR_KEYPHRASE_TRIGGERED = 433, + ATOM_HOTWORD_DETECTOR_EVENTS = 434, + ATOM_BOOT_COMPLETED_BROADCAST_COMPLETION_LATENCY_REPORTED = 437, + ATOM_CONTACTS_INDEXER_UPDATE_STATS_REPORTED = 440, + ATOM_APP_BACKGROUND_RESTRICTIONS_INFO = 441, + ATOM_MMS_SMS_PROVIDER_GET_THREAD_ID_FAILED = 442, + ATOM_MMS_SMS_DATABASE_HELPER_ON_UPGRADE_FAILED = 443, + ATOM_PERMISSION_REMINDER_NOTIFICATION_INTERACTED = 444, + ATOM_RECENT_PERMISSION_DECISIONS_INTERACTED = 445, + ATOM_GNSS_PSDS_DOWNLOAD_REPORTED = 446, + ATOM_LE_AUDIO_CONNECTION_SESSION_REPORTED = 447, + ATOM_LE_AUDIO_BROADCAST_SESSION_REPORTED = 448, + ATOM_DREAM_UI_EVENT_REPORTED = 449, + ATOM_TASK_MANAGER_EVENT_REPORTED = 450, + ATOM_CDM_ASSOCIATION_ACTION = 451, + ATOM_MAGNIFICATION_TRIPLE_TAP_AND_HOLD_ACTIVATED_SESSION_REPORTED = 452, + ATOM_MAGNIFICATION_FOLLOW_TYPING_FOCUS_ACTIVATED_SESSION_REPORTED = 453, + ATOM_ACCESSIBILITY_TEXT_READING_OPTIONS_CHANGED = 454, + ATOM_WIFI_SETUP_FAILURE_CRASH_REPORTED = 455, + ATOM_UWB_DEVICE_ERROR_REPORTED = 456, + ATOM_ISOLATED_COMPILATION_SCHEDULED = 457, + ATOM_ISOLATED_COMPILATION_ENDED = 458, + ATOM_ONS_OPPORTUNISTIC_ESIM_PROVISIONING_COMPLETE = 459, + ATOM_TELEPHONY_ANOMALY_DETECTED = 461, + ATOM_LETTERBOX_POSITION_CHANGED = 462, + ATOM_REMOTE_KEY_PROVISIONING_ATTEMPT = 463, + ATOM_REMOTE_KEY_PROVISIONING_NETWORK_INFO = 464, + ATOM_REMOTE_KEY_PROVISIONING_TIMING = 465, + ATOM_MEDIAOUTPUT_OP_INTERACTION_REPORT = 466, + ATOM_BACKGROUND_DEXOPT_JOB_ENDED = 467, + ATOM_SYNC_EXEMPTION_OCCURRED = 468, + ATOM_AUTOFILL_PRESENTATION_EVENT_REPORTED = 469, + ATOM_DOCK_STATE_CHANGED = 470, + ATOM_BROADCAST_DELIVERY_EVENT_REPORTED = 475, + ATOM_SERVICE_REQUEST_EVENT_REPORTED = 476, + ATOM_PROVIDER_ACQUISITION_EVENT_REPORTED = 477, + ATOM_BLUETOOTH_DEVICE_NAME_REPORTED = 478, + ATOM_VIBRATION_REPORTED = 487, + ATOM_UWB_RANGING_START = 489, + ATOM_DISPLAY_BRIGHTNESS_CHANGED = 494, + ATOM_ACTIVITY_ACTION_BLOCKED = 495, + ATOM_NETWORK_DNS_SERVER_SUPPORT_REPORTED = 504, + ATOM_VM_BOOTED = 505, + ATOM_VM_EXITED = 506, + ATOM_AMBIENT_BRIGHTNESS_STATS_REPORTED = 507, + ATOM_MEDIAMETRICS_SPATIALIZERCAPABILITIES_REPORTED = 508, + ATOM_MEDIAMETRICS_SPATIALIZERDEVICEENABLED_REPORTED = 509, + ATOM_MEDIAMETRICS_HEADTRACKERDEVICEENABLED_REPORTED = 510, + ATOM_MEDIAMETRICS_HEADTRACKERDEVICESUPPORTED_REPORTED = 511, + ATOM_HEARING_AID_INFO_REPORTED = 513, + ATOM_DEVICE_WIDE_JOB_CONSTRAINT_CHANGED = 514, + ATOM_IWLAN_SETUP_DATA_CALL_RESULT_REPORTED = 519, + ATOM_IWLAN_PDN_DISCONNECTED_REASON_REPORTED = 520, + ATOM_AIRPLANE_MODE_SESSION_REPORTED = 521, + ATOM_VM_CPU_STATUS_REPORTED = 522, + ATOM_VM_MEM_STATUS_REPORTED = 523, + ATOM_DEFAULT_NETWORK_REMATCH_INFO = 525, + ATOM_NETWORK_SELECTION_PERFORMANCE = 526, + ATOM_NETWORK_NSD_REPORTED = 527, + ATOM_BLUETOOTH_DISCONNECTION_REASON_REPORTED = 529, + ATOM_BLUETOOTH_LOCAL_VERSIONS_REPORTED = 530, + ATOM_BLUETOOTH_REMOTE_SUPPORTED_FEATURES_REPORTED = 531, + ATOM_BLUETOOTH_LOCAL_SUPPORTED_FEATURES_REPORTED = 532, + ATOM_BLUETOOTH_GATT_APP_INFO = 533, + ATOM_BRIGHTNESS_CONFIGURATION_UPDATED = 534, + ATOM_LAUNCHER_IMPRESSION_EVENT = 547, + ATOM_ODSIGN_REPORTED = 548, + ATOM_ART_DEVICE_DATUM_REPORTED = 550, + ATOM_NETWORK_SLICE_SESSION_ENDED = 558, + ATOM_NETWORK_SLICE_DAILY_DATA_USAGE_REPORTED = 559, + ATOM_NFC_TAG_TYPE_OCCURRED = 560, + ATOM_NFC_AID_CONFLICT_OCCURRED = 561, + ATOM_NFC_READER_CONFLICT_OCCURRED = 562, + ATOM_ART_DATUM_DELTA_REPORTED = 565, + ATOM_MEDIA_DRM_CREATED = 568, + ATOM_MEDIA_DRM_ERRORED = 569, + ATOM_MEDIA_DRM_SESSION_OPENED = 570, + ATOM_MEDIA_DRM_SESSION_CLOSED = 571, + ATOM_PERFORMANCE_HINT_SESSION_REPORTED = 574, + ATOM_HOTWORD_AUDIO_EGRESS_EVENT_REPORTED = 578, + ATOM_NETWORK_VALIDATION_FAILURE_STATS_DAILY_REPORTED = 601, + ATOM_WIFI_BYTES_TRANSFER = 10000, + ATOM_WIFI_BYTES_TRANSFER_BY_FG_BG = 10001, + ATOM_MOBILE_BYTES_TRANSFER = 10002, + ATOM_MOBILE_BYTES_TRANSFER_BY_FG_BG = 10003, + ATOM_BLUETOOTH_BYTES_TRANSFER = 10006, + ATOM_KERNEL_WAKELOCK = 10004, + ATOM_SUBSYSTEM_SLEEP_STATE = 10005, + ATOM_CPU_TIME_PER_UID = 10009, + ATOM_CPU_TIME_PER_UID_FREQ = 10010, + ATOM_WIFI_ACTIVITY_INFO = 10011, + ATOM_MODEM_ACTIVITY_INFO = 10012, + ATOM_BLUETOOTH_ACTIVITY_INFO = 10007, + ATOM_PROCESS_MEMORY_STATE = 10013, + ATOM_SYSTEM_ELAPSED_REALTIME = 10014, + ATOM_SYSTEM_UPTIME = 10015, + ATOM_CPU_ACTIVE_TIME = 10016, + ATOM_CPU_CLUSTER_TIME = 10017, + ATOM_DISK_SPACE = 10018, + ATOM_REMAINING_BATTERY_CAPACITY = 10019, + ATOM_FULL_BATTERY_CAPACITY = 10020, + ATOM_TEMPERATURE = 10021, + ATOM_BINDER_CALLS = 10022, + ATOM_BINDER_CALLS_EXCEPTIONS = 10023, + ATOM_LOOPER_STATS = 10024, + ATOM_DISK_STATS = 10025, + ATOM_DIRECTORY_USAGE = 10026, + ATOM_APP_SIZE = 10027, + ATOM_CATEGORY_SIZE = 10028, + ATOM_PROC_STATS = 10029, + ATOM_BATTERY_VOLTAGE = 10030, + ATOM_NUM_FINGERPRINTS_ENROLLED = 10031, + ATOM_DISK_IO = 10032, + ATOM_POWER_PROFILE = 10033, + ATOM_PROC_STATS_PKG_PROC = 10034, + ATOM_PROCESS_CPU_TIME = 10035, + ATOM_CPU_TIME_PER_THREAD_FREQ = 10037, + ATOM_ON_DEVICE_POWER_MEASUREMENT = 10038, + ATOM_DEVICE_CALCULATED_POWER_USE = 10039, + ATOM_PROCESS_MEMORY_HIGH_WATER_MARK = 10042, + ATOM_BATTERY_LEVEL = 10043, + ATOM_BUILD_INFORMATION = 10044, + ATOM_BATTERY_CYCLE_COUNT = 10045, + ATOM_DEBUG_ELAPSED_CLOCK = 10046, + ATOM_DEBUG_FAILING_ELAPSED_CLOCK = 10047, + ATOM_NUM_FACES_ENROLLED = 10048, + ATOM_ROLE_HOLDER = 10049, + ATOM_DANGEROUS_PERMISSION_STATE = 10050, + ATOM_TRAIN_INFO = 10051, + ATOM_TIME_ZONE_DATA_INFO = 10052, + ATOM_EXTERNAL_STORAGE_INFO = 10053, + ATOM_GPU_STATS_GLOBAL_INFO = 10054, + ATOM_GPU_STATS_APP_INFO = 10055, + ATOM_SYSTEM_ION_HEAP_SIZE = 10056, + ATOM_APPS_ON_EXTERNAL_STORAGE_INFO = 10057, + ATOM_FACE_SETTINGS = 10058, + ATOM_COOLING_DEVICE = 10059, + ATOM_APP_OPS = 10060, + ATOM_PROCESS_SYSTEM_ION_HEAP_SIZE = 10061, + ATOM_SURFACEFLINGER_STATS_GLOBAL_INFO = 10062, + ATOM_SURFACEFLINGER_STATS_LAYER_INFO = 10063, + ATOM_PROCESS_MEMORY_SNAPSHOT = 10064, + ATOM_VMS_CLIENT_STATS = 10065, + ATOM_NOTIFICATION_REMOTE_VIEWS = 10066, + ATOM_DANGEROUS_PERMISSION_STATE_SAMPLED = 10067, + ATOM_GRAPHICS_STATS = 10068, + ATOM_RUNTIME_APP_OP_ACCESS = 10069, + ATOM_ION_HEAP_SIZE = 10070, + ATOM_PACKAGE_NOTIFICATION_PREFERENCES = 10071, + ATOM_PACKAGE_NOTIFICATION_CHANNEL_PREFERENCES = 10072, + ATOM_PACKAGE_NOTIFICATION_CHANNEL_GROUP_PREFERENCES = 10073, + ATOM_GNSS_STATS = 10074, + ATOM_ATTRIBUTED_APP_OPS = 10075, + ATOM_VOICE_CALL_SESSION = 10076, + ATOM_VOICE_CALL_RAT_USAGE = 10077, + ATOM_SIM_SLOT_STATE = 10078, + ATOM_SUPPORTED_RADIO_ACCESS_FAMILY = 10079, + ATOM_SETTING_SNAPSHOT = 10080, + ATOM_BLOB_INFO = 10081, + ATOM_DATA_USAGE_BYTES_TRANSFER = 10082, + ATOM_BYTES_TRANSFER_BY_TAG_AND_METERED = 10083, + ATOM_DND_MODE_RULE = 10084, + ATOM_GENERAL_EXTERNAL_STORAGE_ACCESS_STATS = 10085, + ATOM_INCOMING_SMS = 10086, + ATOM_OUTGOING_SMS = 10087, + ATOM_CARRIER_ID_TABLE_VERSION = 10088, + ATOM_DATA_CALL_SESSION = 10089, + ATOM_CELLULAR_SERVICE_STATE = 10090, + ATOM_CELLULAR_DATA_SERVICE_SWITCH = 10091, + ATOM_SYSTEM_MEMORY = 10092, + ATOM_IMS_REGISTRATION_TERMINATION = 10093, + ATOM_IMS_REGISTRATION_STATS = 10094, + ATOM_CPU_TIME_PER_CLUSTER_FREQ = 10095, + ATOM_CPU_CYCLES_PER_UID_CLUSTER = 10096, + ATOM_DEVICE_ROTATED_DATA = 10097, + ATOM_CPU_CYCLES_PER_THREAD_GROUP_CLUSTER = 10098, + ATOM_MEDIA_DRM_ACTIVITY_INFO = 10099, + ATOM_OEM_MANAGED_BYTES_TRANSFER = 10100, + ATOM_GNSS_POWER_STATS = 10101, + ATOM_TIME_ZONE_DETECTOR_STATE = 10102, + ATOM_KEYSTORE2_STORAGE_STATS = 10103, + ATOM_RKP_POOL_STATS = 10104, + ATOM_PROCESS_DMABUF_MEMORY = 10105, + ATOM_PENDING_ALARM_INFO = 10106, + ATOM_USER_LEVEL_HIBERNATED_APPS = 10107, + ATOM_LAUNCHER_LAYOUT_SNAPSHOT = 10108, + ATOM_GLOBAL_HIBERNATED_APPS = 10109, + ATOM_INPUT_EVENT_LATENCY_SKETCH = 10110, + ATOM_BATTERY_USAGE_STATS_BEFORE_RESET = 10111, + ATOM_BATTERY_USAGE_STATS_SINCE_RESET = 10112, + ATOM_BATTERY_USAGE_STATS_SINCE_RESET_USING_POWER_PROFILE_MODEL = 10113, + ATOM_INSTALLED_INCREMENTAL_PACKAGE = 10114, + ATOM_TELEPHONY_NETWORK_REQUESTS = 10115, + ATOM_APP_SEARCH_STORAGE_INFO = 10116, + ATOM_VMSTAT = 10117, + ATOM_KEYSTORE2_KEY_CREATION_WITH_GENERAL_INFO = 10118, + ATOM_KEYSTORE2_KEY_CREATION_WITH_AUTH_INFO = 10119, + ATOM_KEYSTORE2_KEY_CREATION_WITH_PURPOSE_AND_MODES_INFO = 10120, + ATOM_KEYSTORE2_ATOM_WITH_OVERFLOW = 10121, + ATOM_KEYSTORE2_KEY_OPERATION_WITH_PURPOSE_AND_MODES_INFO = 10122, + ATOM_KEYSTORE2_KEY_OPERATION_WITH_GENERAL_INFO = 10123, + ATOM_RKP_ERROR_STATS = 10124, + ATOM_KEYSTORE2_CRASH_STATS = 10125, + ATOM_VENDOR_APEX_INFO = 10126, + ATOM_ACCESSIBILITY_SHORTCUT_STATS = 10127, + ATOM_ACCESSIBILITY_FLOATING_MENU_STATS = 10128, + ATOM_DATA_USAGE_BYTES_TRANSFER_V2 = 10129, + ATOM_MEDIA_CAPABILITIES = 10130, + ATOM_CAR_WATCHDOG_SYSTEM_IO_USAGE_SUMMARY = 10131, + ATOM_CAR_WATCHDOG_UID_IO_USAGE_SUMMARY = 10132, + ATOM_IMS_REGISTRATION_FEATURE_TAG_STATS = 10133, + ATOM_RCS_CLIENT_PROVISIONING_STATS = 10134, + ATOM_RCS_ACS_PROVISIONING_STATS = 10135, + ATOM_SIP_DELEGATE_STATS = 10136, + ATOM_SIP_TRANSPORT_FEATURE_TAG_STATS = 10137, + ATOM_SIP_MESSAGE_RESPONSE = 10138, + ATOM_SIP_TRANSPORT_SESSION = 10139, + ATOM_IMS_DEDICATED_BEARER_LISTENER_EVENT = 10140, + ATOM_IMS_DEDICATED_BEARER_EVENT = 10141, + ATOM_IMS_REGISTRATION_SERVICE_DESC_STATS = 10142, + ATOM_UCE_EVENT_STATS = 10143, + ATOM_PRESENCE_NOTIFY_EVENT = 10144, + ATOM_GBA_EVENT = 10145, + ATOM_PER_SIM_STATUS = 10146, + ATOM_GPU_WORK_PER_UID = 10147, + ATOM_PERSISTENT_URI_PERMISSIONS_AMOUNT_PER_PACKAGE = 10148, + ATOM_SIGNED_PARTITION_INFO = 10149, + ATOM_PINNED_FILE_SIZES_PER_PACKAGE = 10150, + ATOM_PENDING_INTENTS_PER_PACKAGE = 10151, + ATOM_USER_INFO = 10152, + ATOM_TELEPHONY_NETWORK_REQUESTS_V2 = 10153, + ATOM_DEVICE_TELEPHONY_PROPERTIES = 10154, + ATOM_REMOTE_KEY_PROVISIONING_ERROR_COUNTS = 10155, + ATOM_INCOMING_MMS = 10157, + ATOM_OUTGOING_MMS = 10158, + ATOM_MULTI_USER_INFO = 10160, + ATOM_NETWORK_BPF_MAP_INFO = 10161, + ATOM_CONNECTIVITY_STATE_SAMPLE = 10163, + ATOM_NETWORK_SELECTION_REMATCH_REASONS_INFO = 10164, + ATOM_NETWORK_SLICE_REQUEST_COUNT = 10168, + ATOM_ADPF_SYSTEM_COMPONENT_INFO = 10173, + ATOM_NOTIFICATION_MEMORY_USE = 10174, +}; +} // namespace perfetto +} // namespace protos +} // namespace gen + +#endif // PERFETTO_PROTOS_PROTOS_PERFETTO_CONFIG_STATSD_ATOM_IDS_PROTO_CPP_H_ +// gen_amalgamated expanded: #include "perfetto/protozero/gen_field_helpers.h" +// gen_amalgamated expanded: #include "perfetto/protozero/message.h" +// gen_amalgamated expanded: #include "perfetto/protozero/packed_repeated_fields.h" +// gen_amalgamated expanded: #include "perfetto/protozero/proto_decoder.h" +// gen_amalgamated expanded: #include "perfetto/protozero/scattered_heap_buffer.h" +// DO NOT EDIT. Autogenerated by Perfetto cppgen_plugin +#if defined(__GNUC__) || defined(__clang__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wfloat-equal" +#endif +// gen_amalgamated expanded: #include "protos/perfetto/config/statsd/atom_ids.gen.h" + +namespace perfetto { +namespace protos { +namespace gen { +} // namespace perfetto +} // namespace protos +} // namespace gen +#if defined(__GNUC__) || defined(__clang__) +#pragma GCC diagnostic pop +#endif +// gen_amalgamated begin source: gen/protos/perfetto/config/statsd/statsd_tracing_config.gen.cc +// gen_amalgamated begin header: gen/protos/perfetto/config/statsd/statsd_tracing_config.gen.h +// DO NOT EDIT. Autogenerated by Perfetto cppgen_plugin +#ifndef PERFETTO_PROTOS_PROTOS_PERFETTO_CONFIG_STATSD_STATSD_TRACING_CONFIG_PROTO_CPP_H_ +#define PERFETTO_PROTOS_PROTOS_PERFETTO_CONFIG_STATSD_STATSD_TRACING_CONFIG_PROTO_CPP_H_ + +#include +#include +#include +#include +#include + +// gen_amalgamated expanded: #include "perfetto/protozero/cpp_message_obj.h" +// gen_amalgamated expanded: #include "perfetto/protozero/copyable_ptr.h" +// gen_amalgamated expanded: #include "perfetto/base/export.h" + +namespace perfetto { +namespace protos { +namespace gen { +class StatsdPullAtomConfig; +class StatsdTracingConfig; +enum AtomId : int; +} // namespace perfetto +} // namespace protos +} // namespace gen + +namespace protozero { +class Message; +} // namespace protozero + +namespace perfetto { +namespace protos { +namespace gen { + +class PERFETTO_EXPORT_COMPONENT StatsdPullAtomConfig : public ::protozero::CppMessageObj { + public: + enum FieldNumbers { + kPullAtomIdFieldNumber = 1, + kRawPullAtomIdFieldNumber = 2, + kPullFrequencyMsFieldNumber = 3, + kPackagesFieldNumber = 4, + }; + + StatsdPullAtomConfig(); + ~StatsdPullAtomConfig() override; + StatsdPullAtomConfig(StatsdPullAtomConfig&&) noexcept; + StatsdPullAtomConfig& operator=(StatsdPullAtomConfig&&); + StatsdPullAtomConfig(const StatsdPullAtomConfig&); + StatsdPullAtomConfig& operator=(const StatsdPullAtomConfig&); + bool operator==(const StatsdPullAtomConfig&) const; + bool operator!=(const StatsdPullAtomConfig& other) const { return !(*this == other); } + + bool ParseFromArray(const void*, size_t) override; + std::string SerializeAsString() const override; + std::vector SerializeAsArray() const override; + void Serialize(::protozero::Message*) const; + + const std::vector& pull_atom_id() const { return pull_atom_id_; } + std::vector* mutable_pull_atom_id() { return &pull_atom_id_; } + int pull_atom_id_size() const { return static_cast(pull_atom_id_.size()); } + void clear_pull_atom_id() { pull_atom_id_.clear(); } + void add_pull_atom_id(AtomId value) { pull_atom_id_.emplace_back(value); } + AtomId* add_pull_atom_id() { pull_atom_id_.emplace_back(); return &pull_atom_id_.back(); } + + const std::vector& raw_pull_atom_id() const { return raw_pull_atom_id_; } + std::vector* mutable_raw_pull_atom_id() { return &raw_pull_atom_id_; } + int raw_pull_atom_id_size() const { return static_cast(raw_pull_atom_id_.size()); } + void clear_raw_pull_atom_id() { raw_pull_atom_id_.clear(); } + void add_raw_pull_atom_id(int32_t value) { raw_pull_atom_id_.emplace_back(value); } + int32_t* add_raw_pull_atom_id() { raw_pull_atom_id_.emplace_back(); return &raw_pull_atom_id_.back(); } + + bool has_pull_frequency_ms() const { return _has_field_[3]; } + int32_t pull_frequency_ms() const { return pull_frequency_ms_; } + void set_pull_frequency_ms(int32_t value) { pull_frequency_ms_ = value; _has_field_.set(3); } + + const std::vector& packages() const { return packages_; } + std::vector* mutable_packages() { return &packages_; } + int packages_size() const { return static_cast(packages_.size()); } + void clear_packages() { packages_.clear(); } + void add_packages(std::string value) { packages_.emplace_back(value); } + std::string* add_packages() { packages_.emplace_back(); return &packages_.back(); } + + private: + std::vector pull_atom_id_; + std::vector raw_pull_atom_id_; + int32_t pull_frequency_ms_{}; + std::vector packages_; + + // Allows to preserve unknown protobuf fields for compatibility + // with future versions of .proto files. + std::string unknown_fields_; + + std::bitset<5> _has_field_{}; +}; + + +class PERFETTO_EXPORT_COMPONENT StatsdTracingConfig : public ::protozero::CppMessageObj { + public: + enum FieldNumbers { + kPushAtomIdFieldNumber = 1, + kRawPushAtomIdFieldNumber = 2, + kPullConfigFieldNumber = 3, + }; + + StatsdTracingConfig(); + ~StatsdTracingConfig() override; + StatsdTracingConfig(StatsdTracingConfig&&) noexcept; + StatsdTracingConfig& operator=(StatsdTracingConfig&&); + StatsdTracingConfig(const StatsdTracingConfig&); + StatsdTracingConfig& operator=(const StatsdTracingConfig&); + bool operator==(const StatsdTracingConfig&) const; + bool operator!=(const StatsdTracingConfig& other) const { return !(*this == other); } + + bool ParseFromArray(const void*, size_t) override; + std::string SerializeAsString() const override; + std::vector SerializeAsArray() const override; + void Serialize(::protozero::Message*) const; + + const std::vector& push_atom_id() const { return push_atom_id_; } + std::vector* mutable_push_atom_id() { return &push_atom_id_; } + int push_atom_id_size() const { return static_cast(push_atom_id_.size()); } + void clear_push_atom_id() { push_atom_id_.clear(); } + void add_push_atom_id(AtomId value) { push_atom_id_.emplace_back(value); } + AtomId* add_push_atom_id() { push_atom_id_.emplace_back(); return &push_atom_id_.back(); } + + const std::vector& raw_push_atom_id() const { return raw_push_atom_id_; } + std::vector* mutable_raw_push_atom_id() { return &raw_push_atom_id_; } + int raw_push_atom_id_size() const { return static_cast(raw_push_atom_id_.size()); } + void clear_raw_push_atom_id() { raw_push_atom_id_.clear(); } + void add_raw_push_atom_id(int32_t value) { raw_push_atom_id_.emplace_back(value); } + int32_t* add_raw_push_atom_id() { raw_push_atom_id_.emplace_back(); return &raw_push_atom_id_.back(); } + + const std::vector& pull_config() const { return pull_config_; } + std::vector* mutable_pull_config() { return &pull_config_; } + int pull_config_size() const; + void clear_pull_config(); + StatsdPullAtomConfig* add_pull_config(); + + private: + std::vector push_atom_id_; + std::vector raw_push_atom_id_; + std::vector pull_config_; + + // Allows to preserve unknown protobuf fields for compatibility + // with future versions of .proto files. + std::string unknown_fields_; + + std::bitset<4> _has_field_{}; +}; + +} // namespace perfetto +} // namespace protos +} // namespace gen + +#endif // PERFETTO_PROTOS_PROTOS_PERFETTO_CONFIG_STATSD_STATSD_TRACING_CONFIG_PROTO_CPP_H_ +// gen_amalgamated expanded: #include "perfetto/protozero/gen_field_helpers.h" +// gen_amalgamated expanded: #include "perfetto/protozero/message.h" +// gen_amalgamated expanded: #include "perfetto/protozero/packed_repeated_fields.h" +// gen_amalgamated expanded: #include "perfetto/protozero/proto_decoder.h" +// gen_amalgamated expanded: #include "perfetto/protozero/scattered_heap_buffer.h" +// DO NOT EDIT. Autogenerated by Perfetto cppgen_plugin +#if defined(__GNUC__) || defined(__clang__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wfloat-equal" +#endif +// gen_amalgamated expanded: #include "protos/perfetto/config/statsd/statsd_tracing_config.gen.h" +// gen_amalgamated expanded: #include "protos/perfetto/config/statsd/atom_ids.gen.h" + +namespace perfetto { +namespace protos { +namespace gen { + +StatsdPullAtomConfig::StatsdPullAtomConfig() = default; +StatsdPullAtomConfig::~StatsdPullAtomConfig() = default; +StatsdPullAtomConfig::StatsdPullAtomConfig(const StatsdPullAtomConfig&) = default; +StatsdPullAtomConfig& StatsdPullAtomConfig::operator=(const StatsdPullAtomConfig&) = default; +StatsdPullAtomConfig::StatsdPullAtomConfig(StatsdPullAtomConfig&&) noexcept = default; +StatsdPullAtomConfig& StatsdPullAtomConfig::operator=(StatsdPullAtomConfig&&) = default; + +bool StatsdPullAtomConfig::operator==(const StatsdPullAtomConfig& other) const { + return unknown_fields_ == other.unknown_fields_ + && pull_atom_id_ == other.pull_atom_id_ + && raw_pull_atom_id_ == other.raw_pull_atom_id_ + && pull_frequency_ms_ == other.pull_frequency_ms_ + && packages_ == other.packages_; +} + +bool StatsdPullAtomConfig::ParseFromArray(const void* raw, size_t size) { + pull_atom_id_.clear(); + raw_pull_atom_id_.clear(); + packages_.clear(); + unknown_fields_.clear(); + bool packed_error = false; + + ::protozero::ProtoDecoder dec(raw, size); + for (auto field = dec.ReadField(); field.valid(); field = dec.ReadField()) { + if (field.id() < _has_field_.size()) { + _has_field_.set(field.id()); + } + switch (field.id()) { + case 1 /* pull_atom_id */: + pull_atom_id_.emplace_back(); + field.get(&pull_atom_id_.back()); + break; + case 2 /* raw_pull_atom_id */: + raw_pull_atom_id_.emplace_back(); + field.get(&raw_pull_atom_id_.back()); + break; + case 3 /* pull_frequency_ms */: + field.get(&pull_frequency_ms_); + break; + case 4 /* packages */: + packages_.emplace_back(); + ::protozero::internal::gen_helpers::DeserializeString(field, &packages_.back()); + break; + default: + field.SerializeAndAppendTo(&unknown_fields_); + break; + } + } + return !packed_error && !dec.bytes_left(); +} + +std::string StatsdPullAtomConfig::SerializeAsString() const { + ::protozero::internal::gen_helpers::MessageSerializer msg; + Serialize(msg.get()); + return msg.SerializeAsString(); +} + +std::vector StatsdPullAtomConfig::SerializeAsArray() const { + ::protozero::internal::gen_helpers::MessageSerializer msg; + Serialize(msg.get()); + return msg.SerializeAsArray(); +} + +void StatsdPullAtomConfig::Serialize(::protozero::Message* msg) const { + // Field 1: pull_atom_id + for (auto& it : pull_atom_id_) { + ::protozero::internal::gen_helpers::SerializeVarInt(1, it, msg); + } + + // Field 2: raw_pull_atom_id + for (auto& it : raw_pull_atom_id_) { + ::protozero::internal::gen_helpers::SerializeVarInt(2, it, msg); + } + + // Field 3: pull_frequency_ms + if (_has_field_[3]) { + ::protozero::internal::gen_helpers::SerializeVarInt(3, pull_frequency_ms_, msg); + } + + // Field 4: packages + for (auto& it : packages_) { + ::protozero::internal::gen_helpers::SerializeString(4, it, msg); + } + + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); +} + + +StatsdTracingConfig::StatsdTracingConfig() = default; +StatsdTracingConfig::~StatsdTracingConfig() = default; +StatsdTracingConfig::StatsdTracingConfig(const StatsdTracingConfig&) = default; +StatsdTracingConfig& StatsdTracingConfig::operator=(const StatsdTracingConfig&) = default; +StatsdTracingConfig::StatsdTracingConfig(StatsdTracingConfig&&) noexcept = default; +StatsdTracingConfig& StatsdTracingConfig::operator=(StatsdTracingConfig&&) = default; + +bool StatsdTracingConfig::operator==(const StatsdTracingConfig& other) const { + return unknown_fields_ == other.unknown_fields_ + && push_atom_id_ == other.push_atom_id_ + && raw_push_atom_id_ == other.raw_push_atom_id_ + && pull_config_ == other.pull_config_; +} + +int StatsdTracingConfig::pull_config_size() const { return static_cast(pull_config_.size()); } +void StatsdTracingConfig::clear_pull_config() { pull_config_.clear(); } +StatsdPullAtomConfig* StatsdTracingConfig::add_pull_config() { pull_config_.emplace_back(); return &pull_config_.back(); } +bool StatsdTracingConfig::ParseFromArray(const void* raw, size_t size) { + push_atom_id_.clear(); + raw_push_atom_id_.clear(); + pull_config_.clear(); + unknown_fields_.clear(); + bool packed_error = false; + + ::protozero::ProtoDecoder dec(raw, size); + for (auto field = dec.ReadField(); field.valid(); field = dec.ReadField()) { + if (field.id() < _has_field_.size()) { + _has_field_.set(field.id()); + } + switch (field.id()) { + case 1 /* push_atom_id */: + push_atom_id_.emplace_back(); + field.get(&push_atom_id_.back()); + break; + case 2 /* raw_push_atom_id */: + raw_push_atom_id_.emplace_back(); + field.get(&raw_push_atom_id_.back()); + break; + case 3 /* pull_config */: + pull_config_.emplace_back(); + pull_config_.back().ParseFromArray(field.data(), field.size()); + break; + default: + field.SerializeAndAppendTo(&unknown_fields_); + break; + } + } + return !packed_error && !dec.bytes_left(); +} + +std::string StatsdTracingConfig::SerializeAsString() const { + ::protozero::internal::gen_helpers::MessageSerializer msg; + Serialize(msg.get()); + return msg.SerializeAsString(); +} + +std::vector StatsdTracingConfig::SerializeAsArray() const { + ::protozero::internal::gen_helpers::MessageSerializer msg; + Serialize(msg.get()); + return msg.SerializeAsArray(); +} + +void StatsdTracingConfig::Serialize(::protozero::Message* msg) const { + // Field 1: push_atom_id + for (auto& it : push_atom_id_) { + ::protozero::internal::gen_helpers::SerializeVarInt(1, it, msg); + } + + // Field 2: raw_push_atom_id + for (auto& it : raw_push_atom_id_) { + ::protozero::internal::gen_helpers::SerializeVarInt(2, it, msg); + } + + // Field 3: pull_config + for (auto& it : pull_config_) { + it.Serialize(msg->BeginNestedMessage<::protozero::Message>(3)); + } + + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); } } // namespace perfetto @@ -21716,6 +23572,8 @@ class PERFETTO_EXPORT_COMPONENT SysStatsConfig : public ::protozero::CppMessageO kStatCountersFieldNumber = 6, kDevfreqPeriodMsFieldNumber = 7, kCpufreqPeriodMsFieldNumber = 8, + kBuddyinfoPeriodMsFieldNumber = 9, + kDiskstatPeriodMsFieldNumber = 10, }; SysStatsConfig(); @@ -21773,6 +23631,14 @@ class PERFETTO_EXPORT_COMPONENT SysStatsConfig : public ::protozero::CppMessageO uint32_t cpufreq_period_ms() const { return cpufreq_period_ms_; } void set_cpufreq_period_ms(uint32_t value) { cpufreq_period_ms_ = value; _has_field_.set(8); } + bool has_buddyinfo_period_ms() const { return _has_field_[9]; } + uint32_t buddyinfo_period_ms() const { return buddyinfo_period_ms_; } + void set_buddyinfo_period_ms(uint32_t value) { buddyinfo_period_ms_ = value; _has_field_.set(9); } + + bool has_diskstat_period_ms() const { return _has_field_[10]; } + uint32_t diskstat_period_ms() const { return diskstat_period_ms_; } + void set_diskstat_period_ms(uint32_t value) { diskstat_period_ms_ = value; _has_field_.set(10); } + private: uint32_t meminfo_period_ms_{}; std::vector meminfo_counters_; @@ -21782,12 +23648,14 @@ class PERFETTO_EXPORT_COMPONENT SysStatsConfig : public ::protozero::CppMessageO std::vector stat_counters_; uint32_t devfreq_period_ms_{}; uint32_t cpufreq_period_ms_{}; + uint32_t buddyinfo_period_ms_{}; + uint32_t diskstat_period_ms_{}; // Allows to preserve unknown protobuf fields for compatibility // with future versions of .proto files. std::string unknown_fields_; - std::bitset<9> _has_field_{}; + std::bitset<11> _has_field_{}; }; } // namespace perfetto @@ -21795,6 +23663,7 @@ class PERFETTO_EXPORT_COMPONENT SysStatsConfig : public ::protozero::CppMessageO } // namespace gen #endif // PERFETTO_PROTOS_PROTOS_PERFETTO_CONFIG_SYS_STATS_SYS_STATS_CONFIG_PROTO_CPP_H_ +// gen_amalgamated expanded: #include "perfetto/protozero/gen_field_helpers.h" // gen_amalgamated expanded: #include "perfetto/protozero/message.h" // gen_amalgamated expanded: #include "perfetto/protozero/packed_repeated_fields.h" // gen_amalgamated expanded: #include "perfetto/protozero/proto_decoder.h" @@ -21827,7 +23696,9 @@ bool SysStatsConfig::operator==(const SysStatsConfig& other) const { && stat_period_ms_ == other.stat_period_ms_ && stat_counters_ == other.stat_counters_ && devfreq_period_ms_ == other.devfreq_period_ms_ - && cpufreq_period_ms_ == other.cpufreq_period_ms_; + && cpufreq_period_ms_ == other.cpufreq_period_ms_ + && buddyinfo_period_ms_ == other.buddyinfo_period_ms_ + && diskstat_period_ms_ == other.diskstat_period_ms_; } bool SysStatsConfig::ParseFromArray(const void* raw, size_t size) { @@ -21870,6 +23741,12 @@ bool SysStatsConfig::ParseFromArray(const void* raw, size_t size) { case 8 /* cpufreq_period_ms */: field.get(&cpufreq_period_ms_); break; + case 9 /* buddyinfo_period_ms */: + field.get(&buddyinfo_period_ms_); + break; + case 10 /* diskstat_period_ms */: + field.get(&diskstat_period_ms_); + break; default: field.SerializeAndAppendTo(&unknown_fields_); break; @@ -21879,13 +23756,13 @@ bool SysStatsConfig::ParseFromArray(const void* raw, size_t size) { } std::string SysStatsConfig::SerializeAsString() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsString(); } std::vector SysStatsConfig::SerializeAsArray() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsArray(); } @@ -21893,45 +23770,187 @@ std::vector SysStatsConfig::SerializeAsArray() const { void SysStatsConfig::Serialize(::protozero::Message* msg) const { // Field 1: meminfo_period_ms if (_has_field_[1]) { - msg->AppendVarInt(1, meminfo_period_ms_); + ::protozero::internal::gen_helpers::SerializeVarInt(1, meminfo_period_ms_, msg); } // Field 2: meminfo_counters for (auto& it : meminfo_counters_) { - msg->AppendVarInt(2, it); + ::protozero::internal::gen_helpers::SerializeVarInt(2, it, msg); } // Field 3: vmstat_period_ms if (_has_field_[3]) { - msg->AppendVarInt(3, vmstat_period_ms_); + ::protozero::internal::gen_helpers::SerializeVarInt(3, vmstat_period_ms_, msg); } // Field 4: vmstat_counters for (auto& it : vmstat_counters_) { - msg->AppendVarInt(4, it); + ::protozero::internal::gen_helpers::SerializeVarInt(4, it, msg); } // Field 5: stat_period_ms if (_has_field_[5]) { - msg->AppendVarInt(5, stat_period_ms_); + ::protozero::internal::gen_helpers::SerializeVarInt(5, stat_period_ms_, msg); } // Field 6: stat_counters for (auto& it : stat_counters_) { - msg->AppendVarInt(6, it); + ::protozero::internal::gen_helpers::SerializeVarInt(6, it, msg); } // Field 7: devfreq_period_ms if (_has_field_[7]) { - msg->AppendVarInt(7, devfreq_period_ms_); + ::protozero::internal::gen_helpers::SerializeVarInt(7, devfreq_period_ms_, msg); } // Field 8: cpufreq_period_ms if (_has_field_[8]) { - msg->AppendVarInt(8, cpufreq_period_ms_); + ::protozero::internal::gen_helpers::SerializeVarInt(8, cpufreq_period_ms_, msg); } - msg->AppendRawProtoBytes(unknown_fields_.data(), unknown_fields_.size()); + // Field 9: buddyinfo_period_ms + if (_has_field_[9]) { + ::protozero::internal::gen_helpers::SerializeVarInt(9, buddyinfo_period_ms_, msg); + } + + // Field 10: diskstat_period_ms + if (_has_field_[10]) { + ::protozero::internal::gen_helpers::SerializeVarInt(10, diskstat_period_ms_, msg); + } + + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); +} + +} // namespace perfetto +} // namespace protos +} // namespace gen +#if defined(__GNUC__) || defined(__clang__) +#pragma GCC diagnostic pop +#endif +// gen_amalgamated begin source: gen/protos/perfetto/config/system_info/system_info.gen.cc +// gen_amalgamated begin header: gen/protos/perfetto/config/system_info/system_info.gen.h +// DO NOT EDIT. Autogenerated by Perfetto cppgen_plugin +#ifndef PERFETTO_PROTOS_PROTOS_PERFETTO_CONFIG_SYSTEM_INFO_SYSTEM_INFO_PROTO_CPP_H_ +#define PERFETTO_PROTOS_PROTOS_PERFETTO_CONFIG_SYSTEM_INFO_SYSTEM_INFO_PROTO_CPP_H_ + +#include +#include +#include +#include +#include + +// gen_amalgamated expanded: #include "perfetto/protozero/cpp_message_obj.h" +// gen_amalgamated expanded: #include "perfetto/protozero/copyable_ptr.h" +// gen_amalgamated expanded: #include "perfetto/base/export.h" + +namespace perfetto { +namespace protos { +namespace gen { +class SystemInfoConfig; +} // namespace perfetto +} // namespace protos +} // namespace gen + +namespace protozero { +class Message; +} // namespace protozero + +namespace perfetto { +namespace protos { +namespace gen { + +class PERFETTO_EXPORT_COMPONENT SystemInfoConfig : public ::protozero::CppMessageObj { + public: + enum FieldNumbers { + }; + + SystemInfoConfig(); + ~SystemInfoConfig() override; + SystemInfoConfig(SystemInfoConfig&&) noexcept; + SystemInfoConfig& operator=(SystemInfoConfig&&); + SystemInfoConfig(const SystemInfoConfig&); + SystemInfoConfig& operator=(const SystemInfoConfig&); + bool operator==(const SystemInfoConfig&) const; + bool operator!=(const SystemInfoConfig& other) const { return !(*this == other); } + + bool ParseFromArray(const void*, size_t) override; + std::string SerializeAsString() const override; + std::vector SerializeAsArray() const override; + void Serialize(::protozero::Message*) const; + + private: + + // Allows to preserve unknown protobuf fields for compatibility + // with future versions of .proto files. + std::string unknown_fields_; + + std::bitset<2> _has_field_{}; +}; + +} // namespace perfetto +} // namespace protos +} // namespace gen + +#endif // PERFETTO_PROTOS_PROTOS_PERFETTO_CONFIG_SYSTEM_INFO_SYSTEM_INFO_PROTO_CPP_H_ +// gen_amalgamated expanded: #include "perfetto/protozero/gen_field_helpers.h" +// gen_amalgamated expanded: #include "perfetto/protozero/message.h" +// gen_amalgamated expanded: #include "perfetto/protozero/packed_repeated_fields.h" +// gen_amalgamated expanded: #include "perfetto/protozero/proto_decoder.h" +// gen_amalgamated expanded: #include "perfetto/protozero/scattered_heap_buffer.h" +// DO NOT EDIT. Autogenerated by Perfetto cppgen_plugin +#if defined(__GNUC__) || defined(__clang__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wfloat-equal" +#endif +// gen_amalgamated expanded: #include "protos/perfetto/config/system_info/system_info.gen.h" + +namespace perfetto { +namespace protos { +namespace gen { + +SystemInfoConfig::SystemInfoConfig() = default; +SystemInfoConfig::~SystemInfoConfig() = default; +SystemInfoConfig::SystemInfoConfig(const SystemInfoConfig&) = default; +SystemInfoConfig& SystemInfoConfig::operator=(const SystemInfoConfig&) = default; +SystemInfoConfig::SystemInfoConfig(SystemInfoConfig&&) noexcept = default; +SystemInfoConfig& SystemInfoConfig::operator=(SystemInfoConfig&&) = default; + +bool SystemInfoConfig::operator==(const SystemInfoConfig& other) const { + return unknown_fields_ == other.unknown_fields_; +} + +bool SystemInfoConfig::ParseFromArray(const void* raw, size_t size) { + unknown_fields_.clear(); + bool packed_error = false; + + ::protozero::ProtoDecoder dec(raw, size); + for (auto field = dec.ReadField(); field.valid(); field = dec.ReadField()) { + if (field.id() < _has_field_.size()) { + _has_field_.set(field.id()); + } + switch (field.id()) { + default: + field.SerializeAndAppendTo(&unknown_fields_); + break; + } + } + return !packed_error && !dec.bytes_left(); +} + +std::string SystemInfoConfig::SerializeAsString() const { + ::protozero::internal::gen_helpers::MessageSerializer msg; + Serialize(msg.get()); + return msg.SerializeAsString(); +} + +std::vector SystemInfoConfig::SerializeAsArray() const { + ::protozero::internal::gen_helpers::MessageSerializer msg; + Serialize(msg.get()); + return msg.SerializeAsArray(); +} + +void SystemInfoConfig::Serialize(::protozero::Message* msg) const { + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); } } // namespace perfetto @@ -21941,6 +23960,7 @@ void SysStatsConfig::Serialize(::protozero::Message* msg) const { #pragma GCC diagnostic pop #endif // gen_amalgamated begin source: gen/protos/perfetto/config/track_event/track_event_config.gen.cc +// gen_amalgamated expanded: #include "perfetto/protozero/gen_field_helpers.h" // gen_amalgamated expanded: #include "perfetto/protozero/message.h" // gen_amalgamated expanded: #include "perfetto/protozero/packed_repeated_fields.h" // gen_amalgamated expanded: #include "perfetto/protozero/proto_decoder.h" @@ -21992,19 +24012,19 @@ bool TrackEventConfig::ParseFromArray(const void* raw, size_t size) { switch (field.id()) { case 1 /* disabled_categories */: disabled_categories_.emplace_back(); - field.get(&disabled_categories_.back()); + ::protozero::internal::gen_helpers::DeserializeString(field, &disabled_categories_.back()); break; case 2 /* enabled_categories */: enabled_categories_.emplace_back(); - field.get(&enabled_categories_.back()); + ::protozero::internal::gen_helpers::DeserializeString(field, &enabled_categories_.back()); break; case 3 /* disabled_tags */: disabled_tags_.emplace_back(); - field.get(&disabled_tags_.back()); + ::protozero::internal::gen_helpers::DeserializeString(field, &disabled_tags_.back()); break; case 4 /* enabled_tags */: enabled_tags_.emplace_back(); - field.get(&enabled_tags_.back()); + ::protozero::internal::gen_helpers::DeserializeString(field, &enabled_tags_.back()); break; case 5 /* disable_incremental_timestamps */: field.get(&disable_incremental_timestamps_); @@ -22030,13 +24050,13 @@ bool TrackEventConfig::ParseFromArray(const void* raw, size_t size) { } std::string TrackEventConfig::SerializeAsString() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsString(); } std::vector TrackEventConfig::SerializeAsArray() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsArray(); } @@ -22044,50 +24064,50 @@ std::vector TrackEventConfig::SerializeAsArray() const { void TrackEventConfig::Serialize(::protozero::Message* msg) const { // Field 1: disabled_categories for (auto& it : disabled_categories_) { - msg->AppendString(1, it); + ::protozero::internal::gen_helpers::SerializeString(1, it, msg); } // Field 2: enabled_categories for (auto& it : enabled_categories_) { - msg->AppendString(2, it); + ::protozero::internal::gen_helpers::SerializeString(2, it, msg); } // Field 3: disabled_tags for (auto& it : disabled_tags_) { - msg->AppendString(3, it); + ::protozero::internal::gen_helpers::SerializeString(3, it, msg); } // Field 4: enabled_tags for (auto& it : enabled_tags_) { - msg->AppendString(4, it); + ::protozero::internal::gen_helpers::SerializeString(4, it, msg); } // Field 5: disable_incremental_timestamps if (_has_field_[5]) { - msg->AppendTinyVarInt(5, disable_incremental_timestamps_); + ::protozero::internal::gen_helpers::SerializeTinyVarInt(5, disable_incremental_timestamps_, msg); } // Field 6: timestamp_unit_multiplier if (_has_field_[6]) { - msg->AppendVarInt(6, timestamp_unit_multiplier_); + ::protozero::internal::gen_helpers::SerializeVarInt(6, timestamp_unit_multiplier_, msg); } // Field 7: filter_debug_annotations if (_has_field_[7]) { - msg->AppendTinyVarInt(7, filter_debug_annotations_); + ::protozero::internal::gen_helpers::SerializeTinyVarInt(7, filter_debug_annotations_, msg); } // Field 8: enable_thread_time_sampling if (_has_field_[8]) { - msg->AppendTinyVarInt(8, enable_thread_time_sampling_); + ::protozero::internal::gen_helpers::SerializeTinyVarInt(8, enable_thread_time_sampling_, msg); } // Field 9: filter_dynamic_event_names if (_has_field_[9]) { - msg->AppendTinyVarInt(9, filter_dynamic_event_names_); + ::protozero::internal::gen_helpers::SerializeTinyVarInt(9, filter_dynamic_event_names_, msg); } - msg->AppendRawProtoBytes(unknown_fields_.data(), unknown_fields_.size()); + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); } } // namespace perfetto @@ -22203,6 +24223,7 @@ class PERFETTO_EXPORT_COMPONENT ChromeConfig : public ::protozero::CppMessageObj } // namespace gen #endif // PERFETTO_PROTOS_PROTOS_PERFETTO_CONFIG_CHROME_CHROME_CONFIG_PROTO_CPP_H_ +// gen_amalgamated expanded: #include "perfetto/protozero/gen_field_helpers.h" // gen_amalgamated expanded: #include "perfetto/protozero/message.h" // gen_amalgamated expanded: #include "perfetto/protozero/packed_repeated_fields.h" // gen_amalgamated expanded: #include "perfetto/protozero/proto_decoder.h" @@ -22245,7 +24266,7 @@ bool ChromeConfig::ParseFromArray(const void* raw, size_t size) { } switch (field.id()) { case 1 /* trace_config */: - field.get(&trace_config_); + ::protozero::internal::gen_helpers::DeserializeString(field, &trace_config_); break; case 2 /* privacy_filtering_enabled */: field.get(&privacy_filtering_enabled_); @@ -22257,7 +24278,7 @@ bool ChromeConfig::ParseFromArray(const void* raw, size_t size) { field.get(&client_priority_); break; case 5 /* json_agent_label_filter */: - field.get(&json_agent_label_filter_); + ::protozero::internal::gen_helpers::DeserializeString(field, &json_agent_label_filter_); break; default: field.SerializeAndAppendTo(&unknown_fields_); @@ -22268,13 +24289,13 @@ bool ChromeConfig::ParseFromArray(const void* raw, size_t size) { } std::string ChromeConfig::SerializeAsString() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsString(); } std::vector ChromeConfig::SerializeAsArray() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsArray(); } @@ -22282,30 +24303,30 @@ std::vector ChromeConfig::SerializeAsArray() const { void ChromeConfig::Serialize(::protozero::Message* msg) const { // Field 1: trace_config if (_has_field_[1]) { - msg->AppendString(1, trace_config_); + ::protozero::internal::gen_helpers::SerializeString(1, trace_config_, msg); } // Field 2: privacy_filtering_enabled if (_has_field_[2]) { - msg->AppendTinyVarInt(2, privacy_filtering_enabled_); + ::protozero::internal::gen_helpers::SerializeTinyVarInt(2, privacy_filtering_enabled_, msg); } // Field 3: convert_to_legacy_json if (_has_field_[3]) { - msg->AppendTinyVarInt(3, convert_to_legacy_json_); + ::protozero::internal::gen_helpers::SerializeTinyVarInt(3, convert_to_legacy_json_, msg); } // Field 4: client_priority if (_has_field_[4]) { - msg->AppendVarInt(4, client_priority_); + ::protozero::internal::gen_helpers::SerializeVarInt(4, client_priority_, msg); } // Field 5: json_agent_label_filter if (_has_field_[5]) { - msg->AppendString(5, json_agent_label_filter_); + ::protozero::internal::gen_helpers::SerializeString(5, json_agent_label_filter_, msg); } - msg->AppendRawProtoBytes(unknown_fields_.data(), unknown_fields_.size()); + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); } } // namespace perfetto @@ -22314,7 +24335,407 @@ void ChromeConfig::Serialize(::protozero::Message* msg) const { #if defined(__GNUC__) || defined(__clang__) #pragma GCC diagnostic pop #endif -// gen_amalgamated begin source: gen/protos/perfetto/config/data_source_config.gen.cc +// gen_amalgamated begin source: gen/protos/perfetto/config/chrome/scenario_config.gen.cc +// gen_amalgamated begin header: gen/protos/perfetto/config/chrome/scenario_config.gen.h +// DO NOT EDIT. Autogenerated by Perfetto cppgen_plugin +#ifndef PERFETTO_PROTOS_PROTOS_PERFETTO_CONFIG_CHROME_SCENARIO_CONFIG_PROTO_CPP_H_ +#define PERFETTO_PROTOS_PROTOS_PERFETTO_CONFIG_CHROME_SCENARIO_CONFIG_PROTO_CPP_H_ + +#include +#include +#include +#include +#include + +// gen_amalgamated expanded: #include "perfetto/protozero/cpp_message_obj.h" +// gen_amalgamated expanded: #include "perfetto/protozero/copyable_ptr.h" +// gen_amalgamated expanded: #include "perfetto/base/export.h" + +namespace perfetto { +namespace protos { +namespace gen { +class ChromeFieldTracingConfig; +class ScenarioConfig; +class NestedScenarioConfig; +class TriggerRule; +class TriggerRule_RepeatingInterval; +class TriggerRule_HistogramTrigger; +class TraceConfig; +class TraceConfig_CmdTraceStartDelay; +class TraceConfig_AndroidReportConfig; +class TraceConfig_TraceFilter; +class TraceConfig_IncidentReportConfig; +class TraceConfig_IncrementalStateConfig; +class TraceConfig_TriggerConfig; +class TraceConfig_TriggerConfig_Trigger; +class TraceConfig_GuardrailOverrides; +class TraceConfig_StatsdMetadata; +class TraceConfig_ProducerConfig; +class TraceConfig_BuiltinDataSource; +class TraceConfig_DataSource; +class DataSourceConfig; +class TestConfig; +class TestConfig_DummyFields; +class InterceptorConfig; +class ChromeConfig; +class SystemInfoConfig; +class TraceConfig_BufferConfig; +enum TraceConfig_LockdownModeOperation : int; +enum TraceConfig_CompressionType : int; +enum TraceConfig_StatsdLogging : int; +enum TraceConfig_TriggerConfig_TriggerMode : int; +enum BuiltinClock : int; +enum DataSourceConfig_SessionInitiator : int; +enum ChromeConfig_ClientPriority : int; +enum TraceConfig_BufferConfig_FillPolicy : int; +} // namespace perfetto +} // namespace protos +} // namespace gen + +namespace protozero { +class Message; +} // namespace protozero + +namespace perfetto { +namespace protos { +namespace gen { + +class PERFETTO_EXPORT_COMPONENT ChromeFieldTracingConfig : public ::protozero::CppMessageObj { + public: + enum FieldNumbers { + kScenariosFieldNumber = 1, + }; + + ChromeFieldTracingConfig(); + ~ChromeFieldTracingConfig() override; + ChromeFieldTracingConfig(ChromeFieldTracingConfig&&) noexcept; + ChromeFieldTracingConfig& operator=(ChromeFieldTracingConfig&&); + ChromeFieldTracingConfig(const ChromeFieldTracingConfig&); + ChromeFieldTracingConfig& operator=(const ChromeFieldTracingConfig&); + bool operator==(const ChromeFieldTracingConfig&) const; + bool operator!=(const ChromeFieldTracingConfig& other) const { return !(*this == other); } + + bool ParseFromArray(const void*, size_t) override; + std::string SerializeAsString() const override; + std::vector SerializeAsArray() const override; + void Serialize(::protozero::Message*) const; + + const std::vector& scenarios() const { return scenarios_; } + std::vector* mutable_scenarios() { return &scenarios_; } + int scenarios_size() const; + void clear_scenarios(); + ScenarioConfig* add_scenarios(); + + private: + std::vector scenarios_; + + // Allows to preserve unknown protobuf fields for compatibility + // with future versions of .proto files. + std::string unknown_fields_; + + std::bitset<2> _has_field_{}; +}; + + +class PERFETTO_EXPORT_COMPONENT ScenarioConfig : public ::protozero::CppMessageObj { + public: + enum FieldNumbers { + kScenarioNameFieldNumber = 1, + kStartRulesFieldNumber = 2, + kStopRulesFieldNumber = 3, + kUploadRulesFieldNumber = 4, + kSetupRulesFieldNumber = 5, + kTraceConfigFieldNumber = 6, + kNestedScenariosFieldNumber = 7, + }; + + ScenarioConfig(); + ~ScenarioConfig() override; + ScenarioConfig(ScenarioConfig&&) noexcept; + ScenarioConfig& operator=(ScenarioConfig&&); + ScenarioConfig(const ScenarioConfig&); + ScenarioConfig& operator=(const ScenarioConfig&); + bool operator==(const ScenarioConfig&) const; + bool operator!=(const ScenarioConfig& other) const { return !(*this == other); } + + bool ParseFromArray(const void*, size_t) override; + std::string SerializeAsString() const override; + std::vector SerializeAsArray() const override; + void Serialize(::protozero::Message*) const; + + bool has_scenario_name() const { return _has_field_[1]; } + const std::string& scenario_name() const { return scenario_name_; } + void set_scenario_name(const std::string& value) { scenario_name_ = value; _has_field_.set(1); } + + const std::vector& start_rules() const { return start_rules_; } + std::vector* mutable_start_rules() { return &start_rules_; } + int start_rules_size() const; + void clear_start_rules(); + TriggerRule* add_start_rules(); + + const std::vector& stop_rules() const { return stop_rules_; } + std::vector* mutable_stop_rules() { return &stop_rules_; } + int stop_rules_size() const; + void clear_stop_rules(); + TriggerRule* add_stop_rules(); + + const std::vector& upload_rules() const { return upload_rules_; } + std::vector* mutable_upload_rules() { return &upload_rules_; } + int upload_rules_size() const; + void clear_upload_rules(); + TriggerRule* add_upload_rules(); + + const std::vector& setup_rules() const { return setup_rules_; } + std::vector* mutable_setup_rules() { return &setup_rules_; } + int setup_rules_size() const; + void clear_setup_rules(); + TriggerRule* add_setup_rules(); + + bool has_trace_config() const { return _has_field_[6]; } + const TraceConfig& trace_config() const { return *trace_config_; } + TraceConfig* mutable_trace_config() { _has_field_.set(6); return trace_config_.get(); } + + const std::vector& nested_scenarios() const { return nested_scenarios_; } + std::vector* mutable_nested_scenarios() { return &nested_scenarios_; } + int nested_scenarios_size() const; + void clear_nested_scenarios(); + NestedScenarioConfig* add_nested_scenarios(); + + private: + std::string scenario_name_{}; + std::vector start_rules_; + std::vector stop_rules_; + std::vector upload_rules_; + std::vector setup_rules_; + ::protozero::CopyablePtr trace_config_; + std::vector nested_scenarios_; + + // Allows to preserve unknown protobuf fields for compatibility + // with future versions of .proto files. + std::string unknown_fields_; + + std::bitset<8> _has_field_{}; +}; + + +class PERFETTO_EXPORT_COMPONENT NestedScenarioConfig : public ::protozero::CppMessageObj { + public: + enum FieldNumbers { + kScenarioNameFieldNumber = 1, + kStartRulesFieldNumber = 2, + kStopRulesFieldNumber = 3, + kUploadRulesFieldNumber = 4, + }; + + NestedScenarioConfig(); + ~NestedScenarioConfig() override; + NestedScenarioConfig(NestedScenarioConfig&&) noexcept; + NestedScenarioConfig& operator=(NestedScenarioConfig&&); + NestedScenarioConfig(const NestedScenarioConfig&); + NestedScenarioConfig& operator=(const NestedScenarioConfig&); + bool operator==(const NestedScenarioConfig&) const; + bool operator!=(const NestedScenarioConfig& other) const { return !(*this == other); } + + bool ParseFromArray(const void*, size_t) override; + std::string SerializeAsString() const override; + std::vector SerializeAsArray() const override; + void Serialize(::protozero::Message*) const; + + bool has_scenario_name() const { return _has_field_[1]; } + const std::string& scenario_name() const { return scenario_name_; } + void set_scenario_name(const std::string& value) { scenario_name_ = value; _has_field_.set(1); } + + const std::vector& start_rules() const { return start_rules_; } + std::vector* mutable_start_rules() { return &start_rules_; } + int start_rules_size() const; + void clear_start_rules(); + TriggerRule* add_start_rules(); + + const std::vector& stop_rules() const { return stop_rules_; } + std::vector* mutable_stop_rules() { return &stop_rules_; } + int stop_rules_size() const; + void clear_stop_rules(); + TriggerRule* add_stop_rules(); + + const std::vector& upload_rules() const { return upload_rules_; } + std::vector* mutable_upload_rules() { return &upload_rules_; } + int upload_rules_size() const; + void clear_upload_rules(); + TriggerRule* add_upload_rules(); + + private: + std::string scenario_name_{}; + std::vector start_rules_; + std::vector stop_rules_; + std::vector upload_rules_; + + // Allows to preserve unknown protobuf fields for compatibility + // with future versions of .proto files. + std::string unknown_fields_; + + std::bitset<5> _has_field_{}; +}; + + +class PERFETTO_EXPORT_COMPONENT TriggerRule : public ::protozero::CppMessageObj { + public: + using HistogramTrigger = TriggerRule_HistogramTrigger; + using RepeatingInterval = TriggerRule_RepeatingInterval; + enum FieldNumbers { + kNameFieldNumber = 1, + kTriggerChanceFieldNumber = 2, + kDelayMsFieldNumber = 3, + kManualTriggerNameFieldNumber = 4, + kHistogramFieldNumber = 5, + kRepeatingIntervalFieldNumber = 6, + }; + + TriggerRule(); + ~TriggerRule() override; + TriggerRule(TriggerRule&&) noexcept; + TriggerRule& operator=(TriggerRule&&); + TriggerRule(const TriggerRule&); + TriggerRule& operator=(const TriggerRule&); + bool operator==(const TriggerRule&) const; + bool operator!=(const TriggerRule& other) const { return !(*this == other); } + + bool ParseFromArray(const void*, size_t) override; + std::string SerializeAsString() const override; + std::vector SerializeAsArray() const override; + void Serialize(::protozero::Message*) const; + + bool has_name() const { return _has_field_[1]; } + const std::string& name() const { return name_; } + void set_name(const std::string& value) { name_ = value; _has_field_.set(1); } + + bool has_trigger_chance() const { return _has_field_[2]; } + float trigger_chance() const { return trigger_chance_; } + void set_trigger_chance(float value) { trigger_chance_ = value; _has_field_.set(2); } + + bool has_delay_ms() const { return _has_field_[3]; } + uint64_t delay_ms() const { return delay_ms_; } + void set_delay_ms(uint64_t value) { delay_ms_ = value; _has_field_.set(3); } + + bool has_manual_trigger_name() const { return _has_field_[4]; } + const std::string& manual_trigger_name() const { return manual_trigger_name_; } + void set_manual_trigger_name(const std::string& value) { manual_trigger_name_ = value; _has_field_.set(4); } + + bool has_histogram() const { return _has_field_[5]; } + const TriggerRule_HistogramTrigger& histogram() const { return *histogram_; } + TriggerRule_HistogramTrigger* mutable_histogram() { _has_field_.set(5); return histogram_.get(); } + + bool has_repeating_interval() const { return _has_field_[6]; } + const TriggerRule_RepeatingInterval& repeating_interval() const { return *repeating_interval_; } + TriggerRule_RepeatingInterval* mutable_repeating_interval() { _has_field_.set(6); return repeating_interval_.get(); } + + private: + std::string name_{}; + float trigger_chance_{}; + uint64_t delay_ms_{}; + std::string manual_trigger_name_{}; + ::protozero::CopyablePtr histogram_; + ::protozero::CopyablePtr repeating_interval_; + + // Allows to preserve unknown protobuf fields for compatibility + // with future versions of .proto files. + std::string unknown_fields_; + + std::bitset<7> _has_field_{}; +}; + + +class PERFETTO_EXPORT_COMPONENT TriggerRule_RepeatingInterval : public ::protozero::CppMessageObj { + public: + enum FieldNumbers { + kPeriodMsFieldNumber = 1, + kRandomizedFieldNumber = 2, + }; + + TriggerRule_RepeatingInterval(); + ~TriggerRule_RepeatingInterval() override; + TriggerRule_RepeatingInterval(TriggerRule_RepeatingInterval&&) noexcept; + TriggerRule_RepeatingInterval& operator=(TriggerRule_RepeatingInterval&&); + TriggerRule_RepeatingInterval(const TriggerRule_RepeatingInterval&); + TriggerRule_RepeatingInterval& operator=(const TriggerRule_RepeatingInterval&); + bool operator==(const TriggerRule_RepeatingInterval&) const; + bool operator!=(const TriggerRule_RepeatingInterval& other) const { return !(*this == other); } + + bool ParseFromArray(const void*, size_t) override; + std::string SerializeAsString() const override; + std::vector SerializeAsArray() const override; + void Serialize(::protozero::Message*) const; + + bool has_period_ms() const { return _has_field_[1]; } + uint64_t period_ms() const { return period_ms_; } + void set_period_ms(uint64_t value) { period_ms_ = value; _has_field_.set(1); } + + bool has_randomized() const { return _has_field_[2]; } + bool randomized() const { return randomized_; } + void set_randomized(bool value) { randomized_ = value; _has_field_.set(2); } + + private: + uint64_t period_ms_{}; + bool randomized_{}; + + // Allows to preserve unknown protobuf fields for compatibility + // with future versions of .proto files. + std::string unknown_fields_; + + std::bitset<3> _has_field_{}; +}; + + +class PERFETTO_EXPORT_COMPONENT TriggerRule_HistogramTrigger : public ::protozero::CppMessageObj { + public: + enum FieldNumbers { + kHistogramNameFieldNumber = 1, + kMinValueFieldNumber = 2, + kMaxValueFieldNumber = 3, + }; + + TriggerRule_HistogramTrigger(); + ~TriggerRule_HistogramTrigger() override; + TriggerRule_HistogramTrigger(TriggerRule_HistogramTrigger&&) noexcept; + TriggerRule_HistogramTrigger& operator=(TriggerRule_HistogramTrigger&&); + TriggerRule_HistogramTrigger(const TriggerRule_HistogramTrigger&); + TriggerRule_HistogramTrigger& operator=(const TriggerRule_HistogramTrigger&); + bool operator==(const TriggerRule_HistogramTrigger&) const; + bool operator!=(const TriggerRule_HistogramTrigger& other) const { return !(*this == other); } + + bool ParseFromArray(const void*, size_t) override; + std::string SerializeAsString() const override; + std::vector SerializeAsArray() const override; + void Serialize(::protozero::Message*) const; + + bool has_histogram_name() const { return _has_field_[1]; } + const std::string& histogram_name() const { return histogram_name_; } + void set_histogram_name(const std::string& value) { histogram_name_ = value; _has_field_.set(1); } + + bool has_min_value() const { return _has_field_[2]; } + int64_t min_value() const { return min_value_; } + void set_min_value(int64_t value) { min_value_ = value; _has_field_.set(2); } + + bool has_max_value() const { return _has_field_[3]; } + int64_t max_value() const { return max_value_; } + void set_max_value(int64_t value) { max_value_ = value; _has_field_.set(3); } + + private: + std::string histogram_name_{}; + int64_t min_value_{}; + int64_t max_value_{}; + + // Allows to preserve unknown protobuf fields for compatibility + // with future versions of .proto files. + std::string unknown_fields_; + + std::bitset<4> _has_field_{}; +}; + +} // namespace perfetto +} // namespace protos +} // namespace gen + +#endif // PERFETTO_PROTOS_PROTOS_PERFETTO_CONFIG_CHROME_SCENARIO_CONFIG_PROTO_CPP_H_ // gen_amalgamated begin header: gen/protos/perfetto/config/test_config.gen.h // DO NOT EDIT. Autogenerated by Perfetto cppgen_plugin #ifndef PERFETTO_PROTOS_PROTOS_PERFETTO_CONFIG_TEST_CONFIG_PROTO_CPP_H_ @@ -22606,6 +25027,587 @@ class PERFETTO_EXPORT_COMPONENT InterceptorConfig : public ::protozero::CppMessa } // namespace gen #endif // PERFETTO_PROTOS_PROTOS_PERFETTO_CONFIG_INTERCEPTOR_CONFIG_PROTO_CPP_H_ +// gen_amalgamated expanded: #include "perfetto/protozero/gen_field_helpers.h" +// gen_amalgamated expanded: #include "perfetto/protozero/message.h" +// gen_amalgamated expanded: #include "perfetto/protozero/packed_repeated_fields.h" +// gen_amalgamated expanded: #include "perfetto/protozero/proto_decoder.h" +// gen_amalgamated expanded: #include "perfetto/protozero/scattered_heap_buffer.h" +// DO NOT EDIT. Autogenerated by Perfetto cppgen_plugin +#if defined(__GNUC__) || defined(__clang__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wfloat-equal" +#endif +// gen_amalgamated expanded: #include "protos/perfetto/config/chrome/scenario_config.gen.h" +// gen_amalgamated expanded: #include "protos/perfetto/config/trace_config.gen.h" +// gen_amalgamated expanded: #include "protos/perfetto/config/data_source_config.gen.h" +// gen_amalgamated expanded: #include "protos/perfetto/config/system_info/system_info.gen.h" +// gen_amalgamated expanded: #include "protos/perfetto/config/track_event/track_event_config.gen.h" +// gen_amalgamated expanded: #include "protos/perfetto/config/test_config.gen.h" +// gen_amalgamated expanded: #include "protos/perfetto/config/sys_stats/sys_stats_config.gen.h" +// gen_amalgamated expanded: #include "protos/perfetto/common/sys_stats_counters.gen.h" +// gen_amalgamated expanded: #include "protos/perfetto/config/profiling/perf_event_config.gen.h" +// gen_amalgamated expanded: #include "protos/perfetto/common/perf_events.gen.h" +// gen_amalgamated expanded: #include "protos/perfetto/config/profiling/java_hprof_config.gen.h" +// gen_amalgamated expanded: #include "protos/perfetto/config/profiling/heapprofd_config.gen.h" +// gen_amalgamated expanded: #include "protos/perfetto/config/process_stats/process_stats_config.gen.h" +// gen_amalgamated expanded: #include "protos/perfetto/config/statsd/statsd_tracing_config.gen.h" +// gen_amalgamated expanded: #include "protos/perfetto/config/statsd/atom_ids.gen.h" +// gen_amalgamated expanded: #include "protos/perfetto/config/power/android_power_config.gen.h" +// gen_amalgamated expanded: #include "protos/perfetto/config/interceptor_config.gen.h" +// gen_amalgamated expanded: #include "protos/perfetto/config/interceptors/console_config.gen.h" +// gen_amalgamated expanded: #include "protos/perfetto/config/inode_file/inode_file_config.gen.h" +// gen_amalgamated expanded: #include "protos/perfetto/config/gpu/vulkan_memory_config.gen.h" +// gen_amalgamated expanded: #include "protos/perfetto/config/gpu/gpu_counter_config.gen.h" +// gen_amalgamated expanded: #include "protos/perfetto/config/ftrace/ftrace_config.gen.h" +// gen_amalgamated expanded: #include "protos/perfetto/config/chrome/chrome_config.gen.h" +// gen_amalgamated expanded: #include "protos/perfetto/config/android/packages_list_config.gen.h" +// gen_amalgamated expanded: #include "protos/perfetto/config/android/network_trace_config.gen.h" +// gen_amalgamated expanded: #include "protos/perfetto/config/android/android_system_property_config.gen.h" +// gen_amalgamated expanded: #include "protos/perfetto/config/android/android_polled_state_config.gen.h" +// gen_amalgamated expanded: #include "protos/perfetto/config/android/android_log_config.gen.h" +// gen_amalgamated expanded: #include "protos/perfetto/common/android_log_constants.gen.h" +// gen_amalgamated expanded: #include "protos/perfetto/config/android/android_game_intervention_list_config.gen.h" +// gen_amalgamated expanded: #include "protos/perfetto/common/builtin_clock.gen.h" + +namespace perfetto { +namespace protos { +namespace gen { + +ChromeFieldTracingConfig::ChromeFieldTracingConfig() = default; +ChromeFieldTracingConfig::~ChromeFieldTracingConfig() = default; +ChromeFieldTracingConfig::ChromeFieldTracingConfig(const ChromeFieldTracingConfig&) = default; +ChromeFieldTracingConfig& ChromeFieldTracingConfig::operator=(const ChromeFieldTracingConfig&) = default; +ChromeFieldTracingConfig::ChromeFieldTracingConfig(ChromeFieldTracingConfig&&) noexcept = default; +ChromeFieldTracingConfig& ChromeFieldTracingConfig::operator=(ChromeFieldTracingConfig&&) = default; + +bool ChromeFieldTracingConfig::operator==(const ChromeFieldTracingConfig& other) const { + return unknown_fields_ == other.unknown_fields_ + && scenarios_ == other.scenarios_; +} + +int ChromeFieldTracingConfig::scenarios_size() const { return static_cast(scenarios_.size()); } +void ChromeFieldTracingConfig::clear_scenarios() { scenarios_.clear(); } +ScenarioConfig* ChromeFieldTracingConfig::add_scenarios() { scenarios_.emplace_back(); return &scenarios_.back(); } +bool ChromeFieldTracingConfig::ParseFromArray(const void* raw, size_t size) { + scenarios_.clear(); + unknown_fields_.clear(); + bool packed_error = false; + + ::protozero::ProtoDecoder dec(raw, size); + for (auto field = dec.ReadField(); field.valid(); field = dec.ReadField()) { + if (field.id() < _has_field_.size()) { + _has_field_.set(field.id()); + } + switch (field.id()) { + case 1 /* scenarios */: + scenarios_.emplace_back(); + scenarios_.back().ParseFromArray(field.data(), field.size()); + break; + default: + field.SerializeAndAppendTo(&unknown_fields_); + break; + } + } + return !packed_error && !dec.bytes_left(); +} + +std::string ChromeFieldTracingConfig::SerializeAsString() const { + ::protozero::internal::gen_helpers::MessageSerializer msg; + Serialize(msg.get()); + return msg.SerializeAsString(); +} + +std::vector ChromeFieldTracingConfig::SerializeAsArray() const { + ::protozero::internal::gen_helpers::MessageSerializer msg; + Serialize(msg.get()); + return msg.SerializeAsArray(); +} + +void ChromeFieldTracingConfig::Serialize(::protozero::Message* msg) const { + // Field 1: scenarios + for (auto& it : scenarios_) { + it.Serialize(msg->BeginNestedMessage<::protozero::Message>(1)); + } + + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); +} + + +ScenarioConfig::ScenarioConfig() = default; +ScenarioConfig::~ScenarioConfig() = default; +ScenarioConfig::ScenarioConfig(const ScenarioConfig&) = default; +ScenarioConfig& ScenarioConfig::operator=(const ScenarioConfig&) = default; +ScenarioConfig::ScenarioConfig(ScenarioConfig&&) noexcept = default; +ScenarioConfig& ScenarioConfig::operator=(ScenarioConfig&&) = default; + +bool ScenarioConfig::operator==(const ScenarioConfig& other) const { + return unknown_fields_ == other.unknown_fields_ + && scenario_name_ == other.scenario_name_ + && start_rules_ == other.start_rules_ + && stop_rules_ == other.stop_rules_ + && upload_rules_ == other.upload_rules_ + && setup_rules_ == other.setup_rules_ + && trace_config_ == other.trace_config_ + && nested_scenarios_ == other.nested_scenarios_; +} + +int ScenarioConfig::start_rules_size() const { return static_cast(start_rules_.size()); } +void ScenarioConfig::clear_start_rules() { start_rules_.clear(); } +TriggerRule* ScenarioConfig::add_start_rules() { start_rules_.emplace_back(); return &start_rules_.back(); } +int ScenarioConfig::stop_rules_size() const { return static_cast(stop_rules_.size()); } +void ScenarioConfig::clear_stop_rules() { stop_rules_.clear(); } +TriggerRule* ScenarioConfig::add_stop_rules() { stop_rules_.emplace_back(); return &stop_rules_.back(); } +int ScenarioConfig::upload_rules_size() const { return static_cast(upload_rules_.size()); } +void ScenarioConfig::clear_upload_rules() { upload_rules_.clear(); } +TriggerRule* ScenarioConfig::add_upload_rules() { upload_rules_.emplace_back(); return &upload_rules_.back(); } +int ScenarioConfig::setup_rules_size() const { return static_cast(setup_rules_.size()); } +void ScenarioConfig::clear_setup_rules() { setup_rules_.clear(); } +TriggerRule* ScenarioConfig::add_setup_rules() { setup_rules_.emplace_back(); return &setup_rules_.back(); } +int ScenarioConfig::nested_scenarios_size() const { return static_cast(nested_scenarios_.size()); } +void ScenarioConfig::clear_nested_scenarios() { nested_scenarios_.clear(); } +NestedScenarioConfig* ScenarioConfig::add_nested_scenarios() { nested_scenarios_.emplace_back(); return &nested_scenarios_.back(); } +bool ScenarioConfig::ParseFromArray(const void* raw, size_t size) { + start_rules_.clear(); + stop_rules_.clear(); + upload_rules_.clear(); + setup_rules_.clear(); + nested_scenarios_.clear(); + unknown_fields_.clear(); + bool packed_error = false; + + ::protozero::ProtoDecoder dec(raw, size); + for (auto field = dec.ReadField(); field.valid(); field = dec.ReadField()) { + if (field.id() < _has_field_.size()) { + _has_field_.set(field.id()); + } + switch (field.id()) { + case 1 /* scenario_name */: + ::protozero::internal::gen_helpers::DeserializeString(field, &scenario_name_); + break; + case 2 /* start_rules */: + start_rules_.emplace_back(); + start_rules_.back().ParseFromArray(field.data(), field.size()); + break; + case 3 /* stop_rules */: + stop_rules_.emplace_back(); + stop_rules_.back().ParseFromArray(field.data(), field.size()); + break; + case 4 /* upload_rules */: + upload_rules_.emplace_back(); + upload_rules_.back().ParseFromArray(field.data(), field.size()); + break; + case 5 /* setup_rules */: + setup_rules_.emplace_back(); + setup_rules_.back().ParseFromArray(field.data(), field.size()); + break; + case 6 /* trace_config */: + (*trace_config_).ParseFromArray(field.data(), field.size()); + break; + case 7 /* nested_scenarios */: + nested_scenarios_.emplace_back(); + nested_scenarios_.back().ParseFromArray(field.data(), field.size()); + break; + default: + field.SerializeAndAppendTo(&unknown_fields_); + break; + } + } + return !packed_error && !dec.bytes_left(); +} + +std::string ScenarioConfig::SerializeAsString() const { + ::protozero::internal::gen_helpers::MessageSerializer msg; + Serialize(msg.get()); + return msg.SerializeAsString(); +} + +std::vector ScenarioConfig::SerializeAsArray() const { + ::protozero::internal::gen_helpers::MessageSerializer msg; + Serialize(msg.get()); + return msg.SerializeAsArray(); +} + +void ScenarioConfig::Serialize(::protozero::Message* msg) const { + // Field 1: scenario_name + if (_has_field_[1]) { + ::protozero::internal::gen_helpers::SerializeString(1, scenario_name_, msg); + } + + // Field 2: start_rules + for (auto& it : start_rules_) { + it.Serialize(msg->BeginNestedMessage<::protozero::Message>(2)); + } + + // Field 3: stop_rules + for (auto& it : stop_rules_) { + it.Serialize(msg->BeginNestedMessage<::protozero::Message>(3)); + } + + // Field 4: upload_rules + for (auto& it : upload_rules_) { + it.Serialize(msg->BeginNestedMessage<::protozero::Message>(4)); + } + + // Field 5: setup_rules + for (auto& it : setup_rules_) { + it.Serialize(msg->BeginNestedMessage<::protozero::Message>(5)); + } + + // Field 6: trace_config + if (_has_field_[6]) { + (*trace_config_).Serialize(msg->BeginNestedMessage<::protozero::Message>(6)); + } + + // Field 7: nested_scenarios + for (auto& it : nested_scenarios_) { + it.Serialize(msg->BeginNestedMessage<::protozero::Message>(7)); + } + + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); +} + + +NestedScenarioConfig::NestedScenarioConfig() = default; +NestedScenarioConfig::~NestedScenarioConfig() = default; +NestedScenarioConfig::NestedScenarioConfig(const NestedScenarioConfig&) = default; +NestedScenarioConfig& NestedScenarioConfig::operator=(const NestedScenarioConfig&) = default; +NestedScenarioConfig::NestedScenarioConfig(NestedScenarioConfig&&) noexcept = default; +NestedScenarioConfig& NestedScenarioConfig::operator=(NestedScenarioConfig&&) = default; + +bool NestedScenarioConfig::operator==(const NestedScenarioConfig& other) const { + return unknown_fields_ == other.unknown_fields_ + && scenario_name_ == other.scenario_name_ + && start_rules_ == other.start_rules_ + && stop_rules_ == other.stop_rules_ + && upload_rules_ == other.upload_rules_; +} + +int NestedScenarioConfig::start_rules_size() const { return static_cast(start_rules_.size()); } +void NestedScenarioConfig::clear_start_rules() { start_rules_.clear(); } +TriggerRule* NestedScenarioConfig::add_start_rules() { start_rules_.emplace_back(); return &start_rules_.back(); } +int NestedScenarioConfig::stop_rules_size() const { return static_cast(stop_rules_.size()); } +void NestedScenarioConfig::clear_stop_rules() { stop_rules_.clear(); } +TriggerRule* NestedScenarioConfig::add_stop_rules() { stop_rules_.emplace_back(); return &stop_rules_.back(); } +int NestedScenarioConfig::upload_rules_size() const { return static_cast(upload_rules_.size()); } +void NestedScenarioConfig::clear_upload_rules() { upload_rules_.clear(); } +TriggerRule* NestedScenarioConfig::add_upload_rules() { upload_rules_.emplace_back(); return &upload_rules_.back(); } +bool NestedScenarioConfig::ParseFromArray(const void* raw, size_t size) { + start_rules_.clear(); + stop_rules_.clear(); + upload_rules_.clear(); + unknown_fields_.clear(); + bool packed_error = false; + + ::protozero::ProtoDecoder dec(raw, size); + for (auto field = dec.ReadField(); field.valid(); field = dec.ReadField()) { + if (field.id() < _has_field_.size()) { + _has_field_.set(field.id()); + } + switch (field.id()) { + case 1 /* scenario_name */: + ::protozero::internal::gen_helpers::DeserializeString(field, &scenario_name_); + break; + case 2 /* start_rules */: + start_rules_.emplace_back(); + start_rules_.back().ParseFromArray(field.data(), field.size()); + break; + case 3 /* stop_rules */: + stop_rules_.emplace_back(); + stop_rules_.back().ParseFromArray(field.data(), field.size()); + break; + case 4 /* upload_rules */: + upload_rules_.emplace_back(); + upload_rules_.back().ParseFromArray(field.data(), field.size()); + break; + default: + field.SerializeAndAppendTo(&unknown_fields_); + break; + } + } + return !packed_error && !dec.bytes_left(); +} + +std::string NestedScenarioConfig::SerializeAsString() const { + ::protozero::internal::gen_helpers::MessageSerializer msg; + Serialize(msg.get()); + return msg.SerializeAsString(); +} + +std::vector NestedScenarioConfig::SerializeAsArray() const { + ::protozero::internal::gen_helpers::MessageSerializer msg; + Serialize(msg.get()); + return msg.SerializeAsArray(); +} + +void NestedScenarioConfig::Serialize(::protozero::Message* msg) const { + // Field 1: scenario_name + if (_has_field_[1]) { + ::protozero::internal::gen_helpers::SerializeString(1, scenario_name_, msg); + } + + // Field 2: start_rules + for (auto& it : start_rules_) { + it.Serialize(msg->BeginNestedMessage<::protozero::Message>(2)); + } + + // Field 3: stop_rules + for (auto& it : stop_rules_) { + it.Serialize(msg->BeginNestedMessage<::protozero::Message>(3)); + } + + // Field 4: upload_rules + for (auto& it : upload_rules_) { + it.Serialize(msg->BeginNestedMessage<::protozero::Message>(4)); + } + + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); +} + + +TriggerRule::TriggerRule() = default; +TriggerRule::~TriggerRule() = default; +TriggerRule::TriggerRule(const TriggerRule&) = default; +TriggerRule& TriggerRule::operator=(const TriggerRule&) = default; +TriggerRule::TriggerRule(TriggerRule&&) noexcept = default; +TriggerRule& TriggerRule::operator=(TriggerRule&&) = default; + +bool TriggerRule::operator==(const TriggerRule& other) const { + return unknown_fields_ == other.unknown_fields_ + && name_ == other.name_ + && trigger_chance_ == other.trigger_chance_ + && delay_ms_ == other.delay_ms_ + && manual_trigger_name_ == other.manual_trigger_name_ + && histogram_ == other.histogram_ + && repeating_interval_ == other.repeating_interval_; +} + +bool TriggerRule::ParseFromArray(const void* raw, size_t size) { + unknown_fields_.clear(); + bool packed_error = false; + + ::protozero::ProtoDecoder dec(raw, size); + for (auto field = dec.ReadField(); field.valid(); field = dec.ReadField()) { + if (field.id() < _has_field_.size()) { + _has_field_.set(field.id()); + } + switch (field.id()) { + case 1 /* name */: + ::protozero::internal::gen_helpers::DeserializeString(field, &name_); + break; + case 2 /* trigger_chance */: + field.get(&trigger_chance_); + break; + case 3 /* delay_ms */: + field.get(&delay_ms_); + break; + case 4 /* manual_trigger_name */: + ::protozero::internal::gen_helpers::DeserializeString(field, &manual_trigger_name_); + break; + case 5 /* histogram */: + (*histogram_).ParseFromArray(field.data(), field.size()); + break; + case 6 /* repeating_interval */: + (*repeating_interval_).ParseFromArray(field.data(), field.size()); + break; + default: + field.SerializeAndAppendTo(&unknown_fields_); + break; + } + } + return !packed_error && !dec.bytes_left(); +} + +std::string TriggerRule::SerializeAsString() const { + ::protozero::internal::gen_helpers::MessageSerializer msg; + Serialize(msg.get()); + return msg.SerializeAsString(); +} + +std::vector TriggerRule::SerializeAsArray() const { + ::protozero::internal::gen_helpers::MessageSerializer msg; + Serialize(msg.get()); + return msg.SerializeAsArray(); +} + +void TriggerRule::Serialize(::protozero::Message* msg) const { + // Field 1: name + if (_has_field_[1]) { + ::protozero::internal::gen_helpers::SerializeString(1, name_, msg); + } + + // Field 2: trigger_chance + if (_has_field_[2]) { + ::protozero::internal::gen_helpers::SerializeFixed(2, trigger_chance_, msg); + } + + // Field 3: delay_ms + if (_has_field_[3]) { + ::protozero::internal::gen_helpers::SerializeVarInt(3, delay_ms_, msg); + } + + // Field 4: manual_trigger_name + if (_has_field_[4]) { + ::protozero::internal::gen_helpers::SerializeString(4, manual_trigger_name_, msg); + } + + // Field 5: histogram + if (_has_field_[5]) { + (*histogram_).Serialize(msg->BeginNestedMessage<::protozero::Message>(5)); + } + + // Field 6: repeating_interval + if (_has_field_[6]) { + (*repeating_interval_).Serialize(msg->BeginNestedMessage<::protozero::Message>(6)); + } + + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); +} + + +TriggerRule_RepeatingInterval::TriggerRule_RepeatingInterval() = default; +TriggerRule_RepeatingInterval::~TriggerRule_RepeatingInterval() = default; +TriggerRule_RepeatingInterval::TriggerRule_RepeatingInterval(const TriggerRule_RepeatingInterval&) = default; +TriggerRule_RepeatingInterval& TriggerRule_RepeatingInterval::operator=(const TriggerRule_RepeatingInterval&) = default; +TriggerRule_RepeatingInterval::TriggerRule_RepeatingInterval(TriggerRule_RepeatingInterval&&) noexcept = default; +TriggerRule_RepeatingInterval& TriggerRule_RepeatingInterval::operator=(TriggerRule_RepeatingInterval&&) = default; + +bool TriggerRule_RepeatingInterval::operator==(const TriggerRule_RepeatingInterval& other) const { + return unknown_fields_ == other.unknown_fields_ + && period_ms_ == other.period_ms_ + && randomized_ == other.randomized_; +} + +bool TriggerRule_RepeatingInterval::ParseFromArray(const void* raw, size_t size) { + unknown_fields_.clear(); + bool packed_error = false; + + ::protozero::ProtoDecoder dec(raw, size); + for (auto field = dec.ReadField(); field.valid(); field = dec.ReadField()) { + if (field.id() < _has_field_.size()) { + _has_field_.set(field.id()); + } + switch (field.id()) { + case 1 /* period_ms */: + field.get(&period_ms_); + break; + case 2 /* randomized */: + field.get(&randomized_); + break; + default: + field.SerializeAndAppendTo(&unknown_fields_); + break; + } + } + return !packed_error && !dec.bytes_left(); +} + +std::string TriggerRule_RepeatingInterval::SerializeAsString() const { + ::protozero::internal::gen_helpers::MessageSerializer msg; + Serialize(msg.get()); + return msg.SerializeAsString(); +} + +std::vector TriggerRule_RepeatingInterval::SerializeAsArray() const { + ::protozero::internal::gen_helpers::MessageSerializer msg; + Serialize(msg.get()); + return msg.SerializeAsArray(); +} + +void TriggerRule_RepeatingInterval::Serialize(::protozero::Message* msg) const { + // Field 1: period_ms + if (_has_field_[1]) { + ::protozero::internal::gen_helpers::SerializeVarInt(1, period_ms_, msg); + } + + // Field 2: randomized + if (_has_field_[2]) { + ::protozero::internal::gen_helpers::SerializeTinyVarInt(2, randomized_, msg); + } + + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); +} + + +TriggerRule_HistogramTrigger::TriggerRule_HistogramTrigger() = default; +TriggerRule_HistogramTrigger::~TriggerRule_HistogramTrigger() = default; +TriggerRule_HistogramTrigger::TriggerRule_HistogramTrigger(const TriggerRule_HistogramTrigger&) = default; +TriggerRule_HistogramTrigger& TriggerRule_HistogramTrigger::operator=(const TriggerRule_HistogramTrigger&) = default; +TriggerRule_HistogramTrigger::TriggerRule_HistogramTrigger(TriggerRule_HistogramTrigger&&) noexcept = default; +TriggerRule_HistogramTrigger& TriggerRule_HistogramTrigger::operator=(TriggerRule_HistogramTrigger&&) = default; + +bool TriggerRule_HistogramTrigger::operator==(const TriggerRule_HistogramTrigger& other) const { + return unknown_fields_ == other.unknown_fields_ + && histogram_name_ == other.histogram_name_ + && min_value_ == other.min_value_ + && max_value_ == other.max_value_; +} + +bool TriggerRule_HistogramTrigger::ParseFromArray(const void* raw, size_t size) { + unknown_fields_.clear(); + bool packed_error = false; + + ::protozero::ProtoDecoder dec(raw, size); + for (auto field = dec.ReadField(); field.valid(); field = dec.ReadField()) { + if (field.id() < _has_field_.size()) { + _has_field_.set(field.id()); + } + switch (field.id()) { + case 1 /* histogram_name */: + ::protozero::internal::gen_helpers::DeserializeString(field, &histogram_name_); + break; + case 2 /* min_value */: + field.get(&min_value_); + break; + case 3 /* max_value */: + field.get(&max_value_); + break; + default: + field.SerializeAndAppendTo(&unknown_fields_); + break; + } + } + return !packed_error && !dec.bytes_left(); +} + +std::string TriggerRule_HistogramTrigger::SerializeAsString() const { + ::protozero::internal::gen_helpers::MessageSerializer msg; + Serialize(msg.get()); + return msg.SerializeAsString(); +} + +std::vector TriggerRule_HistogramTrigger::SerializeAsArray() const { + ::protozero::internal::gen_helpers::MessageSerializer msg; + Serialize(msg.get()); + return msg.SerializeAsArray(); +} + +void TriggerRule_HistogramTrigger::Serialize(::protozero::Message* msg) const { + // Field 1: histogram_name + if (_has_field_[1]) { + ::protozero::internal::gen_helpers::SerializeString(1, histogram_name_, msg); + } + + // Field 2: min_value + if (_has_field_[2]) { + ::protozero::internal::gen_helpers::SerializeVarInt(2, min_value_, msg); + } + + // Field 3: max_value + if (_has_field_[3]) { + ::protozero::internal::gen_helpers::SerializeVarInt(3, max_value_, msg); + } + + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); +} + +} // namespace perfetto +} // namespace protos +} // namespace gen +#if defined(__GNUC__) || defined(__clang__) +#pragma GCC diagnostic pop +#endif +// gen_amalgamated begin source: gen/protos/perfetto/config/data_source_config.gen.cc +// gen_amalgamated expanded: #include "perfetto/protozero/gen_field_helpers.h" // gen_amalgamated expanded: #include "perfetto/protozero/message.h" // gen_amalgamated expanded: #include "perfetto/protozero/packed_repeated_fields.h" // gen_amalgamated expanded: #include "perfetto/protozero/proto_decoder.h" @@ -22616,6 +25618,7 @@ class PERFETTO_EXPORT_COMPONENT InterceptorConfig : public ::protozero::CppMessa #pragma GCC diagnostic ignored "-Wfloat-equal" #endif // gen_amalgamated expanded: #include "protos/perfetto/config/data_source_config.gen.h" +// gen_amalgamated expanded: #include "protos/perfetto/config/system_info/system_info.gen.h" // gen_amalgamated expanded: #include "protos/perfetto/config/test_config.gen.h" // gen_amalgamated expanded: #include "protos/perfetto/config/interceptor_config.gen.h" // gen_amalgamated expanded: #include "protos/perfetto/config/interceptors/console_config.gen.h" @@ -22637,6 +25640,7 @@ bool DataSourceConfig::operator==(const DataSourceConfig& other) const { && name_ == other.name_ && target_buffer_ == other.target_buffer_ && trace_duration_ms_ == other.trace_duration_ms_ + && prefer_suspend_clock_for_duration_ == other.prefer_suspend_clock_for_duration_ && stop_timeout_ms_ == other.stop_timeout_ms_ && enable_extra_guardrails_ == other.enable_extra_guardrails_ && session_initiator_ == other.session_initiator_ @@ -22656,8 +25660,12 @@ bool DataSourceConfig::operator==(const DataSourceConfig& other) const { && vulkan_memory_config_ == other.vulkan_memory_config_ && track_event_config_ == other.track_event_config_ && android_polled_state_config_ == other.android_polled_state_config_ + && android_system_property_config_ == other.android_system_property_config_ + && statsd_tracing_config_ == other.statsd_tracing_config_ + && system_info_config_ == other.system_info_config_ && chrome_config_ == other.chrome_config_ && interceptor_config_ == other.interceptor_config_ + && network_packet_trace_config_ == other.network_packet_trace_config_ && legacy_config_ == other.legacy_config_ && for_testing_ == other.for_testing_; } @@ -22673,7 +25681,7 @@ bool DataSourceConfig::ParseFromArray(const void* raw, size_t size) { } switch (field.id()) { case 1 /* name */: - field.get(&name_); + ::protozero::internal::gen_helpers::DeserializeString(field, &name_); break; case 2 /* target_buffer */: field.get(&target_buffer_); @@ -22681,6 +25689,9 @@ bool DataSourceConfig::ParseFromArray(const void* raw, size_t size) { case 3 /* trace_duration_ms */: field.get(&trace_duration_ms_); break; + case 122 /* prefer_suspend_clock_for_duration */: + field.get(&prefer_suspend_clock_for_duration_); + break; case 7 /* stop_timeout_ms */: field.get(&stop_timeout_ms_); break; @@ -22694,49 +25705,58 @@ bool DataSourceConfig::ParseFromArray(const void* raw, size_t size) { field.get(&tracing_session_id_); break; case 100 /* ftrace_config */: - ftrace_config_ = field.as_std_string(); + ::protozero::internal::gen_helpers::DeserializeString(field, &ftrace_config_); break; case 102 /* inode_file_config */: - inode_file_config_ = field.as_std_string(); + ::protozero::internal::gen_helpers::DeserializeString(field, &inode_file_config_); break; case 103 /* process_stats_config */: - process_stats_config_ = field.as_std_string(); + ::protozero::internal::gen_helpers::DeserializeString(field, &process_stats_config_); break; case 104 /* sys_stats_config */: - sys_stats_config_ = field.as_std_string(); + ::protozero::internal::gen_helpers::DeserializeString(field, &sys_stats_config_); break; case 105 /* heapprofd_config */: - heapprofd_config_ = field.as_std_string(); + ::protozero::internal::gen_helpers::DeserializeString(field, &heapprofd_config_); break; case 110 /* java_hprof_config */: - java_hprof_config_ = field.as_std_string(); + ::protozero::internal::gen_helpers::DeserializeString(field, &java_hprof_config_); break; case 106 /* android_power_config */: - android_power_config_ = field.as_std_string(); + ::protozero::internal::gen_helpers::DeserializeString(field, &android_power_config_); break; case 107 /* android_log_config */: - android_log_config_ = field.as_std_string(); + ::protozero::internal::gen_helpers::DeserializeString(field, &android_log_config_); break; case 108 /* gpu_counter_config */: - gpu_counter_config_ = field.as_std_string(); + ::protozero::internal::gen_helpers::DeserializeString(field, &gpu_counter_config_); break; case 116 /* android_game_intervention_list_config */: - android_game_intervention_list_config_ = field.as_std_string(); + ::protozero::internal::gen_helpers::DeserializeString(field, &android_game_intervention_list_config_); break; case 109 /* packages_list_config */: - packages_list_config_ = field.as_std_string(); + ::protozero::internal::gen_helpers::DeserializeString(field, &packages_list_config_); break; case 111 /* perf_event_config */: - perf_event_config_ = field.as_std_string(); + ::protozero::internal::gen_helpers::DeserializeString(field, &perf_event_config_); break; case 112 /* vulkan_memory_config */: - vulkan_memory_config_ = field.as_std_string(); + ::protozero::internal::gen_helpers::DeserializeString(field, &vulkan_memory_config_); break; case 113 /* track_event_config */: - track_event_config_ = field.as_std_string(); + ::protozero::internal::gen_helpers::DeserializeString(field, &track_event_config_); break; case 114 /* android_polled_state_config */: - android_polled_state_config_ = field.as_std_string(); + ::protozero::internal::gen_helpers::DeserializeString(field, &android_polled_state_config_); + break; + case 118 /* android_system_property_config */: + ::protozero::internal::gen_helpers::DeserializeString(field, &android_system_property_config_); + break; + case 117 /* statsd_tracing_config */: + ::protozero::internal::gen_helpers::DeserializeString(field, &statsd_tracing_config_); + break; + case 119 /* system_info_config */: + (*system_info_config_).ParseFromArray(field.data(), field.size()); break; case 101 /* chrome_config */: (*chrome_config_).ParseFromArray(field.data(), field.size()); @@ -22744,8 +25764,11 @@ bool DataSourceConfig::ParseFromArray(const void* raw, size_t size) { case 115 /* interceptor_config */: (*interceptor_config_).ParseFromArray(field.data(), field.size()); break; + case 120 /* network_packet_trace_config */: + ::protozero::internal::gen_helpers::DeserializeString(field, &network_packet_trace_config_); + break; case 1000 /* legacy_config */: - field.get(&legacy_config_); + ::protozero::internal::gen_helpers::DeserializeString(field, &legacy_config_); break; case 1001 /* for_testing */: (*for_testing_).ParseFromArray(field.data(), field.size()); @@ -22759,13 +25782,13 @@ bool DataSourceConfig::ParseFromArray(const void* raw, size_t size) { } std::string DataSourceConfig::SerializeAsString() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsString(); } std::vector DataSourceConfig::SerializeAsArray() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsArray(); } @@ -22773,37 +25796,42 @@ std::vector DataSourceConfig::SerializeAsArray() const { void DataSourceConfig::Serialize(::protozero::Message* msg) const { // Field 1: name if (_has_field_[1]) { - msg->AppendString(1, name_); + ::protozero::internal::gen_helpers::SerializeString(1, name_, msg); } // Field 2: target_buffer if (_has_field_[2]) { - msg->AppendVarInt(2, target_buffer_); + ::protozero::internal::gen_helpers::SerializeVarInt(2, target_buffer_, msg); } // Field 3: trace_duration_ms if (_has_field_[3]) { - msg->AppendVarInt(3, trace_duration_ms_); + ::protozero::internal::gen_helpers::SerializeVarInt(3, trace_duration_ms_, msg); + } + + // Field 122: prefer_suspend_clock_for_duration + if (_has_field_[122]) { + ::protozero::internal::gen_helpers::SerializeTinyVarInt(122, prefer_suspend_clock_for_duration_, msg); } // Field 7: stop_timeout_ms if (_has_field_[7]) { - msg->AppendVarInt(7, stop_timeout_ms_); + ::protozero::internal::gen_helpers::SerializeVarInt(7, stop_timeout_ms_, msg); } // Field 6: enable_extra_guardrails if (_has_field_[6]) { - msg->AppendTinyVarInt(6, enable_extra_guardrails_); + ::protozero::internal::gen_helpers::SerializeTinyVarInt(6, enable_extra_guardrails_, msg); } // Field 8: session_initiator if (_has_field_[8]) { - msg->AppendVarInt(8, session_initiator_); + ::protozero::internal::gen_helpers::SerializeVarInt(8, session_initiator_, msg); } // Field 4: tracing_session_id if (_has_field_[4]) { - msg->AppendVarInt(4, tracing_session_id_); + ::protozero::internal::gen_helpers::SerializeVarInt(4, tracing_session_id_, msg); } // Field 100: ftrace_config @@ -22881,6 +25909,21 @@ void DataSourceConfig::Serialize(::protozero::Message* msg) const { msg->AppendString(114, android_polled_state_config_); } + // Field 118: android_system_property_config + if (_has_field_[118]) { + msg->AppendString(118, android_system_property_config_); + } + + // Field 117: statsd_tracing_config + if (_has_field_[117]) { + msg->AppendString(117, statsd_tracing_config_); + } + + // Field 119: system_info_config + if (_has_field_[119]) { + (*system_info_config_).Serialize(msg->BeginNestedMessage<::protozero::Message>(119)); + } + // Field 101: chrome_config if (_has_field_[101]) { (*chrome_config_).Serialize(msg->BeginNestedMessage<::protozero::Message>(101)); @@ -22891,9 +25934,14 @@ void DataSourceConfig::Serialize(::protozero::Message* msg) const { (*interceptor_config_).Serialize(msg->BeginNestedMessage<::protozero::Message>(115)); } + // Field 120: network_packet_trace_config + if (_has_field_[120]) { + msg->AppendString(120, network_packet_trace_config_); + } + // Field 1000: legacy_config if (_has_field_[1000]) { - msg->AppendString(1000, legacy_config_); + ::protozero::internal::gen_helpers::SerializeString(1000, legacy_config_, msg); } // Field 1001: for_testing @@ -22901,7 +25949,7 @@ void DataSourceConfig::Serialize(::protozero::Message* msg) const { (*for_testing_).Serialize(msg->BeginNestedMessage<::protozero::Message>(1001)); } - msg->AppendRawProtoBytes(unknown_fields_.data(), unknown_fields_.size()); + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); } } // namespace perfetto @@ -22911,6 +25959,7 @@ void DataSourceConfig::Serialize(::protozero::Message* msg) const { #pragma GCC diagnostic pop #endif // gen_amalgamated begin source: gen/protos/perfetto/config/interceptor_config.gen.cc +// gen_amalgamated expanded: #include "perfetto/protozero/gen_field_helpers.h" // gen_amalgamated expanded: #include "perfetto/protozero/message.h" // gen_amalgamated expanded: #include "perfetto/protozero/packed_repeated_fields.h" // gen_amalgamated expanded: #include "perfetto/protozero/proto_decoder.h" @@ -22950,10 +25999,10 @@ bool InterceptorConfig::ParseFromArray(const void* raw, size_t size) { } switch (field.id()) { case 1 /* name */: - field.get(&name_); + ::protozero::internal::gen_helpers::DeserializeString(field, &name_); break; case 100 /* console_config */: - console_config_ = field.as_std_string(); + ::protozero::internal::gen_helpers::DeserializeString(field, &console_config_); break; default: field.SerializeAndAppendTo(&unknown_fields_); @@ -22964,13 +26013,13 @@ bool InterceptorConfig::ParseFromArray(const void* raw, size_t size) { } std::string InterceptorConfig::SerializeAsString() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsString(); } std::vector InterceptorConfig::SerializeAsArray() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsArray(); } @@ -22978,7 +26027,7 @@ std::vector InterceptorConfig::SerializeAsArray() const { void InterceptorConfig::Serialize(::protozero::Message* msg) const { // Field 1: name if (_has_field_[1]) { - msg->AppendString(1, name_); + ::protozero::internal::gen_helpers::SerializeString(1, name_, msg); } // Field 100: console_config @@ -22986,7 +26035,7 @@ void InterceptorConfig::Serialize(::protozero::Message* msg) const { msg->AppendString(100, console_config_); } - msg->AppendRawProtoBytes(unknown_fields_.data(), unknown_fields_.size()); + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); } } // namespace perfetto @@ -23034,6 +26083,7 @@ class TestConfig; class TestConfig_DummyFields; class InterceptorConfig; class ChromeConfig; +class SystemInfoConfig; class TraceConfig_BufferConfig; enum TraceConfig_LockdownModeOperation : int; enum TraceConfig_CompressionType : int; @@ -23214,6 +26264,7 @@ class PERFETTO_EXPORT_COMPONENT StressTestConfig_WriterTiming : public ::protoze } // namespace gen #endif // PERFETTO_PROTOS_PROTOS_PERFETTO_CONFIG_STRESS_TEST_CONFIG_PROTO_CPP_H_ +// gen_amalgamated expanded: #include "perfetto/protozero/gen_field_helpers.h" // gen_amalgamated expanded: #include "perfetto/protozero/message.h" // gen_amalgamated expanded: #include "perfetto/protozero/packed_repeated_fields.h" // gen_amalgamated expanded: #include "perfetto/protozero/proto_decoder.h" @@ -23226,6 +26277,7 @@ class PERFETTO_EXPORT_COMPONENT StressTestConfig_WriterTiming : public ::protoze // gen_amalgamated expanded: #include "protos/perfetto/config/stress_test_config.gen.h" // gen_amalgamated expanded: #include "protos/perfetto/config/trace_config.gen.h" // gen_amalgamated expanded: #include "protos/perfetto/config/data_source_config.gen.h" +// gen_amalgamated expanded: #include "protos/perfetto/config/system_info/system_info.gen.h" // gen_amalgamated expanded: #include "protos/perfetto/config/track_event/track_event_config.gen.h" // gen_amalgamated expanded: #include "protos/perfetto/config/test_config.gen.h" // gen_amalgamated expanded: #include "protos/perfetto/config/sys_stats/sys_stats_config.gen.h" @@ -23235,6 +26287,8 @@ class PERFETTO_EXPORT_COMPONENT StressTestConfig_WriterTiming : public ::protoze // gen_amalgamated expanded: #include "protos/perfetto/config/profiling/java_hprof_config.gen.h" // gen_amalgamated expanded: #include "protos/perfetto/config/profiling/heapprofd_config.gen.h" // gen_amalgamated expanded: #include "protos/perfetto/config/process_stats/process_stats_config.gen.h" +// gen_amalgamated expanded: #include "protos/perfetto/config/statsd/statsd_tracing_config.gen.h" +// gen_amalgamated expanded: #include "protos/perfetto/config/statsd/atom_ids.gen.h" // gen_amalgamated expanded: #include "protos/perfetto/config/power/android_power_config.gen.h" // gen_amalgamated expanded: #include "protos/perfetto/config/interceptor_config.gen.h" // gen_amalgamated expanded: #include "protos/perfetto/config/interceptors/console_config.gen.h" @@ -23244,6 +26298,8 @@ class PERFETTO_EXPORT_COMPONENT StressTestConfig_WriterTiming : public ::protoze // gen_amalgamated expanded: #include "protos/perfetto/config/ftrace/ftrace_config.gen.h" // gen_amalgamated expanded: #include "protos/perfetto/config/chrome/chrome_config.gen.h" // gen_amalgamated expanded: #include "protos/perfetto/config/android/packages_list_config.gen.h" +// gen_amalgamated expanded: #include "protos/perfetto/config/android/network_trace_config.gen.h" +// gen_amalgamated expanded: #include "protos/perfetto/config/android/android_system_property_config.gen.h" // gen_amalgamated expanded: #include "protos/perfetto/config/android/android_polled_state_config.gen.h" // gen_amalgamated expanded: #include "protos/perfetto/config/android/android_log_config.gen.h" // gen_amalgamated expanded: #include "protos/perfetto/common/android_log_constants.gen.h" @@ -23328,13 +26384,13 @@ bool StressTestConfig::ParseFromArray(const void* raw, size_t size) { } std::string StressTestConfig::SerializeAsString() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsString(); } std::vector StressTestConfig::SerializeAsArray() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsArray(); } @@ -23347,32 +26403,32 @@ void StressTestConfig::Serialize(::protozero::Message* msg) const { // Field 2: shmem_size_kb if (_has_field_[2]) { - msg->AppendVarInt(2, shmem_size_kb_); + ::protozero::internal::gen_helpers::SerializeVarInt(2, shmem_size_kb_, msg); } // Field 3: shmem_page_size_kb if (_has_field_[3]) { - msg->AppendVarInt(3, shmem_page_size_kb_); + ::protozero::internal::gen_helpers::SerializeVarInt(3, shmem_page_size_kb_, msg); } // Field 4: num_processes if (_has_field_[4]) { - msg->AppendVarInt(4, num_processes_); + ::protozero::internal::gen_helpers::SerializeVarInt(4, num_processes_, msg); } // Field 5: num_threads if (_has_field_[5]) { - msg->AppendVarInt(5, num_threads_); + ::protozero::internal::gen_helpers::SerializeVarInt(5, num_threads_, msg); } // Field 6: max_events if (_has_field_[6]) { - msg->AppendVarInt(6, max_events_); + ::protozero::internal::gen_helpers::SerializeVarInt(6, max_events_, msg); } // Field 7: nesting if (_has_field_[7]) { - msg->AppendVarInt(7, nesting_); + ::protozero::internal::gen_helpers::SerializeVarInt(7, nesting_, msg); } // Field 8: steady_state_timings @@ -23382,12 +26438,12 @@ void StressTestConfig::Serialize(::protozero::Message* msg) const { // Field 9: burst_period_ms if (_has_field_[9]) { - msg->AppendVarInt(9, burst_period_ms_); + ::protozero::internal::gen_helpers::SerializeVarInt(9, burst_period_ms_, msg); } // Field 10: burst_duration_ms if (_has_field_[10]) { - msg->AppendVarInt(10, burst_duration_ms_); + ::protozero::internal::gen_helpers::SerializeVarInt(10, burst_duration_ms_, msg); } // Field 11: burst_timings @@ -23395,7 +26451,7 @@ void StressTestConfig::Serialize(::protozero::Message* msg) const { (*burst_timings_).Serialize(msg->BeginNestedMessage<::protozero::Message>(11)); } - msg->AppendRawProtoBytes(unknown_fields_.data(), unknown_fields_.size()); + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); } @@ -23449,13 +26505,13 @@ bool StressTestConfig_WriterTiming::ParseFromArray(const void* raw, size_t size) } std::string StressTestConfig_WriterTiming::SerializeAsString() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsString(); } std::vector StressTestConfig_WriterTiming::SerializeAsArray() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsArray(); } @@ -23463,30 +26519,30 @@ std::vector StressTestConfig_WriterTiming::SerializeAsArray() const { void StressTestConfig_WriterTiming::Serialize(::protozero::Message* msg) const { // Field 1: payload_mean if (_has_field_[1]) { - msg->AppendFixed(1, payload_mean_); + ::protozero::internal::gen_helpers::SerializeFixed(1, payload_mean_, msg); } // Field 2: payload_stddev if (_has_field_[2]) { - msg->AppendFixed(2, payload_stddev_); + ::protozero::internal::gen_helpers::SerializeFixed(2, payload_stddev_, msg); } // Field 3: rate_mean if (_has_field_[3]) { - msg->AppendFixed(3, rate_mean_); + ::protozero::internal::gen_helpers::SerializeFixed(3, rate_mean_, msg); } // Field 4: rate_stddev if (_has_field_[4]) { - msg->AppendFixed(4, rate_stddev_); + ::protozero::internal::gen_helpers::SerializeFixed(4, rate_stddev_, msg); } // Field 5: payload_write_time_ms if (_has_field_[5]) { - msg->AppendVarInt(5, payload_write_time_ms_); + ::protozero::internal::gen_helpers::SerializeVarInt(5, payload_write_time_ms_, msg); } - msg->AppendRawProtoBytes(unknown_fields_.data(), unknown_fields_.size()); + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); } } // namespace perfetto @@ -23496,6 +26552,7 @@ void StressTestConfig_WriterTiming::Serialize(::protozero::Message* msg) const { #pragma GCC diagnostic pop #endif // gen_amalgamated begin source: gen/protos/perfetto/config/test_config.gen.cc +// gen_amalgamated expanded: #include "perfetto/protozero/gen_field_helpers.h" // gen_amalgamated expanded: #include "perfetto/protozero/message.h" // gen_amalgamated expanded: #include "perfetto/protozero/packed_repeated_fields.h" // gen_amalgamated expanded: #include "perfetto/protozero/proto_decoder.h" @@ -23565,13 +26622,13 @@ bool TestConfig::ParseFromArray(const void* raw, size_t size) { } std::string TestConfig::SerializeAsString() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsString(); } std::vector TestConfig::SerializeAsArray() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsArray(); } @@ -23579,27 +26636,27 @@ std::vector TestConfig::SerializeAsArray() const { void TestConfig::Serialize(::protozero::Message* msg) const { // Field 1: message_count if (_has_field_[1]) { - msg->AppendVarInt(1, message_count_); + ::protozero::internal::gen_helpers::SerializeVarInt(1, message_count_, msg); } // Field 2: max_messages_per_second if (_has_field_[2]) { - msg->AppendVarInt(2, max_messages_per_second_); + ::protozero::internal::gen_helpers::SerializeVarInt(2, max_messages_per_second_, msg); } // Field 3: seed if (_has_field_[3]) { - msg->AppendVarInt(3, seed_); + ::protozero::internal::gen_helpers::SerializeVarInt(3, seed_, msg); } // Field 4: message_size if (_has_field_[4]) { - msg->AppendVarInt(4, message_size_); + ::protozero::internal::gen_helpers::SerializeVarInt(4, message_size_, msg); } // Field 5: send_batch_on_register if (_has_field_[5]) { - msg->AppendTinyVarInt(5, send_batch_on_register_); + ::protozero::internal::gen_helpers::SerializeTinyVarInt(5, send_batch_on_register_, msg); } // Field 6: dummy_fields @@ -23607,7 +26664,7 @@ void TestConfig::Serialize(::protozero::Message* msg) const { (*dummy_fields_).Serialize(msg->BeginNestedMessage<::protozero::Message>(6)); } - msg->AppendRawProtoBytes(unknown_fields_.data(), unknown_fields_.size()); + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); } @@ -23683,7 +26740,7 @@ bool TestConfig_DummyFields::ParseFromArray(const void* raw, size_t size) { field.get_signed(&field_sint32_); break; case 13 /* field_string */: - field.get(&field_string_); + ::protozero::internal::gen_helpers::DeserializeString(field, &field_string_); break; case 14 /* field_bytes */: field.get(&field_bytes_); @@ -23697,13 +26754,13 @@ bool TestConfig_DummyFields::ParseFromArray(const void* raw, size_t size) { } std::string TestConfig_DummyFields::SerializeAsString() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsString(); } std::vector TestConfig_DummyFields::SerializeAsArray() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsArray(); } @@ -23711,75 +26768,75 @@ std::vector TestConfig_DummyFields::SerializeAsArray() const { void TestConfig_DummyFields::Serialize(::protozero::Message* msg) const { // Field 1: field_uint32 if (_has_field_[1]) { - msg->AppendVarInt(1, field_uint32_); + ::protozero::internal::gen_helpers::SerializeVarInt(1, field_uint32_, msg); } // Field 2: field_int32 if (_has_field_[2]) { - msg->AppendVarInt(2, field_int32_); + ::protozero::internal::gen_helpers::SerializeVarInt(2, field_int32_, msg); } // Field 3: field_uint64 if (_has_field_[3]) { - msg->AppendVarInt(3, field_uint64_); + ::protozero::internal::gen_helpers::SerializeVarInt(3, field_uint64_, msg); } // Field 4: field_int64 if (_has_field_[4]) { - msg->AppendVarInt(4, field_int64_); + ::protozero::internal::gen_helpers::SerializeVarInt(4, field_int64_, msg); } // Field 5: field_fixed64 if (_has_field_[5]) { - msg->AppendFixed(5, field_fixed64_); + ::protozero::internal::gen_helpers::SerializeFixed(5, field_fixed64_, msg); } // Field 6: field_sfixed64 if (_has_field_[6]) { - msg->AppendFixed(6, field_sfixed64_); + ::protozero::internal::gen_helpers::SerializeFixed(6, field_sfixed64_, msg); } // Field 7: field_fixed32 if (_has_field_[7]) { - msg->AppendFixed(7, field_fixed32_); + ::protozero::internal::gen_helpers::SerializeFixed(7, field_fixed32_, msg); } // Field 8: field_sfixed32 if (_has_field_[8]) { - msg->AppendFixed(8, field_sfixed32_); + ::protozero::internal::gen_helpers::SerializeFixed(8, field_sfixed32_, msg); } // Field 9: field_double if (_has_field_[9]) { - msg->AppendFixed(9, field_double_); + ::protozero::internal::gen_helpers::SerializeFixed(9, field_double_, msg); } // Field 10: field_float if (_has_field_[10]) { - msg->AppendFixed(10, field_float_); + ::protozero::internal::gen_helpers::SerializeFixed(10, field_float_, msg); } // Field 11: field_sint64 if (_has_field_[11]) { - msg->AppendSignedVarInt(11, field_sint64_); + ::protozero::internal::gen_helpers::SerializeSignedVarInt(11, field_sint64_, msg); } // Field 12: field_sint32 if (_has_field_[12]) { - msg->AppendSignedVarInt(12, field_sint32_); + ::protozero::internal::gen_helpers::SerializeSignedVarInt(12, field_sint32_, msg); } // Field 13: field_string if (_has_field_[13]) { - msg->AppendString(13, field_string_); + ::protozero::internal::gen_helpers::SerializeString(13, field_string_, msg); } // Field 14: field_bytes if (_has_field_[14]) { - msg->AppendString(14, field_bytes_); + ::protozero::internal::gen_helpers::SerializeString(14, field_bytes_, msg); } - msg->AppendRawProtoBytes(unknown_fields_.data(), unknown_fields_.size()); + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); } } // namespace perfetto @@ -23789,6 +26846,7 @@ void TestConfig_DummyFields::Serialize(::protozero::Message* msg) const { #pragma GCC diagnostic pop #endif // gen_amalgamated begin source: gen/protos/perfetto/config/trace_config.gen.cc +// gen_amalgamated expanded: #include "perfetto/protozero/gen_field_helpers.h" // gen_amalgamated expanded: #include "perfetto/protozero/message.h" // gen_amalgamated expanded: #include "perfetto/protozero/packed_repeated_fields.h" // gen_amalgamated expanded: #include "perfetto/protozero/proto_decoder.h" @@ -23800,6 +26858,7 @@ void TestConfig_DummyFields::Serialize(::protozero::Message* msg) const { #endif // gen_amalgamated expanded: #include "protos/perfetto/config/trace_config.gen.h" // gen_amalgamated expanded: #include "protos/perfetto/config/data_source_config.gen.h" +// gen_amalgamated expanded: #include "protos/perfetto/config/system_info/system_info.gen.h" // gen_amalgamated expanded: #include "protos/perfetto/config/track_event/track_event_config.gen.h" // gen_amalgamated expanded: #include "protos/perfetto/config/test_config.gen.h" // gen_amalgamated expanded: #include "protos/perfetto/config/sys_stats/sys_stats_config.gen.h" @@ -23809,6 +26868,8 @@ void TestConfig_DummyFields::Serialize(::protozero::Message* msg) const { // gen_amalgamated expanded: #include "protos/perfetto/config/profiling/java_hprof_config.gen.h" // gen_amalgamated expanded: #include "protos/perfetto/config/profiling/heapprofd_config.gen.h" // gen_amalgamated expanded: #include "protos/perfetto/config/process_stats/process_stats_config.gen.h" +// gen_amalgamated expanded: #include "protos/perfetto/config/statsd/statsd_tracing_config.gen.h" +// gen_amalgamated expanded: #include "protos/perfetto/config/statsd/atom_ids.gen.h" // gen_amalgamated expanded: #include "protos/perfetto/config/power/android_power_config.gen.h" // gen_amalgamated expanded: #include "protos/perfetto/config/interceptor_config.gen.h" // gen_amalgamated expanded: #include "protos/perfetto/config/interceptors/console_config.gen.h" @@ -23818,6 +26879,8 @@ void TestConfig_DummyFields::Serialize(::protozero::Message* msg) const { // gen_amalgamated expanded: #include "protos/perfetto/config/ftrace/ftrace_config.gen.h" // gen_amalgamated expanded: #include "protos/perfetto/config/chrome/chrome_config.gen.h" // gen_amalgamated expanded: #include "protos/perfetto/config/android/packages_list_config.gen.h" +// gen_amalgamated expanded: #include "protos/perfetto/config/android/network_trace_config.gen.h" +// gen_amalgamated expanded: #include "protos/perfetto/config/android/android_system_property_config.gen.h" // gen_amalgamated expanded: #include "protos/perfetto/config/android/android_polled_state_config.gen.h" // gen_amalgamated expanded: #include "protos/perfetto/config/android/android_log_config.gen.h" // gen_amalgamated expanded: #include "protos/perfetto/common/android_log_constants.gen.h" @@ -23841,6 +26904,7 @@ bool TraceConfig::operator==(const TraceConfig& other) const { && data_sources_ == other.data_sources_ && builtin_data_sources_ == other.builtin_data_sources_ && duration_ms_ == other.duration_ms_ + && prefer_suspend_clock_for_duration_ == other.prefer_suspend_clock_for_duration_ && enable_extra_guardrails_ == other.enable_extra_guardrails_ && lockdown_mode_ == other.lockdown_mode_ && producers_ == other.producers_ @@ -23908,6 +26972,9 @@ bool TraceConfig::ParseFromArray(const void* raw, size_t size) { case 3 /* duration_ms */: field.get(&duration_ms_); break; + case 36 /* prefer_suspend_clock_for_duration */: + field.get(&prefer_suspend_clock_for_duration_); + break; case 4 /* enable_extra_guardrails */: field.get(&enable_extra_guardrails_); break; @@ -23925,7 +26992,7 @@ bool TraceConfig::ParseFromArray(const void* raw, size_t size) { field.get(&write_into_file_); break; case 29 /* output_path */: - field.get(&output_path_); + ::protozero::internal::gen_helpers::DeserializeString(field, &output_path_); break; case 9 /* file_write_period_ms */: field.get(&file_write_period_ms_); @@ -23959,7 +27026,7 @@ bool TraceConfig::ParseFromArray(const void* raw, size_t size) { break; case 18 /* activate_triggers */: activate_triggers_.emplace_back(); - field.get(&activate_triggers_.back()); + ::protozero::internal::gen_helpers::DeserializeString(field, &activate_triggers_.back()); break; case 21 /* incremental_state_config */: (*incremental_state_config_).ParseFromArray(field.data(), field.size()); @@ -23968,7 +27035,7 @@ bool TraceConfig::ParseFromArray(const void* raw, size_t size) { field.get(&allow_user_build_tracing_); break; case 22 /* unique_session_name */: - field.get(&unique_session_name_); + ::protozero::internal::gen_helpers::DeserializeString(field, &unique_session_name_); break; case 24 /* compression_type */: field.get(&compression_type_); @@ -24003,13 +27070,13 @@ bool TraceConfig::ParseFromArray(const void* raw, size_t size) { } std::string TraceConfig::SerializeAsString() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsString(); } std::vector TraceConfig::SerializeAsArray() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsArray(); } @@ -24032,17 +27099,22 @@ void TraceConfig::Serialize(::protozero::Message* msg) const { // Field 3: duration_ms if (_has_field_[3]) { - msg->AppendVarInt(3, duration_ms_); + ::protozero::internal::gen_helpers::SerializeVarInt(3, duration_ms_, msg); + } + + // Field 36: prefer_suspend_clock_for_duration + if (_has_field_[36]) { + ::protozero::internal::gen_helpers::SerializeTinyVarInt(36, prefer_suspend_clock_for_duration_, msg); } // Field 4: enable_extra_guardrails if (_has_field_[4]) { - msg->AppendTinyVarInt(4, enable_extra_guardrails_); + ::protozero::internal::gen_helpers::SerializeTinyVarInt(4, enable_extra_guardrails_, msg); } // Field 5: lockdown_mode if (_has_field_[5]) { - msg->AppendVarInt(5, lockdown_mode_); + ::protozero::internal::gen_helpers::SerializeVarInt(5, lockdown_mode_, msg); } // Field 6: producers @@ -24057,22 +27129,22 @@ void TraceConfig::Serialize(::protozero::Message* msg) const { // Field 8: write_into_file if (_has_field_[8]) { - msg->AppendTinyVarInt(8, write_into_file_); + ::protozero::internal::gen_helpers::SerializeTinyVarInt(8, write_into_file_, msg); } // Field 29: output_path if (_has_field_[29]) { - msg->AppendString(29, output_path_); + ::protozero::internal::gen_helpers::SerializeString(29, output_path_, msg); } // Field 9: file_write_period_ms if (_has_field_[9]) { - msg->AppendVarInt(9, file_write_period_ms_); + ::protozero::internal::gen_helpers::SerializeVarInt(9, file_write_period_ms_, msg); } // Field 10: max_file_size_bytes if (_has_field_[10]) { - msg->AppendVarInt(10, max_file_size_bytes_); + ::protozero::internal::gen_helpers::SerializeVarInt(10, max_file_size_bytes_, msg); } // Field 11: guardrail_overrides @@ -24082,32 +27154,32 @@ void TraceConfig::Serialize(::protozero::Message* msg) const { // Field 12: deferred_start if (_has_field_[12]) { - msg->AppendTinyVarInt(12, deferred_start_); + ::protozero::internal::gen_helpers::SerializeTinyVarInt(12, deferred_start_, msg); } // Field 13: flush_period_ms if (_has_field_[13]) { - msg->AppendVarInt(13, flush_period_ms_); + ::protozero::internal::gen_helpers::SerializeVarInt(13, flush_period_ms_, msg); } // Field 14: flush_timeout_ms if (_has_field_[14]) { - msg->AppendVarInt(14, flush_timeout_ms_); + ::protozero::internal::gen_helpers::SerializeVarInt(14, flush_timeout_ms_, msg); } // Field 23: data_source_stop_timeout_ms if (_has_field_[23]) { - msg->AppendVarInt(23, data_source_stop_timeout_ms_); + ::protozero::internal::gen_helpers::SerializeVarInt(23, data_source_stop_timeout_ms_, msg); } // Field 16: notify_traceur if (_has_field_[16]) { - msg->AppendTinyVarInt(16, notify_traceur_); + ::protozero::internal::gen_helpers::SerializeTinyVarInt(16, notify_traceur_, msg); } // Field 30: bugreport_score if (_has_field_[30]) { - msg->AppendVarInt(30, bugreport_score_); + ::protozero::internal::gen_helpers::SerializeVarInt(30, bugreport_score_, msg); } // Field 17: trigger_config @@ -24117,7 +27189,7 @@ void TraceConfig::Serialize(::protozero::Message* msg) const { // Field 18: activate_triggers for (auto& it : activate_triggers_) { - msg->AppendString(18, it); + ::protozero::internal::gen_helpers::SerializeString(18, it, msg); } // Field 21: incremental_state_config @@ -24127,17 +27199,17 @@ void TraceConfig::Serialize(::protozero::Message* msg) const { // Field 19: allow_user_build_tracing if (_has_field_[19]) { - msg->AppendTinyVarInt(19, allow_user_build_tracing_); + ::protozero::internal::gen_helpers::SerializeTinyVarInt(19, allow_user_build_tracing_, msg); } // Field 22: unique_session_name if (_has_field_[22]) { - msg->AppendString(22, unique_session_name_); + ::protozero::internal::gen_helpers::SerializeString(22, unique_session_name_, msg); } // Field 24: compression_type if (_has_field_[24]) { - msg->AppendVarInt(24, compression_type_); + ::protozero::internal::gen_helpers::SerializeVarInt(24, compression_type_, msg); } // Field 25: incident_report_config @@ -24147,17 +27219,17 @@ void TraceConfig::Serialize(::protozero::Message* msg) const { // Field 31: statsd_logging if (_has_field_[31]) { - msg->AppendVarInt(31, statsd_logging_); + ::protozero::internal::gen_helpers::SerializeVarInt(31, statsd_logging_, msg); } // Field 27: trace_uuid_msb if (_has_field_[27]) { - msg->AppendVarInt(27, trace_uuid_msb_); + ::protozero::internal::gen_helpers::SerializeVarInt(27, trace_uuid_msb_, msg); } // Field 28: trace_uuid_lsb if (_has_field_[28]) { - msg->AppendVarInt(28, trace_uuid_lsb_); + ::protozero::internal::gen_helpers::SerializeVarInt(28, trace_uuid_lsb_, msg); } // Field 33: trace_filter @@ -24175,7 +27247,7 @@ void TraceConfig::Serialize(::protozero::Message* msg) const { (*cmd_trace_start_delay_).Serialize(msg->BeginNestedMessage<::protozero::Message>(35)); } - msg->AppendRawProtoBytes(unknown_fields_.data(), unknown_fields_.size()); + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); } @@ -24217,13 +27289,13 @@ bool TraceConfig_CmdTraceStartDelay::ParseFromArray(const void* raw, size_t size } std::string TraceConfig_CmdTraceStartDelay::SerializeAsString() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsString(); } std::vector TraceConfig_CmdTraceStartDelay::SerializeAsArray() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsArray(); } @@ -24231,15 +27303,15 @@ std::vector TraceConfig_CmdTraceStartDelay::SerializeAsArray() const { void TraceConfig_CmdTraceStartDelay::Serialize(::protozero::Message* msg) const { // Field 1: min_delay_ms if (_has_field_[1]) { - msg->AppendVarInt(1, min_delay_ms_); + ::protozero::internal::gen_helpers::SerializeVarInt(1, min_delay_ms_, msg); } // Field 2: max_delay_ms if (_has_field_[2]) { - msg->AppendVarInt(2, max_delay_ms_); + ::protozero::internal::gen_helpers::SerializeVarInt(2, max_delay_ms_, msg); } - msg->AppendRawProtoBytes(unknown_fields_.data(), unknown_fields_.size()); + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); } @@ -24269,10 +27341,10 @@ bool TraceConfig_AndroidReportConfig::ParseFromArray(const void* raw, size_t siz } switch (field.id()) { case 1 /* reporter_service_package */: - field.get(&reporter_service_package_); + ::protozero::internal::gen_helpers::DeserializeString(field, &reporter_service_package_); break; case 2 /* reporter_service_class */: - field.get(&reporter_service_class_); + ::protozero::internal::gen_helpers::DeserializeString(field, &reporter_service_class_); break; case 3 /* skip_report */: field.get(&skip_report_); @@ -24289,13 +27361,13 @@ bool TraceConfig_AndroidReportConfig::ParseFromArray(const void* raw, size_t siz } std::string TraceConfig_AndroidReportConfig::SerializeAsString() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsString(); } std::vector TraceConfig_AndroidReportConfig::SerializeAsArray() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsArray(); } @@ -24303,25 +27375,25 @@ std::vector TraceConfig_AndroidReportConfig::SerializeAsArray() const { void TraceConfig_AndroidReportConfig::Serialize(::protozero::Message* msg) const { // Field 1: reporter_service_package if (_has_field_[1]) { - msg->AppendString(1, reporter_service_package_); + ::protozero::internal::gen_helpers::SerializeString(1, reporter_service_package_, msg); } // Field 2: reporter_service_class if (_has_field_[2]) { - msg->AppendString(2, reporter_service_class_); + ::protozero::internal::gen_helpers::SerializeString(2, reporter_service_class_, msg); } // Field 3: skip_report if (_has_field_[3]) { - msg->AppendTinyVarInt(3, skip_report_); + ::protozero::internal::gen_helpers::SerializeTinyVarInt(3, skip_report_, msg); } // Field 4: use_pipe_in_framework_for_testing if (_has_field_[4]) { - msg->AppendTinyVarInt(4, use_pipe_in_framework_for_testing_); + ::protozero::internal::gen_helpers::SerializeTinyVarInt(4, use_pipe_in_framework_for_testing_, msg); } - msg->AppendRawProtoBytes(unknown_fields_.data(), unknown_fields_.size()); + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); } @@ -24359,13 +27431,13 @@ bool TraceConfig_TraceFilter::ParseFromArray(const void* raw, size_t size) { } std::string TraceConfig_TraceFilter::SerializeAsString() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsString(); } std::vector TraceConfig_TraceFilter::SerializeAsArray() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsArray(); } @@ -24373,10 +27445,10 @@ std::vector TraceConfig_TraceFilter::SerializeAsArray() const { void TraceConfig_TraceFilter::Serialize(::protozero::Message* msg) const { // Field 1: bytecode if (_has_field_[1]) { - msg->AppendString(1, bytecode_); + ::protozero::internal::gen_helpers::SerializeString(1, bytecode_, msg); } - msg->AppendRawProtoBytes(unknown_fields_.data(), unknown_fields_.size()); + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); } @@ -24407,10 +27479,10 @@ bool TraceConfig_IncidentReportConfig::ParseFromArray(const void* raw, size_t si } switch (field.id()) { case 1 /* destination_package */: - field.get(&destination_package_); + ::protozero::internal::gen_helpers::DeserializeString(field, &destination_package_); break; case 2 /* destination_class */: - field.get(&destination_class_); + ::protozero::internal::gen_helpers::DeserializeString(field, &destination_class_); break; case 3 /* privacy_level */: field.get(&privacy_level_); @@ -24430,13 +27502,13 @@ bool TraceConfig_IncidentReportConfig::ParseFromArray(const void* raw, size_t si } std::string TraceConfig_IncidentReportConfig::SerializeAsString() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsString(); } std::vector TraceConfig_IncidentReportConfig::SerializeAsArray() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsArray(); } @@ -24444,30 +27516,30 @@ std::vector TraceConfig_IncidentReportConfig::SerializeAsArray() const void TraceConfig_IncidentReportConfig::Serialize(::protozero::Message* msg) const { // Field 1: destination_package if (_has_field_[1]) { - msg->AppendString(1, destination_package_); + ::protozero::internal::gen_helpers::SerializeString(1, destination_package_, msg); } // Field 2: destination_class if (_has_field_[2]) { - msg->AppendString(2, destination_class_); + ::protozero::internal::gen_helpers::SerializeString(2, destination_class_, msg); } // Field 3: privacy_level if (_has_field_[3]) { - msg->AppendVarInt(3, privacy_level_); + ::protozero::internal::gen_helpers::SerializeVarInt(3, privacy_level_, msg); } // Field 5: skip_incidentd if (_has_field_[5]) { - msg->AppendTinyVarInt(5, skip_incidentd_); + ::protozero::internal::gen_helpers::SerializeTinyVarInt(5, skip_incidentd_, msg); } // Field 4: skip_dropbox if (_has_field_[4]) { - msg->AppendTinyVarInt(4, skip_dropbox_); + ::protozero::internal::gen_helpers::SerializeTinyVarInt(4, skip_dropbox_, msg); } - msg->AppendRawProtoBytes(unknown_fields_.data(), unknown_fields_.size()); + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); } @@ -24505,13 +27577,13 @@ bool TraceConfig_IncrementalStateConfig::ParseFromArray(const void* raw, size_t } std::string TraceConfig_IncrementalStateConfig::SerializeAsString() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsString(); } std::vector TraceConfig_IncrementalStateConfig::SerializeAsArray() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsArray(); } @@ -24519,10 +27591,10 @@ std::vector TraceConfig_IncrementalStateConfig::SerializeAsArray() cons void TraceConfig_IncrementalStateConfig::Serialize(::protozero::Message* msg) const { // Field 1: clear_period_ms if (_has_field_[1]) { - msg->AppendVarInt(1, clear_period_ms_); + ::protozero::internal::gen_helpers::SerializeVarInt(1, clear_period_ms_, msg); } - msg->AppendRawProtoBytes(unknown_fields_.data(), unknown_fields_.size()); + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); } @@ -24573,13 +27645,13 @@ bool TraceConfig_TriggerConfig::ParseFromArray(const void* raw, size_t size) { } std::string TraceConfig_TriggerConfig::SerializeAsString() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsString(); } std::vector TraceConfig_TriggerConfig::SerializeAsArray() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsArray(); } @@ -24587,7 +27659,7 @@ std::vector TraceConfig_TriggerConfig::SerializeAsArray() const { void TraceConfig_TriggerConfig::Serialize(::protozero::Message* msg) const { // Field 1: trigger_mode if (_has_field_[1]) { - msg->AppendVarInt(1, trigger_mode_); + ::protozero::internal::gen_helpers::SerializeVarInt(1, trigger_mode_, msg); } // Field 2: triggers @@ -24597,10 +27669,10 @@ void TraceConfig_TriggerConfig::Serialize(::protozero::Message* msg) const { // Field 3: trigger_timeout_ms if (_has_field_[3]) { - msg->AppendVarInt(3, trigger_timeout_ms_); + ::protozero::internal::gen_helpers::SerializeVarInt(3, trigger_timeout_ms_, msg); } - msg->AppendRawProtoBytes(unknown_fields_.data(), unknown_fields_.size()); + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); } @@ -24631,10 +27703,10 @@ bool TraceConfig_TriggerConfig_Trigger::ParseFromArray(const void* raw, size_t s } switch (field.id()) { case 1 /* name */: - field.get(&name_); + ::protozero::internal::gen_helpers::DeserializeString(field, &name_); break; case 2 /* producer_name_regex */: - field.get(&producer_name_regex_); + ::protozero::internal::gen_helpers::DeserializeString(field, &producer_name_regex_); break; case 3 /* stop_delay_ms */: field.get(&stop_delay_ms_); @@ -24654,13 +27726,13 @@ bool TraceConfig_TriggerConfig_Trigger::ParseFromArray(const void* raw, size_t s } std::string TraceConfig_TriggerConfig_Trigger::SerializeAsString() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsString(); } std::vector TraceConfig_TriggerConfig_Trigger::SerializeAsArray() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsArray(); } @@ -24668,30 +27740,30 @@ std::vector TraceConfig_TriggerConfig_Trigger::SerializeAsArray() const void TraceConfig_TriggerConfig_Trigger::Serialize(::protozero::Message* msg) const { // Field 1: name if (_has_field_[1]) { - msg->AppendString(1, name_); + ::protozero::internal::gen_helpers::SerializeString(1, name_, msg); } // Field 2: producer_name_regex if (_has_field_[2]) { - msg->AppendString(2, producer_name_regex_); + ::protozero::internal::gen_helpers::SerializeString(2, producer_name_regex_, msg); } // Field 3: stop_delay_ms if (_has_field_[3]) { - msg->AppendVarInt(3, stop_delay_ms_); + ::protozero::internal::gen_helpers::SerializeVarInt(3, stop_delay_ms_, msg); } // Field 4: max_per_24_h if (_has_field_[4]) { - msg->AppendVarInt(4, max_per_24_h_); + ::protozero::internal::gen_helpers::SerializeVarInt(4, max_per_24_h_, msg); } // Field 5: skip_probability if (_has_field_[5]) { - msg->AppendFixed(5, skip_probability_); + ::protozero::internal::gen_helpers::SerializeFixed(5, skip_probability_, msg); } - msg->AppendRawProtoBytes(unknown_fields_.data(), unknown_fields_.size()); + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); } @@ -24704,7 +27776,8 @@ TraceConfig_GuardrailOverrides& TraceConfig_GuardrailOverrides::operator=(TraceC bool TraceConfig_GuardrailOverrides::operator==(const TraceConfig_GuardrailOverrides& other) const { return unknown_fields_ == other.unknown_fields_ - && max_upload_per_day_bytes_ == other.max_upload_per_day_bytes_; + && max_upload_per_day_bytes_ == other.max_upload_per_day_bytes_ + && max_tracing_buffer_size_kb_ == other.max_tracing_buffer_size_kb_; } bool TraceConfig_GuardrailOverrides::ParseFromArray(const void* raw, size_t size) { @@ -24720,6 +27793,9 @@ bool TraceConfig_GuardrailOverrides::ParseFromArray(const void* raw, size_t size case 1 /* max_upload_per_day_bytes */: field.get(&max_upload_per_day_bytes_); break; + case 2 /* max_tracing_buffer_size_kb */: + field.get(&max_tracing_buffer_size_kb_); + break; default: field.SerializeAndAppendTo(&unknown_fields_); break; @@ -24729,13 +27805,13 @@ bool TraceConfig_GuardrailOverrides::ParseFromArray(const void* raw, size_t size } std::string TraceConfig_GuardrailOverrides::SerializeAsString() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsString(); } std::vector TraceConfig_GuardrailOverrides::SerializeAsArray() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsArray(); } @@ -24743,10 +27819,15 @@ std::vector TraceConfig_GuardrailOverrides::SerializeAsArray() const { void TraceConfig_GuardrailOverrides::Serialize(::protozero::Message* msg) const { // Field 1: max_upload_per_day_bytes if (_has_field_[1]) { - msg->AppendVarInt(1, max_upload_per_day_bytes_); + ::protozero::internal::gen_helpers::SerializeVarInt(1, max_upload_per_day_bytes_, msg); } - msg->AppendRawProtoBytes(unknown_fields_.data(), unknown_fields_.size()); + // Field 2: max_tracing_buffer_size_kb + if (_has_field_[2]) { + ::protozero::internal::gen_helpers::SerializeVarInt(2, max_tracing_buffer_size_kb_, msg); + } + + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); } @@ -24796,13 +27877,13 @@ bool TraceConfig_StatsdMetadata::ParseFromArray(const void* raw, size_t size) { } std::string TraceConfig_StatsdMetadata::SerializeAsString() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsString(); } std::vector TraceConfig_StatsdMetadata::SerializeAsArray() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsArray(); } @@ -24810,25 +27891,25 @@ std::vector TraceConfig_StatsdMetadata::SerializeAsArray() const { void TraceConfig_StatsdMetadata::Serialize(::protozero::Message* msg) const { // Field 1: triggering_alert_id if (_has_field_[1]) { - msg->AppendVarInt(1, triggering_alert_id_); + ::protozero::internal::gen_helpers::SerializeVarInt(1, triggering_alert_id_, msg); } // Field 2: triggering_config_uid if (_has_field_[2]) { - msg->AppendVarInt(2, triggering_config_uid_); + ::protozero::internal::gen_helpers::SerializeVarInt(2, triggering_config_uid_, msg); } // Field 3: triggering_config_id if (_has_field_[3]) { - msg->AppendVarInt(3, triggering_config_id_); + ::protozero::internal::gen_helpers::SerializeVarInt(3, triggering_config_id_, msg); } // Field 4: triggering_subscription_id if (_has_field_[4]) { - msg->AppendVarInt(4, triggering_subscription_id_); + ::protozero::internal::gen_helpers::SerializeVarInt(4, triggering_subscription_id_, msg); } - msg->AppendRawProtoBytes(unknown_fields_.data(), unknown_fields_.size()); + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); } @@ -24857,7 +27938,7 @@ bool TraceConfig_ProducerConfig::ParseFromArray(const void* raw, size_t size) { } switch (field.id()) { case 1 /* producer_name */: - field.get(&producer_name_); + ::protozero::internal::gen_helpers::DeserializeString(field, &producer_name_); break; case 2 /* shm_size_kb */: field.get(&shm_size_kb_); @@ -24874,13 +27955,13 @@ bool TraceConfig_ProducerConfig::ParseFromArray(const void* raw, size_t size) { } std::string TraceConfig_ProducerConfig::SerializeAsString() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsString(); } std::vector TraceConfig_ProducerConfig::SerializeAsArray() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsArray(); } @@ -24888,20 +27969,20 @@ std::vector TraceConfig_ProducerConfig::SerializeAsArray() const { void TraceConfig_ProducerConfig::Serialize(::protozero::Message* msg) const { // Field 1: producer_name if (_has_field_[1]) { - msg->AppendString(1, producer_name_); + ::protozero::internal::gen_helpers::SerializeString(1, producer_name_, msg); } // Field 2: shm_size_kb if (_has_field_[2]) { - msg->AppendVarInt(2, shm_size_kb_); + ::protozero::internal::gen_helpers::SerializeVarInt(2, shm_size_kb_, msg); } // Field 3: page_size_kb if (_has_field_[3]) { - msg->AppendVarInt(3, page_size_kb_); + ::protozero::internal::gen_helpers::SerializeVarInt(3, page_size_kb_, msg); } - msg->AppendRawProtoBytes(unknown_fields_.data(), unknown_fields_.size()); + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); } @@ -24920,7 +28001,8 @@ bool TraceConfig_BuiltinDataSource::operator==(const TraceConfig_BuiltinDataSour && disable_service_events_ == other.disable_service_events_ && primary_trace_clock_ == other.primary_trace_clock_ && snapshot_interval_ms_ == other.snapshot_interval_ms_ - && prefer_suspend_clock_for_snapshot_ == other.prefer_suspend_clock_for_snapshot_; + && prefer_suspend_clock_for_snapshot_ == other.prefer_suspend_clock_for_snapshot_ + && disable_chunk_usage_histograms_ == other.disable_chunk_usage_histograms_; } bool TraceConfig_BuiltinDataSource::ParseFromArray(const void* raw, size_t size) { @@ -24954,6 +28036,9 @@ bool TraceConfig_BuiltinDataSource::ParseFromArray(const void* raw, size_t size) case 7 /* prefer_suspend_clock_for_snapshot */: field.get(&prefer_suspend_clock_for_snapshot_); break; + case 8 /* disable_chunk_usage_histograms */: + field.get(&disable_chunk_usage_histograms_); + break; default: field.SerializeAndAppendTo(&unknown_fields_); break; @@ -24963,13 +28048,13 @@ bool TraceConfig_BuiltinDataSource::ParseFromArray(const void* raw, size_t size) } std::string TraceConfig_BuiltinDataSource::SerializeAsString() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsString(); } std::vector TraceConfig_BuiltinDataSource::SerializeAsArray() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsArray(); } @@ -24977,40 +28062,45 @@ std::vector TraceConfig_BuiltinDataSource::SerializeAsArray() const { void TraceConfig_BuiltinDataSource::Serialize(::protozero::Message* msg) const { // Field 1: disable_clock_snapshotting if (_has_field_[1]) { - msg->AppendTinyVarInt(1, disable_clock_snapshotting_); + ::protozero::internal::gen_helpers::SerializeTinyVarInt(1, disable_clock_snapshotting_, msg); } // Field 2: disable_trace_config if (_has_field_[2]) { - msg->AppendTinyVarInt(2, disable_trace_config_); + ::protozero::internal::gen_helpers::SerializeTinyVarInt(2, disable_trace_config_, msg); } // Field 3: disable_system_info if (_has_field_[3]) { - msg->AppendTinyVarInt(3, disable_system_info_); + ::protozero::internal::gen_helpers::SerializeTinyVarInt(3, disable_system_info_, msg); } // Field 4: disable_service_events if (_has_field_[4]) { - msg->AppendTinyVarInt(4, disable_service_events_); + ::protozero::internal::gen_helpers::SerializeTinyVarInt(4, disable_service_events_, msg); } // Field 5: primary_trace_clock if (_has_field_[5]) { - msg->AppendVarInt(5, primary_trace_clock_); + ::protozero::internal::gen_helpers::SerializeVarInt(5, primary_trace_clock_, msg); } // Field 6: snapshot_interval_ms if (_has_field_[6]) { - msg->AppendVarInt(6, snapshot_interval_ms_); + ::protozero::internal::gen_helpers::SerializeVarInt(6, snapshot_interval_ms_, msg); } // Field 7: prefer_suspend_clock_for_snapshot if (_has_field_[7]) { - msg->AppendTinyVarInt(7, prefer_suspend_clock_for_snapshot_); + ::protozero::internal::gen_helpers::SerializeTinyVarInt(7, prefer_suspend_clock_for_snapshot_, msg); } - msg->AppendRawProtoBytes(unknown_fields_.data(), unknown_fields_.size()); + // Field 8: disable_chunk_usage_histograms + if (_has_field_[8]) { + ::protozero::internal::gen_helpers::SerializeTinyVarInt(8, disable_chunk_usage_histograms_, msg); + } + + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); } @@ -25045,11 +28135,11 @@ bool TraceConfig_DataSource::ParseFromArray(const void* raw, size_t size) { break; case 2 /* producer_name_filter */: producer_name_filter_.emplace_back(); - field.get(&producer_name_filter_.back()); + ::protozero::internal::gen_helpers::DeserializeString(field, &producer_name_filter_.back()); break; case 3 /* producer_name_regex_filter */: producer_name_regex_filter_.emplace_back(); - field.get(&producer_name_regex_filter_.back()); + ::protozero::internal::gen_helpers::DeserializeString(field, &producer_name_regex_filter_.back()); break; default: field.SerializeAndAppendTo(&unknown_fields_); @@ -25060,13 +28150,13 @@ bool TraceConfig_DataSource::ParseFromArray(const void* raw, size_t size) { } std::string TraceConfig_DataSource::SerializeAsString() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsString(); } std::vector TraceConfig_DataSource::SerializeAsArray() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsArray(); } @@ -25079,15 +28169,15 @@ void TraceConfig_DataSource::Serialize(::protozero::Message* msg) const { // Field 2: producer_name_filter for (auto& it : producer_name_filter_) { - msg->AppendString(2, it); + ::protozero::internal::gen_helpers::SerializeString(2, it, msg); } // Field 3: producer_name_regex_filter for (auto& it : producer_name_regex_filter_) { - msg->AppendString(3, it); + ::protozero::internal::gen_helpers::SerializeString(3, it, msg); } - msg->AppendRawProtoBytes(unknown_fields_.data(), unknown_fields_.size()); + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); } @@ -25129,13 +28219,13 @@ bool TraceConfig_BufferConfig::ParseFromArray(const void* raw, size_t size) { } std::string TraceConfig_BufferConfig::SerializeAsString() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsString(); } std::vector TraceConfig_BufferConfig::SerializeAsArray() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsArray(); } @@ -25143,15 +28233,15 @@ std::vector TraceConfig_BufferConfig::SerializeAsArray() const { void TraceConfig_BufferConfig::Serialize(::protozero::Message* msg) const { // Field 1: size_kb if (_has_field_[1]) { - msg->AppendVarInt(1, size_kb_); + ::protozero::internal::gen_helpers::SerializeVarInt(1, size_kb_, msg); } // Field 4: fill_policy if (_has_field_[4]) { - msg->AppendVarInt(4, fill_policy_); + ::protozero::internal::gen_helpers::SerializeVarInt(4, fill_policy_, msg); } - msg->AppendRawProtoBytes(unknown_fields_.data(), unknown_fields_.size()); + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); } } // namespace perfetto @@ -25192,6 +28282,26 @@ void TraceConfig_BufferConfig::Serialize(::protozero::Message* msg) const { // Intentionally empty (crbug.com/998165) // gen_amalgamated begin source: gen/protos/perfetto/common/track_event_descriptor.pbzero.cc // Intentionally empty (crbug.com/998165) +// gen_amalgamated begin source: gen/protos/perfetto/trace/android/android_game_intervention_list.pbzero.cc +// Intentionally empty (crbug.com/998165) +// gen_amalgamated begin source: gen/protos/perfetto/trace/android/android_log.pbzero.cc +// Intentionally empty (crbug.com/998165) +// gen_amalgamated begin source: gen/protos/perfetto/trace/android/android_system_property.pbzero.cc +// Intentionally empty (crbug.com/998165) +// gen_amalgamated begin source: gen/protos/perfetto/trace/android/camera_event.pbzero.cc +// Intentionally empty (crbug.com/998165) +// gen_amalgamated begin source: gen/protos/perfetto/trace/android/frame_timeline_event.pbzero.cc +// Intentionally empty (crbug.com/998165) +// gen_amalgamated begin source: gen/protos/perfetto/trace/android/gpu_mem_event.pbzero.cc +// Intentionally empty (crbug.com/998165) +// gen_amalgamated begin source: gen/protos/perfetto/trace/android/graphics_frame_event.pbzero.cc +// Intentionally empty (crbug.com/998165) +// gen_amalgamated begin source: gen/protos/perfetto/trace/android/initial_display_state.pbzero.cc +// Intentionally empty (crbug.com/998165) +// gen_amalgamated begin source: gen/protos/perfetto/trace/android/network_trace.pbzero.cc +// Intentionally empty (crbug.com/998165) +// gen_amalgamated begin source: gen/protos/perfetto/trace/android/packages_list.pbzero.cc +// Intentionally empty (crbug.com/998165) // gen_amalgamated begin source: gen/protos/perfetto/trace/gpu/gpu_counter_event.pbzero.cc // Intentionally empty (crbug.com/998165) // gen_amalgamated begin source: gen/protos/perfetto/trace/gpu/gpu_log.pbzero.cc @@ -25212,6 +28322,8 @@ void TraceConfig_BufferConfig::Serialize(::protozero::Message* msg) const { // Intentionally empty (crbug.com/998165) // gen_amalgamated begin source: gen/protos/perfetto/trace/profiling/smaps.pbzero.cc // Intentionally empty (crbug.com/998165) +// gen_amalgamated begin source: gen/protos/perfetto/trace/track_event/chrome_active_processes.pbzero.cc +// Intentionally empty (crbug.com/998165) // gen_amalgamated begin source: gen/protos/perfetto/trace/track_event/chrome_application_state_info.pbzero.cc // Intentionally empty (crbug.com/998165) // gen_amalgamated begin source: gen/protos/perfetto/trace/track_event/chrome_compositor_scheduler_state.pbzero.cc @@ -25250,6 +28362,8 @@ void TraceConfig_BufferConfig::Serialize(::protozero::Message* msg) const { // Intentionally empty (crbug.com/998165) // gen_amalgamated begin source: gen/protos/perfetto/trace/track_event/process_descriptor.pbzero.cc // Intentionally empty (crbug.com/998165) +// gen_amalgamated begin source: gen/protos/perfetto/trace/track_event/range_of_interest.pbzero.cc +// Intentionally empty (crbug.com/998165) // gen_amalgamated begin source: gen/protos/perfetto/trace/track_event/source_location.pbzero.cc // Intentionally empty (crbug.com/998165) // gen_amalgamated begin source: gen/protos/perfetto/trace/track_event/task_execution.pbzero.cc @@ -25262,6 +28376,158 @@ void TraceConfig_BufferConfig::Serialize(::protozero::Message* msg) const { // Intentionally empty (crbug.com/998165) // gen_amalgamated begin source: gen/protos/perfetto/trace/interned_data/interned_data.pbzero.cc // Intentionally empty (crbug.com/998165) +// gen_amalgamated begin source: gen/protos/perfetto/trace/track_event/chrome_active_processes.gen.cc +// gen_amalgamated begin header: gen/protos/perfetto/trace/track_event/chrome_active_processes.gen.h +// DO NOT EDIT. Autogenerated by Perfetto cppgen_plugin +#ifndef PERFETTO_PROTOS_PROTOS_PERFETTO_TRACE_TRACK_EVENT_CHROME_ACTIVE_PROCESSES_PROTO_CPP_H_ +#define PERFETTO_PROTOS_PROTOS_PERFETTO_TRACE_TRACK_EVENT_CHROME_ACTIVE_PROCESSES_PROTO_CPP_H_ + +#include +#include +#include +#include +#include + +// gen_amalgamated expanded: #include "perfetto/protozero/cpp_message_obj.h" +// gen_amalgamated expanded: #include "perfetto/protozero/copyable_ptr.h" +// gen_amalgamated expanded: #include "perfetto/base/export.h" + +namespace perfetto { +namespace protos { +namespace gen { +class ChromeActiveProcesses; +} // namespace perfetto +} // namespace protos +} // namespace gen + +namespace protozero { +class Message; +} // namespace protozero + +namespace perfetto { +namespace protos { +namespace gen { + +class PERFETTO_EXPORT_COMPONENT ChromeActiveProcesses : public ::protozero::CppMessageObj { + public: + enum FieldNumbers { + kPidFieldNumber = 1, + }; + + ChromeActiveProcesses(); + ~ChromeActiveProcesses() override; + ChromeActiveProcesses(ChromeActiveProcesses&&) noexcept; + ChromeActiveProcesses& operator=(ChromeActiveProcesses&&); + ChromeActiveProcesses(const ChromeActiveProcesses&); + ChromeActiveProcesses& operator=(const ChromeActiveProcesses&); + bool operator==(const ChromeActiveProcesses&) const; + bool operator!=(const ChromeActiveProcesses& other) const { return !(*this == other); } + + bool ParseFromArray(const void*, size_t) override; + std::string SerializeAsString() const override; + std::vector SerializeAsArray() const override; + void Serialize(::protozero::Message*) const; + + const std::vector& pid() const { return pid_; } + std::vector* mutable_pid() { return &pid_; } + int pid_size() const { return static_cast(pid_.size()); } + void clear_pid() { pid_.clear(); } + void add_pid(int32_t value) { pid_.emplace_back(value); } + int32_t* add_pid() { pid_.emplace_back(); return &pid_.back(); } + + private: + std::vector pid_; + + // Allows to preserve unknown protobuf fields for compatibility + // with future versions of .proto files. + std::string unknown_fields_; + + std::bitset<2> _has_field_{}; +}; + +} // namespace perfetto +} // namespace protos +} // namespace gen + +#endif // PERFETTO_PROTOS_PROTOS_PERFETTO_TRACE_TRACK_EVENT_CHROME_ACTIVE_PROCESSES_PROTO_CPP_H_ +// gen_amalgamated expanded: #include "perfetto/protozero/gen_field_helpers.h" +// gen_amalgamated expanded: #include "perfetto/protozero/message.h" +// gen_amalgamated expanded: #include "perfetto/protozero/packed_repeated_fields.h" +// gen_amalgamated expanded: #include "perfetto/protozero/proto_decoder.h" +// gen_amalgamated expanded: #include "perfetto/protozero/scattered_heap_buffer.h" +// DO NOT EDIT. Autogenerated by Perfetto cppgen_plugin +#if defined(__GNUC__) || defined(__clang__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wfloat-equal" +#endif +// gen_amalgamated expanded: #include "protos/perfetto/trace/track_event/chrome_active_processes.gen.h" + +namespace perfetto { +namespace protos { +namespace gen { + +ChromeActiveProcesses::ChromeActiveProcesses() = default; +ChromeActiveProcesses::~ChromeActiveProcesses() = default; +ChromeActiveProcesses::ChromeActiveProcesses(const ChromeActiveProcesses&) = default; +ChromeActiveProcesses& ChromeActiveProcesses::operator=(const ChromeActiveProcesses&) = default; +ChromeActiveProcesses::ChromeActiveProcesses(ChromeActiveProcesses&&) noexcept = default; +ChromeActiveProcesses& ChromeActiveProcesses::operator=(ChromeActiveProcesses&&) = default; + +bool ChromeActiveProcesses::operator==(const ChromeActiveProcesses& other) const { + return unknown_fields_ == other.unknown_fields_ + && pid_ == other.pid_; +} + +bool ChromeActiveProcesses::ParseFromArray(const void* raw, size_t size) { + pid_.clear(); + unknown_fields_.clear(); + bool packed_error = false; + + ::protozero::ProtoDecoder dec(raw, size); + for (auto field = dec.ReadField(); field.valid(); field = dec.ReadField()) { + if (field.id() < _has_field_.size()) { + _has_field_.set(field.id()); + } + switch (field.id()) { + case 1 /* pid */: + pid_.emplace_back(); + field.get(&pid_.back()); + break; + default: + field.SerializeAndAppendTo(&unknown_fields_); + break; + } + } + return !packed_error && !dec.bytes_left(); +} + +std::string ChromeActiveProcesses::SerializeAsString() const { + ::protozero::internal::gen_helpers::MessageSerializer msg; + Serialize(msg.get()); + return msg.SerializeAsString(); +} + +std::vector ChromeActiveProcesses::SerializeAsArray() const { + ::protozero::internal::gen_helpers::MessageSerializer msg; + Serialize(msg.get()); + return msg.SerializeAsArray(); +} + +void ChromeActiveProcesses::Serialize(::protozero::Message* msg) const { + // Field 1: pid + for (auto& it : pid_) { + ::protozero::internal::gen_helpers::SerializeVarInt(1, it, msg); + } + + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); +} + +} // namespace perfetto +} // namespace protos +} // namespace gen +#if defined(__GNUC__) || defined(__clang__) +#pragma GCC diagnostic pop +#endif // gen_amalgamated begin source: gen/protos/perfetto/trace/track_event/chrome_application_state_info.gen.cc // gen_amalgamated begin header: gen/protos/perfetto/trace/track_event/chrome_application_state_info.gen.h // DO NOT EDIT. Autogenerated by Perfetto cppgen_plugin @@ -25349,6 +28615,7 @@ class PERFETTO_EXPORT_COMPONENT ChromeApplicationStateInfo : public ::protozero: } // namespace gen #endif // PERFETTO_PROTOS_PROTOS_PERFETTO_TRACE_TRACK_EVENT_CHROME_APPLICATION_STATE_INFO_PROTO_CPP_H_ +// gen_amalgamated expanded: #include "perfetto/protozero/gen_field_helpers.h" // gen_amalgamated expanded: #include "perfetto/protozero/message.h" // gen_amalgamated expanded: #include "perfetto/protozero/packed_repeated_fields.h" // gen_amalgamated expanded: #include "perfetto/protozero/proto_decoder.h" @@ -25398,13 +28665,13 @@ bool ChromeApplicationStateInfo::ParseFromArray(const void* raw, size_t size) { } std::string ChromeApplicationStateInfo::SerializeAsString() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsString(); } std::vector ChromeApplicationStateInfo::SerializeAsArray() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsArray(); } @@ -25412,10 +28679,10 @@ std::vector ChromeApplicationStateInfo::SerializeAsArray() const { void ChromeApplicationStateInfo::Serialize(::protozero::Message* msg) const { // Field 1: application_state if (_has_field_[1]) { - msg->AppendVarInt(1, application_state_); + ::protozero::internal::gen_helpers::SerializeVarInt(1, application_state_, msg); } - msg->AppendRawProtoBytes(unknown_fields_.data(), unknown_fields_.size()); + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); } } // namespace perfetto @@ -26676,6 +29943,7 @@ class PERFETTO_EXPORT_COMPONENT UnsymbolizedSourceLocation : public ::protozero: } // namespace gen #endif // PERFETTO_PROTOS_PROTOS_PERFETTO_TRACE_TRACK_EVENT_SOURCE_LOCATION_PROTO_CPP_H_ +// gen_amalgamated expanded: #include "perfetto/protozero/gen_field_helpers.h" // gen_amalgamated expanded: #include "perfetto/protozero/message.h" // gen_amalgamated expanded: #include "perfetto/protozero/packed_repeated_fields.h" // gen_amalgamated expanded: #include "perfetto/protozero/proto_decoder.h" @@ -26750,13 +30018,13 @@ bool CompositorTimingHistory::ParseFromArray(const void* raw, size_t size) { } std::string CompositorTimingHistory::SerializeAsString() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsString(); } std::vector CompositorTimingHistory::SerializeAsArray() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsArray(); } @@ -26764,40 +30032,40 @@ std::vector CompositorTimingHistory::SerializeAsArray() const { void CompositorTimingHistory::Serialize(::protozero::Message* msg) const { // Field 1: begin_main_frame_queue_critical_estimate_delta_us if (_has_field_[1]) { - msg->AppendVarInt(1, begin_main_frame_queue_critical_estimate_delta_us_); + ::protozero::internal::gen_helpers::SerializeVarInt(1, begin_main_frame_queue_critical_estimate_delta_us_, msg); } // Field 2: begin_main_frame_queue_not_critical_estimate_delta_us if (_has_field_[2]) { - msg->AppendVarInt(2, begin_main_frame_queue_not_critical_estimate_delta_us_); + ::protozero::internal::gen_helpers::SerializeVarInt(2, begin_main_frame_queue_not_critical_estimate_delta_us_, msg); } // Field 3: begin_main_frame_start_to_ready_to_commit_estimate_delta_us if (_has_field_[3]) { - msg->AppendVarInt(3, begin_main_frame_start_to_ready_to_commit_estimate_delta_us_); + ::protozero::internal::gen_helpers::SerializeVarInt(3, begin_main_frame_start_to_ready_to_commit_estimate_delta_us_, msg); } // Field 4: commit_to_ready_to_activate_estimate_delta_us if (_has_field_[4]) { - msg->AppendVarInt(4, commit_to_ready_to_activate_estimate_delta_us_); + ::protozero::internal::gen_helpers::SerializeVarInt(4, commit_to_ready_to_activate_estimate_delta_us_, msg); } // Field 5: prepare_tiles_estimate_delta_us if (_has_field_[5]) { - msg->AppendVarInt(5, prepare_tiles_estimate_delta_us_); + ::protozero::internal::gen_helpers::SerializeVarInt(5, prepare_tiles_estimate_delta_us_, msg); } // Field 6: activate_estimate_delta_us if (_has_field_[6]) { - msg->AppendVarInt(6, activate_estimate_delta_us_); + ::protozero::internal::gen_helpers::SerializeVarInt(6, activate_estimate_delta_us_, msg); } // Field 7: draw_estimate_delta_us if (_has_field_[7]) { - msg->AppendVarInt(7, draw_estimate_delta_us_); + ::protozero::internal::gen_helpers::SerializeVarInt(7, draw_estimate_delta_us_, msg); } - msg->AppendRawProtoBytes(unknown_fields_.data(), unknown_fields_.size()); + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); } @@ -26847,13 +30115,13 @@ bool BeginFrameSourceState::ParseFromArray(const void* raw, size_t size) { } std::string BeginFrameSourceState::SerializeAsString() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsString(); } std::vector BeginFrameSourceState::SerializeAsArray() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsArray(); } @@ -26861,17 +30129,17 @@ std::vector BeginFrameSourceState::SerializeAsArray() const { void BeginFrameSourceState::Serialize(::protozero::Message* msg) const { // Field 1: source_id if (_has_field_[1]) { - msg->AppendVarInt(1, source_id_); + ::protozero::internal::gen_helpers::SerializeVarInt(1, source_id_, msg); } // Field 2: paused if (_has_field_[2]) { - msg->AppendTinyVarInt(2, paused_); + ::protozero::internal::gen_helpers::SerializeTinyVarInt(2, paused_, msg); } // Field 3: num_observers if (_has_field_[3]) { - msg->AppendVarInt(3, num_observers_); + ::protozero::internal::gen_helpers::SerializeVarInt(3, num_observers_, msg); } // Field 4: last_begin_frame_args @@ -26879,7 +30147,7 @@ void BeginFrameSourceState::Serialize(::protozero::Message* msg) const { (*last_begin_frame_args_).Serialize(msg->BeginNestedMessage<::protozero::Message>(4)); } - msg->AppendRawProtoBytes(unknown_fields_.data(), unknown_fields_.size()); + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); } @@ -26957,13 +30225,13 @@ bool BeginFrameArgs::ParseFromArray(const void* raw, size_t size) { } std::string BeginFrameArgs::SerializeAsString() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsString(); } std::vector BeginFrameArgs::SerializeAsArray() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsArray(); } @@ -26971,47 +30239,47 @@ std::vector BeginFrameArgs::SerializeAsArray() const { void BeginFrameArgs::Serialize(::protozero::Message* msg) const { // Field 1: type if (_has_field_[1]) { - msg->AppendVarInt(1, type_); + ::protozero::internal::gen_helpers::SerializeVarInt(1, type_, msg); } // Field 2: source_id if (_has_field_[2]) { - msg->AppendVarInt(2, source_id_); + ::protozero::internal::gen_helpers::SerializeVarInt(2, source_id_, msg); } // Field 3: sequence_number if (_has_field_[3]) { - msg->AppendVarInt(3, sequence_number_); + ::protozero::internal::gen_helpers::SerializeVarInt(3, sequence_number_, msg); } // Field 4: frame_time_us if (_has_field_[4]) { - msg->AppendVarInt(4, frame_time_us_); + ::protozero::internal::gen_helpers::SerializeVarInt(4, frame_time_us_, msg); } // Field 5: deadline_us if (_has_field_[5]) { - msg->AppendVarInt(5, deadline_us_); + ::protozero::internal::gen_helpers::SerializeVarInt(5, deadline_us_, msg); } // Field 6: interval_delta_us if (_has_field_[6]) { - msg->AppendVarInt(6, interval_delta_us_); + ::protozero::internal::gen_helpers::SerializeVarInt(6, interval_delta_us_, msg); } // Field 7: on_critical_path if (_has_field_[7]) { - msg->AppendTinyVarInt(7, on_critical_path_); + ::protozero::internal::gen_helpers::SerializeTinyVarInt(7, on_critical_path_, msg); } // Field 8: animate_only if (_has_field_[8]) { - msg->AppendTinyVarInt(8, animate_only_); + ::protozero::internal::gen_helpers::SerializeTinyVarInt(8, animate_only_, msg); } // Field 9: source_location_iid if (_has_field_[9]) { - msg->AppendVarInt(9, source_location_iid_); + ::protozero::internal::gen_helpers::SerializeVarInt(9, source_location_iid_, msg); } // Field 10: source_location @@ -27021,10 +30289,10 @@ void BeginFrameArgs::Serialize(::protozero::Message* msg) const { // Field 12: frames_throttled_since_last if (_has_field_[12]) { - msg->AppendVarInt(12, frames_throttled_since_last_); + ::protozero::internal::gen_helpers::SerializeVarInt(12, frames_throttled_since_last_, msg); } - msg->AppendRawProtoBytes(unknown_fields_.data(), unknown_fields_.size()); + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); } @@ -27066,13 +30334,13 @@ bool BeginFrameObserverState::ParseFromArray(const void* raw, size_t size) { } std::string BeginFrameObserverState::SerializeAsString() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsString(); } std::vector BeginFrameObserverState::SerializeAsArray() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsArray(); } @@ -27080,7 +30348,7 @@ std::vector BeginFrameObserverState::SerializeAsArray() const { void BeginFrameObserverState::Serialize(::protozero::Message* msg) const { // Field 1: dropped_begin_frame_args if (_has_field_[1]) { - msg->AppendVarInt(1, dropped_begin_frame_args_); + ::protozero::internal::gen_helpers::SerializeVarInt(1, dropped_begin_frame_args_, msg); } // Field 2: last_begin_frame_args @@ -27088,7 +30356,7 @@ void BeginFrameObserverState::Serialize(::protozero::Message* msg) const { (*last_begin_frame_args_).Serialize(msg->BeginNestedMessage<::protozero::Message>(2)); } - msg->AppendRawProtoBytes(unknown_fields_.data(), unknown_fields_.size()); + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); } @@ -27146,13 +30414,13 @@ bool BeginImplFrameArgs::ParseFromArray(const void* raw, size_t size) { } std::string BeginImplFrameArgs::SerializeAsString() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsString(); } std::vector BeginImplFrameArgs::SerializeAsArray() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsArray(); } @@ -27160,17 +30428,17 @@ std::vector BeginImplFrameArgs::SerializeAsArray() const { void BeginImplFrameArgs::Serialize(::protozero::Message* msg) const { // Field 1: updated_at_us if (_has_field_[1]) { - msg->AppendVarInt(1, updated_at_us_); + ::protozero::internal::gen_helpers::SerializeVarInt(1, updated_at_us_, msg); } // Field 2: finished_at_us if (_has_field_[2]) { - msg->AppendVarInt(2, finished_at_us_); + ::protozero::internal::gen_helpers::SerializeVarInt(2, finished_at_us_, msg); } // Field 3: state if (_has_field_[3]) { - msg->AppendVarInt(3, state_); + ::protozero::internal::gen_helpers::SerializeVarInt(3, state_, msg); } // Field 4: current_args @@ -27188,7 +30456,7 @@ void BeginImplFrameArgs::Serialize(::protozero::Message* msg) const { (*timestamps_in_us_).Serialize(msg->BeginNestedMessage<::protozero::Message>(6)); } - msg->AppendRawProtoBytes(unknown_fields_.data(), unknown_fields_.size()); + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); } @@ -27250,13 +30518,13 @@ bool BeginImplFrameArgs_TimestampsInUs::ParseFromArray(const void* raw, size_t s } std::string BeginImplFrameArgs_TimestampsInUs::SerializeAsString() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsString(); } std::vector BeginImplFrameArgs_TimestampsInUs::SerializeAsArray() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsArray(); } @@ -27264,40 +30532,40 @@ std::vector BeginImplFrameArgs_TimestampsInUs::SerializeAsArray() const void BeginImplFrameArgs_TimestampsInUs::Serialize(::protozero::Message* msg) const { // Field 1: interval_delta if (_has_field_[1]) { - msg->AppendVarInt(1, interval_delta_); + ::protozero::internal::gen_helpers::SerializeVarInt(1, interval_delta_, msg); } // Field 2: now_to_deadline_delta if (_has_field_[2]) { - msg->AppendVarInt(2, now_to_deadline_delta_); + ::protozero::internal::gen_helpers::SerializeVarInt(2, now_to_deadline_delta_, msg); } // Field 3: frame_time_to_now_delta if (_has_field_[3]) { - msg->AppendVarInt(3, frame_time_to_now_delta_); + ::protozero::internal::gen_helpers::SerializeVarInt(3, frame_time_to_now_delta_, msg); } // Field 4: frame_time_to_deadline_delta if (_has_field_[4]) { - msg->AppendVarInt(4, frame_time_to_deadline_delta_); + ::protozero::internal::gen_helpers::SerializeVarInt(4, frame_time_to_deadline_delta_, msg); } // Field 5: now if (_has_field_[5]) { - msg->AppendVarInt(5, now_); + ::protozero::internal::gen_helpers::SerializeVarInt(5, now_, msg); } // Field 6: frame_time if (_has_field_[6]) { - msg->AppendVarInt(6, frame_time_); + ::protozero::internal::gen_helpers::SerializeVarInt(6, frame_time_, msg); } // Field 7: deadline if (_has_field_[7]) { - msg->AppendVarInt(7, deadline_); + ::protozero::internal::gen_helpers::SerializeVarInt(7, deadline_, msg); } - msg->AppendRawProtoBytes(unknown_fields_.data(), unknown_fields_.size()); + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); } @@ -27339,13 +30607,13 @@ bool ChromeCompositorStateMachine::ParseFromArray(const void* raw, size_t size) } std::string ChromeCompositorStateMachine::SerializeAsString() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsString(); } std::vector ChromeCompositorStateMachine::SerializeAsArray() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsArray(); } @@ -27361,7 +30629,7 @@ void ChromeCompositorStateMachine::Serialize(::protozero::Message* msg) const { (*minor_state_).Serialize(msg->BeginNestedMessage<::protozero::Message>(2)); } - msg->AppendRawProtoBytes(unknown_fields_.data(), unknown_fields_.size()); + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); } @@ -27575,13 +30843,13 @@ bool ChromeCompositorStateMachine_MinorState::ParseFromArray(const void* raw, si } std::string ChromeCompositorStateMachine_MinorState::SerializeAsString() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsString(); } std::vector ChromeCompositorStateMachine_MinorState::SerializeAsArray() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsArray(); } @@ -27589,230 +30857,230 @@ std::vector ChromeCompositorStateMachine_MinorState::SerializeAsArray() void ChromeCompositorStateMachine_MinorState::Serialize(::protozero::Message* msg) const { // Field 1: commit_count if (_has_field_[1]) { - msg->AppendVarInt(1, commit_count_); + ::protozero::internal::gen_helpers::SerializeVarInt(1, commit_count_, msg); } // Field 2: current_frame_number if (_has_field_[2]) { - msg->AppendVarInt(2, current_frame_number_); + ::protozero::internal::gen_helpers::SerializeVarInt(2, current_frame_number_, msg); } // Field 3: last_frame_number_submit_performed if (_has_field_[3]) { - msg->AppendVarInt(3, last_frame_number_submit_performed_); + ::protozero::internal::gen_helpers::SerializeVarInt(3, last_frame_number_submit_performed_, msg); } // Field 4: last_frame_number_draw_performed if (_has_field_[4]) { - msg->AppendVarInt(4, last_frame_number_draw_performed_); + ::protozero::internal::gen_helpers::SerializeVarInt(4, last_frame_number_draw_performed_, msg); } // Field 5: last_frame_number_begin_main_frame_sent if (_has_field_[5]) { - msg->AppendVarInt(5, last_frame_number_begin_main_frame_sent_); + ::protozero::internal::gen_helpers::SerializeVarInt(5, last_frame_number_begin_main_frame_sent_, msg); } // Field 6: did_draw if (_has_field_[6]) { - msg->AppendTinyVarInt(6, did_draw_); + ::protozero::internal::gen_helpers::SerializeTinyVarInt(6, did_draw_, msg); } // Field 7: did_send_begin_main_frame_for_current_frame if (_has_field_[7]) { - msg->AppendTinyVarInt(7, did_send_begin_main_frame_for_current_frame_); + ::protozero::internal::gen_helpers::SerializeTinyVarInt(7, did_send_begin_main_frame_for_current_frame_, msg); } // Field 8: did_notify_begin_main_frame_not_expected_until if (_has_field_[8]) { - msg->AppendTinyVarInt(8, did_notify_begin_main_frame_not_expected_until_); + ::protozero::internal::gen_helpers::SerializeTinyVarInt(8, did_notify_begin_main_frame_not_expected_until_, msg); } // Field 9: did_notify_begin_main_frame_not_expected_soon if (_has_field_[9]) { - msg->AppendTinyVarInt(9, did_notify_begin_main_frame_not_expected_soon_); + ::protozero::internal::gen_helpers::SerializeTinyVarInt(9, did_notify_begin_main_frame_not_expected_soon_, msg); } // Field 10: wants_begin_main_frame_not_expected if (_has_field_[10]) { - msg->AppendTinyVarInt(10, wants_begin_main_frame_not_expected_); + ::protozero::internal::gen_helpers::SerializeTinyVarInt(10, wants_begin_main_frame_not_expected_, msg); } // Field 11: did_commit_during_frame if (_has_field_[11]) { - msg->AppendTinyVarInt(11, did_commit_during_frame_); + ::protozero::internal::gen_helpers::SerializeTinyVarInt(11, did_commit_during_frame_, msg); } // Field 12: did_invalidate_layer_tree_frame_sink if (_has_field_[12]) { - msg->AppendTinyVarInt(12, did_invalidate_layer_tree_frame_sink_); + ::protozero::internal::gen_helpers::SerializeTinyVarInt(12, did_invalidate_layer_tree_frame_sink_, msg); } // Field 13: did_perform_impl_side_invalidaion if (_has_field_[13]) { - msg->AppendTinyVarInt(13, did_perform_impl_side_invalidaion_); + ::protozero::internal::gen_helpers::SerializeTinyVarInt(13, did_perform_impl_side_invalidaion_, msg); } // Field 14: did_prepare_tiles if (_has_field_[14]) { - msg->AppendTinyVarInt(14, did_prepare_tiles_); + ::protozero::internal::gen_helpers::SerializeTinyVarInt(14, did_prepare_tiles_, msg); } // Field 15: consecutive_checkerboard_animations if (_has_field_[15]) { - msg->AppendVarInt(15, consecutive_checkerboard_animations_); + ::protozero::internal::gen_helpers::SerializeVarInt(15, consecutive_checkerboard_animations_, msg); } // Field 16: pending_submit_frames if (_has_field_[16]) { - msg->AppendVarInt(16, pending_submit_frames_); + ::protozero::internal::gen_helpers::SerializeVarInt(16, pending_submit_frames_, msg); } // Field 17: submit_frames_with_current_layer_tree_frame_sink if (_has_field_[17]) { - msg->AppendVarInt(17, submit_frames_with_current_layer_tree_frame_sink_); + ::protozero::internal::gen_helpers::SerializeVarInt(17, submit_frames_with_current_layer_tree_frame_sink_, msg); } // Field 18: needs_redraw if (_has_field_[18]) { - msg->AppendTinyVarInt(18, needs_redraw_); + ::protozero::internal::gen_helpers::SerializeTinyVarInt(18, needs_redraw_, msg); } // Field 19: needs_prepare_tiles if (_has_field_[19]) { - msg->AppendTinyVarInt(19, needs_prepare_tiles_); + ::protozero::internal::gen_helpers::SerializeTinyVarInt(19, needs_prepare_tiles_, msg); } // Field 20: needs_begin_main_frame if (_has_field_[20]) { - msg->AppendTinyVarInt(20, needs_begin_main_frame_); + ::protozero::internal::gen_helpers::SerializeTinyVarInt(20, needs_begin_main_frame_, msg); } // Field 21: needs_one_begin_impl_frame if (_has_field_[21]) { - msg->AppendTinyVarInt(21, needs_one_begin_impl_frame_); + ::protozero::internal::gen_helpers::SerializeTinyVarInt(21, needs_one_begin_impl_frame_, msg); } // Field 22: visible if (_has_field_[22]) { - msg->AppendTinyVarInt(22, visible_); + ::protozero::internal::gen_helpers::SerializeTinyVarInt(22, visible_, msg); } // Field 23: begin_frame_source_paused if (_has_field_[23]) { - msg->AppendTinyVarInt(23, begin_frame_source_paused_); + ::protozero::internal::gen_helpers::SerializeTinyVarInt(23, begin_frame_source_paused_, msg); } // Field 24: can_draw if (_has_field_[24]) { - msg->AppendTinyVarInt(24, can_draw_); + ::protozero::internal::gen_helpers::SerializeTinyVarInt(24, can_draw_, msg); } // Field 25: resourceless_draw if (_has_field_[25]) { - msg->AppendTinyVarInt(25, resourceless_draw_); + ::protozero::internal::gen_helpers::SerializeTinyVarInt(25, resourceless_draw_, msg); } // Field 26: has_pending_tree if (_has_field_[26]) { - msg->AppendTinyVarInt(26, has_pending_tree_); + ::protozero::internal::gen_helpers::SerializeTinyVarInt(26, has_pending_tree_, msg); } // Field 27: pending_tree_is_ready_for_activation if (_has_field_[27]) { - msg->AppendTinyVarInt(27, pending_tree_is_ready_for_activation_); + ::protozero::internal::gen_helpers::SerializeTinyVarInt(27, pending_tree_is_ready_for_activation_, msg); } // Field 28: active_tree_needs_first_draw if (_has_field_[28]) { - msg->AppendTinyVarInt(28, active_tree_needs_first_draw_); + ::protozero::internal::gen_helpers::SerializeTinyVarInt(28, active_tree_needs_first_draw_, msg); } // Field 29: active_tree_is_ready_to_draw if (_has_field_[29]) { - msg->AppendTinyVarInt(29, active_tree_is_ready_to_draw_); + ::protozero::internal::gen_helpers::SerializeTinyVarInt(29, active_tree_is_ready_to_draw_, msg); } // Field 30: did_create_and_initialize_first_layer_tree_frame_sink if (_has_field_[30]) { - msg->AppendTinyVarInt(30, did_create_and_initialize_first_layer_tree_frame_sink_); + ::protozero::internal::gen_helpers::SerializeTinyVarInt(30, did_create_and_initialize_first_layer_tree_frame_sink_, msg); } // Field 31: tree_priority if (_has_field_[31]) { - msg->AppendVarInt(31, tree_priority_); + ::protozero::internal::gen_helpers::SerializeVarInt(31, tree_priority_, msg); } // Field 32: scroll_handler_state if (_has_field_[32]) { - msg->AppendVarInt(32, scroll_handler_state_); + ::protozero::internal::gen_helpers::SerializeVarInt(32, scroll_handler_state_, msg); } // Field 33: critical_begin_main_frame_to_activate_is_fast if (_has_field_[33]) { - msg->AppendTinyVarInt(33, critical_begin_main_frame_to_activate_is_fast_); + ::protozero::internal::gen_helpers::SerializeTinyVarInt(33, critical_begin_main_frame_to_activate_is_fast_, msg); } // Field 34: main_thread_missed_last_deadline if (_has_field_[34]) { - msg->AppendTinyVarInt(34, main_thread_missed_last_deadline_); + ::protozero::internal::gen_helpers::SerializeTinyVarInt(34, main_thread_missed_last_deadline_, msg); } // Field 36: video_needs_begin_frames if (_has_field_[36]) { - msg->AppendTinyVarInt(36, video_needs_begin_frames_); + ::protozero::internal::gen_helpers::SerializeTinyVarInt(36, video_needs_begin_frames_, msg); } // Field 37: defer_begin_main_frame if (_has_field_[37]) { - msg->AppendTinyVarInt(37, defer_begin_main_frame_); + ::protozero::internal::gen_helpers::SerializeTinyVarInt(37, defer_begin_main_frame_, msg); } // Field 38: last_commit_had_no_updates if (_has_field_[38]) { - msg->AppendTinyVarInt(38, last_commit_had_no_updates_); + ::protozero::internal::gen_helpers::SerializeTinyVarInt(38, last_commit_had_no_updates_, msg); } // Field 39: did_draw_in_last_frame if (_has_field_[39]) { - msg->AppendTinyVarInt(39, did_draw_in_last_frame_); + ::protozero::internal::gen_helpers::SerializeTinyVarInt(39, did_draw_in_last_frame_, msg); } // Field 40: did_submit_in_last_frame if (_has_field_[40]) { - msg->AppendTinyVarInt(40, did_submit_in_last_frame_); + ::protozero::internal::gen_helpers::SerializeTinyVarInt(40, did_submit_in_last_frame_, msg); } // Field 41: needs_impl_side_invalidation if (_has_field_[41]) { - msg->AppendTinyVarInt(41, needs_impl_side_invalidation_); + ::protozero::internal::gen_helpers::SerializeTinyVarInt(41, needs_impl_side_invalidation_, msg); } // Field 42: current_pending_tree_is_impl_side if (_has_field_[42]) { - msg->AppendTinyVarInt(42, current_pending_tree_is_impl_side_); + ::protozero::internal::gen_helpers::SerializeTinyVarInt(42, current_pending_tree_is_impl_side_, msg); } // Field 43: previous_pending_tree_was_impl_side if (_has_field_[43]) { - msg->AppendTinyVarInt(43, previous_pending_tree_was_impl_side_); + ::protozero::internal::gen_helpers::SerializeTinyVarInt(43, previous_pending_tree_was_impl_side_, msg); } // Field 44: processing_animation_worklets_for_active_tree if (_has_field_[44]) { - msg->AppendTinyVarInt(44, processing_animation_worklets_for_active_tree_); + ::protozero::internal::gen_helpers::SerializeTinyVarInt(44, processing_animation_worklets_for_active_tree_, msg); } // Field 45: processing_animation_worklets_for_pending_tree if (_has_field_[45]) { - msg->AppendTinyVarInt(45, processing_animation_worklets_for_pending_tree_); + ::protozero::internal::gen_helpers::SerializeTinyVarInt(45, processing_animation_worklets_for_pending_tree_, msg); } // Field 46: processing_paint_worklets_for_pending_tree if (_has_field_[46]) { - msg->AppendTinyVarInt(46, processing_paint_worklets_for_pending_tree_); + ::protozero::internal::gen_helpers::SerializeTinyVarInt(46, processing_paint_worklets_for_pending_tree_, msg); } - msg->AppendRawProtoBytes(unknown_fields_.data(), unknown_fields_.size()); + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); } @@ -27866,13 +31134,13 @@ bool ChromeCompositorStateMachine_MajorState::ParseFromArray(const void* raw, si } std::string ChromeCompositorStateMachine_MajorState::SerializeAsString() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsString(); } std::vector ChromeCompositorStateMachine_MajorState::SerializeAsArray() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsArray(); } @@ -27880,30 +31148,30 @@ std::vector ChromeCompositorStateMachine_MajorState::SerializeAsArray() void ChromeCompositorStateMachine_MajorState::Serialize(::protozero::Message* msg) const { // Field 1: next_action if (_has_field_[1]) { - msg->AppendVarInt(1, next_action_); + ::protozero::internal::gen_helpers::SerializeVarInt(1, next_action_, msg); } // Field 2: begin_impl_frame_state if (_has_field_[2]) { - msg->AppendVarInt(2, begin_impl_frame_state_); + ::protozero::internal::gen_helpers::SerializeVarInt(2, begin_impl_frame_state_, msg); } // Field 3: begin_main_frame_state if (_has_field_[3]) { - msg->AppendVarInt(3, begin_main_frame_state_); + ::protozero::internal::gen_helpers::SerializeVarInt(3, begin_main_frame_state_, msg); } // Field 4: layer_tree_frame_sink_state if (_has_field_[4]) { - msg->AppendVarInt(4, layer_tree_frame_sink_state_); + ::protozero::internal::gen_helpers::SerializeVarInt(4, layer_tree_frame_sink_state_, msg); } // Field 5: forced_redraw_state if (_has_field_[5]) { - msg->AppendVarInt(5, forced_redraw_state_); + ::protozero::internal::gen_helpers::SerializeVarInt(5, forced_redraw_state_, msg); } - msg->AppendRawProtoBytes(unknown_fields_.data(), unknown_fields_.size()); + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); } @@ -28001,13 +31269,13 @@ bool ChromeCompositorSchedulerState::ParseFromArray(const void* raw, size_t size } std::string ChromeCompositorSchedulerState::SerializeAsString() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsString(); } std::vector ChromeCompositorSchedulerState::SerializeAsArray() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsArray(); } @@ -28020,57 +31288,57 @@ void ChromeCompositorSchedulerState::Serialize(::protozero::Message* msg) const // Field 2: observing_begin_frame_source if (_has_field_[2]) { - msg->AppendTinyVarInt(2, observing_begin_frame_source_); + ::protozero::internal::gen_helpers::SerializeTinyVarInt(2, observing_begin_frame_source_, msg); } // Field 3: begin_impl_frame_deadline_task if (_has_field_[3]) { - msg->AppendTinyVarInt(3, begin_impl_frame_deadline_task_); + ::protozero::internal::gen_helpers::SerializeTinyVarInt(3, begin_impl_frame_deadline_task_, msg); } // Field 4: pending_begin_frame_task if (_has_field_[4]) { - msg->AppendTinyVarInt(4, pending_begin_frame_task_); + ::protozero::internal::gen_helpers::SerializeTinyVarInt(4, pending_begin_frame_task_, msg); } // Field 5: skipped_last_frame_missed_exceeded_deadline if (_has_field_[5]) { - msg->AppendTinyVarInt(5, skipped_last_frame_missed_exceeded_deadline_); + ::protozero::internal::gen_helpers::SerializeTinyVarInt(5, skipped_last_frame_missed_exceeded_deadline_, msg); } // Field 7: inside_action if (_has_field_[7]) { - msg->AppendVarInt(7, inside_action_); + ::protozero::internal::gen_helpers::SerializeVarInt(7, inside_action_, msg); } // Field 8: deadline_mode if (_has_field_[8]) { - msg->AppendVarInt(8, deadline_mode_); + ::protozero::internal::gen_helpers::SerializeVarInt(8, deadline_mode_, msg); } // Field 9: deadline_us if (_has_field_[9]) { - msg->AppendVarInt(9, deadline_us_); + ::protozero::internal::gen_helpers::SerializeVarInt(9, deadline_us_, msg); } // Field 10: deadline_scheduled_at_us if (_has_field_[10]) { - msg->AppendVarInt(10, deadline_scheduled_at_us_); + ::protozero::internal::gen_helpers::SerializeVarInt(10, deadline_scheduled_at_us_, msg); } // Field 11: now_us if (_has_field_[11]) { - msg->AppendVarInt(11, now_us_); + ::protozero::internal::gen_helpers::SerializeVarInt(11, now_us_, msg); } // Field 12: now_to_deadline_delta_us if (_has_field_[12]) { - msg->AppendVarInt(12, now_to_deadline_delta_us_); + ::protozero::internal::gen_helpers::SerializeVarInt(12, now_to_deadline_delta_us_, msg); } // Field 13: now_to_deadline_scheduled_at_delta_us if (_has_field_[13]) { - msg->AppendVarInt(13, now_to_deadline_scheduled_at_delta_us_); + ::protozero::internal::gen_helpers::SerializeVarInt(13, now_to_deadline_scheduled_at_delta_us_, msg); } // Field 14: begin_impl_frame_args @@ -28093,7 +31361,7 @@ void ChromeCompositorSchedulerState::Serialize(::protozero::Message* msg) const (*compositor_timing_history_).Serialize(msg->BeginNestedMessage<::protozero::Message>(17)); } - msg->AppendRawProtoBytes(unknown_fields_.data(), unknown_fields_.size()); + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); } } // namespace perfetto @@ -28173,6 +31441,7 @@ class PERFETTO_EXPORT_COMPONENT ChromeContentSettingsEventInfo : public ::protoz } // namespace gen #endif // PERFETTO_PROTOS_PROTOS_PERFETTO_TRACE_TRACK_EVENT_CHROME_CONTENT_SETTINGS_EVENT_INFO_PROTO_CPP_H_ +// gen_amalgamated expanded: #include "perfetto/protozero/gen_field_helpers.h" // gen_amalgamated expanded: #include "perfetto/protozero/message.h" // gen_amalgamated expanded: #include "perfetto/protozero/packed_repeated_fields.h" // gen_amalgamated expanded: #include "perfetto/protozero/proto_decoder.h" @@ -28222,13 +31491,13 @@ bool ChromeContentSettingsEventInfo::ParseFromArray(const void* raw, size_t size } std::string ChromeContentSettingsEventInfo::SerializeAsString() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsString(); } std::vector ChromeContentSettingsEventInfo::SerializeAsArray() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsArray(); } @@ -28236,10 +31505,10 @@ std::vector ChromeContentSettingsEventInfo::SerializeAsArray() const { void ChromeContentSettingsEventInfo::Serialize(::protozero::Message* msg) const { // Field 1: number_of_exceptions if (_has_field_[1]) { - msg->AppendVarInt(1, number_of_exceptions_); + ::protozero::internal::gen_helpers::SerializeVarInt(1, number_of_exceptions_, msg); } - msg->AppendRawProtoBytes(unknown_fields_.data(), unknown_fields_.size()); + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); } } // namespace perfetto @@ -28271,6 +31540,7 @@ class ChromeFrameReporter; enum ChromeFrameReporter_State : int; enum ChromeFrameReporter_FrameDropReason : int; enum ChromeFrameReporter_ScrollState : int; +enum ChromeFrameReporter_FrameType : int; } // namespace perfetto } // namespace protos } // namespace gen @@ -28300,6 +31570,10 @@ enum ChromeFrameReporter_ScrollState : int { ChromeFrameReporter_ScrollState_SCROLL_COMPOSITOR_THREAD = 2, ChromeFrameReporter_ScrollState_SCROLL_UNKNOWN = 3, }; +enum ChromeFrameReporter_FrameType : int { + ChromeFrameReporter_FrameType_FORKED = 0, + ChromeFrameReporter_FrameType_BACKFILL = 1, +}; class PERFETTO_EXPORT_COMPONENT ChromeFrameReporter : public ::protozero::CppMessageObj { public: @@ -28324,6 +31598,11 @@ class PERFETTO_EXPORT_COMPONENT ChromeFrameReporter : public ::protozero::CppMes static constexpr auto SCROLL_UNKNOWN = ChromeFrameReporter_ScrollState_SCROLL_UNKNOWN; static constexpr auto ScrollState_MIN = ChromeFrameReporter_ScrollState_SCROLL_NONE; static constexpr auto ScrollState_MAX = ChromeFrameReporter_ScrollState_SCROLL_UNKNOWN; + using FrameType = ChromeFrameReporter_FrameType; + static constexpr auto FORKED = ChromeFrameReporter_FrameType_FORKED; + static constexpr auto BACKFILL = ChromeFrameReporter_FrameType_BACKFILL; + static constexpr auto FrameType_MIN = ChromeFrameReporter_FrameType_FORKED; + static constexpr auto FrameType_MAX = ChromeFrameReporter_FrameType_BACKFILL; enum FieldNumbers { kStateFieldNumber = 1, kReasonFieldNumber = 2, @@ -28337,6 +31616,8 @@ class PERFETTO_EXPORT_COMPONENT ChromeFrameReporter : public ::protozero::CppMes kHasMissingContentFieldNumber = 10, kLayerTreeHostIdFieldNumber = 11, kHasHighLatencyFieldNumber = 12, + kFrameTypeFieldNumber = 13, + kHighLatencyContributionStageFieldNumber = 14, }; ChromeFrameReporter(); @@ -28401,6 +31682,17 @@ class PERFETTO_EXPORT_COMPONENT ChromeFrameReporter : public ::protozero::CppMes bool has_high_latency() const { return has_high_latency_; } void set_has_high_latency(bool value) { has_high_latency_ = value; _has_field_.set(12); } + bool has_frame_type() const { return _has_field_[13]; } + ChromeFrameReporter_FrameType frame_type() const { return frame_type_; } + void set_frame_type(ChromeFrameReporter_FrameType value) { frame_type_ = value; _has_field_.set(13); } + + const std::vector& high_latency_contribution_stage() const { return high_latency_contribution_stage_; } + std::vector* mutable_high_latency_contribution_stage() { return &high_latency_contribution_stage_; } + int high_latency_contribution_stage_size() const { return static_cast(high_latency_contribution_stage_.size()); } + void clear_high_latency_contribution_stage() { high_latency_contribution_stage_.clear(); } + void add_high_latency_contribution_stage(std::string value) { high_latency_contribution_stage_.emplace_back(value); } + std::string* add_high_latency_contribution_stage() { high_latency_contribution_stage_.emplace_back(); return &high_latency_contribution_stage_.back(); } + private: ChromeFrameReporter_State state_{}; ChromeFrameReporter_FrameDropReason reason_{}; @@ -28414,12 +31706,14 @@ class PERFETTO_EXPORT_COMPONENT ChromeFrameReporter : public ::protozero::CppMes bool has_missing_content_{}; uint64_t layer_tree_host_id_{}; bool has_high_latency_{}; + ChromeFrameReporter_FrameType frame_type_{}; + std::vector high_latency_contribution_stage_; // Allows to preserve unknown protobuf fields for compatibility // with future versions of .proto files. std::string unknown_fields_; - std::bitset<13> _has_field_{}; + std::bitset<15> _has_field_{}; }; } // namespace perfetto @@ -28427,6 +31721,7 @@ class PERFETTO_EXPORT_COMPONENT ChromeFrameReporter : public ::protozero::CppMes } // namespace gen #endif // PERFETTO_PROTOS_PROTOS_PERFETTO_TRACE_TRACK_EVENT_CHROME_FRAME_REPORTER_PROTO_CPP_H_ +// gen_amalgamated expanded: #include "perfetto/protozero/gen_field_helpers.h" // gen_amalgamated expanded: #include "perfetto/protozero/message.h" // gen_amalgamated expanded: #include "perfetto/protozero/packed_repeated_fields.h" // gen_amalgamated expanded: #include "perfetto/protozero/proto_decoder.h" @@ -28462,10 +31757,13 @@ bool ChromeFrameReporter::operator==(const ChromeFrameReporter& other) const { && has_smooth_input_main_ == other.has_smooth_input_main_ && has_missing_content_ == other.has_missing_content_ && layer_tree_host_id_ == other.layer_tree_host_id_ - && has_high_latency_ == other.has_high_latency_; + && has_high_latency_ == other.has_high_latency_ + && frame_type_ == other.frame_type_ + && high_latency_contribution_stage_ == other.high_latency_contribution_stage_; } bool ChromeFrameReporter::ParseFromArray(const void* raw, size_t size) { + high_latency_contribution_stage_.clear(); unknown_fields_.clear(); bool packed_error = false; @@ -28511,6 +31809,13 @@ bool ChromeFrameReporter::ParseFromArray(const void* raw, size_t size) { case 12 /* has_high_latency */: field.get(&has_high_latency_); break; + case 13 /* frame_type */: + field.get(&frame_type_); + break; + case 14 /* high_latency_contribution_stage */: + high_latency_contribution_stage_.emplace_back(); + ::protozero::internal::gen_helpers::DeserializeString(field, &high_latency_contribution_stage_.back()); + break; default: field.SerializeAndAppendTo(&unknown_fields_); break; @@ -28520,13 +31825,13 @@ bool ChromeFrameReporter::ParseFromArray(const void* raw, size_t size) { } std::string ChromeFrameReporter::SerializeAsString() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsString(); } std::vector ChromeFrameReporter::SerializeAsArray() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsArray(); } @@ -28534,65 +31839,75 @@ std::vector ChromeFrameReporter::SerializeAsArray() const { void ChromeFrameReporter::Serialize(::protozero::Message* msg) const { // Field 1: state if (_has_field_[1]) { - msg->AppendVarInt(1, state_); + ::protozero::internal::gen_helpers::SerializeVarInt(1, state_, msg); } // Field 2: reason if (_has_field_[2]) { - msg->AppendVarInt(2, reason_); + ::protozero::internal::gen_helpers::SerializeVarInt(2, reason_, msg); } // Field 3: frame_source if (_has_field_[3]) { - msg->AppendVarInt(3, frame_source_); + ::protozero::internal::gen_helpers::SerializeVarInt(3, frame_source_, msg); } // Field 4: frame_sequence if (_has_field_[4]) { - msg->AppendVarInt(4, frame_sequence_); + ::protozero::internal::gen_helpers::SerializeVarInt(4, frame_sequence_, msg); } // Field 5: affects_smoothness if (_has_field_[5]) { - msg->AppendTinyVarInt(5, affects_smoothness_); + ::protozero::internal::gen_helpers::SerializeTinyVarInt(5, affects_smoothness_, msg); } // Field 6: scroll_state if (_has_field_[6]) { - msg->AppendVarInt(6, scroll_state_); + ::protozero::internal::gen_helpers::SerializeVarInt(6, scroll_state_, msg); } // Field 7: has_main_animation if (_has_field_[7]) { - msg->AppendTinyVarInt(7, has_main_animation_); + ::protozero::internal::gen_helpers::SerializeTinyVarInt(7, has_main_animation_, msg); } // Field 8: has_compositor_animation if (_has_field_[8]) { - msg->AppendTinyVarInt(8, has_compositor_animation_); + ::protozero::internal::gen_helpers::SerializeTinyVarInt(8, has_compositor_animation_, msg); } // Field 9: has_smooth_input_main if (_has_field_[9]) { - msg->AppendTinyVarInt(9, has_smooth_input_main_); + ::protozero::internal::gen_helpers::SerializeTinyVarInt(9, has_smooth_input_main_, msg); } // Field 10: has_missing_content if (_has_field_[10]) { - msg->AppendTinyVarInt(10, has_missing_content_); + ::protozero::internal::gen_helpers::SerializeTinyVarInt(10, has_missing_content_, msg); } // Field 11: layer_tree_host_id if (_has_field_[11]) { - msg->AppendVarInt(11, layer_tree_host_id_); + ::protozero::internal::gen_helpers::SerializeVarInt(11, layer_tree_host_id_, msg); } // Field 12: has_high_latency if (_has_field_[12]) { - msg->AppendTinyVarInt(12, has_high_latency_); + ::protozero::internal::gen_helpers::SerializeTinyVarInt(12, has_high_latency_, msg); } - msg->AppendRawProtoBytes(unknown_fields_.data(), unknown_fields_.size()); + // Field 13: frame_type + if (_has_field_[13]) { + ::protozero::internal::gen_helpers::SerializeVarInt(13, frame_type_, msg); + } + + // Field 14: high_latency_contribution_stage + for (auto& it : high_latency_contribution_stage_) { + ::protozero::internal::gen_helpers::SerializeString(14, it, msg); + } + + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); } } // namespace perfetto @@ -28732,6 +32047,7 @@ class PERFETTO_EXPORT_COMPONENT HistogramName : public ::protozero::CppMessageOb } // namespace gen #endif // PERFETTO_PROTOS_PROTOS_PERFETTO_TRACE_TRACK_EVENT_CHROME_HISTOGRAM_SAMPLE_PROTO_CPP_H_ +// gen_amalgamated expanded: #include "perfetto/protozero/gen_field_helpers.h" // gen_amalgamated expanded: #include "perfetto/protozero/message.h" // gen_amalgamated expanded: #include "perfetto/protozero/packed_repeated_fields.h" // gen_amalgamated expanded: #include "perfetto/protozero/proto_decoder.h" @@ -28776,7 +32092,7 @@ bool ChromeHistogramSample::ParseFromArray(const void* raw, size_t size) { field.get(&name_hash_); break; case 2 /* name */: - field.get(&name_); + ::protozero::internal::gen_helpers::DeserializeString(field, &name_); break; case 3 /* sample */: field.get(&sample_); @@ -28793,13 +32109,13 @@ bool ChromeHistogramSample::ParseFromArray(const void* raw, size_t size) { } std::string ChromeHistogramSample::SerializeAsString() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsString(); } std::vector ChromeHistogramSample::SerializeAsArray() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsArray(); } @@ -28807,25 +32123,25 @@ std::vector ChromeHistogramSample::SerializeAsArray() const { void ChromeHistogramSample::Serialize(::protozero::Message* msg) const { // Field 1: name_hash if (_has_field_[1]) { - msg->AppendVarInt(1, name_hash_); + ::protozero::internal::gen_helpers::SerializeVarInt(1, name_hash_, msg); } // Field 2: name if (_has_field_[2]) { - msg->AppendString(2, name_); + ::protozero::internal::gen_helpers::SerializeString(2, name_, msg); } // Field 3: sample if (_has_field_[3]) { - msg->AppendVarInt(3, sample_); + ::protozero::internal::gen_helpers::SerializeVarInt(3, sample_, msg); } // Field 4: name_iid if (_has_field_[4]) { - msg->AppendVarInt(4, name_iid_); + ::protozero::internal::gen_helpers::SerializeVarInt(4, name_iid_, msg); } - msg->AppendRawProtoBytes(unknown_fields_.data(), unknown_fields_.size()); + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); } @@ -28856,7 +32172,7 @@ bool HistogramName::ParseFromArray(const void* raw, size_t size) { field.get(&iid_); break; case 2 /* name */: - field.get(&name_); + ::protozero::internal::gen_helpers::DeserializeString(field, &name_); break; default: field.SerializeAndAppendTo(&unknown_fields_); @@ -28867,13 +32183,13 @@ bool HistogramName::ParseFromArray(const void* raw, size_t size) { } std::string HistogramName::SerializeAsString() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsString(); } std::vector HistogramName::SerializeAsArray() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsArray(); } @@ -28881,15 +32197,15 @@ std::vector HistogramName::SerializeAsArray() const { void HistogramName::Serialize(::protozero::Message* msg) const { // Field 1: iid if (_has_field_[1]) { - msg->AppendVarInt(1, iid_); + ::protozero::internal::gen_helpers::SerializeVarInt(1, iid_, msg); } // Field 2: name if (_has_field_[2]) { - msg->AppendString(2, name_); + ::protozero::internal::gen_helpers::SerializeString(2, name_, msg); } - msg->AppendRawProtoBytes(unknown_fields_.data(), unknown_fields_.size()); + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); } } // namespace perfetto @@ -28969,6 +32285,7 @@ class PERFETTO_EXPORT_COMPONENT ChromeKeyedService : public ::protozero::CppMess } // namespace gen #endif // PERFETTO_PROTOS_PROTOS_PERFETTO_TRACE_TRACK_EVENT_CHROME_KEYED_SERVICE_PROTO_CPP_H_ +// gen_amalgamated expanded: #include "perfetto/protozero/gen_field_helpers.h" // gen_amalgamated expanded: #include "perfetto/protozero/message.h" // gen_amalgamated expanded: #include "perfetto/protozero/packed_repeated_fields.h" // gen_amalgamated expanded: #include "perfetto/protozero/proto_decoder.h" @@ -29007,7 +32324,7 @@ bool ChromeKeyedService::ParseFromArray(const void* raw, size_t size) { } switch (field.id()) { case 1 /* name */: - field.get(&name_); + ::protozero::internal::gen_helpers::DeserializeString(field, &name_); break; default: field.SerializeAndAppendTo(&unknown_fields_); @@ -29018,13 +32335,13 @@ bool ChromeKeyedService::ParseFromArray(const void* raw, size_t size) { } std::string ChromeKeyedService::SerializeAsString() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsString(); } std::vector ChromeKeyedService::SerializeAsArray() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsArray(); } @@ -29032,10 +32349,10 @@ std::vector ChromeKeyedService::SerializeAsArray() const { void ChromeKeyedService::Serialize(::protozero::Message* msg) const { // Field 1: name if (_has_field_[1]) { - msg->AppendString(1, name_); + ::protozero::internal::gen_helpers::SerializeString(1, name_, msg); } - msg->AppendRawProtoBytes(unknown_fields_.data(), unknown_fields_.size()); + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); } } // namespace perfetto @@ -29262,6 +32579,7 @@ class PERFETTO_EXPORT_COMPONENT ChromeLatencyInfo_ComponentInfo : public ::proto } // namespace gen #endif // PERFETTO_PROTOS_PROTOS_PERFETTO_TRACE_TRACK_EVENT_CHROME_LATENCY_INFO_PROTO_CPP_H_ +// gen_amalgamated expanded: #include "perfetto/protozero/gen_field_helpers.h" // gen_amalgamated expanded: #include "perfetto/protozero/message.h" // gen_amalgamated expanded: #include "perfetto/protozero/packed_repeated_fields.h" // gen_amalgamated expanded: #include "perfetto/protozero/proto_decoder.h" @@ -29340,13 +32658,13 @@ bool ChromeLatencyInfo::ParseFromArray(const void* raw, size_t size) { } std::string ChromeLatencyInfo::SerializeAsString() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsString(); } std::vector ChromeLatencyInfo::SerializeAsArray() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsArray(); } @@ -29354,17 +32672,17 @@ std::vector ChromeLatencyInfo::SerializeAsArray() const { void ChromeLatencyInfo::Serialize(::protozero::Message* msg) const { // Field 1: trace_id if (_has_field_[1]) { - msg->AppendVarInt(1, trace_id_); + ::protozero::internal::gen_helpers::SerializeVarInt(1, trace_id_, msg); } // Field 2: step if (_has_field_[2]) { - msg->AppendVarInt(2, step_); + ::protozero::internal::gen_helpers::SerializeVarInt(2, step_, msg); } // Field 3: frame_tree_node_id if (_has_field_[3]) { - msg->AppendVarInt(3, frame_tree_node_id_); + ::protozero::internal::gen_helpers::SerializeVarInt(3, frame_tree_node_id_, msg); } // Field 4: component_info @@ -29374,20 +32692,20 @@ void ChromeLatencyInfo::Serialize(::protozero::Message* msg) const { // Field 5: is_coalesced if (_has_field_[5]) { - msg->AppendTinyVarInt(5, is_coalesced_); + ::protozero::internal::gen_helpers::SerializeTinyVarInt(5, is_coalesced_, msg); } // Field 6: gesture_scroll_id if (_has_field_[6]) { - msg->AppendVarInt(6, gesture_scroll_id_); + ::protozero::internal::gen_helpers::SerializeVarInt(6, gesture_scroll_id_, msg); } // Field 7: touch_id if (_has_field_[7]) { - msg->AppendVarInt(7, touch_id_); + ::protozero::internal::gen_helpers::SerializeVarInt(7, touch_id_, msg); } - msg->AppendRawProtoBytes(unknown_fields_.data(), unknown_fields_.size()); + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); } @@ -29429,13 +32747,13 @@ bool ChromeLatencyInfo_ComponentInfo::ParseFromArray(const void* raw, size_t siz } std::string ChromeLatencyInfo_ComponentInfo::SerializeAsString() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsString(); } std::vector ChromeLatencyInfo_ComponentInfo::SerializeAsArray() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsArray(); } @@ -29443,15 +32761,15 @@ std::vector ChromeLatencyInfo_ComponentInfo::SerializeAsArray() const { void ChromeLatencyInfo_ComponentInfo::Serialize(::protozero::Message* msg) const { // Field 1: component_type if (_has_field_[1]) { - msg->AppendVarInt(1, component_type_); + ::protozero::internal::gen_helpers::SerializeVarInt(1, component_type_, msg); } // Field 2: time_us if (_has_field_[2]) { - msg->AppendVarInt(2, time_us_); + ::protozero::internal::gen_helpers::SerializeVarInt(2, time_us_, msg); } - msg->AppendRawProtoBytes(unknown_fields_.data(), unknown_fields_.size()); + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); } } // namespace perfetto @@ -29619,6 +32937,7 @@ class PERFETTO_EXPORT_COMPONENT ChromeLegacyIpc : public ::protozero::CppMessage } // namespace gen #endif // PERFETTO_PROTOS_PROTOS_PERFETTO_TRACE_TRACK_EVENT_CHROME_LEGACY_IPC_PROTO_CPP_H_ +// gen_amalgamated expanded: #include "perfetto/protozero/gen_field_helpers.h" // gen_amalgamated expanded: #include "perfetto/protozero/message.h" // gen_amalgamated expanded: #include "perfetto/protozero/packed_repeated_fields.h" // gen_amalgamated expanded: #include "perfetto/protozero/proto_decoder.h" @@ -29672,13 +32991,13 @@ bool ChromeLegacyIpc::ParseFromArray(const void* raw, size_t size) { } std::string ChromeLegacyIpc::SerializeAsString() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsString(); } std::vector ChromeLegacyIpc::SerializeAsArray() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsArray(); } @@ -29686,15 +33005,15 @@ std::vector ChromeLegacyIpc::SerializeAsArray() const { void ChromeLegacyIpc::Serialize(::protozero::Message* msg) const { // Field 1: message_class if (_has_field_[1]) { - msg->AppendVarInt(1, message_class_); + ::protozero::internal::gen_helpers::SerializeVarInt(1, message_class_, msg); } // Field 2: message_line if (_has_field_[2]) { - msg->AppendVarInt(2, message_line_); + ::protozero::internal::gen_helpers::SerializeVarInt(2, message_line_, msg); } - msg->AppendRawProtoBytes(unknown_fields_.data(), unknown_fields_.size()); + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); } } // namespace perfetto @@ -29780,6 +33099,7 @@ class PERFETTO_EXPORT_COMPONENT ChromeMessagePump : public ::protozero::CppMessa } // namespace gen #endif // PERFETTO_PROTOS_PROTOS_PERFETTO_TRACE_TRACK_EVENT_CHROME_MESSAGE_PUMP_PROTO_CPP_H_ +// gen_amalgamated expanded: #include "perfetto/protozero/gen_field_helpers.h" // gen_amalgamated expanded: #include "perfetto/protozero/message.h" // gen_amalgamated expanded: #include "perfetto/protozero/packed_repeated_fields.h" // gen_amalgamated expanded: #include "perfetto/protozero/proto_decoder.h" @@ -29833,13 +33153,13 @@ bool ChromeMessagePump::ParseFromArray(const void* raw, size_t size) { } std::string ChromeMessagePump::SerializeAsString() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsString(); } std::vector ChromeMessagePump::SerializeAsArray() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsArray(); } @@ -29847,15 +33167,15 @@ std::vector ChromeMessagePump::SerializeAsArray() const { void ChromeMessagePump::Serialize(::protozero::Message* msg) const { // Field 1: sent_messages_in_queue if (_has_field_[1]) { - msg->AppendTinyVarInt(1, sent_messages_in_queue_); + ::protozero::internal::gen_helpers::SerializeTinyVarInt(1, sent_messages_in_queue_, msg); } // Field 2: io_handler_location_iid if (_has_field_[2]) { - msg->AppendVarInt(2, io_handler_location_iid_); + ::protozero::internal::gen_helpers::SerializeVarInt(2, io_handler_location_iid_, msg); } - msg->AppendRawProtoBytes(unknown_fields_.data(), unknown_fields_.size()); + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); } } // namespace perfetto @@ -29903,6 +33223,9 @@ class PERFETTO_EXPORT_COMPONENT ChromeMojoEventInfo : public ::protozero::CppMes kIpcHashFieldNumber = 2, kMojoInterfaceTagFieldNumber = 3, kMojoInterfaceMethodIidFieldNumber = 4, + kIsReplyFieldNumber = 5, + kPayloadSizeFieldNumber = 6, + kDataNumBytesFieldNumber = 7, }; ChromeMojoEventInfo(); @@ -29935,17 +33258,32 @@ class PERFETTO_EXPORT_COMPONENT ChromeMojoEventInfo : public ::protozero::CppMes uint64_t mojo_interface_method_iid() const { return mojo_interface_method_iid_; } void set_mojo_interface_method_iid(uint64_t value) { mojo_interface_method_iid_ = value; _has_field_.set(4); } + bool has_is_reply() const { return _has_field_[5]; } + bool is_reply() const { return is_reply_; } + void set_is_reply(bool value) { is_reply_ = value; _has_field_.set(5); } + + bool has_payload_size() const { return _has_field_[6]; } + uint64_t payload_size() const { return payload_size_; } + void set_payload_size(uint64_t value) { payload_size_ = value; _has_field_.set(6); } + + bool has_data_num_bytes() const { return _has_field_[7]; } + uint64_t data_num_bytes() const { return data_num_bytes_; } + void set_data_num_bytes(uint64_t value) { data_num_bytes_ = value; _has_field_.set(7); } + private: std::string watcher_notify_interface_tag_{}; uint32_t ipc_hash_{}; std::string mojo_interface_tag_{}; uint64_t mojo_interface_method_iid_{}; + bool is_reply_{}; + uint64_t payload_size_{}; + uint64_t data_num_bytes_{}; // Allows to preserve unknown protobuf fields for compatibility // with future versions of .proto files. std::string unknown_fields_; - std::bitset<5> _has_field_{}; + std::bitset<8> _has_field_{}; }; } // namespace perfetto @@ -29953,6 +33291,7 @@ class PERFETTO_EXPORT_COMPONENT ChromeMojoEventInfo : public ::protozero::CppMes } // namespace gen #endif // PERFETTO_PROTOS_PROTOS_PERFETTO_TRACE_TRACK_EVENT_CHROME_MOJO_EVENT_INFO_PROTO_CPP_H_ +// gen_amalgamated expanded: #include "perfetto/protozero/gen_field_helpers.h" // gen_amalgamated expanded: #include "perfetto/protozero/message.h" // gen_amalgamated expanded: #include "perfetto/protozero/packed_repeated_fields.h" // gen_amalgamated expanded: #include "perfetto/protozero/proto_decoder.h" @@ -29980,7 +33319,10 @@ bool ChromeMojoEventInfo::operator==(const ChromeMojoEventInfo& other) const { && watcher_notify_interface_tag_ == other.watcher_notify_interface_tag_ && ipc_hash_ == other.ipc_hash_ && mojo_interface_tag_ == other.mojo_interface_tag_ - && mojo_interface_method_iid_ == other.mojo_interface_method_iid_; + && mojo_interface_method_iid_ == other.mojo_interface_method_iid_ + && is_reply_ == other.is_reply_ + && payload_size_ == other.payload_size_ + && data_num_bytes_ == other.data_num_bytes_; } bool ChromeMojoEventInfo::ParseFromArray(const void* raw, size_t size) { @@ -29994,17 +33336,26 @@ bool ChromeMojoEventInfo::ParseFromArray(const void* raw, size_t size) { } switch (field.id()) { case 1 /* watcher_notify_interface_tag */: - field.get(&watcher_notify_interface_tag_); + ::protozero::internal::gen_helpers::DeserializeString(field, &watcher_notify_interface_tag_); break; case 2 /* ipc_hash */: field.get(&ipc_hash_); break; case 3 /* mojo_interface_tag */: - field.get(&mojo_interface_tag_); + ::protozero::internal::gen_helpers::DeserializeString(field, &mojo_interface_tag_); break; case 4 /* mojo_interface_method_iid */: field.get(&mojo_interface_method_iid_); break; + case 5 /* is_reply */: + field.get(&is_reply_); + break; + case 6 /* payload_size */: + field.get(&payload_size_); + break; + case 7 /* data_num_bytes */: + field.get(&data_num_bytes_); + break; default: field.SerializeAndAppendTo(&unknown_fields_); break; @@ -30014,13 +33365,13 @@ bool ChromeMojoEventInfo::ParseFromArray(const void* raw, size_t size) { } std::string ChromeMojoEventInfo::SerializeAsString() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsString(); } std::vector ChromeMojoEventInfo::SerializeAsArray() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsArray(); } @@ -30028,25 +33379,40 @@ std::vector ChromeMojoEventInfo::SerializeAsArray() const { void ChromeMojoEventInfo::Serialize(::protozero::Message* msg) const { // Field 1: watcher_notify_interface_tag if (_has_field_[1]) { - msg->AppendString(1, watcher_notify_interface_tag_); + ::protozero::internal::gen_helpers::SerializeString(1, watcher_notify_interface_tag_, msg); } // Field 2: ipc_hash if (_has_field_[2]) { - msg->AppendVarInt(2, ipc_hash_); + ::protozero::internal::gen_helpers::SerializeVarInt(2, ipc_hash_, msg); } // Field 3: mojo_interface_tag if (_has_field_[3]) { - msg->AppendString(3, mojo_interface_tag_); + ::protozero::internal::gen_helpers::SerializeString(3, mojo_interface_tag_, msg); } // Field 4: mojo_interface_method_iid if (_has_field_[4]) { - msg->AppendVarInt(4, mojo_interface_method_iid_); + ::protozero::internal::gen_helpers::SerializeVarInt(4, mojo_interface_method_iid_, msg); } - msg->AppendRawProtoBytes(unknown_fields_.data(), unknown_fields_.size()); + // Field 5: is_reply + if (_has_field_[5]) { + ::protozero::internal::gen_helpers::SerializeTinyVarInt(5, is_reply_, msg); + } + + // Field 6: payload_size + if (_has_field_[6]) { + ::protozero::internal::gen_helpers::SerializeVarInt(6, payload_size_, msg); + } + + // Field 7: data_num_bytes + if (_has_field_[7]) { + ::protozero::internal::gen_helpers::SerializeVarInt(7, data_num_bytes_, msg); + } + + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); } } // namespace perfetto @@ -30238,6 +33604,7 @@ class PERFETTO_EXPORT_COMPONENT ChromeProcessDescriptor : public ::protozero::Cp } // namespace gen #endif // PERFETTO_PROTOS_PROTOS_PERFETTO_TRACE_TRACK_EVENT_CHROME_PROCESS_DESCRIPTOR_PROTO_CPP_H_ +// gen_amalgamated expanded: #include "perfetto/protozero/gen_field_helpers.h" // gen_amalgamated expanded: #include "perfetto/protozero/message.h" // gen_amalgamated expanded: #include "perfetto/protozero/packed_repeated_fields.h" // gen_amalgamated expanded: #include "perfetto/protozero/proto_decoder.h" @@ -30289,7 +33656,7 @@ bool ChromeProcessDescriptor::ParseFromArray(const void* raw, size_t size) { field.get(&legacy_sort_index_); break; case 4 /* host_app_package_name */: - field.get(&host_app_package_name_); + ::protozero::internal::gen_helpers::DeserializeString(field, &host_app_package_name_); break; case 5 /* crash_trace_id */: field.get(&crash_trace_id_); @@ -30303,13 +33670,13 @@ bool ChromeProcessDescriptor::ParseFromArray(const void* raw, size_t size) { } std::string ChromeProcessDescriptor::SerializeAsString() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsString(); } std::vector ChromeProcessDescriptor::SerializeAsArray() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsArray(); } @@ -30317,30 +33684,30 @@ std::vector ChromeProcessDescriptor::SerializeAsArray() const { void ChromeProcessDescriptor::Serialize(::protozero::Message* msg) const { // Field 1: process_type if (_has_field_[1]) { - msg->AppendVarInt(1, process_type_); + ::protozero::internal::gen_helpers::SerializeVarInt(1, process_type_, msg); } // Field 2: process_priority if (_has_field_[2]) { - msg->AppendVarInt(2, process_priority_); + ::protozero::internal::gen_helpers::SerializeVarInt(2, process_priority_, msg); } // Field 3: legacy_sort_index if (_has_field_[3]) { - msg->AppendVarInt(3, legacy_sort_index_); + ::protozero::internal::gen_helpers::SerializeVarInt(3, legacy_sort_index_, msg); } // Field 4: host_app_package_name if (_has_field_[4]) { - msg->AppendString(4, host_app_package_name_); + ::protozero::internal::gen_helpers::SerializeString(4, host_app_package_name_, msg); } // Field 5: crash_trace_id if (_has_field_[5]) { - msg->AppendVarInt(5, crash_trace_id_); + ::protozero::internal::gen_helpers::SerializeVarInt(5, crash_trace_id_, msg); } - msg->AppendRawProtoBytes(unknown_fields_.data(), unknown_fields_.size()); + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); } } // namespace perfetto @@ -30440,6 +33807,7 @@ class PERFETTO_EXPORT_COMPONENT ChromeRendererSchedulerState : public ::protozer } // namespace gen #endif // PERFETTO_PROTOS_PROTOS_PERFETTO_TRACE_TRACK_EVENT_CHROME_RENDERER_SCHEDULER_STATE_PROTO_CPP_H_ +// gen_amalgamated expanded: #include "perfetto/protozero/gen_field_helpers.h" // gen_amalgamated expanded: #include "perfetto/protozero/message.h" // gen_amalgamated expanded: #include "perfetto/protozero/packed_repeated_fields.h" // gen_amalgamated expanded: #include "perfetto/protozero/proto_decoder.h" @@ -30497,13 +33865,13 @@ bool ChromeRendererSchedulerState::ParseFromArray(const void* raw, size_t size) } std::string ChromeRendererSchedulerState::SerializeAsString() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsString(); } std::vector ChromeRendererSchedulerState::SerializeAsArray() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsArray(); } @@ -30511,20 +33879,20 @@ std::vector ChromeRendererSchedulerState::SerializeAsArray() const { void ChromeRendererSchedulerState::Serialize(::protozero::Message* msg) const { // Field 1: rail_mode if (_has_field_[1]) { - msg->AppendVarInt(1, rail_mode_); + ::protozero::internal::gen_helpers::SerializeVarInt(1, rail_mode_, msg); } // Field 2: is_backgrounded if (_has_field_[2]) { - msg->AppendTinyVarInt(2, is_backgrounded_); + ::protozero::internal::gen_helpers::SerializeTinyVarInt(2, is_backgrounded_, msg); } // Field 3: is_hidden if (_has_field_[3]) { - msg->AppendTinyVarInt(3, is_hidden_); + ::protozero::internal::gen_helpers::SerializeTinyVarInt(3, is_hidden_, msg); } - msg->AppendRawProtoBytes(unknown_fields_.data(), unknown_fields_.size()); + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); } } // namespace perfetto @@ -30704,6 +34072,7 @@ class PERFETTO_EXPORT_COMPONENT ChromeThreadDescriptor : public ::protozero::Cpp } // namespace gen #endif // PERFETTO_PROTOS_PROTOS_PERFETTO_TRACE_TRACK_EVENT_CHROME_THREAD_DESCRIPTOR_PROTO_CPP_H_ +// gen_amalgamated expanded: #include "perfetto/protozero/gen_field_helpers.h" // gen_amalgamated expanded: #include "perfetto/protozero/message.h" // gen_amalgamated expanded: #include "perfetto/protozero/packed_repeated_fields.h" // gen_amalgamated expanded: #include "perfetto/protozero/proto_decoder.h" @@ -30757,13 +34126,13 @@ bool ChromeThreadDescriptor::ParseFromArray(const void* raw, size_t size) { } std::string ChromeThreadDescriptor::SerializeAsString() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsString(); } std::vector ChromeThreadDescriptor::SerializeAsArray() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsArray(); } @@ -30771,15 +34140,15 @@ std::vector ChromeThreadDescriptor::SerializeAsArray() const { void ChromeThreadDescriptor::Serialize(::protozero::Message* msg) const { // Field 1: thread_type if (_has_field_[1]) { - msg->AppendVarInt(1, thread_type_); + ::protozero::internal::gen_helpers::SerializeVarInt(1, thread_type_, msg); } // Field 2: legacy_sort_index if (_has_field_[2]) { - msg->AppendVarInt(2, legacy_sort_index_); + ::protozero::internal::gen_helpers::SerializeVarInt(2, legacy_sort_index_, msg); } - msg->AppendRawProtoBytes(unknown_fields_.data(), unknown_fields_.size()); + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); } } // namespace perfetto @@ -30865,6 +34234,7 @@ class PERFETTO_EXPORT_COMPONENT ChromeUserEvent : public ::protozero::CppMessage } // namespace gen #endif // PERFETTO_PROTOS_PROTOS_PERFETTO_TRACE_TRACK_EVENT_CHROME_USER_EVENT_PROTO_CPP_H_ +// gen_amalgamated expanded: #include "perfetto/protozero/gen_field_helpers.h" // gen_amalgamated expanded: #include "perfetto/protozero/message.h" // gen_amalgamated expanded: #include "perfetto/protozero/packed_repeated_fields.h" // gen_amalgamated expanded: #include "perfetto/protozero/proto_decoder.h" @@ -30904,7 +34274,7 @@ bool ChromeUserEvent::ParseFromArray(const void* raw, size_t size) { } switch (field.id()) { case 1 /* action */: - field.get(&action_); + ::protozero::internal::gen_helpers::DeserializeString(field, &action_); break; case 2 /* action_hash */: field.get(&action_hash_); @@ -30918,13 +34288,13 @@ bool ChromeUserEvent::ParseFromArray(const void* raw, size_t size) { } std::string ChromeUserEvent::SerializeAsString() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsString(); } std::vector ChromeUserEvent::SerializeAsArray() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsArray(); } @@ -30932,15 +34302,15 @@ std::vector ChromeUserEvent::SerializeAsArray() const { void ChromeUserEvent::Serialize(::protozero::Message* msg) const { // Field 1: action if (_has_field_[1]) { - msg->AppendString(1, action_); + ::protozero::internal::gen_helpers::SerializeString(1, action_, msg); } // Field 2: action_hash if (_has_field_[2]) { - msg->AppendVarInt(2, action_hash_); + ::protozero::internal::gen_helpers::SerializeVarInt(2, action_hash_, msg); } - msg->AppendRawProtoBytes(unknown_fields_.data(), unknown_fields_.size()); + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); } } // namespace perfetto @@ -31032,6 +34402,7 @@ class PERFETTO_EXPORT_COMPONENT ChromeWindowHandleEventInfo : public ::protozero } // namespace gen #endif // PERFETTO_PROTOS_PROTOS_PERFETTO_TRACE_TRACK_EVENT_CHROME_WINDOW_HANDLE_EVENT_INFO_PROTO_CPP_H_ +// gen_amalgamated expanded: #include "perfetto/protozero/gen_field_helpers.h" // gen_amalgamated expanded: #include "perfetto/protozero/message.h" // gen_amalgamated expanded: #include "perfetto/protozero/packed_repeated_fields.h" // gen_amalgamated expanded: #include "perfetto/protozero/proto_decoder.h" @@ -31089,13 +34460,13 @@ bool ChromeWindowHandleEventInfo::ParseFromArray(const void* raw, size_t size) { } std::string ChromeWindowHandleEventInfo::SerializeAsString() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsString(); } std::vector ChromeWindowHandleEventInfo::SerializeAsArray() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsArray(); } @@ -31103,20 +34474,20 @@ std::vector ChromeWindowHandleEventInfo::SerializeAsArray() const { void ChromeWindowHandleEventInfo::Serialize(::protozero::Message* msg) const { // Field 1: dpi if (_has_field_[1]) { - msg->AppendVarInt(1, dpi_); + ::protozero::internal::gen_helpers::SerializeVarInt(1, dpi_, msg); } // Field 2: message_id if (_has_field_[2]) { - msg->AppendVarInt(2, message_id_); + ::protozero::internal::gen_helpers::SerializeVarInt(2, message_id_, msg); } // Field 3: hwnd_ptr if (_has_field_[3]) { - msg->AppendFixed(3, hwnd_ptr_); + ::protozero::internal::gen_helpers::SerializeFixed(3, hwnd_ptr_, msg); } - msg->AppendRawProtoBytes(unknown_fields_.data(), unknown_fields_.size()); + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); } } // namespace perfetto @@ -31126,6 +34497,7 @@ void ChromeWindowHandleEventInfo::Serialize(::protozero::Message* msg) const { #pragma GCC diagnostic pop #endif // gen_amalgamated begin source: gen/protos/perfetto/trace/track_event/counter_descriptor.gen.cc +// gen_amalgamated expanded: #include "perfetto/protozero/gen_field_helpers.h" // gen_amalgamated expanded: #include "perfetto/protozero/message.h" // gen_amalgamated expanded: #include "perfetto/protozero/packed_repeated_fields.h" // gen_amalgamated expanded: #include "perfetto/protozero/proto_decoder.h" @@ -31174,13 +34546,13 @@ bool CounterDescriptor::ParseFromArray(const void* raw, size_t size) { break; case 2 /* categories */: categories_.emplace_back(); - field.get(&categories_.back()); + ::protozero::internal::gen_helpers::DeserializeString(field, &categories_.back()); break; case 3 /* unit */: field.get(&unit_); break; case 6 /* unit_name */: - field.get(&unit_name_); + ::protozero::internal::gen_helpers::DeserializeString(field, &unit_name_); break; case 4 /* unit_multiplier */: field.get(&unit_multiplier_); @@ -31197,13 +34569,13 @@ bool CounterDescriptor::ParseFromArray(const void* raw, size_t size) { } std::string CounterDescriptor::SerializeAsString() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsString(); } std::vector CounterDescriptor::SerializeAsArray() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsArray(); } @@ -31211,35 +34583,35 @@ std::vector CounterDescriptor::SerializeAsArray() const { void CounterDescriptor::Serialize(::protozero::Message* msg) const { // Field 1: type if (_has_field_[1]) { - msg->AppendVarInt(1, type_); + ::protozero::internal::gen_helpers::SerializeVarInt(1, type_, msg); } // Field 2: categories for (auto& it : categories_) { - msg->AppendString(2, it); + ::protozero::internal::gen_helpers::SerializeString(2, it, msg); } // Field 3: unit if (_has_field_[3]) { - msg->AppendVarInt(3, unit_); + ::protozero::internal::gen_helpers::SerializeVarInt(3, unit_, msg); } // Field 6: unit_name if (_has_field_[6]) { - msg->AppendString(6, unit_name_); + ::protozero::internal::gen_helpers::SerializeString(6, unit_name_, msg); } // Field 4: unit_multiplier if (_has_field_[4]) { - msg->AppendVarInt(4, unit_multiplier_); + ::protozero::internal::gen_helpers::SerializeVarInt(4, unit_multiplier_, msg); } // Field 5: is_incremental if (_has_field_[5]) { - msg->AppendTinyVarInt(5, is_incremental_); + ::protozero::internal::gen_helpers::SerializeTinyVarInt(5, is_incremental_, msg); } - msg->AppendRawProtoBytes(unknown_fields_.data(), unknown_fields_.size()); + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); } } // namespace perfetto @@ -31381,10 +34753,11 @@ class PERFETTO_EXPORT_COMPONENT DebugAnnotation : public ::protozero::CppMessage kUintValueFieldNumber = 3, kIntValueFieldNumber = 4, kDoubleValueFieldNumber = 5, - kStringValueFieldNumber = 6, kPointerValueFieldNumber = 7, kNestedValueFieldNumber = 8, kLegacyJsonValueFieldNumber = 9, + kStringValueFieldNumber = 6, + kStringValueIidFieldNumber = 17, kProtoTypeNameFieldNumber = 16, kProtoTypeNameIidFieldNumber = 13, kProtoValueFieldNumber = 14, @@ -31430,10 +34803,6 @@ class PERFETTO_EXPORT_COMPONENT DebugAnnotation : public ::protozero::CppMessage double double_value() const { return double_value_; } void set_double_value(double value) { double_value_ = value; _has_field_.set(5); } - bool has_string_value() const { return _has_field_[6]; } - const std::string& string_value() const { return string_value_; } - void set_string_value(const std::string& value) { string_value_ = value; _has_field_.set(6); } - bool has_pointer_value() const { return _has_field_[7]; } uint64_t pointer_value() const { return pointer_value_; } void set_pointer_value(uint64_t value) { pointer_value_ = value; _has_field_.set(7); } @@ -31446,6 +34815,14 @@ class PERFETTO_EXPORT_COMPONENT DebugAnnotation : public ::protozero::CppMessage const std::string& legacy_json_value() const { return legacy_json_value_; } void set_legacy_json_value(const std::string& value) { legacy_json_value_ = value; _has_field_.set(9); } + bool has_string_value() const { return _has_field_[6]; } + const std::string& string_value() const { return string_value_; } + void set_string_value(const std::string& value) { string_value_ = value; _has_field_.set(6); } + + bool has_string_value_iid() const { return _has_field_[17]; } + uint64_t string_value_iid() const { return string_value_iid_; } + void set_string_value_iid(uint64_t value) { string_value_iid_ = value; _has_field_.set(17); } + bool has_proto_type_name() const { return _has_field_[16]; } const std::string& proto_type_name() const { return proto_type_name_; } void set_proto_type_name(const std::string& value) { proto_type_name_ = value; _has_field_.set(16); } @@ -31478,10 +34855,11 @@ class PERFETTO_EXPORT_COMPONENT DebugAnnotation : public ::protozero::CppMessage uint64_t uint_value_{}; int64_t int_value_{}; double double_value_{}; - std::string string_value_{}; uint64_t pointer_value_{}; ::protozero::CopyablePtr nested_value_; std::string legacy_json_value_{}; + std::string string_value_{}; + uint64_t string_value_iid_{}; std::string proto_type_name_{}; uint64_t proto_type_name_iid_{}; std::string proto_value_{}; @@ -31492,7 +34870,7 @@ class PERFETTO_EXPORT_COMPONENT DebugAnnotation : public ::protozero::CppMessage // with future versions of .proto files. std::string unknown_fields_; - std::bitset<17> _has_field_{}; + std::bitset<18> _has_field_{}; }; @@ -31590,6 +34968,7 @@ class PERFETTO_EXPORT_COMPONENT DebugAnnotation_NestedValue : public ::protozero } // namespace gen #endif // PERFETTO_PROTOS_PROTOS_PERFETTO_TRACE_TRACK_EVENT_DEBUG_ANNOTATION_PROTO_CPP_H_ +// gen_amalgamated expanded: #include "perfetto/protozero/gen_field_helpers.h" // gen_amalgamated expanded: #include "perfetto/protozero/message.h" // gen_amalgamated expanded: #include "perfetto/protozero/packed_repeated_fields.h" // gen_amalgamated expanded: #include "perfetto/protozero/proto_decoder.h" @@ -31632,7 +35011,7 @@ bool DebugAnnotationValueTypeName::ParseFromArray(const void* raw, size_t size) field.get(&iid_); break; case 2 /* name */: - field.get(&name_); + ::protozero::internal::gen_helpers::DeserializeString(field, &name_); break; default: field.SerializeAndAppendTo(&unknown_fields_); @@ -31643,13 +35022,13 @@ bool DebugAnnotationValueTypeName::ParseFromArray(const void* raw, size_t size) } std::string DebugAnnotationValueTypeName::SerializeAsString() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsString(); } std::vector DebugAnnotationValueTypeName::SerializeAsArray() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsArray(); } @@ -31657,15 +35036,15 @@ std::vector DebugAnnotationValueTypeName::SerializeAsArray() const { void DebugAnnotationValueTypeName::Serialize(::protozero::Message* msg) const { // Field 1: iid if (_has_field_[1]) { - msg->AppendVarInt(1, iid_); + ::protozero::internal::gen_helpers::SerializeVarInt(1, iid_, msg); } // Field 2: name if (_has_field_[2]) { - msg->AppendString(2, name_); + ::protozero::internal::gen_helpers::SerializeString(2, name_, msg); } - msg->AppendRawProtoBytes(unknown_fields_.data(), unknown_fields_.size()); + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); } @@ -31696,7 +35075,7 @@ bool DebugAnnotationName::ParseFromArray(const void* raw, size_t size) { field.get(&iid_); break; case 2 /* name */: - field.get(&name_); + ::protozero::internal::gen_helpers::DeserializeString(field, &name_); break; default: field.SerializeAndAppendTo(&unknown_fields_); @@ -31707,13 +35086,13 @@ bool DebugAnnotationName::ParseFromArray(const void* raw, size_t size) { } std::string DebugAnnotationName::SerializeAsString() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsString(); } std::vector DebugAnnotationName::SerializeAsArray() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsArray(); } @@ -31721,15 +35100,15 @@ std::vector DebugAnnotationName::SerializeAsArray() const { void DebugAnnotationName::Serialize(::protozero::Message* msg) const { // Field 1: iid if (_has_field_[1]) { - msg->AppendVarInt(1, iid_); + ::protozero::internal::gen_helpers::SerializeVarInt(1, iid_, msg); } // Field 2: name if (_has_field_[2]) { - msg->AppendString(2, name_); + ::protozero::internal::gen_helpers::SerializeString(2, name_, msg); } - msg->AppendRawProtoBytes(unknown_fields_.data(), unknown_fields_.size()); + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); } @@ -31748,10 +35127,11 @@ bool DebugAnnotation::operator==(const DebugAnnotation& other) const { && uint_value_ == other.uint_value_ && int_value_ == other.int_value_ && double_value_ == other.double_value_ - && string_value_ == other.string_value_ && pointer_value_ == other.pointer_value_ && nested_value_ == other.nested_value_ && legacy_json_value_ == other.legacy_json_value_ + && string_value_ == other.string_value_ + && string_value_iid_ == other.string_value_iid_ && proto_type_name_ == other.proto_type_name_ && proto_type_name_iid_ == other.proto_type_name_iid_ && proto_value_ == other.proto_value_ @@ -31781,7 +35161,7 @@ bool DebugAnnotation::ParseFromArray(const void* raw, size_t size) { field.get(&name_iid_); break; case 10 /* name */: - field.get(&name_); + ::protozero::internal::gen_helpers::DeserializeString(field, &name_); break; case 2 /* bool_value */: field.get(&bool_value_); @@ -31795,9 +35175,6 @@ bool DebugAnnotation::ParseFromArray(const void* raw, size_t size) { case 5 /* double_value */: field.get(&double_value_); break; - case 6 /* string_value */: - field.get(&string_value_); - break; case 7 /* pointer_value */: field.get(&pointer_value_); break; @@ -31805,10 +35182,16 @@ bool DebugAnnotation::ParseFromArray(const void* raw, size_t size) { (*nested_value_).ParseFromArray(field.data(), field.size()); break; case 9 /* legacy_json_value */: - field.get(&legacy_json_value_); + ::protozero::internal::gen_helpers::DeserializeString(field, &legacy_json_value_); + break; + case 6 /* string_value */: + ::protozero::internal::gen_helpers::DeserializeString(field, &string_value_); + break; + case 17 /* string_value_iid */: + field.get(&string_value_iid_); break; case 16 /* proto_type_name */: - field.get(&proto_type_name_); + ::protozero::internal::gen_helpers::DeserializeString(field, &proto_type_name_); break; case 13 /* proto_type_name_iid */: field.get(&proto_type_name_iid_); @@ -31833,13 +35216,13 @@ bool DebugAnnotation::ParseFromArray(const void* raw, size_t size) { } std::string DebugAnnotation::SerializeAsString() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsString(); } std::vector DebugAnnotation::SerializeAsArray() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsArray(); } @@ -31847,42 +35230,37 @@ std::vector DebugAnnotation::SerializeAsArray() const { void DebugAnnotation::Serialize(::protozero::Message* msg) const { // Field 1: name_iid if (_has_field_[1]) { - msg->AppendVarInt(1, name_iid_); + ::protozero::internal::gen_helpers::SerializeVarInt(1, name_iid_, msg); } // Field 10: name if (_has_field_[10]) { - msg->AppendString(10, name_); + ::protozero::internal::gen_helpers::SerializeString(10, name_, msg); } // Field 2: bool_value if (_has_field_[2]) { - msg->AppendTinyVarInt(2, bool_value_); + ::protozero::internal::gen_helpers::SerializeTinyVarInt(2, bool_value_, msg); } // Field 3: uint_value if (_has_field_[3]) { - msg->AppendVarInt(3, uint_value_); + ::protozero::internal::gen_helpers::SerializeVarInt(3, uint_value_, msg); } // Field 4: int_value if (_has_field_[4]) { - msg->AppendVarInt(4, int_value_); + ::protozero::internal::gen_helpers::SerializeVarInt(4, int_value_, msg); } // Field 5: double_value if (_has_field_[5]) { - msg->AppendFixed(5, double_value_); - } - - // Field 6: string_value - if (_has_field_[6]) { - msg->AppendString(6, string_value_); + ::protozero::internal::gen_helpers::SerializeFixed(5, double_value_, msg); } // Field 7: pointer_value if (_has_field_[7]) { - msg->AppendVarInt(7, pointer_value_); + ::protozero::internal::gen_helpers::SerializeVarInt(7, pointer_value_, msg); } // Field 8: nested_value @@ -31892,22 +35270,32 @@ void DebugAnnotation::Serialize(::protozero::Message* msg) const { // Field 9: legacy_json_value if (_has_field_[9]) { - msg->AppendString(9, legacy_json_value_); + ::protozero::internal::gen_helpers::SerializeString(9, legacy_json_value_, msg); + } + + // Field 6: string_value + if (_has_field_[6]) { + ::protozero::internal::gen_helpers::SerializeString(6, string_value_, msg); + } + + // Field 17: string_value_iid + if (_has_field_[17]) { + ::protozero::internal::gen_helpers::SerializeVarInt(17, string_value_iid_, msg); } // Field 16: proto_type_name if (_has_field_[16]) { - msg->AppendString(16, proto_type_name_); + ::protozero::internal::gen_helpers::SerializeString(16, proto_type_name_, msg); } // Field 13: proto_type_name_iid if (_has_field_[13]) { - msg->AppendVarInt(13, proto_type_name_iid_); + ::protozero::internal::gen_helpers::SerializeVarInt(13, proto_type_name_iid_, msg); } // Field 14: proto_value if (_has_field_[14]) { - msg->AppendString(14, proto_value_); + ::protozero::internal::gen_helpers::SerializeString(14, proto_value_, msg); } // Field 11: dict_entries @@ -31920,7 +35308,7 @@ void DebugAnnotation::Serialize(::protozero::Message* msg) const { it.Serialize(msg->BeginNestedMessage<::protozero::Message>(12)); } - msg->AppendRawProtoBytes(unknown_fields_.data(), unknown_fields_.size()); + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); } @@ -31967,7 +35355,7 @@ bool DebugAnnotation_NestedValue::ParseFromArray(const void* raw, size_t size) { break; case 2 /* dict_keys */: dict_keys_.emplace_back(); - field.get(&dict_keys_.back()); + ::protozero::internal::gen_helpers::DeserializeString(field, &dict_keys_.back()); break; case 3 /* dict_values */: dict_values_.emplace_back(); @@ -31987,7 +35375,7 @@ bool DebugAnnotation_NestedValue::ParseFromArray(const void* raw, size_t size) { field.get(&bool_value_); break; case 8 /* string_value */: - field.get(&string_value_); + ::protozero::internal::gen_helpers::DeserializeString(field, &string_value_); break; default: field.SerializeAndAppendTo(&unknown_fields_); @@ -31998,13 +35386,13 @@ bool DebugAnnotation_NestedValue::ParseFromArray(const void* raw, size_t size) { } std::string DebugAnnotation_NestedValue::SerializeAsString() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsString(); } std::vector DebugAnnotation_NestedValue::SerializeAsArray() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsArray(); } @@ -32012,12 +35400,12 @@ std::vector DebugAnnotation_NestedValue::SerializeAsArray() const { void DebugAnnotation_NestedValue::Serialize(::protozero::Message* msg) const { // Field 1: nested_type if (_has_field_[1]) { - msg->AppendVarInt(1, nested_type_); + ::protozero::internal::gen_helpers::SerializeVarInt(1, nested_type_, msg); } // Field 2: dict_keys for (auto& it : dict_keys_) { - msg->AppendString(2, it); + ::protozero::internal::gen_helpers::SerializeString(2, it, msg); } // Field 3: dict_values @@ -32032,25 +35420,25 @@ void DebugAnnotation_NestedValue::Serialize(::protozero::Message* msg) const { // Field 5: int_value if (_has_field_[5]) { - msg->AppendVarInt(5, int_value_); + ::protozero::internal::gen_helpers::SerializeVarInt(5, int_value_, msg); } // Field 6: double_value if (_has_field_[6]) { - msg->AppendFixed(6, double_value_); + ::protozero::internal::gen_helpers::SerializeFixed(6, double_value_, msg); } // Field 7: bool_value if (_has_field_[7]) { - msg->AppendTinyVarInt(7, bool_value_); + ::protozero::internal::gen_helpers::SerializeTinyVarInt(7, bool_value_, msg); } // Field 8: string_value if (_has_field_[8]) { - msg->AppendString(8, string_value_); + ::protozero::internal::gen_helpers::SerializeString(8, string_value_, msg); } - msg->AppendRawProtoBytes(unknown_fields_.data(), unknown_fields_.size()); + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); } } // namespace perfetto @@ -32178,6 +35566,7 @@ class PERFETTO_EXPORT_COMPONENT LogMessage : public ::protozero::CppMessageObj { } // namespace gen #endif // PERFETTO_PROTOS_PROTOS_PERFETTO_TRACE_TRACK_EVENT_LOG_MESSAGE_PROTO_CPP_H_ +// gen_amalgamated expanded: #include "perfetto/protozero/gen_field_helpers.h" // gen_amalgamated expanded: #include "perfetto/protozero/message.h" // gen_amalgamated expanded: #include "perfetto/protozero/packed_repeated_fields.h" // gen_amalgamated expanded: #include "perfetto/protozero/proto_decoder.h" @@ -32220,7 +35609,7 @@ bool LogMessageBody::ParseFromArray(const void* raw, size_t size) { field.get(&iid_); break; case 2 /* body */: - field.get(&body_); + ::protozero::internal::gen_helpers::DeserializeString(field, &body_); break; default: field.SerializeAndAppendTo(&unknown_fields_); @@ -32231,13 +35620,13 @@ bool LogMessageBody::ParseFromArray(const void* raw, size_t size) { } std::string LogMessageBody::SerializeAsString() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsString(); } std::vector LogMessageBody::SerializeAsArray() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsArray(); } @@ -32245,15 +35634,15 @@ std::vector LogMessageBody::SerializeAsArray() const { void LogMessageBody::Serialize(::protozero::Message* msg) const { // Field 1: iid if (_has_field_[1]) { - msg->AppendVarInt(1, iid_); + ::protozero::internal::gen_helpers::SerializeVarInt(1, iid_, msg); } // Field 2: body if (_has_field_[2]) { - msg->AppendString(2, body_); + ::protozero::internal::gen_helpers::SerializeString(2, body_, msg); } - msg->AppendRawProtoBytes(unknown_fields_.data(), unknown_fields_.size()); + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); } @@ -32295,13 +35684,13 @@ bool LogMessage::ParseFromArray(const void* raw, size_t size) { } std::string LogMessage::SerializeAsString() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsString(); } std::vector LogMessage::SerializeAsArray() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsArray(); } @@ -32309,15 +35698,15 @@ std::vector LogMessage::SerializeAsArray() const { void LogMessage::Serialize(::protozero::Message* msg) const { // Field 1: source_location_iid if (_has_field_[1]) { - msg->AppendVarInt(1, source_location_iid_); + ::protozero::internal::gen_helpers::SerializeVarInt(1, source_location_iid_, msg); } // Field 2: body_iid if (_has_field_[2]) { - msg->AppendVarInt(2, body_iid_); + ::protozero::internal::gen_helpers::SerializeVarInt(2, body_iid_, msg); } - msg->AppendRawProtoBytes(unknown_fields_.data(), unknown_fields_.size()); + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); } } // namespace perfetto @@ -32469,6 +35858,7 @@ class PERFETTO_EXPORT_COMPONENT ProcessDescriptor : public ::protozero::CppMessa } // namespace gen #endif // PERFETTO_PROTOS_PROTOS_PERFETTO_TRACE_TRACK_EVENT_PROCESS_DESCRIPTOR_PROTO_CPP_H_ +// gen_amalgamated expanded: #include "perfetto/protozero/gen_field_helpers.h" // gen_amalgamated expanded: #include "perfetto/protozero/message.h" // gen_amalgamated expanded: #include "perfetto/protozero/packed_repeated_fields.h" // gen_amalgamated expanded: #include "perfetto/protozero/proto_decoder.h" @@ -32520,10 +35910,10 @@ bool ProcessDescriptor::ParseFromArray(const void* raw, size_t size) { break; case 2 /* cmdline */: cmdline_.emplace_back(); - field.get(&cmdline_.back()); + ::protozero::internal::gen_helpers::DeserializeString(field, &cmdline_.back()); break; case 6 /* process_name */: - field.get(&process_name_); + ::protozero::internal::gen_helpers::DeserializeString(field, &process_name_); break; case 5 /* process_priority */: field.get(&process_priority_); @@ -32539,7 +35929,7 @@ bool ProcessDescriptor::ParseFromArray(const void* raw, size_t size) { break; case 8 /* process_labels */: process_labels_.emplace_back(); - field.get(&process_labels_.back()); + ::protozero::internal::gen_helpers::DeserializeString(field, &process_labels_.back()); break; default: field.SerializeAndAppendTo(&unknown_fields_); @@ -32550,13 +35940,13 @@ bool ProcessDescriptor::ParseFromArray(const void* raw, size_t size) { } std::string ProcessDescriptor::SerializeAsString() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsString(); } std::vector ProcessDescriptor::SerializeAsArray() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsArray(); } @@ -32564,45 +35954,192 @@ std::vector ProcessDescriptor::SerializeAsArray() const { void ProcessDescriptor::Serialize(::protozero::Message* msg) const { // Field 1: pid if (_has_field_[1]) { - msg->AppendVarInt(1, pid_); + ::protozero::internal::gen_helpers::SerializeVarInt(1, pid_, msg); } // Field 2: cmdline for (auto& it : cmdline_) { - msg->AppendString(2, it); + ::protozero::internal::gen_helpers::SerializeString(2, it, msg); } // Field 6: process_name if (_has_field_[6]) { - msg->AppendString(6, process_name_); + ::protozero::internal::gen_helpers::SerializeString(6, process_name_, msg); } // Field 5: process_priority if (_has_field_[5]) { - msg->AppendVarInt(5, process_priority_); + ::protozero::internal::gen_helpers::SerializeVarInt(5, process_priority_, msg); } // Field 7: start_timestamp_ns if (_has_field_[7]) { - msg->AppendVarInt(7, start_timestamp_ns_); + ::protozero::internal::gen_helpers::SerializeVarInt(7, start_timestamp_ns_, msg); } // Field 4: chrome_process_type if (_has_field_[4]) { - msg->AppendVarInt(4, chrome_process_type_); + ::protozero::internal::gen_helpers::SerializeVarInt(4, chrome_process_type_, msg); } // Field 3: legacy_sort_index if (_has_field_[3]) { - msg->AppendVarInt(3, legacy_sort_index_); + ::protozero::internal::gen_helpers::SerializeVarInt(3, legacy_sort_index_, msg); } // Field 8: process_labels for (auto& it : process_labels_) { - msg->AppendString(8, it); + ::protozero::internal::gen_helpers::SerializeString(8, it, msg); } - msg->AppendRawProtoBytes(unknown_fields_.data(), unknown_fields_.size()); + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); +} + +} // namespace perfetto +} // namespace protos +} // namespace gen +#if defined(__GNUC__) || defined(__clang__) +#pragma GCC diagnostic pop +#endif +// gen_amalgamated begin source: gen/protos/perfetto/trace/track_event/range_of_interest.gen.cc +// gen_amalgamated begin header: gen/protos/perfetto/trace/track_event/range_of_interest.gen.h +// DO NOT EDIT. Autogenerated by Perfetto cppgen_plugin +#ifndef PERFETTO_PROTOS_PROTOS_PERFETTO_TRACE_TRACK_EVENT_RANGE_OF_INTEREST_PROTO_CPP_H_ +#define PERFETTO_PROTOS_PROTOS_PERFETTO_TRACE_TRACK_EVENT_RANGE_OF_INTEREST_PROTO_CPP_H_ + +#include +#include +#include +#include +#include + +// gen_amalgamated expanded: #include "perfetto/protozero/cpp_message_obj.h" +// gen_amalgamated expanded: #include "perfetto/protozero/copyable_ptr.h" +// gen_amalgamated expanded: #include "perfetto/base/export.h" + +namespace perfetto { +namespace protos { +namespace gen { +class TrackEventRangeOfInterest; +} // namespace perfetto +} // namespace protos +} // namespace gen + +namespace protozero { +class Message; +} // namespace protozero + +namespace perfetto { +namespace protos { +namespace gen { + +class PERFETTO_EXPORT_COMPONENT TrackEventRangeOfInterest : public ::protozero::CppMessageObj { + public: + enum FieldNumbers { + kStartUsFieldNumber = 1, + }; + + TrackEventRangeOfInterest(); + ~TrackEventRangeOfInterest() override; + TrackEventRangeOfInterest(TrackEventRangeOfInterest&&) noexcept; + TrackEventRangeOfInterest& operator=(TrackEventRangeOfInterest&&); + TrackEventRangeOfInterest(const TrackEventRangeOfInterest&); + TrackEventRangeOfInterest& operator=(const TrackEventRangeOfInterest&); + bool operator==(const TrackEventRangeOfInterest&) const; + bool operator!=(const TrackEventRangeOfInterest& other) const { return !(*this == other); } + + bool ParseFromArray(const void*, size_t) override; + std::string SerializeAsString() const override; + std::vector SerializeAsArray() const override; + void Serialize(::protozero::Message*) const; + + bool has_start_us() const { return _has_field_[1]; } + int64_t start_us() const { return start_us_; } + void set_start_us(int64_t value) { start_us_ = value; _has_field_.set(1); } + + private: + int64_t start_us_{}; + + // Allows to preserve unknown protobuf fields for compatibility + // with future versions of .proto files. + std::string unknown_fields_; + + std::bitset<2> _has_field_{}; +}; + +} // namespace perfetto +} // namespace protos +} // namespace gen + +#endif // PERFETTO_PROTOS_PROTOS_PERFETTO_TRACE_TRACK_EVENT_RANGE_OF_INTEREST_PROTO_CPP_H_ +// gen_amalgamated expanded: #include "perfetto/protozero/gen_field_helpers.h" +// gen_amalgamated expanded: #include "perfetto/protozero/message.h" +// gen_amalgamated expanded: #include "perfetto/protozero/packed_repeated_fields.h" +// gen_amalgamated expanded: #include "perfetto/protozero/proto_decoder.h" +// gen_amalgamated expanded: #include "perfetto/protozero/scattered_heap_buffer.h" +// DO NOT EDIT. Autogenerated by Perfetto cppgen_plugin +#if defined(__GNUC__) || defined(__clang__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wfloat-equal" +#endif +// gen_amalgamated expanded: #include "protos/perfetto/trace/track_event/range_of_interest.gen.h" + +namespace perfetto { +namespace protos { +namespace gen { + +TrackEventRangeOfInterest::TrackEventRangeOfInterest() = default; +TrackEventRangeOfInterest::~TrackEventRangeOfInterest() = default; +TrackEventRangeOfInterest::TrackEventRangeOfInterest(const TrackEventRangeOfInterest&) = default; +TrackEventRangeOfInterest& TrackEventRangeOfInterest::operator=(const TrackEventRangeOfInterest&) = default; +TrackEventRangeOfInterest::TrackEventRangeOfInterest(TrackEventRangeOfInterest&&) noexcept = default; +TrackEventRangeOfInterest& TrackEventRangeOfInterest::operator=(TrackEventRangeOfInterest&&) = default; + +bool TrackEventRangeOfInterest::operator==(const TrackEventRangeOfInterest& other) const { + return unknown_fields_ == other.unknown_fields_ + && start_us_ == other.start_us_; +} + +bool TrackEventRangeOfInterest::ParseFromArray(const void* raw, size_t size) { + unknown_fields_.clear(); + bool packed_error = false; + + ::protozero::ProtoDecoder dec(raw, size); + for (auto field = dec.ReadField(); field.valid(); field = dec.ReadField()) { + if (field.id() < _has_field_.size()) { + _has_field_.set(field.id()); + } + switch (field.id()) { + case 1 /* start_us */: + field.get(&start_us_); + break; + default: + field.SerializeAndAppendTo(&unknown_fields_); + break; + } + } + return !packed_error && !dec.bytes_left(); +} + +std::string TrackEventRangeOfInterest::SerializeAsString() const { + ::protozero::internal::gen_helpers::MessageSerializer msg; + Serialize(msg.get()); + return msg.SerializeAsString(); +} + +std::vector TrackEventRangeOfInterest::SerializeAsArray() const { + ::protozero::internal::gen_helpers::MessageSerializer msg; + Serialize(msg.get()); + return msg.SerializeAsArray(); +} + +void TrackEventRangeOfInterest::Serialize(::protozero::Message* msg) const { + // Field 1: start_us + if (_has_field_[1]) { + ::protozero::internal::gen_helpers::SerializeVarInt(1, start_us_, msg); + } + + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); } } // namespace perfetto @@ -32612,6 +36149,7 @@ void ProcessDescriptor::Serialize(::protozero::Message* msg) const { #pragma GCC diagnostic pop #endif // gen_amalgamated begin source: gen/protos/perfetto/trace/track_event/source_location.gen.cc +// gen_amalgamated expanded: #include "perfetto/protozero/gen_field_helpers.h" // gen_amalgamated expanded: #include "perfetto/protozero/message.h" // gen_amalgamated expanded: #include "perfetto/protozero/packed_repeated_fields.h" // gen_amalgamated expanded: #include "perfetto/protozero/proto_decoder.h" @@ -32656,10 +36194,10 @@ bool SourceLocation::ParseFromArray(const void* raw, size_t size) { field.get(&iid_); break; case 2 /* file_name */: - field.get(&file_name_); + ::protozero::internal::gen_helpers::DeserializeString(field, &file_name_); break; case 3 /* function_name */: - field.get(&function_name_); + ::protozero::internal::gen_helpers::DeserializeString(field, &function_name_); break; case 4 /* line_number */: field.get(&line_number_); @@ -32673,13 +36211,13 @@ bool SourceLocation::ParseFromArray(const void* raw, size_t size) { } std::string SourceLocation::SerializeAsString() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsString(); } std::vector SourceLocation::SerializeAsArray() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsArray(); } @@ -32687,25 +36225,25 @@ std::vector SourceLocation::SerializeAsArray() const { void SourceLocation::Serialize(::protozero::Message* msg) const { // Field 1: iid if (_has_field_[1]) { - msg->AppendVarInt(1, iid_); + ::protozero::internal::gen_helpers::SerializeVarInt(1, iid_, msg); } // Field 2: file_name if (_has_field_[2]) { - msg->AppendString(2, file_name_); + ::protozero::internal::gen_helpers::SerializeString(2, file_name_, msg); } // Field 3: function_name if (_has_field_[3]) { - msg->AppendString(3, function_name_); + ::protozero::internal::gen_helpers::SerializeString(3, function_name_, msg); } // Field 4: line_number if (_has_field_[4]) { - msg->AppendVarInt(4, line_number_); + ::protozero::internal::gen_helpers::SerializeVarInt(4, line_number_, msg); } - msg->AppendRawProtoBytes(unknown_fields_.data(), unknown_fields_.size()); + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); } @@ -32751,13 +36289,13 @@ bool UnsymbolizedSourceLocation::ParseFromArray(const void* raw, size_t size) { } std::string UnsymbolizedSourceLocation::SerializeAsString() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsString(); } std::vector UnsymbolizedSourceLocation::SerializeAsArray() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsArray(); } @@ -32765,20 +36303,20 @@ std::vector UnsymbolizedSourceLocation::SerializeAsArray() const { void UnsymbolizedSourceLocation::Serialize(::protozero::Message* msg) const { // Field 1: iid if (_has_field_[1]) { - msg->AppendVarInt(1, iid_); + ::protozero::internal::gen_helpers::SerializeVarInt(1, iid_, msg); } // Field 2: mapping_id if (_has_field_[2]) { - msg->AppendVarInt(2, mapping_id_); + ::protozero::internal::gen_helpers::SerializeVarInt(2, mapping_id_, msg); } // Field 3: rel_pc if (_has_field_[3]) { - msg->AppendVarInt(3, rel_pc_); + ::protozero::internal::gen_helpers::SerializeVarInt(3, rel_pc_, msg); } - msg->AppendRawProtoBytes(unknown_fields_.data(), unknown_fields_.size()); + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); } } // namespace perfetto @@ -32858,6 +36396,7 @@ class PERFETTO_EXPORT_COMPONENT TaskExecution : public ::protozero::CppMessageOb } // namespace gen #endif // PERFETTO_PROTOS_PROTOS_PERFETTO_TRACE_TRACK_EVENT_TASK_EXECUTION_PROTO_CPP_H_ +// gen_amalgamated expanded: #include "perfetto/protozero/gen_field_helpers.h" // gen_amalgamated expanded: #include "perfetto/protozero/message.h" // gen_amalgamated expanded: #include "perfetto/protozero/packed_repeated_fields.h" // gen_amalgamated expanded: #include "perfetto/protozero/proto_decoder.h" @@ -32907,13 +36446,13 @@ bool TaskExecution::ParseFromArray(const void* raw, size_t size) { } std::string TaskExecution::SerializeAsString() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsString(); } std::vector TaskExecution::SerializeAsArray() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsArray(); } @@ -32921,10 +36460,10 @@ std::vector TaskExecution::SerializeAsArray() const { void TaskExecution::Serialize(::protozero::Message* msg) const { // Field 1: posted_from_iid if (_has_field_[1]) { - msg->AppendVarInt(1, posted_from_iid_); + ::protozero::internal::gen_helpers::SerializeVarInt(1, posted_from_iid_, msg); } - msg->AppendRawProtoBytes(unknown_fields_.data(), unknown_fields_.size()); + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); } } // namespace perfetto @@ -33080,6 +36619,7 @@ class PERFETTO_EXPORT_COMPONENT ThreadDescriptor : public ::protozero::CppMessag } // namespace gen #endif // PERFETTO_PROTOS_PROTOS_PERFETTO_TRACE_TRACK_EVENT_THREAD_DESCRIPTOR_PROTO_CPP_H_ +// gen_amalgamated expanded: #include "perfetto/protozero/gen_field_helpers.h" // gen_amalgamated expanded: #include "perfetto/protozero/message.h" // gen_amalgamated expanded: #include "perfetto/protozero/packed_repeated_fields.h" // gen_amalgamated expanded: #include "perfetto/protozero/proto_decoder.h" @@ -33131,7 +36671,7 @@ bool ThreadDescriptor::ParseFromArray(const void* raw, size_t size) { field.get(&tid_); break; case 5 /* thread_name */: - field.get(&thread_name_); + ::protozero::internal::gen_helpers::DeserializeString(field, &thread_name_); break; case 4 /* chrome_thread_type */: field.get(&chrome_thread_type_); @@ -33157,13 +36697,13 @@ bool ThreadDescriptor::ParseFromArray(const void* raw, size_t size) { } std::string ThreadDescriptor::SerializeAsString() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsString(); } std::vector ThreadDescriptor::SerializeAsArray() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsArray(); } @@ -33171,45 +36711,45 @@ std::vector ThreadDescriptor::SerializeAsArray() const { void ThreadDescriptor::Serialize(::protozero::Message* msg) const { // Field 1: pid if (_has_field_[1]) { - msg->AppendVarInt(1, pid_); + ::protozero::internal::gen_helpers::SerializeVarInt(1, pid_, msg); } // Field 2: tid if (_has_field_[2]) { - msg->AppendVarInt(2, tid_); + ::protozero::internal::gen_helpers::SerializeVarInt(2, tid_, msg); } // Field 5: thread_name if (_has_field_[5]) { - msg->AppendString(5, thread_name_); + ::protozero::internal::gen_helpers::SerializeString(5, thread_name_, msg); } // Field 4: chrome_thread_type if (_has_field_[4]) { - msg->AppendVarInt(4, chrome_thread_type_); + ::protozero::internal::gen_helpers::SerializeVarInt(4, chrome_thread_type_, msg); } // Field 6: reference_timestamp_us if (_has_field_[6]) { - msg->AppendVarInt(6, reference_timestamp_us_); + ::protozero::internal::gen_helpers::SerializeVarInt(6, reference_timestamp_us_, msg); } // Field 7: reference_thread_time_us if (_has_field_[7]) { - msg->AppendVarInt(7, reference_thread_time_us_); + ::protozero::internal::gen_helpers::SerializeVarInt(7, reference_thread_time_us_, msg); } // Field 8: reference_thread_instruction_count if (_has_field_[8]) { - msg->AppendVarInt(8, reference_thread_instruction_count_); + ::protozero::internal::gen_helpers::SerializeVarInt(8, reference_thread_instruction_count_, msg); } // Field 3: legacy_sort_index if (_has_field_[3]) { - msg->AppendVarInt(3, legacy_sort_index_); + ::protozero::internal::gen_helpers::SerializeVarInt(3, legacy_sort_index_, msg); } - msg->AppendRawProtoBytes(unknown_fields_.data(), unknown_fields_.size()); + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); } } // namespace perfetto @@ -33219,6 +36759,7 @@ void ThreadDescriptor::Serialize(::protozero::Message* msg) const { #pragma GCC diagnostic pop #endif // gen_amalgamated begin source: gen/protos/perfetto/trace/track_event/track_descriptor.gen.cc +// gen_amalgamated expanded: #include "perfetto/protozero/gen_field_helpers.h" // gen_amalgamated expanded: #include "perfetto/protozero/message.h" // gen_amalgamated expanded: #include "perfetto/protozero/packed_repeated_fields.h" // gen_amalgamated expanded: #include "perfetto/protozero/proto_decoder.h" @@ -33255,7 +36796,8 @@ bool TrackDescriptor::operator==(const TrackDescriptor& other) const { && chrome_process_ == other.chrome_process_ && thread_ == other.thread_ && chrome_thread_ == other.chrome_thread_ - && counter_ == other.counter_; + && counter_ == other.counter_ + && disallow_merging_with_system_tracks_ == other.disallow_merging_with_system_tracks_; } bool TrackDescriptor::ParseFromArray(const void* raw, size_t size) { @@ -33275,7 +36817,7 @@ bool TrackDescriptor::ParseFromArray(const void* raw, size_t size) { field.get(&parent_uuid_); break; case 2 /* name */: - field.get(&name_); + ::protozero::internal::gen_helpers::DeserializeString(field, &name_); break; case 3 /* process */: (*process_).ParseFromArray(field.data(), field.size()); @@ -33292,6 +36834,9 @@ bool TrackDescriptor::ParseFromArray(const void* raw, size_t size) { case 8 /* counter */: (*counter_).ParseFromArray(field.data(), field.size()); break; + case 9 /* disallow_merging_with_system_tracks */: + field.get(&disallow_merging_with_system_tracks_); + break; default: field.SerializeAndAppendTo(&unknown_fields_); break; @@ -33301,13 +36846,13 @@ bool TrackDescriptor::ParseFromArray(const void* raw, size_t size) { } std::string TrackDescriptor::SerializeAsString() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsString(); } std::vector TrackDescriptor::SerializeAsArray() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsArray(); } @@ -33315,17 +36860,17 @@ std::vector TrackDescriptor::SerializeAsArray() const { void TrackDescriptor::Serialize(::protozero::Message* msg) const { // Field 1: uuid if (_has_field_[1]) { - msg->AppendVarInt(1, uuid_); + ::protozero::internal::gen_helpers::SerializeVarInt(1, uuid_, msg); } // Field 5: parent_uuid if (_has_field_[5]) { - msg->AppendVarInt(5, parent_uuid_); + ::protozero::internal::gen_helpers::SerializeVarInt(5, parent_uuid_, msg); } // Field 2: name if (_has_field_[2]) { - msg->AppendString(2, name_); + ::protozero::internal::gen_helpers::SerializeString(2, name_, msg); } // Field 3: process @@ -33353,7 +36898,12 @@ void TrackDescriptor::Serialize(::protozero::Message* msg) const { (*counter_).Serialize(msg->BeginNestedMessage<::protozero::Message>(8)); } - msg->AppendRawProtoBytes(unknown_fields_.data(), unknown_fields_.size()); + // Field 9: disallow_merging_with_system_tracks + if (_has_field_[9]) { + ::protozero::internal::gen_helpers::SerializeTinyVarInt(9, disallow_merging_with_system_tracks_, msg); + } + + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); } } // namespace perfetto @@ -33389,6 +36939,7 @@ class TrackEvent_LegacyEvent; class ChromeMojoEventInfo; class ChromeMessagePump; class SourceLocation; +class ChromeActiveProcesses; class ChromeContentSettingsEventInfo; class ChromeWindowHandleEventInfo; class ChromeRendererSchedulerState; @@ -33422,6 +36973,7 @@ enum ChromeApplicationStateInfo_ChromeApplicationState : int; enum ChromeFrameReporter_State : int; enum ChromeFrameReporter_FrameDropReason : int; enum ChromeFrameReporter_ScrollState : int; +enum ChromeFrameReporter_FrameType : int; enum ChromeLatencyInfo_Step : int; enum ChromeLatencyInfo_LatencyComponentType : int; enum ChromeLegacyIpc_MessageClass : int; @@ -33626,8 +37178,10 @@ class PERFETTO_EXPORT_COMPONENT TrackEvent : public ::protozero::CppMessageObj { kExtraCounterValuesFieldNumber = 12, kExtraDoubleCounterTrackUuidsFieldNumber = 45, kExtraDoubleCounterValuesFieldNumber = 46, - kFlowIdsFieldNumber = 36, - kTerminatingFlowIdsFieldNumber = 42, + kFlowIdsOldFieldNumber = 36, + kFlowIdsFieldNumber = 47, + kTerminatingFlowIdsOldFieldNumber = 42, + kTerminatingFlowIdsFieldNumber = 48, kDebugAnnotationsFieldNumber = 4, kTaskExecutionFieldNumber = 5, kLogMessageFieldNumber = 21, @@ -33642,6 +37196,7 @@ class PERFETTO_EXPORT_COMPONENT TrackEvent : public ::protozero::CppMessageObj { kChromeRendererSchedulerStateFieldNumber = 40, kChromeWindowHandleEventInfoFieldNumber = 41, kChromeContentSettingsEventInfoFieldNumber = 43, + kChromeActiveProcessesFieldNumber = 49, kSourceLocationFieldNumber = 33, kSourceLocationIidFieldNumber = 34, kChromeMessagePumpFieldNumber = 35, @@ -33735,6 +37290,13 @@ class PERFETTO_EXPORT_COMPONENT TrackEvent : public ::protozero::CppMessageObj { void add_extra_double_counter_values(double value) { extra_double_counter_values_.emplace_back(value); } double* add_extra_double_counter_values() { extra_double_counter_values_.emplace_back(); return &extra_double_counter_values_.back(); } + const std::vector& flow_ids_old() const { return flow_ids_old_; } + std::vector* mutable_flow_ids_old() { return &flow_ids_old_; } + int flow_ids_old_size() const { return static_cast(flow_ids_old_.size()); } + void clear_flow_ids_old() { flow_ids_old_.clear(); } + void add_flow_ids_old(uint64_t value) { flow_ids_old_.emplace_back(value); } + uint64_t* add_flow_ids_old() { flow_ids_old_.emplace_back(); return &flow_ids_old_.back(); } + const std::vector& flow_ids() const { return flow_ids_; } std::vector* mutable_flow_ids() { return &flow_ids_; } int flow_ids_size() const { return static_cast(flow_ids_.size()); } @@ -33742,6 +37304,13 @@ class PERFETTO_EXPORT_COMPONENT TrackEvent : public ::protozero::CppMessageObj { void add_flow_ids(uint64_t value) { flow_ids_.emplace_back(value); } uint64_t* add_flow_ids() { flow_ids_.emplace_back(); return &flow_ids_.back(); } + const std::vector& terminating_flow_ids_old() const { return terminating_flow_ids_old_; } + std::vector* mutable_terminating_flow_ids_old() { return &terminating_flow_ids_old_; } + int terminating_flow_ids_old_size() const { return static_cast(terminating_flow_ids_old_.size()); } + void clear_terminating_flow_ids_old() { terminating_flow_ids_old_.clear(); } + void add_terminating_flow_ids_old(uint64_t value) { terminating_flow_ids_old_.emplace_back(value); } + uint64_t* add_terminating_flow_ids_old() { terminating_flow_ids_old_.emplace_back(); return &terminating_flow_ids_old_.back(); } + const std::vector& terminating_flow_ids() const { return terminating_flow_ids_; } std::vector* mutable_terminating_flow_ids() { return &terminating_flow_ids_; } int terminating_flow_ids_size() const { return static_cast(terminating_flow_ids_.size()); } @@ -33807,6 +37376,10 @@ class PERFETTO_EXPORT_COMPONENT TrackEvent : public ::protozero::CppMessageObj { const ChromeContentSettingsEventInfo& chrome_content_settings_event_info() const { return *chrome_content_settings_event_info_; } ChromeContentSettingsEventInfo* mutable_chrome_content_settings_event_info() { _has_field_.set(43); return chrome_content_settings_event_info_.get(); } + bool has_chrome_active_processes() const { return _has_field_[49]; } + const ChromeActiveProcesses& chrome_active_processes() const { return *chrome_active_processes_; } + ChromeActiveProcesses* mutable_chrome_active_processes() { _has_field_.set(49); return chrome_active_processes_.get(); } + bool has_source_location() const { return _has_field_[33]; } const SourceLocation& source_location() const { return *source_location_; } SourceLocation* mutable_source_location() { _has_field_.set(33); return source_location_.get(); } @@ -33864,7 +37437,9 @@ class PERFETTO_EXPORT_COMPONENT TrackEvent : public ::protozero::CppMessageObj { std::vector extra_counter_values_; std::vector extra_double_counter_track_uuids_; std::vector extra_double_counter_values_; + std::vector flow_ids_old_; std::vector flow_ids_; + std::vector terminating_flow_ids_old_; std::vector terminating_flow_ids_; std::vector debug_annotations_; ::protozero::CopyablePtr task_execution_; @@ -33880,6 +37455,7 @@ class PERFETTO_EXPORT_COMPONENT TrackEvent : public ::protozero::CppMessageObj { ::protozero::CopyablePtr chrome_renderer_scheduler_state_; ::protozero::CopyablePtr chrome_window_handle_event_info_; ::protozero::CopyablePtr chrome_content_settings_event_info_; + ::protozero::CopyablePtr chrome_active_processes_; ::protozero::CopyablePtr source_location_; uint64_t source_location_iid_{}; ::protozero::CopyablePtr chrome_message_pump_; @@ -33896,7 +37472,7 @@ class PERFETTO_EXPORT_COMPONENT TrackEvent : public ::protozero::CppMessageObj { // with future versions of .proto files. std::string unknown_fields_; - std::bitset<47> _has_field_{}; + std::bitset<50> _has_field_{}; }; @@ -34043,6 +37619,7 @@ class PERFETTO_EXPORT_COMPONENT TrackEvent_LegacyEvent : public ::protozero::Cpp } // namespace gen #endif // PERFETTO_PROTOS_PROTOS_PERFETTO_TRACE_TRACK_EVENT_TRACK_EVENT_PROTO_CPP_H_ +// gen_amalgamated expanded: #include "perfetto/protozero/gen_field_helpers.h" // gen_amalgamated expanded: #include "perfetto/protozero/message.h" // gen_amalgamated expanded: #include "perfetto/protozero/packed_repeated_fields.h" // gen_amalgamated expanded: #include "perfetto/protozero/proto_decoder.h" @@ -34067,6 +37644,7 @@ class PERFETTO_EXPORT_COMPONENT TrackEvent_LegacyEvent : public ::protozero::Cpp // gen_amalgamated expanded: #include "protos/perfetto/trace/track_event/chrome_content_settings_event_info.gen.h" // gen_amalgamated expanded: #include "protos/perfetto/trace/track_event/chrome_compositor_scheduler_state.gen.h" // gen_amalgamated expanded: #include "protos/perfetto/trace/track_event/chrome_application_state_info.gen.h" +// gen_amalgamated expanded: #include "protos/perfetto/trace/track_event/chrome_active_processes.gen.h" // gen_amalgamated expanded: #include "protos/perfetto/trace/track_event/task_execution.gen.h" // gen_amalgamated expanded: #include "protos/perfetto/trace/track_event/log_message.gen.h" // gen_amalgamated expanded: #include "protos/perfetto/trace/track_event/debug_annotation.gen.h" @@ -34102,7 +37680,7 @@ bool EventName::ParseFromArray(const void* raw, size_t size) { field.get(&iid_); break; case 2 /* name */: - field.get(&name_); + ::protozero::internal::gen_helpers::DeserializeString(field, &name_); break; default: field.SerializeAndAppendTo(&unknown_fields_); @@ -34113,13 +37691,13 @@ bool EventName::ParseFromArray(const void* raw, size_t size) { } std::string EventName::SerializeAsString() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsString(); } std::vector EventName::SerializeAsArray() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsArray(); } @@ -34127,15 +37705,15 @@ std::vector EventName::SerializeAsArray() const { void EventName::Serialize(::protozero::Message* msg) const { // Field 1: iid if (_has_field_[1]) { - msg->AppendVarInt(1, iid_); + ::protozero::internal::gen_helpers::SerializeVarInt(1, iid_, msg); } // Field 2: name if (_has_field_[2]) { - msg->AppendString(2, name_); + ::protozero::internal::gen_helpers::SerializeString(2, name_, msg); } - msg->AppendRawProtoBytes(unknown_fields_.data(), unknown_fields_.size()); + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); } @@ -34166,7 +37744,7 @@ bool EventCategory::ParseFromArray(const void* raw, size_t size) { field.get(&iid_); break; case 2 /* name */: - field.get(&name_); + ::protozero::internal::gen_helpers::DeserializeString(field, &name_); break; default: field.SerializeAndAppendTo(&unknown_fields_); @@ -34177,13 +37755,13 @@ bool EventCategory::ParseFromArray(const void* raw, size_t size) { } std::string EventCategory::SerializeAsString() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsString(); } std::vector EventCategory::SerializeAsArray() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsArray(); } @@ -34191,15 +37769,15 @@ std::vector EventCategory::SerializeAsArray() const { void EventCategory::Serialize(::protozero::Message* msg) const { // Field 1: iid if (_has_field_[1]) { - msg->AppendVarInt(1, iid_); + ::protozero::internal::gen_helpers::SerializeVarInt(1, iid_, msg); } // Field 2: name if (_has_field_[2]) { - msg->AppendString(2, name_); + ::protozero::internal::gen_helpers::SerializeString(2, name_, msg); } - msg->AppendRawProtoBytes(unknown_fields_.data(), unknown_fields_.size()); + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); } @@ -34249,13 +37827,13 @@ bool TrackEventDefaults::ParseFromArray(const void* raw, size_t size) { } std::string TrackEventDefaults::SerializeAsString() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsString(); } std::vector TrackEventDefaults::SerializeAsArray() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsArray(); } @@ -34263,20 +37841,20 @@ std::vector TrackEventDefaults::SerializeAsArray() const { void TrackEventDefaults::Serialize(::protozero::Message* msg) const { // Field 11: track_uuid if (_has_field_[11]) { - msg->AppendVarInt(11, track_uuid_); + ::protozero::internal::gen_helpers::SerializeVarInt(11, track_uuid_, msg); } // Field 31: extra_counter_track_uuids for (auto& it : extra_counter_track_uuids_) { - msg->AppendVarInt(31, it); + ::protozero::internal::gen_helpers::SerializeVarInt(31, it, msg); } // Field 45: extra_double_counter_track_uuids for (auto& it : extra_double_counter_track_uuids_) { - msg->AppendVarInt(45, it); + ::protozero::internal::gen_helpers::SerializeVarInt(45, it, msg); } - msg->AppendRawProtoBytes(unknown_fields_.data(), unknown_fields_.size()); + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); } @@ -34301,7 +37879,9 @@ bool TrackEvent::operator==(const TrackEvent& other) const { && extra_counter_values_ == other.extra_counter_values_ && extra_double_counter_track_uuids_ == other.extra_double_counter_track_uuids_ && extra_double_counter_values_ == other.extra_double_counter_values_ + && flow_ids_old_ == other.flow_ids_old_ && flow_ids_ == other.flow_ids_ + && terminating_flow_ids_old_ == other.terminating_flow_ids_old_ && terminating_flow_ids_ == other.terminating_flow_ids_ && debug_annotations_ == other.debug_annotations_ && task_execution_ == other.task_execution_ @@ -34317,6 +37897,7 @@ bool TrackEvent::operator==(const TrackEvent& other) const { && chrome_renderer_scheduler_state_ == other.chrome_renderer_scheduler_state_ && chrome_window_handle_event_info_ == other.chrome_window_handle_event_info_ && chrome_content_settings_event_info_ == other.chrome_content_settings_event_info_ + && chrome_active_processes_ == other.chrome_active_processes_ && source_location_ == other.source_location_ && source_location_iid_ == other.source_location_iid_ && chrome_message_pump_ == other.chrome_message_pump_ @@ -34340,7 +37921,9 @@ bool TrackEvent::ParseFromArray(const void* raw, size_t size) { extra_counter_values_.clear(); extra_double_counter_track_uuids_.clear(); extra_double_counter_values_.clear(); + flow_ids_old_.clear(); flow_ids_.clear(); + terminating_flow_ids_old_.clear(); terminating_flow_ids_.clear(); debug_annotations_.clear(); unknown_fields_.clear(); @@ -34358,13 +37941,13 @@ bool TrackEvent::ParseFromArray(const void* raw, size_t size) { break; case 22 /* categories */: categories_.emplace_back(); - field.get(&categories_.back()); + ::protozero::internal::gen_helpers::DeserializeString(field, &categories_.back()); break; case 10 /* name_iid */: field.get(&name_iid_); break; case 23 /* name */: - field.get(&name_); + ::protozero::internal::gen_helpers::DeserializeString(field, &name_); break; case 9 /* type */: field.get(&type_); @@ -34394,11 +37977,19 @@ bool TrackEvent::ParseFromArray(const void* raw, size_t size) { extra_double_counter_values_.emplace_back(); field.get(&extra_double_counter_values_.back()); break; - case 36 /* flow_ids */: + case 36 /* flow_ids_old */: + flow_ids_old_.emplace_back(); + field.get(&flow_ids_old_.back()); + break; + case 47 /* flow_ids */: flow_ids_.emplace_back(); field.get(&flow_ids_.back()); break; - case 42 /* terminating_flow_ids */: + case 42 /* terminating_flow_ids_old */: + terminating_flow_ids_old_.emplace_back(); + field.get(&terminating_flow_ids_old_.back()); + break; + case 48 /* terminating_flow_ids */: terminating_flow_ids_.emplace_back(); field.get(&terminating_flow_ids_.back()); break; @@ -34445,6 +38036,9 @@ bool TrackEvent::ParseFromArray(const void* raw, size_t size) { case 43 /* chrome_content_settings_event_info */: (*chrome_content_settings_event_info_).ParseFromArray(field.data(), field.size()); break; + case 49 /* chrome_active_processes */: + (*chrome_active_processes_).ParseFromArray(field.data(), field.size()); + break; case 33 /* source_location */: (*source_location_).ParseFromArray(field.data(), field.size()); break; @@ -34487,13 +38081,13 @@ bool TrackEvent::ParseFromArray(const void* raw, size_t size) { } std::string TrackEvent::SerializeAsString() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsString(); } std::vector TrackEvent::SerializeAsArray() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsArray(); } @@ -34501,72 +38095,82 @@ std::vector TrackEvent::SerializeAsArray() const { void TrackEvent::Serialize(::protozero::Message* msg) const { // Field 3: category_iids for (auto& it : category_iids_) { - msg->AppendVarInt(3, it); + ::protozero::internal::gen_helpers::SerializeVarInt(3, it, msg); } // Field 22: categories for (auto& it : categories_) { - msg->AppendString(22, it); + ::protozero::internal::gen_helpers::SerializeString(22, it, msg); } // Field 10: name_iid if (_has_field_[10]) { - msg->AppendVarInt(10, name_iid_); + ::protozero::internal::gen_helpers::SerializeVarInt(10, name_iid_, msg); } // Field 23: name if (_has_field_[23]) { - msg->AppendString(23, name_); + ::protozero::internal::gen_helpers::SerializeString(23, name_, msg); } // Field 9: type if (_has_field_[9]) { - msg->AppendVarInt(9, type_); + ::protozero::internal::gen_helpers::SerializeVarInt(9, type_, msg); } // Field 11: track_uuid if (_has_field_[11]) { - msg->AppendVarInt(11, track_uuid_); + ::protozero::internal::gen_helpers::SerializeVarInt(11, track_uuid_, msg); } // Field 30: counter_value if (_has_field_[30]) { - msg->AppendVarInt(30, counter_value_); + ::protozero::internal::gen_helpers::SerializeVarInt(30, counter_value_, msg); } // Field 44: double_counter_value if (_has_field_[44]) { - msg->AppendFixed(44, double_counter_value_); + ::protozero::internal::gen_helpers::SerializeFixed(44, double_counter_value_, msg); } // Field 31: extra_counter_track_uuids for (auto& it : extra_counter_track_uuids_) { - msg->AppendVarInt(31, it); + ::protozero::internal::gen_helpers::SerializeVarInt(31, it, msg); } // Field 12: extra_counter_values for (auto& it : extra_counter_values_) { - msg->AppendVarInt(12, it); + ::protozero::internal::gen_helpers::SerializeVarInt(12, it, msg); } // Field 45: extra_double_counter_track_uuids for (auto& it : extra_double_counter_track_uuids_) { - msg->AppendVarInt(45, it); + ::protozero::internal::gen_helpers::SerializeVarInt(45, it, msg); } // Field 46: extra_double_counter_values for (auto& it : extra_double_counter_values_) { - msg->AppendFixed(46, it); + ::protozero::internal::gen_helpers::SerializeFixed(46, it, msg); } - // Field 36: flow_ids + // Field 36: flow_ids_old + for (auto& it : flow_ids_old_) { + ::protozero::internal::gen_helpers::SerializeVarInt(36, it, msg); + } + + // Field 47: flow_ids for (auto& it : flow_ids_) { - msg->AppendVarInt(36, it); + ::protozero::internal::gen_helpers::SerializeFixed(47, it, msg); } - // Field 42: terminating_flow_ids + // Field 42: terminating_flow_ids_old + for (auto& it : terminating_flow_ids_old_) { + ::protozero::internal::gen_helpers::SerializeVarInt(42, it, msg); + } + + // Field 48: terminating_flow_ids for (auto& it : terminating_flow_ids_) { - msg->AppendVarInt(42, it); + ::protozero::internal::gen_helpers::SerializeFixed(48, it, msg); } // Field 4: debug_annotations @@ -34639,6 +38243,11 @@ void TrackEvent::Serialize(::protozero::Message* msg) const { (*chrome_content_settings_event_info_).Serialize(msg->BeginNestedMessage<::protozero::Message>(43)); } + // Field 49: chrome_active_processes + if (_has_field_[49]) { + (*chrome_active_processes_).Serialize(msg->BeginNestedMessage<::protozero::Message>(49)); + } + // Field 33: source_location if (_has_field_[33]) { (*source_location_).Serialize(msg->BeginNestedMessage<::protozero::Message>(33)); @@ -34646,7 +38255,7 @@ void TrackEvent::Serialize(::protozero::Message* msg) const { // Field 34: source_location_iid if (_has_field_[34]) { - msg->AppendVarInt(34, source_location_iid_); + ::protozero::internal::gen_helpers::SerializeVarInt(34, source_location_iid_, msg); } // Field 35: chrome_message_pump @@ -34661,32 +38270,32 @@ void TrackEvent::Serialize(::protozero::Message* msg) const { // Field 1: timestamp_delta_us if (_has_field_[1]) { - msg->AppendVarInt(1, timestamp_delta_us_); + ::protozero::internal::gen_helpers::SerializeVarInt(1, timestamp_delta_us_, msg); } // Field 16: timestamp_absolute_us if (_has_field_[16]) { - msg->AppendVarInt(16, timestamp_absolute_us_); + ::protozero::internal::gen_helpers::SerializeVarInt(16, timestamp_absolute_us_, msg); } // Field 2: thread_time_delta_us if (_has_field_[2]) { - msg->AppendVarInt(2, thread_time_delta_us_); + ::protozero::internal::gen_helpers::SerializeVarInt(2, thread_time_delta_us_, msg); } // Field 17: thread_time_absolute_us if (_has_field_[17]) { - msg->AppendVarInt(17, thread_time_absolute_us_); + ::protozero::internal::gen_helpers::SerializeVarInt(17, thread_time_absolute_us_, msg); } // Field 8: thread_instruction_count_delta if (_has_field_[8]) { - msg->AppendVarInt(8, thread_instruction_count_delta_); + ::protozero::internal::gen_helpers::SerializeVarInt(8, thread_instruction_count_delta_, msg); } // Field 20: thread_instruction_count_absolute if (_has_field_[20]) { - msg->AppendVarInt(20, thread_instruction_count_absolute_); + ::protozero::internal::gen_helpers::SerializeVarInt(20, thread_instruction_count_absolute_, msg); } // Field 6: legacy_event @@ -34694,7 +38303,7 @@ void TrackEvent::Serialize(::protozero::Message* msg) const { (*legacy_event_).Serialize(msg->BeginNestedMessage<::protozero::Message>(6)); } - msg->AppendRawProtoBytes(unknown_fields_.data(), unknown_fields_.size()); + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); } @@ -34760,7 +38369,7 @@ bool TrackEvent_LegacyEvent::ParseFromArray(const void* raw, size_t size) { field.get(&global_id_); break; case 7 /* id_scope */: - field.get(&id_scope_); + ::protozero::internal::gen_helpers::DeserializeString(field, &id_scope_); break; case 9 /* use_async_tts */: field.get(&use_async_tts_); @@ -34792,13 +38401,13 @@ bool TrackEvent_LegacyEvent::ParseFromArray(const void* raw, size_t size) { } std::string TrackEvent_LegacyEvent::SerializeAsString() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsString(); } std::vector TrackEvent_LegacyEvent::SerializeAsArray() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsArray(); } @@ -34806,85 +38415,85 @@ std::vector TrackEvent_LegacyEvent::SerializeAsArray() const { void TrackEvent_LegacyEvent::Serialize(::protozero::Message* msg) const { // Field 1: name_iid if (_has_field_[1]) { - msg->AppendVarInt(1, name_iid_); + ::protozero::internal::gen_helpers::SerializeVarInt(1, name_iid_, msg); } // Field 2: phase if (_has_field_[2]) { - msg->AppendVarInt(2, phase_); + ::protozero::internal::gen_helpers::SerializeVarInt(2, phase_, msg); } // Field 3: duration_us if (_has_field_[3]) { - msg->AppendVarInt(3, duration_us_); + ::protozero::internal::gen_helpers::SerializeVarInt(3, duration_us_, msg); } // Field 4: thread_duration_us if (_has_field_[4]) { - msg->AppendVarInt(4, thread_duration_us_); + ::protozero::internal::gen_helpers::SerializeVarInt(4, thread_duration_us_, msg); } // Field 15: thread_instruction_delta if (_has_field_[15]) { - msg->AppendVarInt(15, thread_instruction_delta_); + ::protozero::internal::gen_helpers::SerializeVarInt(15, thread_instruction_delta_, msg); } // Field 6: unscoped_id if (_has_field_[6]) { - msg->AppendVarInt(6, unscoped_id_); + ::protozero::internal::gen_helpers::SerializeVarInt(6, unscoped_id_, msg); } // Field 10: local_id if (_has_field_[10]) { - msg->AppendVarInt(10, local_id_); + ::protozero::internal::gen_helpers::SerializeVarInt(10, local_id_, msg); } // Field 11: global_id if (_has_field_[11]) { - msg->AppendVarInt(11, global_id_); + ::protozero::internal::gen_helpers::SerializeVarInt(11, global_id_, msg); } // Field 7: id_scope if (_has_field_[7]) { - msg->AppendString(7, id_scope_); + ::protozero::internal::gen_helpers::SerializeString(7, id_scope_, msg); } // Field 9: use_async_tts if (_has_field_[9]) { - msg->AppendTinyVarInt(9, use_async_tts_); + ::protozero::internal::gen_helpers::SerializeTinyVarInt(9, use_async_tts_, msg); } // Field 8: bind_id if (_has_field_[8]) { - msg->AppendVarInt(8, bind_id_); + ::protozero::internal::gen_helpers::SerializeVarInt(8, bind_id_, msg); } // Field 12: bind_to_enclosing if (_has_field_[12]) { - msg->AppendTinyVarInt(12, bind_to_enclosing_); + ::protozero::internal::gen_helpers::SerializeTinyVarInt(12, bind_to_enclosing_, msg); } // Field 13: flow_direction if (_has_field_[13]) { - msg->AppendVarInt(13, flow_direction_); + ::protozero::internal::gen_helpers::SerializeVarInt(13, flow_direction_, msg); } // Field 14: instant_event_scope if (_has_field_[14]) { - msg->AppendVarInt(14, instant_event_scope_); + ::protozero::internal::gen_helpers::SerializeVarInt(14, instant_event_scope_, msg); } // Field 18: pid_override if (_has_field_[18]) { - msg->AppendVarInt(18, pid_override_); + ::protozero::internal::gen_helpers::SerializeVarInt(18, pid_override_, msg); } // Field 19: tid_override if (_has_field_[19]) { - msg->AppendVarInt(19, tid_override_); + ::protozero::internal::gen_helpers::SerializeVarInt(19, tid_override_, msg); } - msg->AppendRawProtoBytes(unknown_fields_.data(), unknown_fields_.size()); + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); } } // namespace perfetto @@ -34899,6 +38508,10 @@ void TrackEvent_LegacyEvent::Serialize(::protozero::Message* msg) const { // Intentionally empty (crbug.com/998165) // gen_amalgamated begin source: gen/protos/perfetto/config/android/android_polled_state_config.pbzero.cc // Intentionally empty (crbug.com/998165) +// gen_amalgamated begin source: gen/protos/perfetto/config/android/android_system_property_config.pbzero.cc +// Intentionally empty (crbug.com/998165) +// gen_amalgamated begin source: gen/protos/perfetto/config/android/network_trace_config.pbzero.cc +// Intentionally empty (crbug.com/998165) // gen_amalgamated begin source: gen/protos/perfetto/config/android/packages_list_config.pbzero.cc // Intentionally empty (crbug.com/998165) // gen_amalgamated begin source: gen/protos/perfetto/config/ftrace/ftrace_config.pbzero.cc @@ -34921,12 +38534,20 @@ void TrackEvent_LegacyEvent::Serialize(::protozero::Message* msg) const { // Intentionally empty (crbug.com/998165) // gen_amalgamated begin source: gen/protos/perfetto/config/profiling/perf_event_config.pbzero.cc // Intentionally empty (crbug.com/998165) +// gen_amalgamated begin source: gen/protos/perfetto/config/statsd/atom_ids.pbzero.cc +// Intentionally empty (crbug.com/998165) +// gen_amalgamated begin source: gen/protos/perfetto/config/statsd/statsd_tracing_config.pbzero.cc +// Intentionally empty (crbug.com/998165) // gen_amalgamated begin source: gen/protos/perfetto/config/sys_stats/sys_stats_config.pbzero.cc // Intentionally empty (crbug.com/998165) +// gen_amalgamated begin source: gen/protos/perfetto/config/system_info/system_info.pbzero.cc +// Intentionally empty (crbug.com/998165) // gen_amalgamated begin source: gen/protos/perfetto/config/track_event/track_event_config.pbzero.cc // Intentionally empty (crbug.com/998165) // gen_amalgamated begin source: gen/protos/perfetto/config/chrome/chrome_config.pbzero.cc // Intentionally empty (crbug.com/998165) +// gen_amalgamated begin source: gen/protos/perfetto/config/chrome/scenario_config.pbzero.cc +// Intentionally empty (crbug.com/998165) // gen_amalgamated begin source: gen/protos/perfetto/config/data_source_config.pbzero.cc // Intentionally empty (crbug.com/998165) // gen_amalgamated begin source: gen/protos/perfetto/config/interceptor_config.pbzero.cc @@ -34939,26 +38560,12 @@ void TrackEvent_LegacyEvent::Serialize(::protozero::Message* msg) const { // Intentionally empty (crbug.com/998165) // gen_amalgamated begin source: gen/protos/perfetto/trace/clock_snapshot.pbzero.cc // Intentionally empty (crbug.com/998165) +// gen_amalgamated begin source: gen/protos/perfetto/trace/trace_uuid.pbzero.cc +// Intentionally empty (crbug.com/998165) // gen_amalgamated begin source: gen/protos/perfetto/trace/trigger.pbzero.cc // Intentionally empty (crbug.com/998165) // gen_amalgamated begin source: gen/protos/perfetto/trace/system_info.pbzero.cc // Intentionally empty (crbug.com/998165) -// gen_amalgamated begin source: gen/protos/perfetto/trace/android/android_game_intervention_list.pbzero.cc -// Intentionally empty (crbug.com/998165) -// gen_amalgamated begin source: gen/protos/perfetto/trace/android/android_log.pbzero.cc -// Intentionally empty (crbug.com/998165) -// gen_amalgamated begin source: gen/protos/perfetto/trace/android/camera_event.pbzero.cc -// Intentionally empty (crbug.com/998165) -// gen_amalgamated begin source: gen/protos/perfetto/trace/android/frame_timeline_event.pbzero.cc -// Intentionally empty (crbug.com/998165) -// gen_amalgamated begin source: gen/protos/perfetto/trace/android/gpu_mem_event.pbzero.cc -// Intentionally empty (crbug.com/998165) -// gen_amalgamated begin source: gen/protos/perfetto/trace/android/graphics_frame_event.pbzero.cc -// Intentionally empty (crbug.com/998165) -// gen_amalgamated begin source: gen/protos/perfetto/trace/android/initial_display_state.pbzero.cc -// Intentionally empty (crbug.com/998165) -// gen_amalgamated begin source: gen/protos/perfetto/trace/android/packages_list.pbzero.cc -// Intentionally empty (crbug.com/998165) // gen_amalgamated begin source: gen/protos/perfetto/trace/chrome/chrome_benchmark_metadata.pbzero.cc // Intentionally empty (crbug.com/998165) // gen_amalgamated begin source: gen/protos/perfetto/trace/chrome/chrome_metadata.pbzero.cc @@ -34977,6 +38584,8 @@ void TrackEvent_LegacyEvent::Serialize(::protozero::Message* msg) const { // Intentionally empty (crbug.com/998165) // gen_amalgamated begin source: gen/protos/perfetto/trace/ftrace/generic.pbzero.cc // Intentionally empty (crbug.com/998165) +// gen_amalgamated begin source: gen/protos/perfetto/trace/ftrace/android_fs.pbzero.cc +// Intentionally empty (crbug.com/998165) // gen_amalgamated begin source: gen/protos/perfetto/trace/ftrace/binder.pbzero.cc // Intentionally empty (crbug.com/998165) // gen_amalgamated begin source: gen/protos/perfetto/trace/ftrace/block.pbzero.cc @@ -34985,6 +38594,8 @@ void TrackEvent_LegacyEvent::Serialize(::protozero::Message* msg) const { // Intentionally empty (crbug.com/998165) // gen_amalgamated begin source: gen/protos/perfetto/trace/ftrace/clk.pbzero.cc // Intentionally empty (crbug.com/998165) +// gen_amalgamated begin source: gen/protos/perfetto/trace/ftrace/cma.pbzero.cc +// Intentionally empty (crbug.com/998165) // gen_amalgamated begin source: gen/protos/perfetto/trace/ftrace/compaction.pbzero.cc // Intentionally empty (crbug.com/998165) // gen_amalgamated begin source: gen/protos/perfetto/trace/ftrace/cpuhp.pbzero.cc @@ -35017,6 +38628,8 @@ void TrackEvent_LegacyEvent::Serialize(::protozero::Message* msg) const { // Intentionally empty (crbug.com/998165) // gen_amalgamated begin source: gen/protos/perfetto/trace/ftrace/gpu_scheduler.pbzero.cc // Intentionally empty (crbug.com/998165) +// gen_amalgamated begin source: gen/protos/perfetto/trace/ftrace/hyp.pbzero.cc +// Intentionally empty (crbug.com/998165) // gen_amalgamated begin source: gen/protos/perfetto/trace/ftrace/i2c.pbzero.cc // Intentionally empty (crbug.com/998165) // gen_amalgamated begin source: gen/protos/perfetto/trace/ftrace/ion.pbzero.cc @@ -35031,6 +38644,8 @@ void TrackEvent_LegacyEvent::Serialize(::protozero::Message* msg) const { // Intentionally empty (crbug.com/998165) // gen_amalgamated begin source: gen/protos/perfetto/trace/ftrace/lowmemorykiller.pbzero.cc // Intentionally empty (crbug.com/998165) +// gen_amalgamated begin source: gen/protos/perfetto/trace/ftrace/lwis.pbzero.cc +// Intentionally empty (crbug.com/998165) // gen_amalgamated begin source: gen/protos/perfetto/trace/ftrace/mali.pbzero.cc // Intentionally empty (crbug.com/998165) // gen_amalgamated begin source: gen/protos/perfetto/trace/ftrace/mdss.pbzero.cc @@ -35041,6 +38656,8 @@ void TrackEvent_LegacyEvent::Serialize(::protozero::Message* msg) const { // Intentionally empty (crbug.com/998165) // gen_amalgamated begin source: gen/protos/perfetto/trace/ftrace/oom.pbzero.cc // Intentionally empty (crbug.com/998165) +// gen_amalgamated begin source: gen/protos/perfetto/trace/ftrace/panel.pbzero.cc +// Intentionally empty (crbug.com/998165) // gen_amalgamated begin source: gen/protos/perfetto/trace/ftrace/power.pbzero.cc // Intentionally empty (crbug.com/998165) // gen_amalgamated begin source: gen/protos/perfetto/trace/ftrace/printk.pbzero.cc @@ -35073,8 +38690,16 @@ void TrackEvent_LegacyEvent::Serialize(::protozero::Message* msg) const { // Intentionally empty (crbug.com/998165) // gen_amalgamated begin source: gen/protos/perfetto/trace/ftrace/thermal.pbzero.cc // Intentionally empty (crbug.com/998165) +// gen_amalgamated begin source: gen/protos/perfetto/trace/ftrace/trusty.pbzero.cc +// Intentionally empty (crbug.com/998165) // gen_amalgamated begin source: gen/protos/perfetto/trace/ftrace/ufs.pbzero.cc // Intentionally empty (crbug.com/998165) +// gen_amalgamated begin source: gen/protos/perfetto/trace/ftrace/v4l2.pbzero.cc +// Intentionally empty (crbug.com/998165) +// gen_amalgamated begin source: gen/protos/perfetto/trace/ftrace/virtio_gpu.pbzero.cc +// Intentionally empty (crbug.com/998165) +// gen_amalgamated begin source: gen/protos/perfetto/trace/ftrace/virtio_video.pbzero.cc +// Intentionally empty (crbug.com/998165) // gen_amalgamated begin source: gen/protos/perfetto/trace/ftrace/vmscan.pbzero.cc // Intentionally empty (crbug.com/998165) // gen_amalgamated begin source: gen/protos/perfetto/trace/ftrace/workqueue.pbzero.cc @@ -35085,6 +38710,8 @@ void TrackEvent_LegacyEvent::Serialize(::protozero::Message* msg) const { // Intentionally empty (crbug.com/998165) // gen_amalgamated begin source: gen/protos/perfetto/trace/power/android_energy_estimation_breakdown.pbzero.cc // Intentionally empty (crbug.com/998165) +// gen_amalgamated begin source: gen/protos/perfetto/trace/power/android_entity_state_residency.pbzero.cc +// Intentionally empty (crbug.com/998165) // gen_amalgamated begin source: gen/protos/perfetto/trace/power/battery_counters.pbzero.cc // Intentionally empty (crbug.com/998165) // gen_amalgamated begin source: gen/protos/perfetto/trace/power/power_rails.pbzero.cc @@ -35093,6 +38720,8 @@ void TrackEvent_LegacyEvent::Serialize(::protozero::Message* msg) const { // Intentionally empty (crbug.com/998165) // gen_amalgamated begin source: gen/protos/perfetto/trace/ps/process_tree.pbzero.cc // Intentionally empty (crbug.com/998165) +// gen_amalgamated begin source: gen/protos/perfetto/trace/statsd/statsd_atom.pbzero.cc +// Intentionally empty (crbug.com/998165) // gen_amalgamated begin source: gen/protos/perfetto/trace/sys_stats/sys_stats.pbzero.cc // Intentionally empty (crbug.com/998165) // gen_amalgamated begin source: gen/protos/perfetto/trace/system_info/cpu_info.pbzero.cc @@ -35326,6 +38955,25 @@ using WriterID = uint16_t; // Unique within the scope of the tracing service. using FlushRequestID = uint64_t; +// Combines Producer and Writer ID in one word which can be used as key for +// hashtables and other data structures. +using ProducerAndWriterID = uint32_t; + +inline ProducerAndWriterID MkProducerAndWriterID(ProducerID p, WriterID w) { + static_assert( + sizeof(ProducerID) + sizeof(WriterID) == sizeof(ProducerAndWriterID), + "MkProducerAndWriterID() and GetProducerAndWriterID() need updating"); + return (static_cast(p) << (sizeof(WriterID) * 8)) | w; +} + +inline void GetProducerAndWriterID(ProducerAndWriterID x, + ProducerID* p, + WriterID* w) { + static constexpr auto mask = (1ull << (sizeof(WriterID) * 8)) - 1; + *w = static_cast(x & mask); + *p = static_cast(x >> (sizeof(WriterID) * 8)); +} + // We need one FD per producer and we are not going to be able to keep > 64k FDs // open in the service. static constexpr ProducerID kMaxProducerID = static_cast(-1); @@ -35346,6 +38994,7 @@ using BufferID = uint16_t; // for the target buffer of a startup trace writer. Reservation IDs will be // translated to actual BufferIDs after they are bound by // SharedMemoryArbiter::BindStartupTargetBuffer(). +// TODO(mohitms): Delete this type and use `struct {uint16 ; uint16;}` instead. using MaybeUnboundBufferID = uint32_t; // Keep this in sync with SharedMemoryABI::PageHeader::target_buffer. @@ -35362,6 +39011,11 @@ constexpr uid_t kInvalidUid = ::perfetto::base::kInvalidUid; constexpr uint32_t kDefaultFlushTimeoutMs = 5000; +// The special id 0xffff..ffff represents the tracing session with the highest +// bugreport score. This is used for CloneSession(kBugreportSessionId). +constexpr TracingSessionID kBugreportSessionId = + static_cast(-1); + } // namespace perfetto #endif // INCLUDE_PERFETTO_EXT_TRACING_CORE_BASIC_TYPES_H_ @@ -35455,6 +39109,7 @@ class NullTraceWriter : public TraceWriter { // TraceWriter implementation. See documentation in trace_writer.h. // TracePacketHandle is defined in trace_writer.h TracePacketHandle NewTracePacket() override; + void FinishTracePacket() override; void Flush(std::function callback = {}) override; WriterID writer_id() const override; uint64_t written() const override; @@ -35466,7 +39121,7 @@ class NullTraceWriter : public TraceWriter { protozero::ScatteredStreamWriterNullDelegate delegate_; protozero::ScatteredStreamWriter stream_; - // The packet returned via NewTracePacket(). Its owned by this class, + // The packet returned via NewTracePacket(). It is owned by this class, // TracePacketHandle has just a pointer to it. std::unique_ptr> cur_packet_; @@ -35524,6 +39179,10 @@ NullTraceWriter::TracePacketHandle NullTraceWriter::NewTracePacket() { return TraceWriter::TracePacketHandle(cur_packet_.get()); } +void NullTraceWriter::FinishTracePacket() { + cur_packet_->Finalize(); +} + WriterID NullTraceWriter::writer_id() const { return 0; } @@ -36210,14 +39869,6 @@ inline void ClearChunkHeader(SharedMemoryABI::ChunkHeader* header) { } // namespace -// static -constexpr uint32_t SharedMemoryABI::kNumChunksForLayout[]; -constexpr const char* SharedMemoryABI::kChunkStateStr[]; -constexpr const size_t SharedMemoryABI::kInvalidPageIdx; -constexpr const size_t SharedMemoryABI::kMinPageSize; -constexpr const size_t SharedMemoryABI::kMaxPageSize; -constexpr const size_t SharedMemoryABI::kPacketSizeDropPacket; - SharedMemoryABI::SharedMemoryABI() = default; SharedMemoryABI::SharedMemoryABI(uint8_t* start, @@ -36575,9 +40226,6 @@ class Producer; class SharedMemoryArbiter; class TraceWriter; -// Exposed for testing. -std::string GetBugreportPath(); - // TODO: for the moment this assumes that all the calls happen on the same // thread/sequence. Not sure this will be the case long term in Chrome. @@ -36591,6 +40239,11 @@ class PERFETTO_EXPORT_COMPONENT ProducerEndpoint { public: virtual ~ProducerEndpoint(); + // Disconnects the endpoint from the service, while keeping the shared memory + // valid. After calling this, the endpoint will no longer call any methods + // on the Producer. + virtual void Disconnect() = 0; + // Called by the Producer to (un)register data sources. Data sources are // identified by their name (i.e. DataSourceDescriptor.name) virtual void RegisterDataSource(const DataSourceDescriptor&) = 0; @@ -36717,6 +40370,14 @@ class PERFETTO_EXPORT_COMPONENT ConsumerEndpoint { virtual void DisableTracing() = 0; + // Clones an existing tracing session and attaches to it. The session is + // cloned in read-only mode and can only be used to read a snapshot of an + // existing tracing session. Will invoke Consumer::OnSessionCloned(). + // If TracingSessionID == kBugreportSessionId (0xff...ff) the session with the + // highest bugreport score is cloned (if any exists). + // TODO(primiano): make pure virtual after various 3way patches. + virtual void CloneSession(TracingSessionID); + // Requests all data sources to flush their data immediately and invokes the // passed callback once all of them have acked the flush (in which case // the callback argument |success| will be true) or |timeout_ms| are elapsed @@ -36791,6 +40452,10 @@ class PERFETTO_EXPORT_COMPONENT TracingService { using ProducerEndpoint = perfetto::ProducerEndpoint; using ConsumerEndpoint = perfetto::ConsumerEndpoint; + // Default sizes used by the service implementation and client library. + static constexpr size_t kDefaultShmPageSize = 4096ul; + static constexpr size_t kDefaultShmSize = 256 * 1024ul; + enum class ProducerSMBScrapingMode { // Use service's default setting for SMB scraping. Currently, the default // mode is to disable SMB scraping, but this may change in the future. @@ -37249,6 +40914,10 @@ class SharedMemoryArbiterImpl : public SharedMemoryArbiter { default_page_layout = l; } + static SharedMemoryABI::PageLayout default_page_layout_for_testing() { + return default_page_layout; + } + // SharedMemoryArbiter implementation. // See include/perfetto/tracing/core/shared_memory_arbiter.h for comments. std::unique_ptr CreateTraceWriter( @@ -37522,8 +41191,6 @@ class PatchList { PatchList() : last_(list_.before_begin()) {} Patch* emplace_back(ChunkID chunk_id, uint16_t offset) { - PERFETTO_DCHECK(empty() || last_->chunk_id != chunk_id || - offset >= last_->offset + sizeof(Patch::PatchContent)); last_ = list_.emplace_after(last_, chunk_id, offset); return &*last_; } @@ -37613,6 +41280,7 @@ class TraceWriterImpl : public TraceWriter, // TraceWriter implementation. See documentation in trace_writer.h. TracePacketHandle NewTracePacket() override; + void FinishTracePacket() override; // Commits the data pending for the current chunk into the shared memory // buffer and sends a CommitDataRequest() to the service. // TODO(primiano): right now the |callback| will be called on the IPC thread. @@ -37633,6 +41301,7 @@ class TraceWriterImpl : public TraceWriter, // ScatteredStreamWriter::Delegate implementation. protozero::ContiguousMemoryRange GetNewBuffer() override; + uint8_t* AnnotatePatch(uint8_t*) override; // The per-producer arbiter that coordinates access to the shared memory // buffer from several threads. @@ -37665,6 +41334,14 @@ class TraceWriterImpl : public TraceWriter, // The packet returned via NewTracePacket(). Its owned by this class, // TracePacketHandle has just a pointer to it. + // + // The caller of NewTracePacket can use TakeStreamWriter() and use the stream + // writer directly: in that case: + // * cur_packet_->size() is not up to date. Only the stream writer has the + // correct information. + // * cur_packet_->nested_message() is always nullptr. + // * cur_packet_->size_field() is still used to track the start of the current + // fragment. std::unique_ptr> cur_packet_; @@ -37707,6 +41384,10 @@ class TraceWriterImpl : public TraceWriter, // PID of the process that created the trace writer. Used for a DCHECK that // aims to detect unsupported process forks while tracing. const base::PlatformProcessId process_id_; + + // True for the first packet on sequence. See the comment for + // TracePacket.first_packet_on_sequence for more details. + bool first_packet_on_sequence_ = true; }; } // namespace perfetto @@ -37766,9 +41447,6 @@ bool IsReservationTargetBufferId(MaybeUnboundBufferID buffer_id) { SharedMemoryABI::PageLayout SharedMemoryArbiterImpl::default_page_layout = SharedMemoryABI::PageLayout::kPageDiv1; -// static -constexpr BufferID SharedMemoryArbiterImpl::kInvalidBufferId; - // static std::unique_ptr SharedMemoryArbiter::CreateInstance( SharedMemory* shared_memory, @@ -38349,8 +42027,7 @@ void SharedMemoryArbiterImpl::BindStartupTargetBuffer( std::unique_lock scoped_lock(lock_); - // We should already be bound to an endpoint, but not fully bound. - PERFETTO_CHECK(!fully_bound_); + // We should already be bound to an endpoint. PERFETTO_CHECK(producer_endpoint_); PERFETTO_CHECK(task_runner_); PERFETTO_CHECK(task_runner_->RunsTasksOnCurrentThread()); @@ -38380,8 +42057,6 @@ void SharedMemoryArbiterImpl::AbortStartupTracingForReservation( return; } - PERFETTO_CHECK(!fully_bound_); - // Bind the target buffer reservation to an invalid buffer (ID 0), so that // existing commits, as well as future commits (of currently acquired chunks), // will be released as free free by the service but otherwise ignored (i.e. @@ -38923,6 +42598,7 @@ std::string TracePacket::GetRawBytesForTesting() { // gen_amalgamated expanded: #include "perfetto/protozero/message.h" // gen_amalgamated expanded: #include "perfetto/protozero/proto_utils.h" // gen_amalgamated expanded: #include "perfetto/protozero/root_message.h" +// gen_amalgamated expanded: #include "perfetto/protozero/static_buffer.h" // gen_amalgamated expanded: #include "src/tracing/core/shared_memory_arbiter_impl.h" // gen_amalgamated expanded: #include "protos/perfetto/trace/trace_packet.pbzero.h" @@ -38953,7 +42629,7 @@ TraceWriterImpl::TraceWriterImpl(SharedMemoryArbiterImpl* shmem_arbiter, PERFETTO_CHECK(id_ != 0); cur_packet_.reset(new protozero::RootMessage()); - cur_packet_->Finalize(); // To avoid the DCHECK in NewTracePacket(). + cur_packet_->Finalize(); // To avoid the CHECK in NewTracePacket(). } TraceWriterImpl::~TraceWriterImpl() { @@ -39053,6 +42729,11 @@ TraceWriterImpl::TracePacketHandle TraceWriterImpl::NewTracePacket() { } } + if (PERFETTO_UNLIKELY(first_packet_on_sequence_)) { + cur_packet_->set_first_packet_on_sequence(true); + first_packet_on_sequence_ = false; + } + return handle; } @@ -39198,10 +42879,9 @@ protozero::ContiguousMemoryRange TraceWriterImpl::GetNewBuffer() { // Descend in the stack of non-finalized nested submessages (if any) and // detour their |size_field| into the |patch_list_|. At this point we have // to release the chunk and they cannot write anymore into that. - bool chunk_needs_patching = false; for (auto* nested_msg = cur_packet_->nested_message(); nested_msg; nested_msg = nested_msg->nested_message()) { - uint8_t* const cur_hdr = nested_msg->size_field(); + uint8_t* cur_hdr = nested_msg->size_field(); // If this is false the protozero Message has already been instructed to // write, upon Finalize(), its size into the patch list. @@ -39210,13 +42890,8 @@ protozero::ContiguousMemoryRange TraceWriterImpl::GetNewBuffer() { cur_hdr + kMessageLengthFieldSize <= cur_chunk_.end(); if (size_field_points_within_chunk) { - auto offset = - static_cast(cur_hdr - cur_chunk_.payload_begin()); - const ChunkID cur_chunk_id = - cur_chunk_.header()->chunk_id.load(std::memory_order_relaxed); - Patch* patch = patch_list_.emplace_back(cur_chunk_id, offset); - nested_msg->set_size_field(&patch->size_field[0]); - chunk_needs_patching = true; + cur_hdr = TraceWriterImpl::AnnotatePatch(cur_hdr); + nested_msg->set_size_field(cur_hdr); } else { #if PERFETTO_DCHECK_IS_ON() // Ensure that the size field of the message points to an element of the @@ -39227,11 +42902,8 @@ protozero::ContiguousMemoryRange TraceWriterImpl::GetNewBuffer() { PERFETTO_DCHECK(patch_it != patch_list_.end()); #endif } - } // for(nested_msg - - if (chunk_needs_patching) - cur_chunk_.SetFlag(ChunkHeader::kChunkNeedsPatching); - } // if(fragmenting_packet) + } // for(nested_msg) + } // if(fragmenting_packet) if (cur_chunk_.is_valid()) { // ReturnCompletedChunk will consume the first patched entries from @@ -39260,6 +42932,55 @@ protozero::ContiguousMemoryRange TraceWriterImpl::GetNewBuffer() { return protozero::ContiguousMemoryRange{payload_begin, cur_chunk_.end()}; } +void TraceWriterImpl::FinishTracePacket() { + // If we hit this, this trace writer was created in a different process. This + // likely means that the process forked while tracing was active, and the + // forked child process tried to emit a trace event. This is not supported, as + // it would lead to two processes writing to the same tracing SMB. + PERFETTO_DCHECK(process_id_ == base::GetProcessId()); + + // If the caller uses TakeStreamWriter(), cur_packet_->size() is not up to + // date, only the stream writer knows the exact size. + // cur_packet_->size_field() is still used to store the start of the fragment. + if (cur_packet_->size_field()) { + uint8_t* const wptr = protobuf_stream_writer_.write_ptr(); + PERFETTO_DCHECK(wptr >= cur_fragment_start_); + uint32_t partial_size = static_cast(wptr - cur_fragment_start_); + + WriteRedundantVarInt(partial_size, last_packet_size_field_); + } + + cur_packet_->Reset(&protobuf_stream_writer_); + cur_packet_->Finalize(); // To avoid the CHECK in NewTracePacket(). + + // Send any completed patches to the service to facilitate trace data + // recovery by the service. This should only happen when we're completing + // the first packet in a chunk which was a continuation from the previous + // chunk, i.e. at most once per chunk. + if (!patch_list_.empty() && patch_list_.front().is_patched()) { + shmem_arbiter_->SendPatches(id_, target_buffer_, &patch_list_); + } +} + +uint8_t* TraceWriterImpl::AnnotatePatch(uint8_t* to_patch) { + if (!cur_chunk_.is_valid()) { + return nullptr; + } + auto offset = static_cast(to_patch - cur_chunk_.payload_begin()); + const ChunkID cur_chunk_id = + cur_chunk_.header()->chunk_id.load(std::memory_order_relaxed); + static_assert(kPatchSize == sizeof(Patch::PatchContent), + "Patch size mismatch"); + Patch* patch = patch_list_.emplace_back(cur_chunk_id, offset); + // Check that the flag is not already set before setting it. This is not + // necessary, but it makes the code faster. + if (!(cur_chunk_.GetPacketCountAndFlags().second & + ChunkHeader::kChunkNeedsPatching)) { + cur_chunk_.SetFlag(ChunkHeader::kChunkNeedsPatching); + } + return &patch->size_field[0]; +} + WriterID TraceWriterImpl::writer_id() const { return id_; } @@ -39379,6 +43100,11 @@ class PERFETTO_EXPORT_COMPONENT Consumer { // TracingService::ConsumerEndpoint::ObserveEvents() whenever one or more // ObservableEvents of enabled event types occur. virtual void OnObservableEvents(const ObservableEvents&) = 0; + + // Called back by the Service (or transport layer) after invoking + // TracingService::ConsumerEndpoint::CloneSession(). + // TODO(primiano): make pure virtual after various 3way patches. + virtual void OnSessionCloned(bool success, const std::string& error); }; } // namespace perfetto @@ -39450,6 +43176,10 @@ class PERFETTO_EXPORT_COMPONENT Producer { // created. Can be used for any setup required before tracing begins. virtual void OnTracingSetup() = 0; + // Called by muxer once StartupTracing is started. It will be called before + // SetupStartupTracingBlocking is returned. + virtual void OnStartupTracingSetup() {} + // The lifecycle methods below are always called in the following sequence: // SetupDataSource -> StartDataSource -> StopDataSource. // Or, in the edge case where a trace is aborted immediately: @@ -39550,6 +43280,10 @@ SharedMemory::~SharedMemory() = default; SharedMemory::Factory::~Factory() = default; SharedMemoryArbiter::~SharedMemoryArbiter() = default; +// TODO(primiano): make pure virtual after various 3way patches. +void ConsumerEndpoint::CloneSession(TracingSessionID) {} +void Consumer::OnSessionCloned(bool, const std::string&) {} + } // namespace perfetto // gen_amalgamated begin source: src/tracing/console_interceptor.cc // gen_amalgamated begin header: gen/protos/perfetto/config/interceptors/console_config.pbzero.h @@ -39571,16 +43305,39 @@ namespace perfetto { namespace protos { namespace pbzero { -enum ConsoleConfig_Output : int32_t; +namespace perfetto_pbzero_enum_ConsoleConfig { +enum Output : int32_t; +} // namespace perfetto_pbzero_enum_ConsoleConfig +using ConsoleConfig_Output = perfetto_pbzero_enum_ConsoleConfig::Output; -enum ConsoleConfig_Output : int32_t { - ConsoleConfig_Output_OUTPUT_UNSPECIFIED = 0, - ConsoleConfig_Output_OUTPUT_STDOUT = 1, - ConsoleConfig_Output_OUTPUT_STDERR = 2, +namespace perfetto_pbzero_enum_ConsoleConfig { +enum Output : int32_t { + OUTPUT_UNSPECIFIED = 0, + OUTPUT_STDOUT = 1, + OUTPUT_STDERR = 2, }; +} // namespace perfetto_pbzero_enum_ConsoleConfig +using ConsoleConfig_Output = perfetto_pbzero_enum_ConsoleConfig::Output; -const ConsoleConfig_Output ConsoleConfig_Output_MIN = ConsoleConfig_Output_OUTPUT_UNSPECIFIED; -const ConsoleConfig_Output ConsoleConfig_Output_MAX = ConsoleConfig_Output_OUTPUT_STDERR; + +constexpr ConsoleConfig_Output ConsoleConfig_Output_MIN = ConsoleConfig_Output::OUTPUT_UNSPECIFIED; +constexpr ConsoleConfig_Output ConsoleConfig_Output_MAX = ConsoleConfig_Output::OUTPUT_STDERR; + + +PERFETTO_PROTOZERO_CONSTEXPR14_OR_INLINE +const char* ConsoleConfig_Output_Name(::perfetto::protos::pbzero::ConsoleConfig_Output value) { + switch (value) { + case ::perfetto::protos::pbzero::ConsoleConfig_Output::OUTPUT_UNSPECIFIED: + return "OUTPUT_UNSPECIFIED"; + + case ::perfetto::protos::pbzero::ConsoleConfig_Output::OUTPUT_STDOUT: + return "OUTPUT_STDOUT"; + + case ::perfetto::protos::pbzero::ConsoleConfig_Output::OUTPUT_STDERR: + return "OUTPUT_STDERR"; + } + return "PBZERO_UNKNOWN_ENUM_VALUE"; +} class ConsoleConfig_Decoder : public ::protozero::TypedProtoDecoder { public: @@ -39602,10 +43359,14 @@ class ConsoleConfig : public ::protozero::Message { }; static constexpr const char* GetName() { return ".perfetto.protos.ConsoleConfig"; } + using Output = ::perfetto::protos::pbzero::ConsoleConfig_Output; - static const Output OUTPUT_UNSPECIFIED = ConsoleConfig_Output_OUTPUT_UNSPECIFIED; - static const Output OUTPUT_STDOUT = ConsoleConfig_Output_OUTPUT_STDOUT; - static const Output OUTPUT_STDERR = ConsoleConfig_Output_OUTPUT_STDERR; + static inline const char* Output_Name(Output value) { + return ::perfetto::protos::pbzero::ConsoleConfig_Output_Name(value); + } + static const Output OUTPUT_UNSPECIFIED = Output::OUTPUT_UNSPECIFIED; + static const Output OUTPUT_STDOUT = Output::OUTPUT_STDOUT; + static const Output OUTPUT_STDERR = Output::OUTPUT_STDERR; using FieldMetadata_Output = ::protozero::proto_utils::FieldMetadata< @@ -39615,14 +43376,7 @@ class ConsoleConfig : public ::protozero::Message { ::perfetto::protos::pbzero::ConsoleConfig_Output, ConsoleConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Output kOutput() { return {}; } + static constexpr FieldMetadata_Output kOutput{}; void set_output(::perfetto::protos::pbzero::ConsoleConfig_Output value) { static constexpr uint32_t field_id = FieldMetadata_Output::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -39640,14 +43394,7 @@ class ConsoleConfig : public ::protozero::Message { bool, ConsoleConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_EnableColors kEnableColors() { return {}; } + static constexpr FieldMetadata_EnableColors kEnableColors{}; void set_enable_colors(bool value) { static constexpr uint32_t field_id = FieldMetadata_EnableColors::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -39716,14 +43463,7 @@ class TracePacketDefaults : public ::protozero::Message { uint32_t, TracePacketDefaults>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_TimestampClockId kTimestampClockId() { return {}; } + static constexpr FieldMetadata_TimestampClockId kTimestampClockId{}; void set_timestamp_clock_id(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_TimestampClockId::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -39741,14 +43481,7 @@ class TracePacketDefaults : public ::protozero::Message { TrackEventDefaults, TracePacketDefaults>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_TrackEventDefaults kTrackEventDefaults() { return {}; } + static constexpr FieldMetadata_TrackEventDefaults kTrackEventDefaults{}; template T* set_track_event_defaults() { return BeginNestedMessage(11); } @@ -39762,14 +43495,7 @@ class TracePacketDefaults : public ::protozero::Message { PerfSampleDefaults, TracePacketDefaults>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_PerfSampleDefaults kPerfSampleDefaults() { return {}; } + static constexpr FieldMetadata_PerfSampleDefaults kPerfSampleDefaults{}; template T* set_perf_sample_defaults() { return BeginNestedMessage(12); } @@ -39799,22 +43525,63 @@ namespace perfetto { namespace protos { namespace pbzero { -enum ProcessDescriptor_ChromeProcessType : int32_t; +namespace perfetto_pbzero_enum_ProcessDescriptor { +enum ChromeProcessType : int32_t; +} // namespace perfetto_pbzero_enum_ProcessDescriptor +using ProcessDescriptor_ChromeProcessType = perfetto_pbzero_enum_ProcessDescriptor::ChromeProcessType; -enum ProcessDescriptor_ChromeProcessType : int32_t { - ProcessDescriptor_ChromeProcessType_PROCESS_UNSPECIFIED = 0, - ProcessDescriptor_ChromeProcessType_PROCESS_BROWSER = 1, - ProcessDescriptor_ChromeProcessType_PROCESS_RENDERER = 2, - ProcessDescriptor_ChromeProcessType_PROCESS_UTILITY = 3, - ProcessDescriptor_ChromeProcessType_PROCESS_ZYGOTE = 4, - ProcessDescriptor_ChromeProcessType_PROCESS_SANDBOX_HELPER = 5, - ProcessDescriptor_ChromeProcessType_PROCESS_GPU = 6, - ProcessDescriptor_ChromeProcessType_PROCESS_PPAPI_PLUGIN = 7, - ProcessDescriptor_ChromeProcessType_PROCESS_PPAPI_BROKER = 8, +namespace perfetto_pbzero_enum_ProcessDescriptor { +enum ChromeProcessType : int32_t { + PROCESS_UNSPECIFIED = 0, + PROCESS_BROWSER = 1, + PROCESS_RENDERER = 2, + PROCESS_UTILITY = 3, + PROCESS_ZYGOTE = 4, + PROCESS_SANDBOX_HELPER = 5, + PROCESS_GPU = 6, + PROCESS_PPAPI_PLUGIN = 7, + PROCESS_PPAPI_BROKER = 8, }; +} // namespace perfetto_pbzero_enum_ProcessDescriptor +using ProcessDescriptor_ChromeProcessType = perfetto_pbzero_enum_ProcessDescriptor::ChromeProcessType; -const ProcessDescriptor_ChromeProcessType ProcessDescriptor_ChromeProcessType_MIN = ProcessDescriptor_ChromeProcessType_PROCESS_UNSPECIFIED; -const ProcessDescriptor_ChromeProcessType ProcessDescriptor_ChromeProcessType_MAX = ProcessDescriptor_ChromeProcessType_PROCESS_PPAPI_BROKER; + +constexpr ProcessDescriptor_ChromeProcessType ProcessDescriptor_ChromeProcessType_MIN = ProcessDescriptor_ChromeProcessType::PROCESS_UNSPECIFIED; +constexpr ProcessDescriptor_ChromeProcessType ProcessDescriptor_ChromeProcessType_MAX = ProcessDescriptor_ChromeProcessType::PROCESS_PPAPI_BROKER; + + +PERFETTO_PROTOZERO_CONSTEXPR14_OR_INLINE +const char* ProcessDescriptor_ChromeProcessType_Name(::perfetto::protos::pbzero::ProcessDescriptor_ChromeProcessType value) { + switch (value) { + case ::perfetto::protos::pbzero::ProcessDescriptor_ChromeProcessType::PROCESS_UNSPECIFIED: + return "PROCESS_UNSPECIFIED"; + + case ::perfetto::protos::pbzero::ProcessDescriptor_ChromeProcessType::PROCESS_BROWSER: + return "PROCESS_BROWSER"; + + case ::perfetto::protos::pbzero::ProcessDescriptor_ChromeProcessType::PROCESS_RENDERER: + return "PROCESS_RENDERER"; + + case ::perfetto::protos::pbzero::ProcessDescriptor_ChromeProcessType::PROCESS_UTILITY: + return "PROCESS_UTILITY"; + + case ::perfetto::protos::pbzero::ProcessDescriptor_ChromeProcessType::PROCESS_ZYGOTE: + return "PROCESS_ZYGOTE"; + + case ::perfetto::protos::pbzero::ProcessDescriptor_ChromeProcessType::PROCESS_SANDBOX_HELPER: + return "PROCESS_SANDBOX_HELPER"; + + case ::perfetto::protos::pbzero::ProcessDescriptor_ChromeProcessType::PROCESS_GPU: + return "PROCESS_GPU"; + + case ::perfetto::protos::pbzero::ProcessDescriptor_ChromeProcessType::PROCESS_PPAPI_PLUGIN: + return "PROCESS_PPAPI_PLUGIN"; + + case ::perfetto::protos::pbzero::ProcessDescriptor_ChromeProcessType::PROCESS_PPAPI_BROKER: + return "PROCESS_PPAPI_BROKER"; + } + return "PBZERO_UNKNOWN_ENUM_VALUE"; +} class ProcessDescriptor_Decoder : public ::protozero::TypedProtoDecoder { public: @@ -39854,16 +43621,20 @@ class ProcessDescriptor : public ::protozero::Message { }; static constexpr const char* GetName() { return ".perfetto.protos.ProcessDescriptor"; } + using ChromeProcessType = ::perfetto::protos::pbzero::ProcessDescriptor_ChromeProcessType; - static const ChromeProcessType PROCESS_UNSPECIFIED = ProcessDescriptor_ChromeProcessType_PROCESS_UNSPECIFIED; - static const ChromeProcessType PROCESS_BROWSER = ProcessDescriptor_ChromeProcessType_PROCESS_BROWSER; - static const ChromeProcessType PROCESS_RENDERER = ProcessDescriptor_ChromeProcessType_PROCESS_RENDERER; - static const ChromeProcessType PROCESS_UTILITY = ProcessDescriptor_ChromeProcessType_PROCESS_UTILITY; - static const ChromeProcessType PROCESS_ZYGOTE = ProcessDescriptor_ChromeProcessType_PROCESS_ZYGOTE; - static const ChromeProcessType PROCESS_SANDBOX_HELPER = ProcessDescriptor_ChromeProcessType_PROCESS_SANDBOX_HELPER; - static const ChromeProcessType PROCESS_GPU = ProcessDescriptor_ChromeProcessType_PROCESS_GPU; - static const ChromeProcessType PROCESS_PPAPI_PLUGIN = ProcessDescriptor_ChromeProcessType_PROCESS_PPAPI_PLUGIN; - static const ChromeProcessType PROCESS_PPAPI_BROKER = ProcessDescriptor_ChromeProcessType_PROCESS_PPAPI_BROKER; + static inline const char* ChromeProcessType_Name(ChromeProcessType value) { + return ::perfetto::protos::pbzero::ProcessDescriptor_ChromeProcessType_Name(value); + } + static const ChromeProcessType PROCESS_UNSPECIFIED = ChromeProcessType::PROCESS_UNSPECIFIED; + static const ChromeProcessType PROCESS_BROWSER = ChromeProcessType::PROCESS_BROWSER; + static const ChromeProcessType PROCESS_RENDERER = ChromeProcessType::PROCESS_RENDERER; + static const ChromeProcessType PROCESS_UTILITY = ChromeProcessType::PROCESS_UTILITY; + static const ChromeProcessType PROCESS_ZYGOTE = ChromeProcessType::PROCESS_ZYGOTE; + static const ChromeProcessType PROCESS_SANDBOX_HELPER = ChromeProcessType::PROCESS_SANDBOX_HELPER; + static const ChromeProcessType PROCESS_GPU = ChromeProcessType::PROCESS_GPU; + static const ChromeProcessType PROCESS_PPAPI_PLUGIN = ChromeProcessType::PROCESS_PPAPI_PLUGIN; + static const ChromeProcessType PROCESS_PPAPI_BROKER = ChromeProcessType::PROCESS_PPAPI_BROKER; using FieldMetadata_Pid = ::protozero::proto_utils::FieldMetadata< @@ -39873,14 +43644,7 @@ class ProcessDescriptor : public ::protozero::Message { int32_t, ProcessDescriptor>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Pid kPid() { return {}; } + static constexpr FieldMetadata_Pid kPid{}; void set_pid(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Pid::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -39898,17 +43662,13 @@ class ProcessDescriptor : public ::protozero::Message { std::string, ProcessDescriptor>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Cmdline kCmdline() { return {}; } + static constexpr FieldMetadata_Cmdline kCmdline{}; void add_cmdline(const char* data, size_t size) { AppendBytes(FieldMetadata_Cmdline::kFieldId, data, size); } + void add_cmdline(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Cmdline::kFieldId, chars.data, chars.size); + } void add_cmdline(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Cmdline::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -39926,17 +43686,13 @@ class ProcessDescriptor : public ::protozero::Message { std::string, ProcessDescriptor>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ProcessName kProcessName() { return {}; } + static constexpr FieldMetadata_ProcessName kProcessName{}; void set_process_name(const char* data, size_t size) { AppendBytes(FieldMetadata_ProcessName::kFieldId, data, size); } + void set_process_name(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_ProcessName::kFieldId, chars.data, chars.size); + } void set_process_name(std::string value) { static constexpr uint32_t field_id = FieldMetadata_ProcessName::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -39954,14 +43710,7 @@ class ProcessDescriptor : public ::protozero::Message { int32_t, ProcessDescriptor>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ProcessPriority kProcessPriority() { return {}; } + static constexpr FieldMetadata_ProcessPriority kProcessPriority{}; void set_process_priority(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_ProcessPriority::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -39979,14 +43728,7 @@ class ProcessDescriptor : public ::protozero::Message { int64_t, ProcessDescriptor>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_StartTimestampNs kStartTimestampNs() { return {}; } + static constexpr FieldMetadata_StartTimestampNs kStartTimestampNs{}; void set_start_timestamp_ns(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_StartTimestampNs::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -40004,14 +43746,7 @@ class ProcessDescriptor : public ::protozero::Message { ::perfetto::protos::pbzero::ProcessDescriptor_ChromeProcessType, ProcessDescriptor>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ChromeProcessType kChromeProcessType() { return {}; } + static constexpr FieldMetadata_ChromeProcessType kChromeProcessType{}; void set_chrome_process_type(::perfetto::protos::pbzero::ProcessDescriptor_ChromeProcessType value) { static constexpr uint32_t field_id = FieldMetadata_ChromeProcessType::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -40029,14 +43764,7 @@ class ProcessDescriptor : public ::protozero::Message { int32_t, ProcessDescriptor>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_LegacySortIndex kLegacySortIndex() { return {}; } + static constexpr FieldMetadata_LegacySortIndex kLegacySortIndex{}; void set_legacy_sort_index(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_LegacySortIndex::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -40054,17 +43782,13 @@ class ProcessDescriptor : public ::protozero::Message { std::string, ProcessDescriptor>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ProcessLabels kProcessLabels() { return {}; } + static constexpr FieldMetadata_ProcessLabels kProcessLabels{}; void add_process_labels(const char* data, size_t size) { AppendBytes(FieldMetadata_ProcessLabels::kFieldId, data, size); } + void add_process_labels(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_ProcessLabels::kFieldId, chars.data, chars.size); + } void add_process_labels(std::string value) { static constexpr uint32_t field_id = FieldMetadata_ProcessLabels::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -40098,27 +43822,83 @@ namespace perfetto { namespace protos { namespace pbzero { -enum ThreadDescriptor_ChromeThreadType : int32_t; +namespace perfetto_pbzero_enum_ThreadDescriptor { +enum ChromeThreadType : int32_t; +} // namespace perfetto_pbzero_enum_ThreadDescriptor +using ThreadDescriptor_ChromeThreadType = perfetto_pbzero_enum_ThreadDescriptor::ChromeThreadType; -enum ThreadDescriptor_ChromeThreadType : int32_t { - ThreadDescriptor_ChromeThreadType_CHROME_THREAD_UNSPECIFIED = 0, - ThreadDescriptor_ChromeThreadType_CHROME_THREAD_MAIN = 1, - ThreadDescriptor_ChromeThreadType_CHROME_THREAD_IO = 2, - ThreadDescriptor_ChromeThreadType_CHROME_THREAD_POOL_BG_WORKER = 3, - ThreadDescriptor_ChromeThreadType_CHROME_THREAD_POOL_FG_WORKER = 4, - ThreadDescriptor_ChromeThreadType_CHROME_THREAD_POOL_FB_BLOCKING = 5, - ThreadDescriptor_ChromeThreadType_CHROME_THREAD_POOL_BG_BLOCKING = 6, - ThreadDescriptor_ChromeThreadType_CHROME_THREAD_POOL_SERVICE = 7, - ThreadDescriptor_ChromeThreadType_CHROME_THREAD_COMPOSITOR = 8, - ThreadDescriptor_ChromeThreadType_CHROME_THREAD_VIZ_COMPOSITOR = 9, - ThreadDescriptor_ChromeThreadType_CHROME_THREAD_COMPOSITOR_WORKER = 10, - ThreadDescriptor_ChromeThreadType_CHROME_THREAD_SERVICE_WORKER = 11, - ThreadDescriptor_ChromeThreadType_CHROME_THREAD_MEMORY_INFRA = 50, - ThreadDescriptor_ChromeThreadType_CHROME_THREAD_SAMPLING_PROFILER = 51, +namespace perfetto_pbzero_enum_ThreadDescriptor { +enum ChromeThreadType : int32_t { + CHROME_THREAD_UNSPECIFIED = 0, + CHROME_THREAD_MAIN = 1, + CHROME_THREAD_IO = 2, + CHROME_THREAD_POOL_BG_WORKER = 3, + CHROME_THREAD_POOL_FG_WORKER = 4, + CHROME_THREAD_POOL_FB_BLOCKING = 5, + CHROME_THREAD_POOL_BG_BLOCKING = 6, + CHROME_THREAD_POOL_SERVICE = 7, + CHROME_THREAD_COMPOSITOR = 8, + CHROME_THREAD_VIZ_COMPOSITOR = 9, + CHROME_THREAD_COMPOSITOR_WORKER = 10, + CHROME_THREAD_SERVICE_WORKER = 11, + CHROME_THREAD_MEMORY_INFRA = 50, + CHROME_THREAD_SAMPLING_PROFILER = 51, }; +} // namespace perfetto_pbzero_enum_ThreadDescriptor +using ThreadDescriptor_ChromeThreadType = perfetto_pbzero_enum_ThreadDescriptor::ChromeThreadType; -const ThreadDescriptor_ChromeThreadType ThreadDescriptor_ChromeThreadType_MIN = ThreadDescriptor_ChromeThreadType_CHROME_THREAD_UNSPECIFIED; -const ThreadDescriptor_ChromeThreadType ThreadDescriptor_ChromeThreadType_MAX = ThreadDescriptor_ChromeThreadType_CHROME_THREAD_SAMPLING_PROFILER; + +constexpr ThreadDescriptor_ChromeThreadType ThreadDescriptor_ChromeThreadType_MIN = ThreadDescriptor_ChromeThreadType::CHROME_THREAD_UNSPECIFIED; +constexpr ThreadDescriptor_ChromeThreadType ThreadDescriptor_ChromeThreadType_MAX = ThreadDescriptor_ChromeThreadType::CHROME_THREAD_SAMPLING_PROFILER; + + +PERFETTO_PROTOZERO_CONSTEXPR14_OR_INLINE +const char* ThreadDescriptor_ChromeThreadType_Name(::perfetto::protos::pbzero::ThreadDescriptor_ChromeThreadType value) { + switch (value) { + case ::perfetto::protos::pbzero::ThreadDescriptor_ChromeThreadType::CHROME_THREAD_UNSPECIFIED: + return "CHROME_THREAD_UNSPECIFIED"; + + case ::perfetto::protos::pbzero::ThreadDescriptor_ChromeThreadType::CHROME_THREAD_MAIN: + return "CHROME_THREAD_MAIN"; + + case ::perfetto::protos::pbzero::ThreadDescriptor_ChromeThreadType::CHROME_THREAD_IO: + return "CHROME_THREAD_IO"; + + case ::perfetto::protos::pbzero::ThreadDescriptor_ChromeThreadType::CHROME_THREAD_POOL_BG_WORKER: + return "CHROME_THREAD_POOL_BG_WORKER"; + + case ::perfetto::protos::pbzero::ThreadDescriptor_ChromeThreadType::CHROME_THREAD_POOL_FG_WORKER: + return "CHROME_THREAD_POOL_FG_WORKER"; + + case ::perfetto::protos::pbzero::ThreadDescriptor_ChromeThreadType::CHROME_THREAD_POOL_FB_BLOCKING: + return "CHROME_THREAD_POOL_FB_BLOCKING"; + + case ::perfetto::protos::pbzero::ThreadDescriptor_ChromeThreadType::CHROME_THREAD_POOL_BG_BLOCKING: + return "CHROME_THREAD_POOL_BG_BLOCKING"; + + case ::perfetto::protos::pbzero::ThreadDescriptor_ChromeThreadType::CHROME_THREAD_POOL_SERVICE: + return "CHROME_THREAD_POOL_SERVICE"; + + case ::perfetto::protos::pbzero::ThreadDescriptor_ChromeThreadType::CHROME_THREAD_COMPOSITOR: + return "CHROME_THREAD_COMPOSITOR"; + + case ::perfetto::protos::pbzero::ThreadDescriptor_ChromeThreadType::CHROME_THREAD_VIZ_COMPOSITOR: + return "CHROME_THREAD_VIZ_COMPOSITOR"; + + case ::perfetto::protos::pbzero::ThreadDescriptor_ChromeThreadType::CHROME_THREAD_COMPOSITOR_WORKER: + return "CHROME_THREAD_COMPOSITOR_WORKER"; + + case ::perfetto::protos::pbzero::ThreadDescriptor_ChromeThreadType::CHROME_THREAD_SERVICE_WORKER: + return "CHROME_THREAD_SERVICE_WORKER"; + + case ::perfetto::protos::pbzero::ThreadDescriptor_ChromeThreadType::CHROME_THREAD_MEMORY_INFRA: + return "CHROME_THREAD_MEMORY_INFRA"; + + case ::perfetto::protos::pbzero::ThreadDescriptor_ChromeThreadType::CHROME_THREAD_SAMPLING_PROFILER: + return "CHROME_THREAD_SAMPLING_PROFILER"; + } + return "PBZERO_UNKNOWN_ENUM_VALUE"; +} class ThreadDescriptor_Decoder : public ::protozero::TypedProtoDecoder { public: @@ -40158,21 +43938,25 @@ class ThreadDescriptor : public ::protozero::Message { }; static constexpr const char* GetName() { return ".perfetto.protos.ThreadDescriptor"; } + using ChromeThreadType = ::perfetto::protos::pbzero::ThreadDescriptor_ChromeThreadType; - static const ChromeThreadType CHROME_THREAD_UNSPECIFIED = ThreadDescriptor_ChromeThreadType_CHROME_THREAD_UNSPECIFIED; - static const ChromeThreadType CHROME_THREAD_MAIN = ThreadDescriptor_ChromeThreadType_CHROME_THREAD_MAIN; - static const ChromeThreadType CHROME_THREAD_IO = ThreadDescriptor_ChromeThreadType_CHROME_THREAD_IO; - static const ChromeThreadType CHROME_THREAD_POOL_BG_WORKER = ThreadDescriptor_ChromeThreadType_CHROME_THREAD_POOL_BG_WORKER; - static const ChromeThreadType CHROME_THREAD_POOL_FG_WORKER = ThreadDescriptor_ChromeThreadType_CHROME_THREAD_POOL_FG_WORKER; - static const ChromeThreadType CHROME_THREAD_POOL_FB_BLOCKING = ThreadDescriptor_ChromeThreadType_CHROME_THREAD_POOL_FB_BLOCKING; - static const ChromeThreadType CHROME_THREAD_POOL_BG_BLOCKING = ThreadDescriptor_ChromeThreadType_CHROME_THREAD_POOL_BG_BLOCKING; - static const ChromeThreadType CHROME_THREAD_POOL_SERVICE = ThreadDescriptor_ChromeThreadType_CHROME_THREAD_POOL_SERVICE; - static const ChromeThreadType CHROME_THREAD_COMPOSITOR = ThreadDescriptor_ChromeThreadType_CHROME_THREAD_COMPOSITOR; - static const ChromeThreadType CHROME_THREAD_VIZ_COMPOSITOR = ThreadDescriptor_ChromeThreadType_CHROME_THREAD_VIZ_COMPOSITOR; - static const ChromeThreadType CHROME_THREAD_COMPOSITOR_WORKER = ThreadDescriptor_ChromeThreadType_CHROME_THREAD_COMPOSITOR_WORKER; - static const ChromeThreadType CHROME_THREAD_SERVICE_WORKER = ThreadDescriptor_ChromeThreadType_CHROME_THREAD_SERVICE_WORKER; - static const ChromeThreadType CHROME_THREAD_MEMORY_INFRA = ThreadDescriptor_ChromeThreadType_CHROME_THREAD_MEMORY_INFRA; - static const ChromeThreadType CHROME_THREAD_SAMPLING_PROFILER = ThreadDescriptor_ChromeThreadType_CHROME_THREAD_SAMPLING_PROFILER; + static inline const char* ChromeThreadType_Name(ChromeThreadType value) { + return ::perfetto::protos::pbzero::ThreadDescriptor_ChromeThreadType_Name(value); + } + static const ChromeThreadType CHROME_THREAD_UNSPECIFIED = ChromeThreadType::CHROME_THREAD_UNSPECIFIED; + static const ChromeThreadType CHROME_THREAD_MAIN = ChromeThreadType::CHROME_THREAD_MAIN; + static const ChromeThreadType CHROME_THREAD_IO = ChromeThreadType::CHROME_THREAD_IO; + static const ChromeThreadType CHROME_THREAD_POOL_BG_WORKER = ChromeThreadType::CHROME_THREAD_POOL_BG_WORKER; + static const ChromeThreadType CHROME_THREAD_POOL_FG_WORKER = ChromeThreadType::CHROME_THREAD_POOL_FG_WORKER; + static const ChromeThreadType CHROME_THREAD_POOL_FB_BLOCKING = ChromeThreadType::CHROME_THREAD_POOL_FB_BLOCKING; + static const ChromeThreadType CHROME_THREAD_POOL_BG_BLOCKING = ChromeThreadType::CHROME_THREAD_POOL_BG_BLOCKING; + static const ChromeThreadType CHROME_THREAD_POOL_SERVICE = ChromeThreadType::CHROME_THREAD_POOL_SERVICE; + static const ChromeThreadType CHROME_THREAD_COMPOSITOR = ChromeThreadType::CHROME_THREAD_COMPOSITOR; + static const ChromeThreadType CHROME_THREAD_VIZ_COMPOSITOR = ChromeThreadType::CHROME_THREAD_VIZ_COMPOSITOR; + static const ChromeThreadType CHROME_THREAD_COMPOSITOR_WORKER = ChromeThreadType::CHROME_THREAD_COMPOSITOR_WORKER; + static const ChromeThreadType CHROME_THREAD_SERVICE_WORKER = ChromeThreadType::CHROME_THREAD_SERVICE_WORKER; + static const ChromeThreadType CHROME_THREAD_MEMORY_INFRA = ChromeThreadType::CHROME_THREAD_MEMORY_INFRA; + static const ChromeThreadType CHROME_THREAD_SAMPLING_PROFILER = ChromeThreadType::CHROME_THREAD_SAMPLING_PROFILER; using FieldMetadata_Pid = ::protozero::proto_utils::FieldMetadata< @@ -40182,14 +43966,7 @@ class ThreadDescriptor : public ::protozero::Message { int32_t, ThreadDescriptor>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Pid kPid() { return {}; } + static constexpr FieldMetadata_Pid kPid{}; void set_pid(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Pid::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -40207,14 +43984,7 @@ class ThreadDescriptor : public ::protozero::Message { int32_t, ThreadDescriptor>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Tid kTid() { return {}; } + static constexpr FieldMetadata_Tid kTid{}; void set_tid(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Tid::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -40232,17 +44002,13 @@ class ThreadDescriptor : public ::protozero::Message { std::string, ThreadDescriptor>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ThreadName kThreadName() { return {}; } + static constexpr FieldMetadata_ThreadName kThreadName{}; void set_thread_name(const char* data, size_t size) { AppendBytes(FieldMetadata_ThreadName::kFieldId, data, size); } + void set_thread_name(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_ThreadName::kFieldId, chars.data, chars.size); + } void set_thread_name(std::string value) { static constexpr uint32_t field_id = FieldMetadata_ThreadName::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -40260,14 +44026,7 @@ class ThreadDescriptor : public ::protozero::Message { ::perfetto::protos::pbzero::ThreadDescriptor_ChromeThreadType, ThreadDescriptor>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ChromeThreadType kChromeThreadType() { return {}; } + static constexpr FieldMetadata_ChromeThreadType kChromeThreadType{}; void set_chrome_thread_type(::perfetto::protos::pbzero::ThreadDescriptor_ChromeThreadType value) { static constexpr uint32_t field_id = FieldMetadata_ChromeThreadType::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -40285,14 +44044,7 @@ class ThreadDescriptor : public ::protozero::Message { int64_t, ThreadDescriptor>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ReferenceTimestampUs kReferenceTimestampUs() { return {}; } + static constexpr FieldMetadata_ReferenceTimestampUs kReferenceTimestampUs{}; void set_reference_timestamp_us(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_ReferenceTimestampUs::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -40310,14 +44062,7 @@ class ThreadDescriptor : public ::protozero::Message { int64_t, ThreadDescriptor>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ReferenceThreadTimeUs kReferenceThreadTimeUs() { return {}; } + static constexpr FieldMetadata_ReferenceThreadTimeUs kReferenceThreadTimeUs{}; void set_reference_thread_time_us(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_ReferenceThreadTimeUs::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -40335,14 +44080,7 @@ class ThreadDescriptor : public ::protozero::Message { int64_t, ThreadDescriptor>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ReferenceThreadInstructionCount kReferenceThreadInstructionCount() { return {}; } + static constexpr FieldMetadata_ReferenceThreadInstructionCount kReferenceThreadInstructionCount{}; void set_reference_thread_instruction_count(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_ReferenceThreadInstructionCount::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -40360,14 +44098,7 @@ class ThreadDescriptor : public ::protozero::Message { int32_t, ThreadDescriptor>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_LegacySortIndex kLegacySortIndex() { return {}; } + static constexpr FieldMetadata_LegacySortIndex kLegacySortIndex{}; void set_legacy_sort_index(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_LegacySortIndex::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -40404,11 +44135,11 @@ class ThreadDescriptor : public ::protozero::Message { #include #include +#include #include // gen_amalgamated expanded: #include "perfetto/ext/base/file_utils.h" // gen_amalgamated expanded: #include "perfetto/ext/base/hash.h" -// gen_amalgamated expanded: #include "perfetto/ext/base/optional.h" // gen_amalgamated expanded: #include "perfetto/ext/base/scoped_file.h" // gen_amalgamated expanded: #include "perfetto/ext/base/string_utils.h" // gen_amalgamated expanded: #include "perfetto/ext/base/utils.h" @@ -40513,7 +44244,7 @@ class ConsoleInterceptor::Delegate : public TrackEventStateTracker::Delegate { using SelfHandle = LockedHandle; InterceptorContext& context_; - base::Optional locked_self_; + std::optional locked_self_; }; ConsoleInterceptor::~ConsoleInterceptor() = default; @@ -40541,7 +44272,7 @@ ConsoleInterceptor::Delegate::GetSessionState() { if (locked_self_.has_value()) return &locked_self_.value()->session_state_; locked_self_ = - base::make_optional(context_.GetInterceptorLocked()); + std::make_optional(context_.GetInterceptorLocked()); return &locked_self_.value()->session_state_; } @@ -40575,8 +44306,9 @@ void ConsoleInterceptor::Delegate::OnTrackUpdated( "%-*.*s", title_width + 2, title_width, title.data()); } - track.user_data.assign(message_prefix.begin(), - message_prefix.begin() + written); + track.user_data.assign( + message_prefix.begin(), + message_prefix.begin() + static_cast(written)); } void ConsoleInterceptor::Delegate::OnTrackEvent( @@ -40868,15 +44600,52 @@ void ConsoleInterceptor::PrintDebugAnnotationValue( */ // gen_amalgamated expanded: #include "perfetto/tracing/data_source.h" +// gen_amalgamated expanded: #include "perfetto/base/logging.h" namespace perfetto { DataSourceBase::StopArgs::~StopArgs() = default; +DataSourceBase::FlushArgs::~FlushArgs() = default; DataSourceBase::~DataSourceBase() = default; void DataSourceBase::OnSetup(const SetupArgs&) {} void DataSourceBase::OnStart(const StartArgs&) {} void DataSourceBase::OnStop(const StopArgs&) {} +void DataSourceBase::WillClearIncrementalState( + const ClearIncrementalStateArgs&) {} +void DataSourceBase::OnFlush(const FlushArgs&) {} +namespace internal { + +void DataSourceType::PopulateTlsInst( + DataSourceInstanceThreadLocalState* tls_inst, + DataSourceState* instance_state, + uint32_t instance_index) { + auto* tracing_impl = TracingMuxer::Get(); + tls_inst->muxer_id_for_testing = instance_state->muxer_id_for_testing; + tls_inst->backend_id = instance_state->backend_id; + tls_inst->backend_connection_id = instance_state->backend_connection_id; + tls_inst->buffer_id = instance_state->buffer_id; + tls_inst->startup_target_buffer_reservation = + instance_state->startup_target_buffer_reservation.load( + std::memory_order_relaxed); + tls_inst->data_source_instance_id = instance_state->data_source_instance_id; + tls_inst->is_intercepted = instance_state->interceptor_id != 0; + tls_inst->trace_writer = tracing_impl->CreateTraceWriter( + &state_, instance_index, instance_state, buffer_exhausted_policy_); + if (create_incremental_state_fn_) { + PERFETTO_DCHECK(!tls_inst->incremental_state); + CreateIncrementalState(tls_inst, instance_index); + } + if (create_custom_tls_fn_) { + tls_inst->data_source_custom_tls = + create_custom_tls_fn_(tls_inst, instance_index, user_arg_); + } + // Even in the case of out-of-IDs, SharedMemoryArbiterImpl returns a + // NullTraceWriter. The returned pointer should never be null. + PERFETTO_DCHECK(tls_inst->trace_writer); +} + +} // namespace internal } // namespace perfetto // gen_amalgamated begin source: src/tracing/debug_annotation.cc /* @@ -41062,6 +44831,13 @@ protos::pbzero::DebugAnnotation* EventContext::AddDebugAnnotation( return annotation; } +protos::pbzero::DebugAnnotation* EventContext::AddDebugAnnotation( + ::perfetto::DynamicString name) { + auto annotation = event()->add_debug_annotations(); + annotation->set_name(name.value); + return annotation; +} + } // namespace perfetto // gen_amalgamated begin source: src/tracing/interceptor.cc /* @@ -41212,6 +44988,7 @@ class InterceptorTraceWriter : public TraceWriterBase { // TraceWriterBase implementation. protozero::MessageHandle NewTracePacket() override; + void FinishTracePacket() override; void Flush(std::function callback = {}) override; uint64_t written() const override; @@ -41317,6 +45094,8 @@ void InterceptorTraceWriter::Flush(std::function callback) { callback(); } +void InterceptorTraceWriter::FinishTracePacket() {} + uint64_t InterceptorTraceWriter::written() const { return bytes_written_; } @@ -41408,11 +45187,18 @@ class UnsupportedProducerEndpoint : public ProducerEndpoint { // to connect successfully, but never start any sessions. auto weak_ptr = weak_ptr_factory_.GetWeakPtr(); task_runner_->PostTask([weak_ptr] { - if (weak_ptr) + if (weak_ptr && weak_ptr->connected_) weak_ptr->producer_->OnConnect(); }); } - ~UnsupportedProducerEndpoint() override { producer_->OnDisconnect(); } + ~UnsupportedProducerEndpoint() override { Disconnect(); } + + void Disconnect() override { + if (!connected_) + return; + connected_ = false; + producer_->OnDisconnect(); + } void RegisterDataSource(const DataSourceDescriptor&) override {} void UpdateDataSource(const DataSourceDescriptor&) override {} @@ -41423,8 +45209,10 @@ class UnsupportedProducerEndpoint : public ProducerEndpoint { void UnregisterTraceWriter(uint32_t /*writer_id*/) override {} void CommitData(const CommitDataRequest&, - CommitDataCallback callback = {}) override { - callback(); + CommitDataCallback callback) override { + if (connected_) { + callback(); + } } SharedMemory* shared_memory() const override { return nullptr; } @@ -41432,7 +45220,7 @@ class UnsupportedProducerEndpoint : public ProducerEndpoint { std::unique_ptr CreateTraceWriter( BufferID /*target_buffer*/, - BufferExhaustedPolicy = BufferExhaustedPolicy::kDefault) override { + BufferExhaustedPolicy) override { return nullptr; } @@ -41444,11 +45232,16 @@ class UnsupportedProducerEndpoint : public ProducerEndpoint { void NotifyDataSourceStopped(DataSourceInstanceID) override {} void ActivateTriggers(const std::vector&) override {} - void Sync(std::function callback) override { callback(); } + void Sync(std::function callback) override { + if (connected_) { + callback(); + } + } private: Producer* const producer_; base::TaskRunner* const task_runner_; + bool connected_ = true; base::WeakPtrFactory weak_ptr_factory_{ this}; // Keep last. }; @@ -41467,8 +45260,7 @@ class UnsupportedConsumerEndpoint : public ConsumerEndpoint { } ~UnsupportedConsumerEndpoint() override = default; - void EnableTracing(const TraceConfig&, - base::ScopedFile = base::ScopedFile()) override {} + void EnableTracing(const TraceConfig&, base::ScopedFile) override {} void ChangeTraceConfig(const TraceConfig&) override {} void StartTracing() override {} @@ -41490,6 +45282,7 @@ class UnsupportedConsumerEndpoint : public ConsumerEndpoint { void QueryCapabilities(QueryCapabilitiesCallback) override {} void SaveTraceForBugreport(SaveTraceForBugreportCallback) override {} + void CloneSession(TracingSessionID) override {} private: Consumer* const consumer_; @@ -41580,6 +45373,7 @@ class TracingMuxerFake : public TracingMuxer { // TracingMuxer implementation. bool RegisterDataSource(const DataSourceDescriptor&, DataSourceFactory, + DataSourceParams, DataSourceStaticState*) override; void UpdateDataSourceDescriptor(const DataSourceDescriptor&, const DataSourceStaticState*) override; @@ -41593,6 +45387,7 @@ class TracingMuxerFake : public TracingMuxer { InterceptorFactory, InterceptorBase::TLSFactory, InterceptorBase::TracePacketCallback) override; + void ActivateTriggers(const std::vector&, uint32_t) override; private: static TracingMuxerFake instance; @@ -41659,6 +45454,7 @@ std::string TracingMuxerFake::FakePlatform::GetCurrentProcessName() { bool TracingMuxerFake::RegisterDataSource(const DataSourceDescriptor&, DataSourceFactory, + DataSourceParams, DataSourceStaticState*) { FailUninitialized(); } @@ -41689,6 +45485,11 @@ void TracingMuxerFake::RegisterInterceptor( FailUninitialized(); } +void TracingMuxerFake::ActivateTriggers(const std::vector&, + uint32_t) { + FailUninitialized(); +} + } // namespace internal } // namespace perfetto // gen_amalgamated begin source: src/tracing/internal/tracing_muxer_impl.cc @@ -41718,16 +45519,21 @@ void TracingMuxerFake::RegisterInterceptor( #include #include #include +#include #include #include #include +#include +#include #include +// gen_amalgamated expanded: #include "perfetto/base/time.h" // gen_amalgamated expanded: #include "perfetto/ext/base/scoped_file.h" // gen_amalgamated expanded: #include "perfetto/ext/base/thread_checker.h" // gen_amalgamated expanded: #include "perfetto/ext/tracing/core/basic_types.h" // gen_amalgamated expanded: #include "perfetto/ext/tracing/core/consumer.h" // gen_amalgamated expanded: #include "perfetto/ext/tracing/core/producer.h" +// gen_amalgamated expanded: #include "perfetto/tracing/backend_type.h" // gen_amalgamated expanded: #include "perfetto/tracing/core/data_source_descriptor.h" // gen_amalgamated expanded: #include "perfetto/tracing/core/forward_decls.h" // gen_amalgamated expanded: #include "perfetto/tracing/core/trace_config.h" @@ -41751,6 +45557,14 @@ namespace base { class TaskRunner; } +namespace shlib { +void ResetForTesting(); +} + +namespace test { +class TracingMuxerImplInternalsForTest; +} + namespace internal { struct DataSourceStaticState; @@ -41791,12 +45605,22 @@ class TracingMuxerImpl : public TracingMuxer { // backends. TracingSessionID is global only within the scope of one service. using TracingSessionGlobalID = uint64_t; + struct RegisteredDataSource { + DataSourceDescriptor descriptor; + DataSourceFactory factory{}; + bool supports_multiple_instances = false; + bool requires_callbacks_under_lock = false; + DataSourceStaticState* static_state = nullptr; + }; + static void InitializeInstance(const TracingInitArgs&); static void ResetForTesting(); + static void Shutdown(); // TracingMuxer implementation. bool RegisterDataSource(const DataSourceDescriptor&, DataSourceFactory, + DataSourceParams, DataSourceStaticState*) override; void UpdateDataSourceDescriptor(const DataSourceDescriptor&, const DataSourceStaticState*) override; @@ -41811,7 +45635,17 @@ class TracingMuxerImpl : public TracingMuxer { InterceptorBase::TLSFactory, InterceptorBase::TracePacketCallback) override; - std::unique_ptr CreateTracingSession(BackendType); + void ActivateTriggers(const std::vector&, uint32_t) override; + + std::unique_ptr CreateTracingSession( + BackendType, + TracingConsumerBackend* (*system_backend_factory)()); + std::unique_ptr CreateStartupTracingSession( + const TraceConfig& config, + Tracing::SetupStartupTracingOpts); + std::unique_ptr CreateStartupTracingSessionBlocking( + const TraceConfig& config, + Tracing::SetupStartupTracingOpts); // Producer-side bookkeeping methods. void UpdateDataSourcesOnAllBackends(); @@ -41821,7 +45655,6 @@ class TracingMuxerImpl : public TracingMuxer { const DataSourceConfig&); void StartDataSource(TracingBackendId, DataSourceInstanceID); void StopDataSource_AsyncBegin(TracingBackendId, DataSourceInstanceID); - void StopDataSource_AsyncEnd(TracingBackendId, DataSourceInstanceID); void ClearDataSourceIncrementalState(TracingBackendId, DataSourceInstanceID); void SyncProducersForTesting(); @@ -41858,6 +45691,9 @@ class TracingMuxerImpl : public TracingMuxer { void SetMaxProducerReconnectionsForTesting(uint32_t count); private: + friend class test::TracingMuxerImplInternalsForTest; + friend void shlib::ResetForTesting(); + // For each TracingBackend we create and register one ProducerImpl instance. // This talks to the producer-side of the service, gets start/stop requests // from it and routes them to the registered data sources. @@ -41882,6 +45718,7 @@ class TracingMuxerImpl : public TracingMuxer { void OnConnect() override; void OnDisconnect() override; void OnTracingSetup() override; + void OnStartupTracingSetup() override; void SetupDataSource(DataSourceInstanceID, const DataSourceConfig&) override; void StartDataSource(DataSourceInstanceID, @@ -41891,13 +45728,19 @@ class TracingMuxerImpl : public TracingMuxer { void ClearIncrementalState(const DataSourceInstanceID*, size_t) override; bool SweepDeadServices(); + void SendOnConnectTriggers(); + void NotifyFlushForDataSourceDone(DataSourceInstanceID, FlushRequestID); PERFETTO_THREAD_CHECKER(thread_checker_) TracingMuxerImpl* muxer_; TracingBackendId const backend_id_; bool connected_ = false; bool did_setup_tracing_ = false; - uint32_t connection_id_ = 0; + bool did_setup_startup_tracing_ = false; + std::atomic connection_id_{0}; + uint16_t last_startup_target_buffer_reservation_ = 0; + bool is_producer_provided_smb_ = false; + bool producer_provided_smb_failed_ = false; const uint32_t shmem_batch_commits_duration_ms_ = 0; @@ -41912,6 +45755,12 @@ class TracingMuxerImpl : public TracingMuxer { // that no longer have any writers (see SweepDeadServices). std::list> dead_services_; + // Triggers that should be sent when the service connects (trigger_name, + // expiration). + std::list> on_connect_triggers_; + + std::map> pending_flushes_; + // The currently active service endpoint is maintained as an atomic shared // pointer so it won't get deleted from underneath threads that are creating // trace writers. At any given time one endpoint can be shared (and thus @@ -41933,10 +45782,7 @@ class TracingMuxerImpl : public TracingMuxer { // tracing sessions. class ConsumerImpl : public Consumer { public: - ConsumerImpl(TracingMuxerImpl*, - BackendType, - TracingBackendId, - TracingSessionGlobalID); + ConsumerImpl(TracingMuxerImpl*, BackendType, TracingSessionGlobalID); ~ConsumerImpl() override; void Initialize(std::unique_ptr endpoint); @@ -41950,6 +45796,7 @@ class TracingMuxerImpl : public TracingMuxer { void OnAttach(bool success, const TraceConfig&) override; void OnTraceStats(bool success, const TraceStats&) override; void OnObservableEvents(const ObservableEvents&) override; + void OnSessionCloned(bool, const std::string&) override; void NotifyStartComplete(); void NotifyError(const TracingError&); @@ -41960,7 +45807,6 @@ class TracingMuxerImpl : public TracingMuxer { TracingMuxerImpl* muxer_; BackendType const backend_type_; - TracingBackendId const backend_id_; TracingSessionGlobalID const session_id_; bool connected_ = false; @@ -42050,10 +45896,21 @@ class TracingMuxerImpl : public TracingMuxer { BackendType const backend_type_; }; - struct RegisteredDataSource { - DataSourceDescriptor descriptor; - DataSourceFactory factory{}; - DataSourceStaticState* static_state = nullptr; + // This object is returned to API clients when they call + // Tracing::SetupStartupTracing(). + class StartupTracingSessionImpl : public StartupTracingSession { + public: + StartupTracingSessionImpl(TracingMuxerImpl*, + TracingSessionGlobalID, + BackendType); + ~StartupTracingSessionImpl() override; + void Abort() override; + void AbortBlocking() override; + + private: + TracingMuxerImpl* const muxer_; + TracingSessionGlobalID const session_id_; + BackendType backend_type_; }; struct RegisteredInterceptor { @@ -42063,15 +45920,33 @@ class TracingMuxerImpl : public TracingMuxer { InterceptorBase::TracePacketCallback packet_callback{}; }; - struct RegisteredBackend { + struct RegisteredStartupSession { + TracingSessionID session_id = 0; + int num_unbound_data_sources = 0; + + bool is_aborting = false; + int num_aborting_data_sources = 0; + + std::function on_aborted; + std::function on_adopted; + }; + + struct RegisteredProducerBackend { // Backends are supposed to have static lifetime. - TracingBackend* backend = nullptr; + TracingProducerBackend* backend = nullptr; TracingBackendId id = 0; BackendType type{}; TracingBackend::ConnectProducerArgs producer_conn_args; std::unique_ptr producer; + std::vector startup_sessions; + }; + + struct RegisteredConsumerBackend { + // Backends are supposed to have static lifetime. + TracingConsumerBackend* backend = nullptr; + BackendType type{}; // The calling code can request more than one concurrently active tracing // session for the same backend. We need to create one consumer per session. std::vector> consumers; @@ -42081,31 +45956,84 @@ class TracingMuxerImpl : public TracingMuxer { bool is_changed); explicit TracingMuxerImpl(const TracingInitArgs&); void Initialize(const TracingInitArgs& args); + void AddBackends(const TracingInitArgs& args); + void AddConsumerBackend(TracingConsumerBackend* backend, BackendType type); + void AddProducerBackend(TracingProducerBackend* backend, + BackendType type, + const TracingInitArgs& args); ConsumerImpl* FindConsumer(TracingSessionGlobalID session_id); + std::pair FindConsumerAndBackend( + TracingSessionGlobalID session_id); + RegisteredProducerBackend* FindProducerBackendById(TracingBackendId id); + RegisteredProducerBackend* FindProducerBackendByType(BackendType type); + RegisteredConsumerBackend* FindConsumerBackendByType(BackendType type); void InitializeConsumer(TracingSessionGlobalID session_id); void OnConsumerDisconnected(ConsumerImpl* consumer); void OnProducerDisconnected(ProducerImpl* producer); + // Test only method. void SweepDeadBackends(); struct FindDataSourceRes { FindDataSourceRes() = default; - FindDataSourceRes(DataSourceStaticState* a, DataSourceState* b, uint32_t c) - : static_state(a), internal_state(b), instance_idx(c) {} + FindDataSourceRes(DataSourceStaticState* a, + DataSourceState* b, + uint32_t c, + bool d) + : static_state(a), + internal_state(b), + instance_idx(c), + requires_callbacks_under_lock(d) {} explicit operator bool() const { return !!internal_state; } DataSourceStaticState* static_state = nullptr; DataSourceState* internal_state = nullptr; uint32_t instance_idx = 0; + bool requires_callbacks_under_lock = false; }; FindDataSourceRes FindDataSource(TracingBackendId, DataSourceInstanceID); + FindDataSourceRes SetupDataSourceImpl( + const RegisteredDataSource&, + TracingBackendId, + uint32_t backend_connection_id, + DataSourceInstanceID, + const DataSourceConfig&, + uint64_t config_hash, + uint64_t startup_config_hash, + TracingSessionGlobalID startup_session_id); + void StartDataSourceImpl(const FindDataSourceRes&); + void StopDataSource_AsyncBeginImpl(const FindDataSourceRes&); + void StopDataSource_AsyncEnd(TracingBackendId, + uint32_t backend_connection_id, + DataSourceInstanceID, + const FindDataSourceRes&); + bool FlushDataSource_AsyncBegin(TracingBackendId, + DataSourceInstanceID, + FlushRequestID); + void FlushDataSource_AsyncEnd(TracingBackendId, + uint32_t backend_connection_id, + DataSourceInstanceID, + const FindDataSourceRes&, + FlushRequestID); + void AbortStartupTracingSession(TracingSessionGlobalID, BackendType); + // When ResetForTesting() is executed, `cb` will be called on the calling + // thread and on the muxer thread. + void AppendResetForTestingCallback(std::function cb); + // WARNING: If you add new state here, be sure to update ResetForTesting. std::unique_ptr task_runner_; std::vector data_sources_; - std::vector backends_; + // These lists can only have one backend per BackendType. The elements are + // sorted by BackendType priority (see BackendTypePriority). They always + // contain a fake low-priority kUnspecifiedBackend at the end. + std::list producer_backends_; + std::list consumer_backends_; std::vector interceptors_; TracingPolicy* policy_ = nullptr; + // Learn more at TracingInitArgs::supports_multiple_data_source_instances + bool supports_multiple_data_source_instances_ = true; + std::atomic next_tracing_session_id_{}; std::atomic next_data_source_index_{}; uint32_t muxer_id_for_testing_{}; @@ -42114,10 +46042,16 @@ class TracingMuxerImpl : public TracingMuxer { // Should only be modified for testing purposes. std::atomic max_producer_reconnections_{100u}; + // Test only member. // After ResetForTesting() is called, holds tracing backends which needs to be // kept alive until all inbound references have gone away. See // SweepDeadBackends(). - std::list dead_backends_; + std::list dead_backends_; + + // Test only member. + // Executes these cleanup functions on the calling thread and on the muxer + // thread when ResetForTesting() is called. + std::list> reset_callbacks_; PERFETTO_THREAD_CHECKER(thread_checker_) }; @@ -42206,6 +46140,7 @@ class TracingMuxerImpl : public TracingMuxer { #include #include #include +#include #include // gen_amalgamated expanded: #include "perfetto/base/build_config.h" @@ -42230,11 +46165,12 @@ class TracingMuxerImpl : public TracingMuxer { // gen_amalgamated expanded: #include "perfetto/tracing/trace_writer_base.h" // gen_amalgamated expanded: #include "perfetto/tracing/tracing.h" // gen_amalgamated expanded: #include "perfetto/tracing/tracing_backend.h" - -// gen_amalgamated expanded: #include "protos/perfetto/config/interceptor_config.gen.h" - +// gen_amalgamated expanded: #include "src/tracing/core/null_trace_writer.h" // gen_amalgamated expanded: #include "src/tracing/internal/tracing_muxer_fake.h" +// gen_amalgamated expanded: #include "protos/perfetto/config/chrome/chrome_config.gen.h" +// gen_amalgamated expanded: #include "protos/perfetto/config/interceptor_config.gen.h" + #if PERFETTO_BUILDFLAG(PERFETTO_OS_WIN) #include // For dup() #else @@ -42246,6 +46182,8 @@ namespace internal { namespace { +using RegisteredDataSource = TracingMuxerImpl::RegisteredDataSource; + // A task runner which prevents calls to DataSource::Trace() while an operation // is in progress. Used to guard against unexpected re-entrancy where the // user-provided task runner implementation tries to enter a trace point under @@ -42309,8 +46247,19 @@ class StopArgsImpl : public DataSourceBase::StopArgs { mutable std::function async_stop_closure; }; +class FlushArgsImpl : public DataSourceBase::FlushArgs { + public: + std::function HandleFlushAsynchronously() const override { + auto closure = std::move(async_flush_closure); + async_flush_closure = std::function(); + return closure; + } + + mutable std::function async_flush_closure; +}; + uint64_t ComputeConfigHash(const DataSourceConfig& config) { - base::Hash hasher; + base::Hasher hasher; std::string config_bytes = config.SerializeAsString(); hasher.Update(config_bytes.data(), config_bytes.size()); return hasher.digest(); @@ -42319,6 +46268,57 @@ uint64_t ComputeConfigHash(const DataSourceConfig& config) { // Holds an earlier TracingMuxerImpl instance after ResetForTesting() is called. static TracingMuxerImpl* g_prev_instance{}; +uint64_t ComputeStartupConfigHash(DataSourceConfig config) { + // Clear target buffer and tracing-service provided fields for comparison of + // configs for startup tracing, since these fields are not available when + // setting up data sources for startup tracing. + config.set_target_buffer(0); + config.set_tracing_session_id(0); + config.set_session_initiator(DataSourceConfig::SESSION_INITIATOR_UNSPECIFIED); + config.set_trace_duration_ms(0); + config.set_stop_timeout_ms(0); + config.set_enable_extra_guardrails(false); + // Clear some fields inside Chrome config: + // * client_priority, because Chrome always sets the priority to + // USER_INITIATED when setting up startup tracing. + // * convert_to_legacy_json, because Telemetry initiates tracing with proto + // format, but in some cases adopts the tracing session later via devtools + // which expect json format. + // TODO(khokhlov): Don't clear client_priority when Chrome correctly sets it + // for startup tracing (and propagates it to all child processes). + if (config.has_chrome_config()) { + config.mutable_chrome_config()->set_client_priority( + perfetto::protos::gen::ChromeConfig::UNKNOWN); + config.mutable_chrome_config()->set_convert_to_legacy_json(false); + } + base::Hasher hasher; + std::string config_bytes = config.SerializeAsString(); + hasher.Update(config_bytes.data(), config_bytes.size()); + return hasher.digest(); +} + +template +struct CompareBackendByType { + static int BackendTypePriority(BackendType type) { + switch (type) { + case kSystemBackend: + return 0; + case kInProcessBackend: + return 1; + case kCustomBackend: + return 2; + // The UnspecifiedBackend has the highest priority so that + // TracingBackendFake is the last one on the backend lists. + case kUnspecifiedBackend: + break; + } + return 3; + } + bool operator()(BackendType type, const RegisteredBackend& b) { + return BackendTypePriority(type) < BackendTypePriority(b.type); + } +}; + } // namespace // ----- Begin of TracingMuxerImpl::ProducerImpl @@ -42338,7 +46338,9 @@ void TracingMuxerImpl::ProducerImpl::Initialize( std::unique_ptr endpoint) { PERFETTO_DCHECK_THREAD(thread_checker_); PERFETTO_DCHECK(!connected_); - connection_id_++; + connection_id_.fetch_add(1, std::memory_order_relaxed); + is_producer_provided_smb_ = endpoint->shared_memory(); + last_startup_target_buffer_reservation_ = 0; // Adopt the endpoint into a shared pointer so that we can safely share it // across threads that create trace writers. The custom deleter function @@ -42365,8 +46367,20 @@ void TracingMuxerImpl::ProducerImpl::OnConnect() { PERFETTO_DLOG("Producer connected"); PERFETTO_DCHECK_THREAD(thread_checker_); PERFETTO_DCHECK(!connected_); + if (is_producer_provided_smb_ && !service_->IsShmemProvidedByProducer()) { + PERFETTO_ELOG( + "The service likely doesn't support producer-provided SMBs. Preventing " + "future attempts to use producer-provided SMB again with this " + "backend."); + producer_provided_smb_failed_ = true; + // Will call OnDisconnect() and cause a reconnect without producer-provided + // SMB. + service_->Disconnect(); + return; + } connected_ = true; muxer_->UpdateDataSourcesOnAllBackends(); + SendOnConnectTriggers(); } void TracingMuxerImpl::ProducerImpl::OnDisconnect() { @@ -42392,7 +46406,7 @@ void TracingMuxerImpl::ProducerImpl::DisposeConnection() { // |service_| here because other threads may be concurrently creating new // trace writers. Any reconnection attempt will atomically swap the new // service in place of the old one. - if (did_setup_tracing_) { + if (did_setup_tracing_ || did_setup_startup_tracing_) { dead_services_.push_back(service_); } else { service_.reset(); @@ -42406,13 +46420,19 @@ void TracingMuxerImpl::ProducerImpl::OnTracingSetup() { shmem_batch_commits_duration_ms_); } +void TracingMuxerImpl::ProducerImpl::OnStartupTracingSetup() { + PERFETTO_DCHECK_THREAD(thread_checker_); + did_setup_startup_tracing_ = true; +} + void TracingMuxerImpl::ProducerImpl::SetupDataSource( DataSourceInstanceID id, const DataSourceConfig& cfg) { PERFETTO_DCHECK_THREAD(thread_checker_); if (!muxer_) return; - muxer_->SetupDataSource(backend_id_, connection_id_, id, cfg); + muxer_->SetupDataSource( + backend_id_, connection_id_.load(std::memory_order_relaxed), id, cfg); } void TracingMuxerImpl::ProducerImpl::StartDataSource(DataSourceInstanceID id, @@ -42431,12 +46451,27 @@ void TracingMuxerImpl::ProducerImpl::StopDataSource(DataSourceInstanceID id) { muxer_->StopDataSource_AsyncBegin(backend_id_, id); } -void TracingMuxerImpl::ProducerImpl::Flush(FlushRequestID flush_id, - const DataSourceInstanceID*, - size_t) { - // Flush is not plumbed for now, we just ack straight away. +void TracingMuxerImpl::ProducerImpl::Flush( + FlushRequestID flush_id, + const DataSourceInstanceID* instances, + size_t instance_count) { PERFETTO_DCHECK_THREAD(thread_checker_); - service_->NotifyFlushComplete(flush_id); + bool all_handled = true; + if (muxer_) { + for (size_t i = 0; i < instance_count; i++) { + DataSourceInstanceID ds_id = instances[i]; + bool handled = + muxer_->FlushDataSource_AsyncBegin(backend_id_, ds_id, flush_id); + if (!handled) { + pending_flushes_[flush_id].insert(ds_id); + all_handled = false; + } + } + } + + if (all_handled) { + service_->NotifyFlushComplete(flush_id); + } } void TracingMuxerImpl::ProducerImpl::ClearIncrementalState( @@ -42467,17 +46502,60 @@ bool TracingMuxerImpl::ProducerImpl::SweepDeadServices() { return dead_services_.empty(); } +void TracingMuxerImpl::ProducerImpl::SendOnConnectTriggers() { + PERFETTO_DCHECK_THREAD(thread_checker_); + base::TimeMillis now = base::GetWallTimeMs(); + std::vector triggers; + while (!on_connect_triggers_.empty()) { + // Skip if we passed TTL. + if (on_connect_triggers_.front().second > now) { + triggers.push_back(std::move(on_connect_triggers_.front().first)); + } + on_connect_triggers_.pop_front(); + } + if (!triggers.empty()) { + service_->ActivateTriggers(triggers); + } +} + +void TracingMuxerImpl::ProducerImpl::NotifyFlushForDataSourceDone( + DataSourceInstanceID ds_id, + FlushRequestID flush_id) { + if (!connected_) { + return; + } + + { + auto it = pending_flushes_.find(flush_id); + if (it == pending_flushes_.end()) { + return; + } + std::set& ds_ids = it->second; + ds_ids.erase(ds_id); + } + + std::optional biggest_flush_id; + for (auto it = pending_flushes_.begin(); it != pending_flushes_.end();) { + if (it->second.empty()) { + biggest_flush_id = it->first; + it = pending_flushes_.erase(it); + } else { + break; + } + } + + if (biggest_flush_id) { + service_->NotifyFlushComplete(*biggest_flush_id); + } +} + // ----- End of TracingMuxerImpl::ProducerImpl methods. // ----- Begin of TracingMuxerImpl::ConsumerImpl TracingMuxerImpl::ConsumerImpl::ConsumerImpl(TracingMuxerImpl* muxer, BackendType backend_type, - TracingBackendId backend_id, TracingSessionGlobalID session_id) - : muxer_(muxer), - backend_type_(backend_type), - backend_id_(backend_id), - session_id_(session_id) {} + : muxer_(muxer), backend_type_(backend_type), session_id_(session_id) {} TracingMuxerImpl::ConsumerImpl::~ConsumerImpl() { muxer_ = nullptr; @@ -42686,6 +46764,13 @@ void TracingMuxerImpl::ConsumerImpl::OnObservableEvents( } } +void TracingMuxerImpl::ConsumerImpl::OnSessionCloned( + bool /*success*/, + const std::string& /*error*/) { + // CloneSession is not exposed in the SDK. This should never happen. + PERFETTO_DCHECK(false); +} + void TracingMuxerImpl::ConsumerImpl::OnTraceStats( bool success, const TraceStats& trace_stats) { @@ -42716,22 +46801,12 @@ TracingMuxerImpl::TracingSessionImpl::TracingSessionImpl( BackendType backend_type) : muxer_(muxer), session_id_(session_id), backend_type_(backend_type) {} -std::mutex trace_muxer_mutex; -std::condition_variable cv; - // Can be destroyed from any thread. TracingMuxerImpl::TracingSessionImpl::~TracingSessionImpl() { auto* muxer = muxer_; auto session_id = session_id_; muxer->task_runner_->PostTask( - [muxer, session_id] { - std::unique_lock lk(trace_muxer_mutex); - muxer->DestroyTracingSession(session_id); - lk.unlock(); - cv.notify_one(); - }); - std::unique_lock lk(trace_muxer_mutex); - cv.wait(lk); + [muxer, session_id] { muxer->DestroyTracingSession(session_id); }); } // Can be called from any thread. @@ -42919,6 +46994,43 @@ void TracingMuxerImpl::TracingSessionImpl::QueryServiceState( // ----- End of TracingMuxerImpl::TracingSessionImpl +// ----- Begin of TracingMuxerImpl::StartupTracingSessionImpl + +TracingMuxerImpl::StartupTracingSessionImpl::StartupTracingSessionImpl( + TracingMuxerImpl* muxer, + TracingSessionGlobalID session_id, + BackendType backend_type) + : muxer_(muxer), session_id_(session_id), backend_type_(backend_type) {} + +// Can be destroyed from any thread. +TracingMuxerImpl::StartupTracingSessionImpl::~StartupTracingSessionImpl() = + default; + +void TracingMuxerImpl::StartupTracingSessionImpl::Abort() { + auto* muxer = muxer_; + auto session_id = session_id_; + auto backend_type = backend_type_; + muxer->task_runner_->PostTask([muxer, session_id, backend_type] { + muxer->AbortStartupTracingSession(session_id, backend_type); + }); +} + +// Must not be called from the SDK's internal thread. +void TracingMuxerImpl::StartupTracingSessionImpl::AbortBlocking() { + auto* muxer = muxer_; + auto session_id = session_id_; + auto backend_type = backend_type_; + PERFETTO_CHECK(!muxer->task_runner_->RunsTasksOnCurrentThread()); + base::WaitableEvent event; + muxer->task_runner_->PostTask([muxer, session_id, backend_type, &event] { + muxer->AbortStartupTracingSession(session_id, backend_type); + event.Notify(); + }); + event.Wait(); +} + +// ----- End of TracingMuxerImpl::StartupTracingSessionImpl + // static TracingMuxer* TracingMuxer::instance_ = TracingMuxerFake::Get(); @@ -42937,69 +47049,166 @@ TracingMuxerImpl::TracingMuxerImpl(const TracingInitArgs& args) this, platform_->CreateTaskRunner(std::move(tr_args)))); // Run the initializer on that thread. - task_runner_->PostTask([this, args] { Initialize(args); }); + task_runner_->PostTask([this, args] { + Initialize(args); + AddBackends(args); + }); } void TracingMuxerImpl::Initialize(const TracingInitArgs& args) { PERFETTO_DCHECK_THREAD(thread_checker_); // Rebind the thread checker. policy_ = args.tracing_policy; + supports_multiple_data_source_instances_ = + args.supports_multiple_data_source_instances; - auto add_backend = [this, &args](TracingBackend* backend, BackendType type) { - if (!backend) { - // We skip the log in release builds because the *_backend_fake.cc code - // has already an ELOG before returning a nullptr. - PERFETTO_DLOG("Backend creation failed, type %d", static_cast(type)); - return; + // Fallback backend for producer creation for an unsupported backend type. + PERFETTO_CHECK(producer_backends_.empty()); + AddProducerBackend(internal::TracingBackendFake::GetInstance(), + BackendType::kUnspecifiedBackend, args); + // Fallback backend for consumer creation for an unsupported backend type. + // This backend simply fails any attempt to start a tracing session. + PERFETTO_CHECK(consumer_backends_.empty()); + AddConsumerBackend(internal::TracingBackendFake::GetInstance(), + BackendType::kUnspecifiedBackend); +} + +void TracingMuxerImpl::AddConsumerBackend(TracingConsumerBackend* backend, + BackendType type) { + if (!backend) { + // We skip the log in release builds because the *_backend_fake.cc code + // has already an ELOG before returning a nullptr. + PERFETTO_DLOG("Consumer backend creation failed, type %d", + static_cast(type)); + return; + } + // Keep the backends sorted by type. + auto it = + std::upper_bound(consumer_backends_.begin(), consumer_backends_.end(), + type, CompareBackendByType()); + it = consumer_backends_.emplace(it); + + RegisteredConsumerBackend& rb = *it; + rb.backend = backend; + rb.type = type; +} + +void TracingMuxerImpl::AddProducerBackend(TracingProducerBackend* backend, + BackendType type, + const TracingInitArgs& args) { + if (!backend) { + // We skip the log in release builds because the *_backend_fake.cc code + // has already an ELOG before returning a nullptr. + PERFETTO_DLOG("Producer backend creation failed, type %d", + static_cast(type)); + return; + } + TracingBackendId backend_id = producer_backends_.size(); + // Keep the backends sorted by type. + auto it = + std::upper_bound(producer_backends_.begin(), producer_backends_.end(), + type, CompareBackendByType()); + it = producer_backends_.emplace(it); + + RegisteredProducerBackend& rb = *it; + rb.backend = backend; + rb.id = backend_id; + rb.type = type; + rb.producer.reset( + new ProducerImpl(this, backend_id, args.shmem_batch_commits_duration_ms)); + rb.producer_conn_args.producer = rb.producer.get(); + rb.producer_conn_args.producer_name = platform_->GetCurrentProcessName(); + rb.producer_conn_args.task_runner = task_runner_.get(); + rb.producer_conn_args.shmem_size_hint_bytes = args.shmem_size_hint_kb * 1024; + rb.producer_conn_args.shmem_page_size_hint_bytes = + args.shmem_page_size_hint_kb * 1024; + rb.producer->Initialize(rb.backend->ConnectProducer(rb.producer_conn_args)); +} + +TracingMuxerImpl::RegisteredProducerBackend* +TracingMuxerImpl::FindProducerBackendById(TracingBackendId id) { + for (RegisteredProducerBackend& b : producer_backends_) { + if (b.id == id) { + return &b; } - TracingBackendId backend_id = backends_.size(); - backends_.emplace_back(); - RegisteredBackend& rb = backends_.back(); - rb.backend = backend; - rb.id = backend_id; - rb.type = type; - rb.producer.reset(new ProducerImpl(this, backend_id, - args.shmem_batch_commits_duration_ms)); - rb.producer_conn_args.producer = rb.producer.get(); - rb.producer_conn_args.producer_name = platform_->GetCurrentProcessName(); - rb.producer_conn_args.task_runner = task_runner_.get(); - rb.producer_conn_args.shmem_size_hint_bytes = - args.shmem_size_hint_kb * 1024; - rb.producer_conn_args.shmem_page_size_hint_bytes = - args.shmem_page_size_hint_kb * 1024; - rb.producer->Initialize(rb.backend->ConnectProducer(rb.producer_conn_args)); - }; + } + return nullptr; +} +TracingMuxerImpl::RegisteredProducerBackend* +TracingMuxerImpl::FindProducerBackendByType(BackendType type) { + for (RegisteredProducerBackend& b : producer_backends_) { + if (b.type == type) { + return &b; + } + } + return nullptr; +} + +TracingMuxerImpl::RegisteredConsumerBackend* +TracingMuxerImpl::FindConsumerBackendByType(BackendType type) { + for (RegisteredConsumerBackend& b : consumer_backends_) { + if (b.type == type) { + return &b; + } + } + return nullptr; +} + +void TracingMuxerImpl::AddBackends(const TracingInitArgs& args) { if (args.backends & kSystemBackend) { - PERFETTO_CHECK(args.system_backend_factory_); - add_backend(args.system_backend_factory_(), kSystemBackend); + PERFETTO_CHECK(args.system_producer_backend_factory_); + if (FindProducerBackendByType(kSystemBackend) == nullptr) { + AddProducerBackend(args.system_producer_backend_factory_(), + kSystemBackend, args); + } + if (args.enable_system_consumer) { + PERFETTO_CHECK(args.system_consumer_backend_factory_); + if (FindConsumerBackendByType(kSystemBackend) == nullptr) { + AddConsumerBackend(args.system_consumer_backend_factory_(), + kSystemBackend); + } + } } if (args.backends & kInProcessBackend) { - PERFETTO_CHECK(args.in_process_backend_factory_); - add_backend(args.in_process_backend_factory_(), kInProcessBackend); + TracingBackend* b = nullptr; + if (FindProducerBackendByType(kInProcessBackend) == nullptr) { + if (!b) { + PERFETTO_CHECK(args.in_process_backend_factory_); + b = args.in_process_backend_factory_(); + } + AddProducerBackend(b, kInProcessBackend, args); + } + if (FindConsumerBackendByType(kInProcessBackend) == nullptr) { + if (!b) { + PERFETTO_CHECK(args.in_process_backend_factory_); + b = args.in_process_backend_factory_(); + } + AddConsumerBackend(b, kInProcessBackend); + } } if (args.backends & kCustomBackend) { PERFETTO_CHECK(args.custom_backend); - add_backend(args.custom_backend, kCustomBackend); + if (FindProducerBackendByType(kCustomBackend) == nullptr) { + AddProducerBackend(args.custom_backend, kCustomBackend, args); + } + if (FindConsumerBackendByType(kCustomBackend) == nullptr) { + AddConsumerBackend(args.custom_backend, kCustomBackend); + } } if (args.backends & ~(kSystemBackend | kInProcessBackend | kCustomBackend)) { PERFETTO_FATAL("Unsupported tracing backend type"); } - - // Fallback backend for consumer creation for an unsupported backend type. - // This backend simply fails any attempt to start a tracing session. - // NOTE: This backend instance has to be added last. - add_backend(internal::TracingBackendFake::GetInstance(), - BackendType::kUnspecifiedBackend); } // Can be called from any thread (but not concurrently). bool TracingMuxerImpl::RegisterDataSource( const DataSourceDescriptor& descriptor, DataSourceFactory factory, + DataSourceParams params, DataSourceStaticState* static_state) { // Ignore repeated registrations. if (static_state->index != kMaxDataSources) @@ -43021,16 +47230,20 @@ bool TracingMuxerImpl::RegisterDataSource( static_state->index = new_index; // Generate a semi-unique id for this data source. - base::Hash hash; + base::Hasher hash; hash.Update(reinterpret_cast(static_state)); hash.Update(base::GetWallTimeNs().count()); static_state->id = hash.digest() ? hash.digest() : 1; - task_runner_->PostTask([this, descriptor, factory, static_state] { + task_runner_->PostTask([this, descriptor, factory, static_state, params] { data_sources_.emplace_back(); RegisteredDataSource& rds = data_sources_.back(); rds.descriptor = descriptor; rds.factory = factory; + rds.supports_multiple_instances = + supports_multiple_data_source_instances_ && + params.supports_multiple_instances; + rds.requires_callbacks_under_lock = params.requires_callbacks_under_lock; rds.static_state = static_state; UpdateDataSourceOnAllBackends(rds, /*is_changed=*/false); @@ -43090,14 +47303,87 @@ void TracingMuxerImpl::RegisterInterceptor( }); } +void TracingMuxerImpl::ActivateTriggers( + const std::vector& triggers, + uint32_t ttl_ms) { + base::TimeMillis expire_time = + base::GetWallTimeMs() + base::TimeMillis(ttl_ms); + task_runner_->PostTask([this, triggers, expire_time] { + for (RegisteredProducerBackend& backend : producer_backends_) { + if (backend.producer->connected_) { + backend.producer->service_->ActivateTriggers(triggers); + } else { + for (const std::string& trigger : triggers) { + backend.producer->on_connect_triggers_.emplace_back(trigger, + expire_time); + } + } + } + }); +} + +// Checks if there is any matching startup tracing data source instance for a +// new SetupDataSource call. If so, moves the data source to this tracing +// session (and its target buffer) and returns true, otherwise returns false. +static bool MaybeAdoptStartupTracingInDataSource( + TracingBackendId backend_id, + uint32_t backend_connection_id, + DataSourceInstanceID instance_id, + const DataSourceConfig& cfg, + const std::vector& data_sources) { + uint64_t startup_config_hash = ComputeStartupConfigHash(cfg); + + for (const auto& rds : data_sources) { + DataSourceStaticState* static_state = rds.static_state; + for (uint32_t i = 0; i < kMaxDataSourceInstances; i++) { + auto* internal_state = static_state->TryGet(i); + + // TODO(eseckler): Instead of comparing config_hashes here, should we ask + // the data source instance for a compat check of the config? + if (internal_state && + internal_state->startup_target_buffer_reservation.load( + std::memory_order_relaxed) && + internal_state->data_source_instance_id == 0 && + internal_state->backend_id == backend_id && + internal_state->backend_connection_id == backend_connection_id && + internal_state->startup_config_hash == startup_config_hash) { + PERFETTO_DLOG("Setting up data source %" PRIu64 + " %s by adopting it from a startup tracing session", + instance_id, cfg.name().c_str()); + + std::lock_guard lock(internal_state->lock); + // Set the associations. The actual takeover happens in + // StartDataSource(). + internal_state->data_source_instance_id = instance_id; + internal_state->buffer_id = + static_cast(cfg.target_buffer()); + internal_state->config_hash = ComputeConfigHash(cfg); + + // TODO(eseckler): Should the data souce config provided by the service + // be allowed to specify additional interceptors / additional data + // source params? + + return true; + } + } + } + return false; +} + // Called by the service of one of the backends. void TracingMuxerImpl::SetupDataSource(TracingBackendId backend_id, uint32_t backend_connection_id, DataSourceInstanceID instance_id, const DataSourceConfig& cfg) { - PERFETTO_DCHECK_THREAD(thread_checker_); PERFETTO_DLOG("Setting up data source %" PRIu64 " %s", instance_id, cfg.name().c_str()); + PERFETTO_DCHECK_THREAD(thread_checker_); + + // First check if there is any matching startup tracing data source instance. + if (MaybeAdoptStartupTracingInDataSource(backend_id, backend_connection_id, + instance_id, cfg, data_sources_)) { + return; + } uint64_t config_hash = ComputeConfigHash(cfg); for (const auto& rds : data_sources_) { @@ -43131,65 +47417,117 @@ void TracingMuxerImpl::SetupDataSource(TracingBackendId backend_id, continue; } - for (uint32_t i = 0; i < kMaxDataSourceInstances; i++) { - // Find a free slot. - if (static_state.TryGet(i)) - continue; + SetupDataSourceImpl(rds, backend_id, backend_connection_id, instance_id, + cfg, config_hash, /*startup_config_hash=*/0, + /*startup_session_id=*/0); + return; + } +} - auto* internal_state = - reinterpret_cast(&static_state.instances[i]); - std::lock_guard guard(internal_state->lock); - static_assert( - std::is_samedata_source_instance_id), - DataSourceInstanceID>::value, - "data_source_instance_id type mismatch"); - internal_state->muxer_id_for_testing = muxer_id_for_testing_; - internal_state->backend_id = backend_id; - internal_state->backend_connection_id = backend_connection_id; - internal_state->data_source_instance_id = instance_id; - internal_state->buffer_id = - static_cast(cfg.target_buffer()); - internal_state->config_hash = config_hash; - internal_state->data_source = rds.factory(); - internal_state->interceptor = nullptr; - internal_state->interceptor_id = 0; +TracingMuxerImpl::FindDataSourceRes TracingMuxerImpl::SetupDataSourceImpl( + const RegisteredDataSource& rds, + TracingBackendId backend_id, + uint32_t backend_connection_id, + DataSourceInstanceID instance_id, + const DataSourceConfig& cfg, + uint64_t config_hash, + uint64_t startup_config_hash, + TracingSessionGlobalID startup_session_id) { + PERFETTO_DCHECK_THREAD(thread_checker_); + DataSourceStaticState& static_state = *rds.static_state; - if (cfg.has_interceptor_config()) { - for (size_t j = 0; j < interceptors_.size(); j++) { - if (cfg.interceptor_config().name() == - interceptors_[j].descriptor.name()) { - PERFETTO_DLOG("Intercepting data source %" PRIu64 - " \"%s\" into \"%s\"", - instance_id, cfg.name().c_str(), - cfg.interceptor_config().name().c_str()); - internal_state->interceptor_id = static_cast(j + 1); - internal_state->interceptor = interceptors_[j].factory(); - internal_state->interceptor->OnSetup({cfg}); - break; - } - } - if (!internal_state->interceptor_id) { - PERFETTO_ELOG("Unknown interceptor configured for data source: %s", + // If any bit is set in `static_state.valid_instances` then at least one + // other instance of data source is running. + if (!rds.supports_multiple_instances && + static_state.valid_instances.load(std::memory_order_acquire) != 0) { + PERFETTO_ELOG( + "Failed to setup data source because some another instance of this " + "data source is already active"); + return FindDataSourceRes(); + } + + for (uint32_t i = 0; i < kMaxDataSourceInstances; i++) { + // Find a free slot. + if (static_state.TryGet(i)) + continue; + + auto* internal_state = + reinterpret_cast(&static_state.instances[i]); + std::unique_lock lock(internal_state->lock); + static_assert( + std::is_samedata_source_instance_id), + DataSourceInstanceID>::value, + "data_source_instance_id type mismatch"); + internal_state->muxer_id_for_testing = muxer_id_for_testing_; + + if (startup_session_id) { + RegisteredProducerBackend& backend = *FindProducerBackendById(backend_id); + uint16_t& last_reservation = + backend.producer->last_startup_target_buffer_reservation_; + if (last_reservation == std::numeric_limits::max()) { + PERFETTO_ELOG( + "Startup buffer reservations exhausted, dropping data source"); + return FindDataSourceRes(); + } + internal_state->startup_target_buffer_reservation.store( + ++last_reservation, std::memory_order_relaxed); + } else { + internal_state->startup_target_buffer_reservation.store( + 0, std::memory_order_relaxed); + } + + internal_state->backend_id = backend_id; + internal_state->backend_connection_id = backend_connection_id; + internal_state->data_source_instance_id = instance_id; + internal_state->buffer_id = + static_cast(cfg.target_buffer()); + internal_state->config_hash = config_hash; + internal_state->startup_session_id = startup_session_id; + internal_state->startup_config_hash = startup_config_hash; + internal_state->data_source = rds.factory(); + internal_state->interceptor = nullptr; + internal_state->interceptor_id = 0; + + if (cfg.has_interceptor_config()) { + for (size_t j = 0; j < interceptors_.size(); j++) { + if (cfg.interceptor_config().name() == + interceptors_[j].descriptor.name()) { + PERFETTO_DLOG("Intercepting data source %" PRIu64 + " \"%s\" into \"%s\"", + instance_id, cfg.name().c_str(), cfg.interceptor_config().name().c_str()); + internal_state->interceptor_id = static_cast(j + 1); + internal_state->interceptor = interceptors_[j].factory(); + internal_state->interceptor->OnSetup({cfg}); + break; } } - - // This must be made at the end. See matching acquire-load in - // DataSource::Trace(). - static_state.valid_instances.fetch_or(1 << i, std::memory_order_release); - - DataSourceBase::SetupArgs setup_args; - setup_args.config = &cfg; - setup_args.internal_instance_index = i; - internal_state->data_source->OnSetup(setup_args); - return; + if (!internal_state->interceptor_id) { + PERFETTO_ELOG("Unknown interceptor configured for data source: %s", + cfg.interceptor_config().name().c_str()); + } } - PERFETTO_ELOG( - "Maximum number of data source instances exhausted. " - "Dropping data source %" PRIu64, - instance_id); - break; + + // This must be made at the end. See matching acquire-load in + // DataSource::Trace(). + static_state.valid_instances.fetch_or(1 << i, std::memory_order_release); + + DataSourceBase::SetupArgs setup_args; + setup_args.config = &cfg; + setup_args.internal_instance_index = i; + + if (!rds.requires_callbacks_under_lock) + lock.unlock(); + internal_state->data_source->OnSetup(setup_args); + + return FindDataSourceRes(&static_state, internal_state, i, + rds.requires_callbacks_under_lock); } + PERFETTO_ELOG( + "Maximum number of data source instances exhausted. " + "Dropping data source %" PRIu64, + instance_id); + return FindDataSourceRes(); } // Called by the service of one of the backends. @@ -43204,13 +47542,74 @@ void TracingMuxerImpl::StartDataSource(TracingBackendId backend_id, return; } + // Check if the data source was already started for startup tracing. + uint16_t startup_reservation = + ds.internal_state->startup_target_buffer_reservation.load( + std::memory_order_relaxed); + if (startup_reservation) { + RegisteredProducerBackend& backend = *FindProducerBackendById(backend_id); + TracingSessionGlobalID session_id = ds.internal_state->startup_session_id; + auto session_it = std::find_if( + backend.startup_sessions.begin(), backend.startup_sessions.end(), + [session_id](const RegisteredStartupSession& session) { + return session.session_id == session_id; + }); + PERFETTO_DCHECK(session_it != backend.startup_sessions.end()); + + if (session_it->is_aborting) { + PERFETTO_DLOG("Data source %" PRIu64 + " was already aborted for startup tracing, not starting it", + instance_id); + return; + } + + PERFETTO_DLOG( + "Data source %" PRIu64 + " was already started for startup tracing, binding its target buffer", + instance_id); + + backend.producer->service_->MaybeSharedMemoryArbiter() + ->BindStartupTargetBuffer(startup_reservation, + ds.internal_state->buffer_id); + + // The reservation ID can be used even after binding it, so there's no need + // for any barriers here - we just need atomicity. + ds.internal_state->startup_target_buffer_reservation.store( + 0, std::memory_order_relaxed); + + // TODO(eseckler): Should we reset incremental state at this point, or + // notify the data source some other way? + + // The session should not have been fully bound yet (or aborted). + PERFETTO_DCHECK(session_it->num_unbound_data_sources > 0); + + session_it->num_unbound_data_sources--; + if (session_it->num_unbound_data_sources == 0) { + if (session_it->on_adopted) + task_runner_->PostTask(session_it->on_adopted); + backend.startup_sessions.erase(session_it); + } + return; + } + + StartDataSourceImpl(ds); +} + +void TracingMuxerImpl::StartDataSourceImpl(const FindDataSourceRes& ds) { + PERFETTO_DCHECK_THREAD(thread_checker_); + DataSourceBase::StartArgs start_args{}; start_args.internal_instance_index = ds.instance_idx; - std::lock_guard guard(ds.internal_state->lock); + std::unique_lock lock(ds.internal_state->lock); if (ds.internal_state->interceptor) ds.internal_state->interceptor->OnStart({}); - ds.internal_state->trace_lambda_enabled = true; + ds.internal_state->trace_lambda_enabled.store(true, + std::memory_order_relaxed); + PERFETTO_DCHECK(ds.internal_state->data_source != nullptr); + + if (!ds.requires_callbacks_under_lock) + lock.unlock(); ds.internal_state->data_source->OnStart(start_args); } @@ -43227,23 +47626,38 @@ void TracingMuxerImpl::StopDataSource_AsyncBegin( return; } + StopDataSource_AsyncBeginImpl(ds); +} + +void TracingMuxerImpl::StopDataSource_AsyncBeginImpl( + const FindDataSourceRes& ds) { + TracingBackendId backend_id = ds.internal_state->backend_id; + uint32_t backend_connection_id = ds.internal_state->backend_connection_id; + DataSourceInstanceID instance_id = ds.internal_state->data_source_instance_id; + StopArgsImpl stop_args{}; stop_args.internal_instance_index = ds.instance_idx; - stop_args.async_stop_closure = [this, backend_id, instance_id] { + stop_args.async_stop_closure = [this, backend_id, backend_connection_id, + instance_id, ds] { // TracingMuxerImpl is long lived, capturing |this| is okay. // The notification closure can be moved out of the StopArgs by the // embedder to handle stop asynchronously. The embedder might then // call the closure on a different thread than the current one, hence // this nested PostTask(). - task_runner_->PostTask([this, backend_id, instance_id] { - StopDataSource_AsyncEnd(backend_id, instance_id); - }); + task_runner_->PostTask( + [this, backend_id, backend_connection_id, instance_id, ds] { + StopDataSource_AsyncEnd(backend_id, backend_connection_id, + instance_id, ds); + }); }; { - std::lock_guard guard(ds.internal_state->lock); + std::unique_lock lock(ds.internal_state->lock); if (ds.internal_state->interceptor) ds.internal_state->interceptor->OnStop({}); + + if (!ds.requires_callbacks_under_lock) + lock.unlock(); ds.internal_state->data_source->OnStop(stop_args); } @@ -43255,14 +47669,19 @@ void TracingMuxerImpl::StopDataSource_AsyncBegin( std::move(stop_args.async_stop_closure)(); } -void TracingMuxerImpl::StopDataSource_AsyncEnd( - TracingBackendId backend_id, - DataSourceInstanceID instance_id) { +void TracingMuxerImpl::StopDataSource_AsyncEnd(TracingBackendId backend_id, + uint32_t backend_connection_id, + DataSourceInstanceID instance_id, + const FindDataSourceRes& ds) { PERFETTO_DLOG("Ending async stop of data source %" PRIu64, instance_id); PERFETTO_DCHECK_THREAD(thread_checker_); - auto ds = FindDataSource(backend_id, instance_id); - if (!ds) { + // Check that the data source instance is still active and was not modified + // while it was being stopped. + if (!ds.static_state->TryGet(ds.instance_idx) || + ds.internal_state->backend_id != backend_id || + ds.internal_state->backend_connection_id != backend_connection_id || + ds.internal_state->data_source_instance_id != instance_id) { PERFETTO_ELOG( "Async stop of data source %" PRIu64 " failed. This might be due to calling the async_stop_closure twice.", @@ -43276,11 +47695,18 @@ void TracingMuxerImpl::StopDataSource_AsyncEnd( // Take the mutex to prevent that the data source is in the middle of // a Trace() execution where it called GetDataSourceLocked() while we // destroy it. + uint16_t startup_buffer_reservation; + TracingSessionGlobalID startup_session_id; { std::lock_guard guard(ds.internal_state->lock); - ds.internal_state->trace_lambda_enabled = false; + ds.internal_state->trace_lambda_enabled.store(false, + std::memory_order_relaxed); ds.internal_state->data_source.reset(); ds.internal_state->interceptor.reset(); + startup_buffer_reservation = + ds.internal_state->startup_target_buffer_reservation.load( + std::memory_order_relaxed); + startup_session_id = ds.internal_state->startup_session_id; } // The other fields of internal_state are deliberately *not* cleared. @@ -43288,16 +47714,49 @@ void TracingMuxerImpl::StopDataSource_AsyncEnd( TracingMuxer::generation_++; - // |backends_| is append-only, Backend instances are always valid. - PERFETTO_CHECK(backend_id < backends_.size()); - ProducerImpl* producer = backends_[backend_id].producer.get(); + // |producer_backends_| is append-only, Backend instances are always valid. + PERFETTO_CHECK(backend_id < producer_backends_.size()); + RegisteredProducerBackend& backend = *FindProducerBackendById(backend_id); + ProducerImpl* producer = backend.producer.get(); if (!producer) return; + + // If the data source instance still has a startup buffer reservation, it was + // only active for startup tracing and never started by the service. Discard + // the startup buffer reservation. + if (startup_buffer_reservation) { + PERFETTO_DCHECK(startup_session_id); + + if (producer->service_ && producer->service_->MaybeSharedMemoryArbiter()) { + producer->service_->MaybeSharedMemoryArbiter() + ->AbortStartupTracingForReservation(startup_buffer_reservation); + } + + auto session_it = std::find_if( + backend.startup_sessions.begin(), backend.startup_sessions.end(), + [startup_session_id](const RegisteredStartupSession& session) { + return session.session_id == startup_session_id; + }); + + // Session should not be removed until abortion of all data source instances + // is complete. + PERFETTO_DCHECK(session_it != backend.startup_sessions.end()); + + session_it->num_aborting_data_sources--; + if (session_it->num_aborting_data_sources == 0) { + if (session_it->on_aborted) + task_runner_->PostTask(session_it->on_aborted); + + backend.startup_sessions.erase(session_it); + } + } + if (producer->connected_) { // Flush any commits that might have been batched by SharedMemoryArbiter. producer->service_->MaybeSharedMemoryArbiter() ->FlushPendingCommitDataRequests(); - producer->service_->NotifyDataSourceStopped(instance_id); + if (instance_id) + producer->service_->NotifyDataSourceStopped(instance_id); } producer->SweepDeadServices(); } @@ -43313,12 +47772,99 @@ void TracingMuxerImpl::ClearDataSourceIncrementalState( PERFETTO_ELOG("Could not find data source to clear incremental state for"); return; } + + DataSourceBase::ClearIncrementalStateArgs clear_incremental_state_args; + clear_incremental_state_args.internal_instance_index = ds.instance_idx; + { + std::unique_lock lock; + if (ds.requires_callbacks_under_lock) + lock = std::unique_lock(ds.internal_state->lock); + ds.internal_state->data_source->WillClearIncrementalState( + clear_incremental_state_args); + } + // Make DataSource::TraceContext::GetIncrementalState() eventually notice that // the incremental state should be cleared. ds.static_state->incremental_state_generation.fetch_add( 1, std::memory_order_relaxed); } +bool TracingMuxerImpl::FlushDataSource_AsyncBegin( + TracingBackendId backend_id, + DataSourceInstanceID instance_id, + FlushRequestID flush_id) { + PERFETTO_DLOG("Flushing data source %" PRIu64, instance_id); + auto ds = FindDataSource(backend_id, instance_id); + if (!ds) { + PERFETTO_ELOG("Could not find data source to flush"); + return true; + } + + uint32_t backend_connection_id = ds.internal_state->backend_connection_id; + + FlushArgsImpl flush_args; + flush_args.internal_instance_index = ds.instance_idx; + flush_args.async_flush_closure = [this, backend_id, backend_connection_id, + instance_id, ds, flush_id] { + // TracingMuxerImpl is long lived, capturing |this| is okay. + // The notification closure can be moved out of the StopArgs by the + // embedder to handle stop asynchronously. The embedder might then + // call the closure on a different thread than the current one, hence + // this nested PostTask(). + task_runner_->PostTask( + [this, backend_id, backend_connection_id, instance_id, ds, flush_id] { + FlushDataSource_AsyncEnd(backend_id, backend_connection_id, + instance_id, ds, flush_id); + }); + }; + { + std::unique_lock lock; + if (ds.requires_callbacks_under_lock) + lock = std::unique_lock(ds.internal_state->lock); + ds.internal_state->data_source->OnFlush(flush_args); + } + + // |async_flush_closure| is moved out of |flush_args| if the producer + // requested to handle the flush asynchronously. + bool handled = static_cast(flush_args.async_flush_closure); + return handled; +} + +void TracingMuxerImpl::FlushDataSource_AsyncEnd( + TracingBackendId backend_id, + uint32_t backend_connection_id, + DataSourceInstanceID instance_id, + const FindDataSourceRes& ds, + FlushRequestID flush_id) { + PERFETTO_DLOG("Ending async flush of data source %" PRIu64, instance_id); + PERFETTO_DCHECK_THREAD(thread_checker_); + + // Check that the data source instance is still active and was not modified + // while it was being flushed. + if (!ds.static_state->TryGet(ds.instance_idx) || + ds.internal_state->backend_id != backend_id || + ds.internal_state->backend_connection_id != backend_connection_id || + ds.internal_state->data_source_instance_id != instance_id) { + PERFETTO_ELOG("Async flush of data source %" PRIu64 + " failed. This might be due to the data source being stopped " + "in the meantime", + instance_id); + return; + } + + // |producer_backends_| is append-only, Backend instances are always valid. + PERFETTO_CHECK(backend_id < producer_backends_.size()); + RegisteredProducerBackend& backend = *FindProducerBackendById(backend_id); + + ProducerImpl* producer = backend.producer.get(); + if (!producer) + return; + + if (producer->connected_) { + producer->NotifyFlushForDataSourceDone(instance_id, flush_id); + } +} + void TracingMuxerImpl::SyncProducersForTesting() { std::mutex mutex; std::condition_variable cv; @@ -43337,9 +47883,9 @@ void TracingMuxerImpl::SyncProducersForTesting() { task_runner_->PostTask([this, &mutex, &cv, &countdown] { { std::unique_lock countdown_lock(mutex); - countdown = backends_.size(); + countdown = producer_backends_.size(); } - for (auto& backend : backends_) { + for (auto& backend : producer_backends_) { auto* producer = backend.producer.get(); producer->service_->Sync([&mutex, &cv, &countdown] { std::unique_lock countdown_lock(mutex); @@ -43359,7 +47905,7 @@ void TracingMuxerImpl::SyncProducersForTesting() { bool done = false; bool all_producers_connected = true; task_runner_->PostTask([this, &mutex, &cv, &done, &all_producers_connected] { - for (auto& backend : backends_) + for (auto& backend : producer_backends_) all_producers_connected &= backend.producer->connected_; std::unique_lock lock(mutex); done = true; @@ -43395,6 +47941,9 @@ void TracingMuxerImpl::DestroyStoppedTraceWritersForCurrentThread() { ds_state->muxer_id_for_testing == ds_tls.muxer_id_for_testing && ds_state->backend_id == ds_tls.backend_id && ds_state->backend_connection_id == ds_tls.backend_connection_id && + ds_state->startup_target_buffer_reservation.load( + std::memory_order_relaxed) == + ds_tls.startup_target_buffer_reservation && ds_state->buffer_id == ds_tls.buffer_id && ds_state->data_source_instance_id == ds_tls.data_source_instance_id) { continue; @@ -43427,7 +47976,7 @@ void TracingMuxerImpl::UpdateDataSourcesOnAllBackends() { void TracingMuxerImpl::UpdateDataSourceOnAllBackends(RegisteredDataSource& rds, bool is_changed) { PERFETTO_DCHECK_THREAD(thread_checker_); - for (RegisteredBackend& backend : backends_) { + for (RegisteredProducerBackend& backend : producer_backends_) { // We cannot call RegisterDataSource on the backend before it connects. if (!backend.producer->connected_) continue; @@ -43571,7 +48120,7 @@ void TracingMuxerImpl::StopTracingSession(TracingSessionGlobalID session_id) { void TracingMuxerImpl::DestroyTracingSession( TracingSessionGlobalID session_id) { PERFETTO_DCHECK_THREAD(thread_checker_); - for (RegisteredBackend& backend : backends_) { + for (RegisteredConsumerBackend& backend : consumer_backends_) { // We need to find the consumer (if any) and call Disconnect as we destroy // the tracing session. We can't call Disconnect() inside this for loop // because in the in-process case this will end up to a synchronous call to @@ -43664,7 +48213,7 @@ void TracingMuxerImpl::QueryServiceState( void TracingMuxerImpl::SetBatchCommitsDurationForTesting( uint32_t batch_commits_duration_ms, BackendType backend_type) { - for (RegisteredBackend& backend : backends_) { + for (RegisteredProducerBackend& backend : producer_backends_) { if (backend.producer && backend.producer->connected_ && backend.type == backend_type) { backend.producer->service_->MaybeSharedMemoryArbiter() @@ -43675,7 +48224,7 @@ void TracingMuxerImpl::SetBatchCommitsDurationForTesting( bool TracingMuxerImpl::EnableDirectSMBPatchingForTesting( BackendType backend_type) { - for (RegisteredBackend& backend : backends_) { + for (RegisteredProducerBackend& backend : producer_backends_) { if (backend.producer && backend.producer->connected_ && backend.type == backend_type && !backend.producer->service_->MaybeSharedMemoryArbiter() @@ -43689,27 +48238,31 @@ bool TracingMuxerImpl::EnableDirectSMBPatchingForTesting( TracingMuxerImpl::ConsumerImpl* TracingMuxerImpl::FindConsumer( TracingSessionGlobalID session_id) { PERFETTO_DCHECK_THREAD(thread_checker_); - for (RegisteredBackend& backend : backends_) { + return FindConsumerAndBackend(session_id).first; +} + +std::pair +TracingMuxerImpl::FindConsumerAndBackend(TracingSessionGlobalID session_id) { + PERFETTO_DCHECK_THREAD(thread_checker_); + for (RegisteredConsumerBackend& backend : consumer_backends_) { for (auto& consumer : backend.consumers) { if (consumer->session_id_ == session_id) { - return consumer.get(); + return {consumer.get(), &backend}; } } } - return nullptr; + return {nullptr, nullptr}; } void TracingMuxerImpl::InitializeConsumer(TracingSessionGlobalID session_id) { PERFETTO_DCHECK_THREAD(thread_checker_); - auto* consumer = FindConsumer(session_id); - if (!consumer) + auto res = FindConsumerAndBackend(session_id); + if (!res.first || !res.second) return; - - TracingBackendId backend_id = consumer->backend_id_; - // |backends_| is append-only, Backend instances are always valid. - PERFETTO_CHECK(backend_id < backends_.size()); - RegisteredBackend& backend = backends_[backend_id]; + TracingMuxerImpl::ConsumerImpl* consumer = res.first; + RegisteredConsumerBackend& backend = *res.second; TracingBackend::ConnectConsumerArgs conn_args; conn_args.consumer = consumer; @@ -43719,7 +48272,7 @@ void TracingMuxerImpl::InitializeConsumer(TracingSessionGlobalID session_id) { void TracingMuxerImpl::OnConsumerDisconnected(ConsumerImpl* consumer) { PERFETTO_DCHECK_THREAD(thread_checker_); - for (RegisteredBackend& backend : backends_) { + for (RegisteredConsumerBackend& backend : consumer_backends_) { auto pred = [consumer](const std::unique_ptr& con) { return con.get() == consumer; }; @@ -43735,28 +48288,45 @@ void TracingMuxerImpl::SetMaxProducerReconnectionsForTesting(uint32_t count) { void TracingMuxerImpl::OnProducerDisconnected(ProducerImpl* producer) { PERFETTO_DCHECK_THREAD(thread_checker_); - for (RegisteredBackend& backend : backends_) { + for (RegisteredProducerBackend& backend : producer_backends_) { if (backend.producer.get() != producer) continue; + + // The tracing service is disconnected. It does not make sense to keep + // tracing (we wouldn't be able to commit). On reconnection, the tracing + // service will restart the data sources. + for (const auto& rds : data_sources_) { + DataSourceStaticState* static_state = rds.static_state; + for (uint32_t i = 0; i < kMaxDataSourceInstances; i++) { + auto* internal_state = static_state->TryGet(i); + if (internal_state && internal_state->backend_id == backend.id && + internal_state->backend_connection_id == + backend.producer->connection_id_.load( + std::memory_order_relaxed)) { + StopDataSource_AsyncBeginImpl( + FindDataSourceRes(static_state, internal_state, i, + rds.requires_callbacks_under_lock)); + } + } + } + // Try reconnecting the disconnected producer. If the connection succeeds, // all the data sources will be automatically re-registered. - if (producer->connection_id_ > max_producer_reconnections_.load()) { + if (producer->connection_id_.load(std::memory_order_relaxed) > + max_producer_reconnections_.load()) { // Avoid reconnecting a failing producer too many times. Instead we just // leak the producer instead of trying to avoid further complicating // cross-thread trace writer creation. PERFETTO_ELOG("Producer disconnected too many times; not reconnecting"); continue; } + backend.producer->Initialize( backend.backend->ConnectProducer(backend.producer_conn_args)); + // Don't use producer-provided SMBs for the next connection unless startup + // tracing requires it again. + backend.producer_conn_args.use_producer_provided_smb = false; } - - // Increment the generation counter to atomically ensure that: - // 1. Old trace writers from the severed connection eventually get cleaned up - // by DestroyStoppedTraceWritersForCurrentThread(). - // 2. No new trace writers can be created for the SharedMemoryArbiter from the - // old connection. - TracingMuxer::generation_++; } void TracingMuxerImpl::SweepDeadBackends() { @@ -43774,13 +48344,18 @@ TracingMuxerImpl::FindDataSourceRes TracingMuxerImpl::FindDataSource( TracingBackendId backend_id, DataSourceInstanceID instance_id) { PERFETTO_DCHECK_THREAD(thread_checker_); + RegisteredProducerBackend& backend = *FindProducerBackendById(backend_id); for (const auto& rds : data_sources_) { DataSourceStaticState* static_state = rds.static_state; for (uint32_t i = 0; i < kMaxDataSourceInstances; i++) { auto* internal_state = static_state->TryGet(i); if (internal_state && internal_state->backend_id == backend_id && + internal_state->backend_connection_id == + backend.producer->connection_id_.load( + std::memory_order_relaxed) && internal_state->data_source_instance_id == instance_id) { - return FindDataSourceRes(static_state, internal_state, i); + return FindDataSourceRes(static_state, internal_state, i, + rds.requires_callbacks_under_lock); } } } @@ -43805,7 +48380,8 @@ std::unique_ptr TracingMuxerImpl::CreateTraceWriter( interceptor.tls_factory(static_state, data_source_instance_index), interceptor.packet_callback, static_state, data_source_instance_index)); } - ProducerImpl* producer = backends_[data_source->backend_id].producer.get(); + ProducerImpl* producer = + FindProducerBackendById(data_source->backend_id)->producer.get(); // Atomically load the current service endpoint. We keep the pointer as a // shared pointer on the stack to guard against it from being concurrently // modified on the thread by ProducerImpl::Initialize() swapping in a @@ -43821,6 +48397,26 @@ std::unique_ptr TracingMuxerImpl::CreateTraceWriter( // CreateTraceWriter posts tasks under the hood. std::shared_ptr service = std::atomic_load(&producer->service_); + + // The service may have been disconnected and reconnected concurrently after + // the data source was enabled, in which case we may not have an arbiter, or + // would be creating a TraceWriter for the wrong (a newer) connection / SMB. + // Instead, early-out now. A relaxed load is fine here because the atomic_load + // above ensures that the |service| isn't newer. + if (producer->connection_id_.load(std::memory_order_relaxed) != + data_source->backend_connection_id) { + return std::unique_ptr(new NullTraceWriter()); + } + + // We just need a relaxed atomic read here: We can use the reservation ID even + // after the buffer was bound, we just need to be sure to read it atomically. + uint16_t startup_buffer_reservation = + data_source->startup_target_buffer_reservation.load( + std::memory_order_relaxed); + if (startup_buffer_reservation) { + return service->MaybeSharedMemoryArbiter()->CreateStartupTraceWriter( + startup_buffer_reservation); + } return service->CreateTraceWriter(data_source->buffer_id, buffer_exhausted_policy); } @@ -43828,30 +48424,34 @@ std::unique_ptr TracingMuxerImpl::CreateTraceWriter( // This is called via the public API Tracing::NewTrace(). // Can be called from any thread. std::unique_ptr TracingMuxerImpl::CreateTracingSession( - BackendType requested_backend_type) { + BackendType requested_backend_type, + TracingConsumerBackend* (*system_backend_factory)()) { TracingSessionGlobalID session_id = ++next_tracing_session_id_; // |backend_type| can only specify one backend, not an OR-ed mask. PERFETTO_CHECK((requested_backend_type & (requested_backend_type - 1)) == 0); // Capturing |this| is fine because the TracingMuxer is a leaky singleton. - task_runner_->PostTask([this, requested_backend_type, session_id] { - for (RegisteredBackend& backend : backends_) { + task_runner_->PostTask([this, requested_backend_type, session_id, + system_backend_factory] { + if (requested_backend_type == kSystemBackend && system_backend_factory && + !FindConsumerBackendByType(kSystemBackend)) { + AddConsumerBackend(system_backend_factory(), kSystemBackend); + } + for (RegisteredConsumerBackend& backend : consumer_backends_) { if (requested_backend_type && backend.type && backend.type != requested_backend_type) { continue; } - TracingBackendId backend_id = backend.id; - // Create the consumer now, even if we have to ask the embedder below, so // that any other tasks executing after this one can find the consumer and // change its pending attributes. backend.consumers.emplace_back( - new ConsumerImpl(this, backend.type, backend.id, session_id)); + new ConsumerImpl(this, backend.type, session_id)); - // The last registered backend in |backends_| is the unsupported backend - // without a valid type. + // The last registered backend in |consumer_backends_| is the unsupported + // backend without a valid type. if (!backend.type) { PERFETTO_ELOG( "No tracing backend ready for type=%d, consumer will disconnect", @@ -43867,10 +48467,11 @@ std::unique_ptr TracingMuxerImpl::CreateTracingSession( return; } + BackendType type = backend.type; TracingPolicy::ShouldAllowConsumerSessionArgs args; args.backend_type = backend.type; - args.result_callback = [this, backend_id, session_id](bool allow) { - task_runner_->PostTask([this, backend_id, session_id, allow] { + args.result_callback = [this, type, session_id](bool allow) { + task_runner_->PostTask([this, type, session_id, allow] { if (allow) { InitializeConsumer(session_id); return; @@ -43879,7 +48480,7 @@ std::unique_ptr TracingMuxerImpl::CreateTracingSession( PERFETTO_ELOG( "Consumer session for backend type type=%d forbidden, " "consumer will disconnect", - backends_[backend_id].type); + type); auto* consumer = FindConsumer(session_id); if (!consumer) @@ -43899,9 +48500,228 @@ std::unique_ptr TracingMuxerImpl::CreateTracingSession( } // static +// This is called via the public API Tracing::SetupStartupTracing(). +// Can be called from any thread. +std::unique_ptr +TracingMuxerImpl::CreateStartupTracingSession( + const TraceConfig& config, + Tracing::SetupStartupTracingOpts opts) { + BackendType backend_type = opts.backend; + // |backend_type| can only specify one backend, not an OR-ed mask. + PERFETTO_CHECK((backend_type & (backend_type - 1)) == 0); + // The in-process backend doesn't support startup tracing. + PERFETTO_CHECK(backend_type != BackendType::kInProcessBackend); + + TracingSessionGlobalID session_id = ++next_tracing_session_id_; + + // Capturing |this| is fine because the TracingMuxer is a leaky singleton. + task_runner_->PostTask([this, config, opts, backend_type, session_id] { + for (RegisteredProducerBackend& backend : producer_backends_) { + if (backend_type && backend.type && backend.type != backend_type) { + continue; + } + + TracingBackendId backend_id = backend.id; + + // The last registered backend in |producer_backends_| is the unsupported + // backend without a valid type. + if (!backend.type) { + PERFETTO_ELOG( + "No tracing backend initialized for type=%d, startup tracing " + "failed", + backend_type); + if (opts.on_setup) + opts.on_setup(Tracing::OnStartupTracingSetupCallbackArgs{ + 0 /* num_data_sources_started */}); + return; + } + + if (!backend.producer->service_ || + !backend.producer->service_->shared_memory()) { + // If we unsuccessfully attempted to use a producer-provided SMB in the + // past, don't try again. + if (backend.producer->producer_provided_smb_failed_) { + PERFETTO_ELOG( + "Backend %zu doesn't seem to support producer-provided " + "SMBs, startup tracing failed", + backend_id); + if (opts.on_setup) + opts.on_setup(Tracing::OnStartupTracingSetupCallbackArgs{ + 0 /* num_data_sources_started */}); + return; + } + + PERFETTO_DLOG("Reconnecting backend %zu for startup tracing", + backend_id); + backend.producer_conn_args.use_producer_provided_smb = true; + backend.producer->service_->Disconnect(); // Causes a reconnect. + PERFETTO_DCHECK(backend.producer->service_ && + backend.producer->service_->MaybeSharedMemoryArbiter()); + } + + RegisteredStartupSession session; + session.session_id = session_id; + session.on_aborted = opts.on_aborted; + session.on_adopted = opts.on_adopted; + + for (const TraceConfig::DataSource& ds_cfg : config.data_sources()) { + // Find all matching data sources and start one instance of each. + for (const auto& rds : data_sources_) { + if (rds.descriptor.name() != ds_cfg.config().name()) + continue; + + PERFETTO_DLOG( + "Setting up data source %s for startup tracing with target " + "buffer reservation %" PRIi32, + rds.descriptor.name().c_str(), + backend.producer->last_startup_target_buffer_reservation_ + 1u); + auto ds = SetupDataSourceImpl( + rds, backend_id, + backend.producer->connection_id_.load(std::memory_order_relaxed), + /*instance_id=*/0, ds_cfg.config(), + ComputeConfigHash(ds_cfg.config()), + ComputeStartupConfigHash(ds_cfg.config()), + /*startup_session_id=*/session_id); + if (ds) { + StartDataSourceImpl(ds); + session.num_unbound_data_sources++; + } + } + } + + int num_ds = session.num_unbound_data_sources; + auto on_setup = opts.on_setup; + if (on_setup) { + backend.producer->OnStartupTracingSetup(); + task_runner_->PostTask([on_setup, num_ds] { + on_setup(Tracing::OnStartupTracingSetupCallbackArgs{num_ds}); + }); + } + + if (num_ds > 0) { + backend.startup_sessions.push_back(std::move(session)); + + if (opts.timeout_ms > 0) { + task_runner_->PostDelayedTask( + [this, session_id, backend_type] { + AbortStartupTracingSession(session_id, backend_type); + }, + opts.timeout_ms); + } + } + return; + } + PERFETTO_DFATAL("Invalid startup tracing session backend"); + }); + + return std::unique_ptr( + new StartupTracingSessionImpl(this, session_id, backend_type)); +} + +// Must not be called from the SDK's internal thread. +std::unique_ptr +TracingMuxerImpl::CreateStartupTracingSessionBlocking( + const TraceConfig& config, + Tracing::SetupStartupTracingOpts opts) { + auto previous_on_setup = std::move(opts.on_setup); + PERFETTO_CHECK(!task_runner_->RunsTasksOnCurrentThread()); + base::WaitableEvent event; + // It is safe to capture by reference because once on_setup is called only + // once before this method returns. + opts.on_setup = [&](Tracing::OnStartupTracingSetupCallbackArgs args) { + if (previous_on_setup) { + previous_on_setup(std::move(args)); + } + event.Notify(); + }; + auto session = CreateStartupTracingSession(config, std::move(opts)); + event.Wait(); + return session; +} + +void TracingMuxerImpl::AbortStartupTracingSession( + TracingSessionGlobalID session_id, + BackendType backend_type) { + PERFETTO_DCHECK_THREAD(thread_checker_); + + for (RegisteredProducerBackend& backend : producer_backends_) { + if (backend_type != backend.type) + continue; + + auto session_it = std::find_if( + backend.startup_sessions.begin(), backend.startup_sessions.end(), + [session_id](const RegisteredStartupSession& session) { + return session.session_id == session_id; + }); + + // The startup session may have already been aborted or fully adopted. + if (session_it == backend.startup_sessions.end()) + return; + if (session_it->is_aborting) + return; + + session_it->is_aborting = true; + + // Iterate all data sources and abort them if they weren't adopted yet. + for (const auto& rds : data_sources_) { + DataSourceStaticState* static_state = rds.static_state; + for (uint32_t i = 0; i < kMaxDataSourceInstances; i++) { + auto* internal_state = static_state->TryGet(i); + if (internal_state && + internal_state->startup_target_buffer_reservation.load( + std::memory_order_relaxed) && + internal_state->data_source_instance_id == 0 && + internal_state->startup_session_id == session_id) { + PERFETTO_DLOG( + "Aborting startup tracing for data source %s (target buffer " + "reservation %" PRIu16 ")", + rds.descriptor.name().c_str(), + internal_state->startup_target_buffer_reservation.load( + std::memory_order_relaxed)); + + // Abort the instance asynchronously by stopping it. From this point + // onwards, the service will not be able to adopt it via + // StartDataSource(). + session_it->num_aborting_data_sources++; + StopDataSource_AsyncBeginImpl( + FindDataSourceRes(static_state, internal_state, i, + rds.requires_callbacks_under_lock)); + } + } + } + + // If we did everything right, we should have aborted all still-unbound data + // source instances. + PERFETTO_DCHECK(session_it->num_unbound_data_sources == + session_it->num_aborting_data_sources); + + if (session_it->num_aborting_data_sources == 0) { + if (session_it->on_aborted) + task_runner_->PostTask(session_it->on_aborted); + + backend.startup_sessions.erase(session_it); + } + return; + } + // We might reach here in tests because when we start a trace, we post the + // Task(AbortStartupTrace, delay=timeout). When we do + // perfetto::ResetForTesting, we sweep dead backends, and we are not able to + // kill those delayed tasks because TaskRunner doesn't have support for + // deleting scheduled future tasks and TaskRunner doesn't have any API for us + // to wait for the completion of all the scheduled tasks (apart from + // deleting the TaskRunner) and we want to avoid doing that because we need + // a long running TaskRunner in muxer. + PERFETTO_DLOG("Invalid startup tracing session backend"); +} + void TracingMuxerImpl::InitializeInstance(const TracingInitArgs& args) { - if (instance_ != TracingMuxerFake::Get()) - PERFETTO_FATAL("Tracing already initialized"); + if (instance_ != TracingMuxerFake::Get()) { + // The tracing muxer was already initialized. We might need to initialize + // additional backends that were not configured earlier. + auto* muxer = static_cast(instance_); + muxer->task_runner_->PostTask([muxer, args] { muxer->AddBackends(args); }); + return; + } // If we previously had a TracingMuxerImpl instance which was reset, // reinitialize and reuse it instead of trying to create a new one. See // ResetForTesting(). @@ -43909,7 +48729,10 @@ void TracingMuxerImpl::InitializeInstance(const TracingInitArgs& args) { auto* muxer = g_prev_instance; g_prev_instance = nullptr; instance_ = muxer; - muxer->task_runner_->PostTask([muxer, args] { muxer->Initialize(args); }); + muxer->task_runner_->PostTask([muxer, args] { + muxer->Initialize(args); + muxer->AddBackends(args); + }); } else { new TracingMuxerImpl(args); } @@ -43937,30 +48760,34 @@ void TracingMuxerImpl::ResetForTesting() { base::WaitableEvent reset_done; auto do_reset = [muxer, &reset_done] { + muxer->DestroyStoppedTraceWritersForCurrentThread(); // Unregister all data sources so they don't interfere with any future // tracing sessions. for (RegisteredDataSource& rds : muxer->data_sources_) { - for (RegisteredBackend& backend : muxer->backends_) { - if (!backend.producer->service_) + for (RegisteredProducerBackend& backend : muxer->producer_backends_) { + if (!backend.producer->service_ || !backend.producer->connected_) continue; backend.producer->service_->UnregisterDataSource(rds.descriptor.name()); } } - for (auto& backend : muxer->backends_) { + for (auto& backend : muxer->consumer_backends_) { // Check that no consumer session is currently active on any backend. for (auto& consumer : backend.consumers) PERFETTO_CHECK(!consumer->service_); + } + for (auto& backend : muxer->producer_backends_) { backend.producer->muxer_ = nullptr; backend.producer->DisposeConnection(); muxer->dead_backends_.push_back(std::move(backend)); } - muxer->backends_.clear(); + muxer->consumer_backends_.clear(); + muxer->producer_backends_.clear(); muxer->interceptors_.clear(); for (auto& ds : muxer->data_sources_) { - ds.static_state->~DataSourceStaticState(); - new (ds.static_state) DataSourceStaticState{}; + ds.static_state->ResetForTesting(); } + muxer->data_sources_.clear(); muxer->next_data_source_index_ = 0; @@ -43975,6 +48802,12 @@ void TracingMuxerImpl::ResetForTesting() { g_prev_instance = muxer; instance_ = TracingMuxerFake::Get(); + + // Call the user provided cleanups on the muxer thread. + for (auto& cb : muxer->reset_callbacks_) { + cb(); + } + reset_done.Notify(); }; @@ -43983,9 +48816,55 @@ void TracingMuxerImpl::ResetForTesting() { if (muxer->task_runner_->RunsTasksOnCurrentThread()) { do_reset(); } else { + muxer->DestroyStoppedTraceWritersForCurrentThread(); muxer->task_runner_->PostTask(std::move(do_reset)); reset_done.Wait(); + // Call the user provided cleanups also on this thread. + for (auto& cb : muxer->reset_callbacks_) { + cb(); + } } + muxer->reset_callbacks_.clear(); +} + +// static +void TracingMuxerImpl::Shutdown() { + auto* muxer = reinterpret_cast(instance_); + + // Shutting down on the muxer thread would lead to a deadlock. + PERFETTO_CHECK(!muxer->task_runner_->RunsTasksOnCurrentThread()); + muxer->DestroyStoppedTraceWritersForCurrentThread(); + + std::unique_ptr owned_task_runner( + muxer->task_runner_.get()); + base::WaitableEvent shutdown_done; + owned_task_runner->PostTask([muxer, &shutdown_done] { + // Check that no consumer session is currently active on any backend. + // Producers will be automatically disconnected as a part of deleting the + // muxer below. + for (auto& backend : muxer->consumer_backends_) { + for (auto& consumer : backend.consumers) { + PERFETTO_CHECK(!consumer->service_); + } + } + // Make sure no trace writers are lingering around on the muxer thread. Note + // that we can't do this for any arbitrary thread in the process; it is the + // caller's responsibility to clean them up before shutting down Perfetto. + muxer->DestroyStoppedTraceWritersForCurrentThread(); + // The task runner must be deleted outside the muxer thread. This is done by + // `owned_task_runner` above. + muxer->task_runner_.release(); + auto* platform = muxer->platform_; + delete muxer; + instance_ = TracingMuxerFake::Get(); + platform->Shutdown(); + shutdown_done.Notify(); + }); + shutdown_done.Wait(); +} + +void TracingMuxerImpl::AppendResetForTestingCallback(std::function cb) { + reset_callbacks_.push_back(std::move(cb)); } TracingMuxer::~TracingMuxer() = default; @@ -44043,14 +48922,7 @@ class TrackEventDescriptor : public ::protozero::Message { TrackEventCategory, TrackEventDescriptor>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_AvailableCategories kAvailableCategories() { return {}; } + static constexpr FieldMetadata_AvailableCategories kAvailableCategories{}; template T* add_available_categories() { return BeginNestedMessage(1); } @@ -44089,17 +48961,13 @@ class TrackEventCategory : public ::protozero::Message { std::string, TrackEventCategory>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Name kName() { return {}; } + static constexpr FieldMetadata_Name kName{}; void set_name(const char* data, size_t size) { AppendBytes(FieldMetadata_Name::kFieldId, data, size); } + void set_name(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Name::kFieldId, chars.data, chars.size); + } void set_name(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Name::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -44117,17 +48985,13 @@ class TrackEventCategory : public ::protozero::Message { std::string, TrackEventCategory>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Description kDescription() { return {}; } + static constexpr FieldMetadata_Description kDescription{}; void set_description(const char* data, size_t size) { AppendBytes(FieldMetadata_Description::kFieldId, data, size); } + void set_description(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Description::kFieldId, chars.data, chars.size); + } void set_description(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Description::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -44145,17 +49009,13 @@ class TrackEventCategory : public ::protozero::Message { std::string, TrackEventCategory>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Tags kTags() { return {}; } + static constexpr FieldMetadata_Tags kTags{}; void add_tags(const char* data, size_t size) { AppendBytes(FieldMetadata_Tags::kFieldId, data, size); } + void add_tags(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Tags::kFieldId, chars.data, chars.size); + } void add_tags(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Tags::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -44192,19 +49052,54 @@ namespace pbzero { class ClockSnapshot_Clock; enum BuiltinClock : int32_t; -enum ClockSnapshot_Clock_BuiltinClocks : int32_t { - ClockSnapshot_Clock_BuiltinClocks_UNKNOWN = 0, - ClockSnapshot_Clock_BuiltinClocks_REALTIME = 1, - ClockSnapshot_Clock_BuiltinClocks_REALTIME_COARSE = 2, - ClockSnapshot_Clock_BuiltinClocks_MONOTONIC = 3, - ClockSnapshot_Clock_BuiltinClocks_MONOTONIC_COARSE = 4, - ClockSnapshot_Clock_BuiltinClocks_MONOTONIC_RAW = 5, - ClockSnapshot_Clock_BuiltinClocks_BOOTTIME = 6, - ClockSnapshot_Clock_BuiltinClocks_BUILTIN_CLOCK_MAX_ID = 63, +namespace perfetto_pbzero_enum_ClockSnapshot_Clock { +enum BuiltinClocks : int32_t { + UNKNOWN = 0, + REALTIME = 1, + REALTIME_COARSE = 2, + MONOTONIC = 3, + MONOTONIC_COARSE = 4, + MONOTONIC_RAW = 5, + BOOTTIME = 6, + BUILTIN_CLOCK_MAX_ID = 63, }; +} // namespace perfetto_pbzero_enum_ClockSnapshot_Clock +using ClockSnapshot_Clock_BuiltinClocks = perfetto_pbzero_enum_ClockSnapshot_Clock::BuiltinClocks; -const ClockSnapshot_Clock_BuiltinClocks ClockSnapshot_Clock_BuiltinClocks_MIN = ClockSnapshot_Clock_BuiltinClocks_UNKNOWN; -const ClockSnapshot_Clock_BuiltinClocks ClockSnapshot_Clock_BuiltinClocks_MAX = ClockSnapshot_Clock_BuiltinClocks_BUILTIN_CLOCK_MAX_ID; + +constexpr ClockSnapshot_Clock_BuiltinClocks ClockSnapshot_Clock_BuiltinClocks_MIN = ClockSnapshot_Clock_BuiltinClocks::UNKNOWN; +constexpr ClockSnapshot_Clock_BuiltinClocks ClockSnapshot_Clock_BuiltinClocks_MAX = ClockSnapshot_Clock_BuiltinClocks::BUILTIN_CLOCK_MAX_ID; + + +PERFETTO_PROTOZERO_CONSTEXPR14_OR_INLINE +const char* ClockSnapshot_Clock_BuiltinClocks_Name(::perfetto::protos::pbzero::ClockSnapshot_Clock_BuiltinClocks value) { + switch (value) { + case ::perfetto::protos::pbzero::ClockSnapshot_Clock_BuiltinClocks::UNKNOWN: + return "UNKNOWN"; + + case ::perfetto::protos::pbzero::ClockSnapshot_Clock_BuiltinClocks::REALTIME: + return "REALTIME"; + + case ::perfetto::protos::pbzero::ClockSnapshot_Clock_BuiltinClocks::REALTIME_COARSE: + return "REALTIME_COARSE"; + + case ::perfetto::protos::pbzero::ClockSnapshot_Clock_BuiltinClocks::MONOTONIC: + return "MONOTONIC"; + + case ::perfetto::protos::pbzero::ClockSnapshot_Clock_BuiltinClocks::MONOTONIC_COARSE: + return "MONOTONIC_COARSE"; + + case ::perfetto::protos::pbzero::ClockSnapshot_Clock_BuiltinClocks::MONOTONIC_RAW: + return "MONOTONIC_RAW"; + + case ::perfetto::protos::pbzero::ClockSnapshot_Clock_BuiltinClocks::BOOTTIME: + return "BOOTTIME"; + + case ::perfetto::protos::pbzero::ClockSnapshot_Clock_BuiltinClocks::BUILTIN_CLOCK_MAX_ID: + return "BUILTIN_CLOCK_MAX_ID"; + } + return "PBZERO_UNKNOWN_ENUM_VALUE"; +} class ClockSnapshot_Decoder : public ::protozero::TypedProtoDecoder { public: @@ -44236,14 +49131,7 @@ class ClockSnapshot : public ::protozero::Message { ClockSnapshot_Clock, ClockSnapshot>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Clocks kClocks() { return {}; } + static constexpr FieldMetadata_Clocks kClocks{}; template T* add_clocks() { return BeginNestedMessage(1); } @@ -44257,14 +49145,7 @@ class ClockSnapshot : public ::protozero::Message { ::perfetto::protos::pbzero::BuiltinClock, ClockSnapshot>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_PrimaryTraceClock kPrimaryTraceClock() { return {}; } + static constexpr FieldMetadata_PrimaryTraceClock kPrimaryTraceClock{}; void set_primary_trace_clock(::perfetto::protos::pbzero::BuiltinClock value) { static constexpr uint32_t field_id = FieldMetadata_PrimaryTraceClock::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -44301,15 +49182,19 @@ class ClockSnapshot_Clock : public ::protozero::Message { }; static constexpr const char* GetName() { return ".perfetto.protos.ClockSnapshot.Clock"; } + using BuiltinClocks = ::perfetto::protos::pbzero::ClockSnapshot_Clock_BuiltinClocks; - static const BuiltinClocks UNKNOWN = ClockSnapshot_Clock_BuiltinClocks_UNKNOWN; - static const BuiltinClocks REALTIME = ClockSnapshot_Clock_BuiltinClocks_REALTIME; - static const BuiltinClocks REALTIME_COARSE = ClockSnapshot_Clock_BuiltinClocks_REALTIME_COARSE; - static const BuiltinClocks MONOTONIC = ClockSnapshot_Clock_BuiltinClocks_MONOTONIC; - static const BuiltinClocks MONOTONIC_COARSE = ClockSnapshot_Clock_BuiltinClocks_MONOTONIC_COARSE; - static const BuiltinClocks MONOTONIC_RAW = ClockSnapshot_Clock_BuiltinClocks_MONOTONIC_RAW; - static const BuiltinClocks BOOTTIME = ClockSnapshot_Clock_BuiltinClocks_BOOTTIME; - static const BuiltinClocks BUILTIN_CLOCK_MAX_ID = ClockSnapshot_Clock_BuiltinClocks_BUILTIN_CLOCK_MAX_ID; + static inline const char* BuiltinClocks_Name(BuiltinClocks value) { + return ::perfetto::protos::pbzero::ClockSnapshot_Clock_BuiltinClocks_Name(value); + } + static const BuiltinClocks UNKNOWN = BuiltinClocks::UNKNOWN; + static const BuiltinClocks REALTIME = BuiltinClocks::REALTIME; + static const BuiltinClocks REALTIME_COARSE = BuiltinClocks::REALTIME_COARSE; + static const BuiltinClocks MONOTONIC = BuiltinClocks::MONOTONIC; + static const BuiltinClocks MONOTONIC_COARSE = BuiltinClocks::MONOTONIC_COARSE; + static const BuiltinClocks MONOTONIC_RAW = BuiltinClocks::MONOTONIC_RAW; + static const BuiltinClocks BOOTTIME = BuiltinClocks::BOOTTIME; + static const BuiltinClocks BUILTIN_CLOCK_MAX_ID = BuiltinClocks::BUILTIN_CLOCK_MAX_ID; using FieldMetadata_ClockId = ::protozero::proto_utils::FieldMetadata< @@ -44319,14 +49204,7 @@ class ClockSnapshot_Clock : public ::protozero::Message { uint32_t, ClockSnapshot_Clock>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ClockId kClockId() { return {}; } + static constexpr FieldMetadata_ClockId kClockId{}; void set_clock_id(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_ClockId::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -44344,14 +49222,7 @@ class ClockSnapshot_Clock : public ::protozero::Message { uint64_t, ClockSnapshot_Clock>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Timestamp kTimestamp() { return {}; } + static constexpr FieldMetadata_Timestamp kTimestamp{}; void set_timestamp(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Timestamp::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -44369,14 +49240,7 @@ class ClockSnapshot_Clock : public ::protozero::Message { bool, ClockSnapshot_Clock>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_IsIncremental kIsIncremental() { return {}; } + static constexpr FieldMetadata_IsIncremental kIsIncremental{}; void set_is_incremental(bool value) { static constexpr uint32_t field_id = FieldMetadata_IsIncremental::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -44394,14 +49258,7 @@ class ClockSnapshot_Clock : public ::protozero::Message { uint64_t, ClockSnapshot_Clock>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_UnitMultiplierNs kUnitMultiplierNs() { return {}; } + static constexpr FieldMetadata_UnitMultiplierNs kUnitMultiplierNs{}; void set_unit_multiplier_ns(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_UnitMultiplierNs::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -44435,7 +49292,6 @@ class ClockSnapshot_Clock : public ::protozero::Message { // gen_amalgamated expanded: #include "perfetto/tracing/internal/track_event_internal.h" // gen_amalgamated expanded: #include "perfetto/base/proc_utils.h" -// gen_amalgamated expanded: #include "perfetto/base/thread_utils.h" // gen_amalgamated expanded: #include "perfetto/base/time.h" // gen_amalgamated expanded: #include "perfetto/tracing/core/data_source_config.h" // gen_amalgamated expanded: #include "perfetto/tracing/internal/track_event_interned_fields.h" @@ -44458,6 +49314,8 @@ TrackEventSessionObserver::~TrackEventSessionObserver() = default; void TrackEventSessionObserver::OnSetup(const DataSourceBase::SetupArgs&) {} void TrackEventSessionObserver::OnStart(const DataSourceBase::StartArgs&) {} void TrackEventSessionObserver::OnStop(const DataSourceBase::StopArgs&) {} +void TrackEventSessionObserver::WillClearIncrementalState( + const DataSourceBase::ClearIncrementalStateArgs&) {} namespace internal { @@ -44465,7 +49323,6 @@ BaseTrackEventInternedDataIndex::~BaseTrackEventInternedDataIndex() = default; namespace { -std::atomic g_main_thread; static constexpr const char kLegacySlowPrefix[] = "disabled-by-default-"; static constexpr const char kSlowTag[] = "slow"; static constexpr const char kDebugTag[] = "debug"; @@ -44475,18 +49332,54 @@ constexpr auto kClockIdIncremental = constexpr auto kClockIdAbsolute = TrackEventIncrementalState::kClockIdAbsolute; -void ForEachObserver( - std::function callback) { - // Session observers, shared by all track event data source instances. - static constexpr int kMaxObservers = 8; - static std::recursive_mutex* mutex = new std::recursive_mutex{}; // Leaked. - static std::array observers{}; - std::unique_lock lock(*mutex); - for (auto& o : observers) { - if (!callback(o)) - break; +class TrackEventSessionObserverRegistry { + public: + static TrackEventSessionObserverRegistry* GetInstance() { + static TrackEventSessionObserverRegistry* instance = + new TrackEventSessionObserverRegistry(); // leaked + return instance; } -} + + void AddObserverForRegistry(const TrackEventCategoryRegistry& registry, + TrackEventSessionObserver* observer) { + std::unique_lock lock(mutex_); + observers_.emplace_back(®istry, observer); + } + + void RemoveObserverForRegistry(const TrackEventCategoryRegistry& registry, + TrackEventSessionObserver* observer) { + std::unique_lock lock(mutex_); + observers_.erase(std::remove(observers_.begin(), observers_.end(), + RegisteredObserver(®istry, observer)), + observers_.end()); + } + + void ForEachObserverForRegistry( + const TrackEventCategoryRegistry& registry, + std::function callback) { + std::unique_lock lock(mutex_); + for (auto& registered_observer : observers_) { + if (®istry == registered_observer.registry) { + callback(registered_observer.observer); + } + } + } + + private: + struct RegisteredObserver { + RegisteredObserver(const TrackEventCategoryRegistry* r, + TrackEventSessionObserver* o) + : registry(r), observer(o) {} + bool operator==(const RegisteredObserver& other) { + return registry == other.registry && observer == other.observer; + } + const TrackEventCategoryRegistry* registry; + TrackEventSessionObserver* observer; + }; + + std::recursive_mutex mutex_; + std::vector observers_; +}; enum class MatchType { kExact, kPattern }; @@ -44527,9 +49420,6 @@ std::atomic TrackEventInternal::session_count_{}; bool TrackEventInternal::Initialize( const TrackEventCategoryRegistry& registry, bool (*register_data_source)(const DataSourceDescriptor&)) { - if (!g_main_thread) - g_main_thread = perfetto::base::GetThreadId(); - DataSourceDescriptor dsd; dsd.set_name("track_event"); @@ -44558,31 +49448,36 @@ bool TrackEventInternal::Initialize( // static bool TrackEventInternal::AddSessionObserver( + const TrackEventCategoryRegistry& registry, TrackEventSessionObserver* observer) { - bool result = false; - ForEachObserver([&](TrackEventSessionObserver*& o) { - if (!o) { - o = observer; - result = true; - return false; - } - return true; - }); - return result; + TrackEventSessionObserverRegistry::GetInstance()->AddObserverForRegistry( + registry, observer); + return true; } // static void TrackEventInternal::RemoveSessionObserver( + const TrackEventCategoryRegistry& registry, TrackEventSessionObserver* observer) { - ForEachObserver([&](TrackEventSessionObserver*& o) { - if (o == observer) { - o = nullptr; - return false; - } - return true; - }); + TrackEventSessionObserverRegistry::GetInstance()->RemoveObserverForRegistry( + registry, observer); } +#if !PERFETTO_BUILDFLAG(PERFETTO_OS_APPLE) && \ + !PERFETTO_BUILDFLAG(PERFETTO_OS_WIN) +static constexpr protos::pbzero::BuiltinClock kDefaultTraceClock = + protos::pbzero::BUILTIN_CLOCK_BOOTTIME; +#else +static constexpr protos::pbzero::BuiltinClock kDefaultTraceClock = + protos::pbzero::BUILTIN_CLOCK_MONOTONIC; +#endif + +// static +protos::pbzero::BuiltinClock TrackEventInternal::clock_ = kDefaultTraceClock; + +// static +bool TrackEventInternal::disallow_merging_with_system_tracks_ = false; + // static void TrackEventInternal::EnableTracing( const TrackEventCategoryRegistry& registry, @@ -44592,34 +49487,41 @@ void TrackEventInternal::EnableTracing( if (IsCategoryEnabled(registry, config, *registry.GetCategory(i))) registry.EnableCategoryForInstance(i, args.internal_instance_index); } - ForEachObserver([&](TrackEventSessionObserver*& o) { - if (o) - o->OnSetup(args); - return true; - }); + TrackEventSessionObserverRegistry::GetInstance()->ForEachObserverForRegistry( + registry, [&](TrackEventSessionObserver* o) { o->OnSetup(args); }); } // static -void TrackEventInternal::OnStart(const DataSourceBase::StartArgs& args) { +void TrackEventInternal::OnStart(const TrackEventCategoryRegistry& registry, + const DataSourceBase::StartArgs& args) { session_count_.fetch_add(1); - ForEachObserver([&](TrackEventSessionObserver*& o) { - if (o) - o->OnStart(args); - return true; - }); + TrackEventSessionObserverRegistry::GetInstance()->ForEachObserverForRegistry( + registry, [&](TrackEventSessionObserver* o) { o->OnStart(args); }); +} + +// static +void TrackEventInternal::OnStop(const TrackEventCategoryRegistry& registry, + const DataSourceBase::StopArgs& args) { + TrackEventSessionObserverRegistry::GetInstance()->ForEachObserverForRegistry( + registry, [&](TrackEventSessionObserver* o) { o->OnStop(args); }); } // static void TrackEventInternal::DisableTracing( const TrackEventCategoryRegistry& registry, - const DataSourceBase::StopArgs& args) { - ForEachObserver([&](TrackEventSessionObserver*& o) { - if (o) - o->OnStop(args); - return true; - }); + uint32_t internal_instance_index) { for (size_t i = 0; i < registry.category_count(); i++) - registry.DisableCategoryForInstance(i, args.internal_instance_index); + registry.DisableCategoryForInstance(i, internal_instance_index); +} + +// static +void TrackEventInternal::WillClearIncrementalState( + const TrackEventCategoryRegistry& registry, + const DataSourceBase::ClearIncrementalStateArgs& args) { + TrackEventSessionObserverRegistry::GetInstance()->ForEachObserverForRegistry( + registry, [&](TrackEventSessionObserver* o) { + o->WillClearIncrementalState(args); + }); } // static @@ -44695,6 +49597,21 @@ bool TrackEventInternal::IsCategoryEnabled( return true; } + // 2.5. A special case for Chrome's legacy disabled-by-default categories. + // We treat them as having a "slow" tag with one exception: they can be + // enabled by a pattern if the pattern starts with "disabled-by-default-" + // itself. + if (match_type == MatchType::kExact && + !strncmp(category.name, kLegacySlowPrefix, strlen(kLegacySlowPrefix))) { + for (const auto& pattern : config.enabled_categories()) { + if (!strncmp(pattern.c_str(), kLegacySlowPrefix, + strlen(kLegacySlowPrefix)) && + NameMatchesPattern(pattern, category.name, MatchType::kPattern)) { + return true; + } + } + } + // 3. Disabled categories. if (NameMatchesPatternList(config.disabled_categories(), category.name, match_type)) { @@ -44724,8 +49641,10 @@ bool TrackEventInternal::IsCategoryEnabled( uint64_t TrackEventInternal::GetTimeNs() { if (GetClockId() == protos::pbzero::BUILTIN_CLOCK_BOOTTIME) return static_cast(perfetto::base::GetBootTimeNs().count()); - PERFETTO_DCHECK(GetClockId() == protos::pbzero::BUILTIN_CLOCK_MONOTONIC); - return static_cast(perfetto::base::GetWallTimeNs().count()); + else if (GetClockId() == protos::pbzero::BUILTIN_CLOCK_MONOTONIC) + return static_cast(perfetto::base::GetWallTimeNs().count()); + PERFETTO_DCHECK(GetClockId() == protos::pbzero::BUILTIN_CLOCK_MONOTONIC_RAW); + return static_cast(perfetto::base::GetWallTimeRawNs().count()); } // static @@ -44745,8 +49664,7 @@ void TrackEventInternal::ResetIncrementalState( const TrackEventTlsState& tls_state, const TraceTimestamp& timestamp) { auto sequence_timestamp = timestamp; - if (timestamp.clock_id != (uint32_t)TrackEventInternal::GetClockId() && - timestamp.clock_id != kClockIdIncremental) { + if (timestamp.clock_id != kClockIdIncremental) { sequence_timestamp = TrackEventInternal::GetTraceTime(); } @@ -44774,11 +49692,11 @@ void TrackEventInternal::ResetIncrementalState( thread_time_counter_track.uuid); } - if (tls_state.default_clock != (uint32_t)GetClockId()) { + if (tls_state.default_clock != static_cast(GetClockId())) { ClockSnapshot* clocks = packet->set_clock_snapshot(); // Trace clock. ClockSnapshot::Clock* trace_clock = clocks->add_clocks(); - trace_clock->set_clock_id(GetClockId()); + trace_clock->set_clock_id(static_cast(GetClockId())); trace_clock->set_timestamp(sequence_timestamp.value); if (PERFETTO_LIKELY(tls_state.default_clock == kClockIdIncremental)) { @@ -44837,8 +49755,9 @@ TrackEventInternal::NewTracePacket(TraceWriterBase* trace_writer, // No need to set the clock id here, since kClockIdIncremental is the // clock id assumed by default. auto time_diff_ns = timestamp.value - incr_state->last_timestamp_ns; - packet->set_timestamp(time_diff_ns / ts_unit_multiplier); - incr_state->last_timestamp_ns = timestamp.value; + auto time_diff_units = time_diff_ns / ts_unit_multiplier; + packet->set_timestamp(time_diff_units); + incr_state->last_timestamp_ns += time_diff_units * ts_unit_multiplier; } else { packet->set_timestamp(timestamp.value / ts_unit_multiplier); packet->set_timestamp_clock_id(ts_unit_multiplier == 1 @@ -44883,7 +49802,6 @@ EventContext TrackEventInternal::WriteEvent( perfetto::protos::pbzero::TrackEvent::Type type, const TraceTimestamp& timestamp, bool on_current_thread_track) { - PERFETTO_DCHECK(g_main_thread); PERFETTO_DCHECK(!incr_state->was_cleared); auto packet = NewTracePacket(trace_writer, incr_state, tls_state, timestamp); EventContext ctx(std::move(packet), incr_state, &tls_state); @@ -44927,6 +49845,15 @@ protos::pbzero::DebugAnnotation* TrackEventInternal::AddDebugAnnotation( return annotation; } +// static +protos::pbzero::DebugAnnotation* TrackEventInternal::AddDebugAnnotation( + perfetto::EventContext* event_ctx, + perfetto::DynamicString name) { + auto annotation = event_ctx->event()->add_debug_annotations(); + annotation->set_name(name.value); + return annotation; +} + } // namespace internal } // namespace perfetto // gen_amalgamated begin source: src/tracing/internal/track_event_interned_fields.cc @@ -45027,6 +49954,12 @@ namespace perfetto { PlatformThreadLocalObject::~PlatformThreadLocalObject() = default; Platform::~Platform() = default; +void Platform::Shutdown() {} + +base::PlatformThreadId Platform::GetCurrentThreadId() { + return base::GetThreadId(); +} + // static std::unique_ptr PlatformThreadLocalObject::CreateInstance() { @@ -45338,26 +50271,31 @@ std::mutex& InitializedMutex() { // static void Tracing::InitializeInternal(const TracingInitArgs& args) { std::unique_lock lock(InitializedMutex()); - static TracingInitArgs init_args; - if (g_was_initialized) { - if (!(init_args == args)) { - PERFETTO_ELOG( - "Tracing::Initialize() called more than once with different args. " - "This is not supported, only the first call will have effect."); - PERFETTO_DCHECK(false); + // If it's the first time Initialize is called, set some global params. + if (!g_was_initialized) { + // Make sure the headers and implementation files agree on the build config. + PERFETTO_CHECK(args.dcheck_is_on_ == PERFETTO_DCHECK_IS_ON()); + if (args.log_message_callback) { + base::SetLogMessageCallback(args.log_message_callback); + } + + if (args.use_monotonic_clock) { + PERFETTO_CHECK(!args.use_monotonic_raw_clock); + internal::TrackEventInternal::SetClockId( + protos::pbzero::BUILTIN_CLOCK_MONOTONIC); + } else if (args.use_monotonic_raw_clock) { + internal::TrackEventInternal::SetClockId( + protos::pbzero::BUILTIN_CLOCK_MONOTONIC_RAW); + } + + if (args.disallow_merging_with_system_tracks) { + internal::TrackEventInternal::SetDisallowMergingWithSystemTracks(true); } - return; } - // Make sure the headers and implementation files agree on the build config. - PERFETTO_CHECK(args.dcheck_is_on_ == PERFETTO_DCHECK_IS_ON()); - if (args.log_message_callback) { - base::SetLogMessageCallback(args.log_message_callback); - } internal::TracingMuxerImpl::InitializeInstance(args); internal::TrackRegistry::InitializeInstance(); g_was_initialized = true; - init_args = args; } // static @@ -45366,6 +50304,15 @@ bool Tracing::IsInitialized() { return g_was_initialized; } +// static +void Tracing::Shutdown() { + std::unique_lock lock(InitializedMutex()); + if (!g_was_initialized) + return; + internal::TracingMuxerImpl::Shutdown(); + g_was_initialized = false; +} + // static void Tracing::ResetForTesting() { std::unique_lock lock(InitializedMutex()); @@ -45378,11 +50325,37 @@ void Tracing::ResetForTesting() { } // static -std::unique_ptr Tracing::NewTrace(BackendType backend) { +std::unique_ptr Tracing::NewTraceInternal( + BackendType backend, + TracingConsumerBackend* (*system_backend_factory)()) { return static_cast(internal::TracingMuxer::Get()) - ->CreateTracingSession(backend); + ->CreateTracingSession(backend, system_backend_factory); } +// static +std::unique_ptr Tracing::SetupStartupTracing( + const TraceConfig& config, + Tracing::SetupStartupTracingOpts opts) { + return static_cast(internal::TracingMuxer::Get()) + ->CreateStartupTracingSession(config, std::move(opts)); +} + +// static +std::unique_ptr Tracing::SetupStartupTracingBlocking( + const TraceConfig& config, + Tracing::SetupStartupTracingOpts opts) { + return static_cast(internal::TracingMuxer::Get()) + ->CreateStartupTracingSessionBlocking(config, std::move(opts)); +} + +// static +void Tracing::ActivateTriggers(const std::vector& triggers, + uint32_t ttl_ms) { + internal::TracingMuxer::Get()->ActivateTriggers(triggers, ttl_ms); +} + +TracingSession::~TracingSession() = default; + // Can be called from any thread. bool TracingSession::FlushBlocking(uint32_t timeout_ms) { std::atomic flush_result; @@ -45466,6 +50439,8 @@ TracingSession::QueryServiceStateBlocking() { return result; } +StartupTracingSession::~StartupTracingSession() = default; + } // namespace perfetto // gen_amalgamated begin source: src/tracing/tracing_policy.cc /* @@ -45518,6 +50493,7 @@ TracingPolicy::~TracingPolicy() = default; // gen_amalgamated expanded: #include "perfetto/ext/base/thread_utils.h" // gen_amalgamated expanded: #include "perfetto/ext/base/uuid.h" // gen_amalgamated expanded: #include "perfetto/tracing/internal/track_event_data_source.h" +// gen_amalgamated expanded: #include "perfetto/tracing/internal/track_event_internal.h" // gen_amalgamated expanded: #include "protos/perfetto/trace/track_event/counter_descriptor.gen.h" // gen_amalgamated expanded: #include "protos/perfetto/trace/track_event/process_descriptor.gen.h" // gen_amalgamated expanded: #include "protos/perfetto/trace/track_event/process_descriptor.pbzero.h" @@ -45575,12 +50551,28 @@ protos::gen::TrackDescriptor ThreadTrack::Serialize() const { auto td = desc.mutable_thread(); td->set_pid(static_cast(pid)); td->set_tid(static_cast(tid)); + if (disallow_merging_with_system_tracks) { + desc.set_disallow_merging_with_system_tracks(true); + } std::string thread_name; if (base::GetThreadName(thread_name)) td->set_thread_name(thread_name); return desc; } +// static +ThreadTrack ThreadTrack::Current() { + return ThreadTrack( + internal::TracingMuxer::Get()->GetCurrentThreadId(), + internal::TrackEventInternal::GetDisallowMergingWithSystemTracks()); +} + +// static +ThreadTrack ThreadTrack::ForThread(base::PlatformThreadId tid_) { + return ThreadTrack( + tid_, internal::TrackEventInternal::GetDisallowMergingWithSystemTracks()); +} + void ThreadTrack::Serialize(protos::pbzero::TrackDescriptor* desc) const { auto bytes = Serialize().SerializeAsString(); desc->AppendRawProtoBytes(bytes.data(), bytes.size()); @@ -45655,8 +50647,6 @@ TrackRegistry::~TrackRegistry() = default; // static void TrackRegistry::InitializeInstance() { - // TODO(eseckler): Chrome may call this more than once. Once Chrome doesn't - // call this directly anymore, bring back DCHECK(!instance_) instead. if (instance_) return; instance_ = new TrackRegistry(); @@ -45667,7 +50657,7 @@ void TrackRegistry::InitializeInstance() { // framework), events emitted by each will be consistently interleaved on // common thread and process tracks. if (uint64_t start_time = GetProcessStartTime()) { - base::Hash hash; + base::Hasher hash; hash.Update(start_time); hash.Update(Platform::GetCurrentProcessId()); Track::process_uuid = hash.digest(); @@ -45678,8 +50668,7 @@ void TrackRegistry::InitializeInstance() { } void TrackRegistry::ResetForTesting() { - delete instance_; - instance_ = nullptr; + instance_->tracks_.clear(); } void TrackRegistry::UpdateTrack(Track track, @@ -45838,7 +50827,7 @@ void LegacyTraceId::Write(protos::pbzero::TrackEvent::LegacyEvent* event, legacy::kTraceEventFlagHasGlobalId); uint64_t id = raw_id_; if (scope_ && scope_flags != legacy::kTraceEventFlagHasGlobalId) { - id = base::Hash::Combine(id, scope_); + id = base::Hasher::Combine(id, scope_); } switch (scope_flags) { @@ -45953,7 +50942,7 @@ void TrackEventStateTracker::ProcessTracePacket( } if (name.data) { - base::Hash hash; + base::Hasher hash; hash.Update(name.data, name.size); name_hash = hash.digest(); } @@ -46192,8 +51181,9 @@ TracingTLS::~TracingTLS() { } // namespace internal +TracingProducerBackend::~TracingProducerBackend() = default; +TracingConsumerBackend::~TracingConsumerBackend() = default; TracingBackend::~TracingBackend() = default; -TracingSession::~TracingSession() = default; } // namespace perfetto // gen_amalgamated begin source: src/android_stats/statsd_logging_helper.cc @@ -46271,6 +51261,7 @@ enum class PerfettoStatsdAtom { kTracedStartTracingInvalidSessionState = 36, kTracedEnableTracingInvalidFilter = 47, kTracedEnableTracingOobTargetBuffer = 48, + kTracedEnableTracingInvalidTriggerMode = 52, // Checkpoints inside perfetto_cmd after tracing has finished. kOnTracingDisabled = 4, @@ -46308,7 +51299,7 @@ enum class PerfettoStatsdAtom { }; // This must match the values of the PerfettoTrigger::TriggerType enum in: -// frameworks/base/cmds/statsd/src/atoms.proto +// frameworks/proto_logging/stats/atoms.proto enum PerfettoTriggerAtom { kUndefined = 0, @@ -46456,6 +51447,92 @@ void MaybeLogTriggerEvents(PerfettoTriggerAtom, } // namespace android_stats } // namespace perfetto +// gen_amalgamated begin source: src/base/version.cc +// gen_amalgamated begin header: include/perfetto/ext/base/version.h +/* + * Copyright (C) 2020 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef INCLUDE_PERFETTO_EXT_BASE_VERSION_H_ +#define INCLUDE_PERFETTO_EXT_BASE_VERSION_H_ + +namespace perfetto { +namespace base { + +// The returned pointer is a static string is safe to pass around. +const char* GetVersionString(); + +} // namespace base +} // namespace perfetto + +#endif // INCLUDE_PERFETTO_EXT_BASE_VERSION_H_ +// gen_amalgamated begin header: gen/perfetto_version.gen.h +// Generated by write_version_header.py + +#ifndef GEN_PERFETTO_VERSION_GEN_H_ +#define GEN_PERFETTO_VERSION_GEN_H_ + +#define PERFETTO_VERSION_STRING() "v34.0-a46c4c811" +#define PERFETTO_VERSION_SCM_REVISION() "a46c4c81192101afc06ecd9651d0827344366aac" + +#endif // GEN_PERFETTO_VERSION_GEN_H_ +/* + * Copyright (C) 2020 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// gen_amalgamated expanded: #include "perfetto/ext/base/version.h" + +// gen_amalgamated expanded: #include "perfetto/base/build_config.h" + +#include + +#if PERFETTO_BUILDFLAG(PERFETTO_VERSION_GEN) +// gen_amalgamated expanded: #include "perfetto_version.gen.h" +#else +#define PERFETTO_VERSION_STRING() "v0.0" +#define PERFETTO_VERSION_SCM_REVISION() "unknown" +#endif + +namespace perfetto { +namespace base { + +const char* GetVersionString() { + static const char* version_str = [] { + static constexpr size_t kMaxLen = 256; + char* version = new char[kMaxLen + 1]; + snprintf(version, kMaxLen, "Perfetto %s (%s)", PERFETTO_VERSION_STRING(), + PERFETTO_VERSION_SCM_REVISION()); + return version; + }(); + return version_str; +} + +} // namespace base +} // namespace perfetto // gen_amalgamated begin source: src/protozero/filtering/filter_bytecode_parser.cc // gen_amalgamated begin header: src/protozero/filtering/filter_bytecode_parser.h /* @@ -46683,7 +51760,7 @@ bool FilterBytecodeParser::LoadInternal(const uint8_t* bytecode_data, if (packed_parse_err || words.empty()) return false; - perfetto::base::Hash hasher; + perfetto::base::Hasher hasher; for (size_t i = 0; i < words.size() - 1; ++i) hasher.Update(words[i]); @@ -47114,6 +52191,7 @@ namespace protozero { class MessageFilter { public: MessageFilter(); + explicit MessageFilter(const MessageFilter&); ~MessageFilter(); struct InputSlice { @@ -47342,6 +52420,11 @@ MessageFilter::MessageFilter() { stack_.emplace_back(); } +MessageFilter::MessageFilter(const MessageFilter& other) + : root_msg_index_(other.root_msg_index_), filter_(other.filter_) { + stack_.emplace_back(); +} + MessageFilter::~MessageFilter() = default; bool MessageFilter::LoadFilterBytecode(const void* filter_data, size_t len) { @@ -47670,8 +52753,9 @@ namespace protos { namespace pbzero { class PerfettoMetatrace_Arg; +class PerfettoMetatrace_InternedString; -class PerfettoMetatrace_Decoder : public ::protozero::TypedProtoDecoder { +class PerfettoMetatrace_Decoder : public ::protozero::TypedProtoDecoder { public: PerfettoMetatrace_Decoder(const uint8_t* data, size_t len) : TypedProtoDecoder(data, len) {} explicit PerfettoMetatrace_Decoder(const std::string& raw) : TypedProtoDecoder(reinterpret_cast(raw.data()), raw.size()) {} @@ -47682,6 +52766,8 @@ class PerfettoMetatrace_Decoder : public ::protozero::TypedProtoDecoder().as_uint32(); } bool has_event_name() const { return at<8>().valid(); } ::protozero::ConstChars event_name() const { return at<8>().as_string(); } + bool has_event_name_iid() const { return at<11>().valid(); } + uint64_t event_name_iid() const { return at<11>().as_uint64(); } bool has_counter_name() const { return at<9>().valid(); } ::protozero::ConstChars counter_name() const { return at<9>().as_string(); } bool has_event_duration_ns() const { return at<3>().valid(); } @@ -47694,6 +52780,8 @@ class PerfettoMetatrace_Decoder : public ::protozero::TypedProtoDecoder().as_bool(); } bool has_args() const { return at<7>().valid(); } ::protozero::RepeatedFieldIterator<::protozero::ConstBytes> args() const { return GetRepeated<::protozero::ConstBytes>(7); } + bool has_interned_strings() const { return at<10>().valid(); } + ::protozero::RepeatedFieldIterator<::protozero::ConstBytes> interned_strings() const { return GetRepeated<::protozero::ConstBytes>(10); } }; class PerfettoMetatrace : public ::protozero::Message { @@ -47703,16 +52791,19 @@ class PerfettoMetatrace : public ::protozero::Message { kEventIdFieldNumber = 1, kCounterIdFieldNumber = 2, kEventNameFieldNumber = 8, + kEventNameIidFieldNumber = 11, kCounterNameFieldNumber = 9, kEventDurationNsFieldNumber = 3, kCounterValueFieldNumber = 4, kThreadIdFieldNumber = 5, kHasOverrunsFieldNumber = 6, kArgsFieldNumber = 7, + kInternedStringsFieldNumber = 10, }; static constexpr const char* GetName() { return ".perfetto.protos.PerfettoMetatrace"; } using Arg = ::perfetto::protos::pbzero::PerfettoMetatrace_Arg; + using InternedString = ::perfetto::protos::pbzero::PerfettoMetatrace_InternedString; using FieldMetadata_EventId = ::protozero::proto_utils::FieldMetadata< @@ -47722,14 +52813,7 @@ class PerfettoMetatrace : public ::protozero::Message { uint32_t, PerfettoMetatrace>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_EventId kEventId() { return {}; } + static constexpr FieldMetadata_EventId kEventId{}; void set_event_id(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_EventId::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -47747,14 +52831,7 @@ class PerfettoMetatrace : public ::protozero::Message { uint32_t, PerfettoMetatrace>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_CounterId kCounterId() { return {}; } + static constexpr FieldMetadata_CounterId kCounterId{}; void set_counter_id(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_CounterId::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -47772,17 +52849,13 @@ class PerfettoMetatrace : public ::protozero::Message { std::string, PerfettoMetatrace>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_EventName kEventName() { return {}; } + static constexpr FieldMetadata_EventName kEventName{}; void set_event_name(const char* data, size_t size) { AppendBytes(FieldMetadata_EventName::kFieldId, data, size); } + void set_event_name(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_EventName::kFieldId, chars.data, chars.size); + } void set_event_name(std::string value) { static constexpr uint32_t field_id = FieldMetadata_EventName::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -47792,6 +52865,24 @@ class PerfettoMetatrace : public ::protozero::Message { ::Append(*this, field_id, value); } + using FieldMetadata_EventNameIid = + ::protozero::proto_utils::FieldMetadata< + 11, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint64, + uint64_t, + PerfettoMetatrace>; + + static constexpr FieldMetadata_EventNameIid kEventNameIid{}; + void set_event_name_iid(uint64_t value) { + static constexpr uint32_t field_id = FieldMetadata_EventNameIid::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint64> + ::Append(*this, field_id, value); + } + using FieldMetadata_CounterName = ::protozero::proto_utils::FieldMetadata< 9, @@ -47800,17 +52891,13 @@ class PerfettoMetatrace : public ::protozero::Message { std::string, PerfettoMetatrace>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_CounterName kCounterName() { return {}; } + static constexpr FieldMetadata_CounterName kCounterName{}; void set_counter_name(const char* data, size_t size) { AppendBytes(FieldMetadata_CounterName::kFieldId, data, size); } + void set_counter_name(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_CounterName::kFieldId, chars.data, chars.size); + } void set_counter_name(std::string value) { static constexpr uint32_t field_id = FieldMetadata_CounterName::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -47828,14 +52915,7 @@ class PerfettoMetatrace : public ::protozero::Message { uint64_t, PerfettoMetatrace>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_EventDurationNs kEventDurationNs() { return {}; } + static constexpr FieldMetadata_EventDurationNs kEventDurationNs{}; void set_event_duration_ns(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_EventDurationNs::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -47853,14 +52933,7 @@ class PerfettoMetatrace : public ::protozero::Message { int32_t, PerfettoMetatrace>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_CounterValue kCounterValue() { return {}; } + static constexpr FieldMetadata_CounterValue kCounterValue{}; void set_counter_value(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_CounterValue::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -47878,14 +52951,7 @@ class PerfettoMetatrace : public ::protozero::Message { uint32_t, PerfettoMetatrace>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ThreadId kThreadId() { return {}; } + static constexpr FieldMetadata_ThreadId kThreadId{}; void set_thread_id(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_ThreadId::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -47903,14 +52969,7 @@ class PerfettoMetatrace : public ::protozero::Message { bool, PerfettoMetatrace>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_HasOverruns kHasOverruns() { return {}; } + static constexpr FieldMetadata_HasOverruns kHasOverruns{}; void set_has_overruns(bool value) { static constexpr uint32_t field_id = FieldMetadata_HasOverruns::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -47928,29 +52987,104 @@ class PerfettoMetatrace : public ::protozero::Message { PerfettoMetatrace_Arg, PerfettoMetatrace>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Args kArgs() { return {}; } + static constexpr FieldMetadata_Args kArgs{}; template T* add_args() { return BeginNestedMessage(7); } + + using FieldMetadata_InternedStrings = + ::protozero::proto_utils::FieldMetadata< + 10, + ::protozero::proto_utils::RepetitionType::kRepeatedNotPacked, + ::protozero::proto_utils::ProtoSchemaType::kMessage, + PerfettoMetatrace_InternedString, + PerfettoMetatrace>; + + static constexpr FieldMetadata_InternedStrings kInternedStrings{}; + template T* add_interned_strings() { + return BeginNestedMessage(10); + } + }; -class PerfettoMetatrace_Arg_Decoder : public ::protozero::TypedProtoDecoder { +class PerfettoMetatrace_InternedString_Decoder : public ::protozero::TypedProtoDecoder { + public: + PerfettoMetatrace_InternedString_Decoder(const uint8_t* data, size_t len) : TypedProtoDecoder(data, len) {} + explicit PerfettoMetatrace_InternedString_Decoder(const std::string& raw) : TypedProtoDecoder(reinterpret_cast(raw.data()), raw.size()) {} + explicit PerfettoMetatrace_InternedString_Decoder(const ::protozero::ConstBytes& raw) : TypedProtoDecoder(raw.data, raw.size) {} + bool has_iid() const { return at<1>().valid(); } + uint64_t iid() const { return at<1>().as_uint64(); } + bool has_value() const { return at<2>().valid(); } + ::protozero::ConstChars value() const { return at<2>().as_string(); } +}; + +class PerfettoMetatrace_InternedString : public ::protozero::Message { + public: + using Decoder = PerfettoMetatrace_InternedString_Decoder; + enum : int32_t { + kIidFieldNumber = 1, + kValueFieldNumber = 2, + }; + static constexpr const char* GetName() { return ".perfetto.protos.PerfettoMetatrace.InternedString"; } + + + using FieldMetadata_Iid = + ::protozero::proto_utils::FieldMetadata< + 1, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint64, + uint64_t, + PerfettoMetatrace_InternedString>; + + static constexpr FieldMetadata_Iid kIid{}; + void set_iid(uint64_t value) { + static constexpr uint32_t field_id = FieldMetadata_Iid::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint64> + ::Append(*this, field_id, value); + } + + using FieldMetadata_Value = + ::protozero::proto_utils::FieldMetadata< + 2, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kString, + std::string, + PerfettoMetatrace_InternedString>; + + static constexpr FieldMetadata_Value kValue{}; + void set_value(const char* data, size_t size) { + AppendBytes(FieldMetadata_Value::kFieldId, data, size); + } + void set_value(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Value::kFieldId, chars.data, chars.size); + } + void set_value(std::string value) { + static constexpr uint32_t field_id = FieldMetadata_Value::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kString> + ::Append(*this, field_id, value); + } +}; + +class PerfettoMetatrace_Arg_Decoder : public ::protozero::TypedProtoDecoder { public: PerfettoMetatrace_Arg_Decoder(const uint8_t* data, size_t len) : TypedProtoDecoder(data, len) {} explicit PerfettoMetatrace_Arg_Decoder(const std::string& raw) : TypedProtoDecoder(reinterpret_cast(raw.data()), raw.size()) {} explicit PerfettoMetatrace_Arg_Decoder(const ::protozero::ConstBytes& raw) : TypedProtoDecoder(raw.data, raw.size) {} bool has_key() const { return at<1>().valid(); } ::protozero::ConstChars key() const { return at<1>().as_string(); } + bool has_key_iid() const { return at<3>().valid(); } + uint64_t key_iid() const { return at<3>().as_uint64(); } bool has_value() const { return at<2>().valid(); } ::protozero::ConstChars value() const { return at<2>().as_string(); } + bool has_value_iid() const { return at<4>().valid(); } + uint64_t value_iid() const { return at<4>().as_uint64(); } }; class PerfettoMetatrace_Arg : public ::protozero::Message { @@ -47958,7 +53092,9 @@ class PerfettoMetatrace_Arg : public ::protozero::Message { using Decoder = PerfettoMetatrace_Arg_Decoder; enum : int32_t { kKeyFieldNumber = 1, + kKeyIidFieldNumber = 3, kValueFieldNumber = 2, + kValueIidFieldNumber = 4, }; static constexpr const char* GetName() { return ".perfetto.protos.PerfettoMetatrace.Arg"; } @@ -47971,17 +53107,13 @@ class PerfettoMetatrace_Arg : public ::protozero::Message { std::string, PerfettoMetatrace_Arg>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Key kKey() { return {}; } + static constexpr FieldMetadata_Key kKey{}; void set_key(const char* data, size_t size) { AppendBytes(FieldMetadata_Key::kFieldId, data, size); } + void set_key(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Key::kFieldId, chars.data, chars.size); + } void set_key(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Key::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -47991,6 +53123,24 @@ class PerfettoMetatrace_Arg : public ::protozero::Message { ::Append(*this, field_id, value); } + using FieldMetadata_KeyIid = + ::protozero::proto_utils::FieldMetadata< + 3, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint64, + uint64_t, + PerfettoMetatrace_Arg>; + + static constexpr FieldMetadata_KeyIid kKeyIid{}; + void set_key_iid(uint64_t value) { + static constexpr uint32_t field_id = FieldMetadata_KeyIid::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint64> + ::Append(*this, field_id, value); + } + using FieldMetadata_Value = ::protozero::proto_utils::FieldMetadata< 2, @@ -47999,17 +53149,13 @@ class PerfettoMetatrace_Arg : public ::protozero::Message { std::string, PerfettoMetatrace_Arg>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Value kValue() { return {}; } + static constexpr FieldMetadata_Value kValue{}; void set_value(const char* data, size_t size) { AppendBytes(FieldMetadata_Value::kFieldId, data, size); } + void set_value(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Value::kFieldId, chars.data, chars.size); + } void set_value(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Value::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -48018,6 +53164,24 @@ class PerfettoMetatrace_Arg : public ::protozero::Message { ::protozero::proto_utils::ProtoSchemaType::kString> ::Append(*this, field_id, value); } + + using FieldMetadata_ValueIid = + ::protozero::proto_utils::FieldMetadata< + 4, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint64, + uint64_t, + PerfettoMetatrace_Arg>; + + static constexpr FieldMetadata_ValueIid kValueIid{}; + void set_value_iid(uint64_t value) { + static constexpr uint32_t field_id = FieldMetadata_ValueIid::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint64> + ::Append(*this, field_id, value); + } }; } // Namespace. @@ -48052,9 +53216,6 @@ class PerfettoMetatrace_Arg : public ::protozero::Message { namespace perfetto { -// static -constexpr char MetatraceWriter::kDataSourceName[]; - MetatraceWriter::MetatraceWriter() : weak_ptr_factory_(this) {} MetatraceWriter::~MetatraceWriter() { @@ -48374,6 +53535,496 @@ bool PacketStreamValidator::Validate(const Slices& slices) { } // namespace perfetto // gen_amalgamated begin source: src/tracing/core/trace_buffer.cc // gen_amalgamated begin header: src/tracing/core/trace_buffer.h +// gen_amalgamated begin header: include/perfetto/ext/base/flat_hash_map.h +/* + * Copyright (C) 2021 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef INCLUDE_PERFETTO_EXT_BASE_FLAT_HASH_MAP_H_ +#define INCLUDE_PERFETTO_EXT_BASE_FLAT_HASH_MAP_H_ + +// gen_amalgamated expanded: #include "perfetto/base/compiler.h" +// gen_amalgamated expanded: #include "perfetto/base/logging.h" +// gen_amalgamated expanded: #include "perfetto/ext/base/hash.h" +// gen_amalgamated expanded: #include "perfetto/ext/base/utils.h" + +#include +#include +#include + +namespace perfetto { +namespace base { + +// An open-addressing hashmap implementation. +// Pointers are not stable, neither for keys nor values. +// Has similar performances of a RobinHood hash (without the complications) +// and 2x an unordered map. +// Doc: http://go/perfetto-hashtables . +// +// When used to implement a string pool in TraceProcessor, the performance +// characteristics obtained by replaying the set of strings seeen in a 4GB trace +// (226M strings, 1M unique) are the following (see flat_hash_map_benchmark.cc): +// This(Linear+AppendOnly) 879,383,676 ns 258.013M insertions/s +// This(LinearProbe): 909,206,047 ns 249.546M insertions/s +// This(QuadraticProbe): 1,083,844,388 ns 209.363M insertions/s +// std::unordered_map: 6,203,351,870 ns 36.5811M insertions/s +// tsl::robin_map: 931,403,397 ns 243.622M insertions/s +// absl::flat_hash_map: 998,013,459 ns 227.379M insertions/s +// FollyF14FastMap: 1,181,480,602 ns 192.074M insertions/s + +// The structs below define the probing algorithm used to probe slots upon a +// collision. They are guaranteed to visit all slots as our table size is always +// a power of two (see https://en.wikipedia.org/wiki/Quadratic_probing). + +// Linear probing can be faster if the hashing is well distributed and the load +// is not high. For TraceProcessor's StringPool this is the fastest. It can +// degenerate badly if the hashing doesn't spread (e.g., if using directly pids +// as keys, with a no-op hashing function). +struct LinearProbe { + static inline size_t Calc(size_t key_hash, size_t step, size_t capacity) { + return (key_hash + step) & (capacity - 1); // Linear probe + } +}; + +// Generates the sequence: 0, 3, 10, 21, 36, 55, ... +// Can be a bit (~5%) slower than LinearProbe because it's less cache hot, but +// avoids degenerating badly if the hash function is bad and causes clusters. +// A good default choice unless benchmarks prove otherwise. +struct QuadraticProbe { + static inline size_t Calc(size_t key_hash, size_t step, size_t capacity) { + return (key_hash + 2 * step * step + step) & (capacity - 1); + } +}; + +// Tends to perform in the middle between linear and quadratic. +// It's a bit more cache-effective than the QuadraticProbe but can create more +// clustering if the hash function doesn't spread well. +// Generates the sequence: 0, 1, 3, 6, 10, 15, 21, ... +struct QuadraticHalfProbe { + static inline size_t Calc(size_t key_hash, size_t step, size_t capacity) { + return (key_hash + (step * step + step) / 2) & (capacity - 1); + } +}; + +template , + typename Probe = QuadraticProbe, + bool AppendOnly = false> +class FlatHashMap { + public: + class Iterator { + public: + explicit Iterator(const FlatHashMap* map) : map_(map) { FindNextNonFree(); } + ~Iterator() = default; + Iterator(const Iterator&) = default; + Iterator& operator=(const Iterator&) = default; + Iterator(Iterator&&) noexcept = default; + Iterator& operator=(Iterator&&) noexcept = default; + + Key& key() { return map_->keys_[idx_]; } + Value& value() { return map_->values_[idx_]; } + const Key& key() const { return map_->keys_[idx_]; } + const Value& value() const { return map_->values_[idx_]; } + + explicit operator bool() const { return idx_ != kEnd; } + Iterator& operator++() { + PERFETTO_DCHECK(idx_ < map_->capacity_); + ++idx_; + FindNextNonFree(); + return *this; + } + + private: + static constexpr size_t kEnd = std::numeric_limits::max(); + + void FindNextNonFree() { + const auto& tags = map_->tags_; + for (; idx_ < map_->capacity_; idx_++) { + if (tags[idx_] != kFreeSlot && (AppendOnly || tags[idx_] != kTombstone)) + return; + } + idx_ = kEnd; + } + + const FlatHashMap* map_ = nullptr; + size_t idx_ = 0; + }; // Iterator + + static constexpr int kDefaultLoadLimitPct = 75; + explicit FlatHashMap(size_t initial_capacity = 0, + int load_limit_pct = kDefaultLoadLimitPct) + : load_limit_percent_(load_limit_pct) { + if (initial_capacity > 0) + Reset(initial_capacity); + } + + // We are calling Clear() so that the destructors for the inserted entries are + // called (unless they are trivial, in which case it will be a no-op). + ~FlatHashMap() { Clear(); } + + FlatHashMap(FlatHashMap&& other) noexcept { + tags_ = std::move(other.tags_); + keys_ = std::move(other.keys_); + values_ = std::move(other.values_); + capacity_ = other.capacity_; + size_ = other.size_; + max_probe_length_ = other.max_probe_length_; + load_limit_ = other.load_limit_; + load_limit_percent_ = other.load_limit_percent_; + + new (&other) FlatHashMap(); + } + + FlatHashMap& operator=(FlatHashMap&& other) noexcept { + this->~FlatHashMap(); + new (this) FlatHashMap(std::move(other)); + return *this; + } + + FlatHashMap(const FlatHashMap&) = delete; + FlatHashMap& operator=(const FlatHashMap&) = delete; + + std::pair Insert(Key key, Value value) { + const size_t key_hash = Hasher{}(key); + const uint8_t tag = HashToTag(key_hash); + static constexpr size_t kSlotNotFound = std::numeric_limits::max(); + + // This for loop does in reality at most two attempts: + // The first iteration either: + // - Early-returns, because the key exists already, + // - Finds an insertion slot and proceeds because the load is < limit. + // The second iteration is only hit in the unlikely case of this insertion + // bringing the table beyond the target |load_limit_| (or the edge case + // of the HT being full, if |load_limit_pct_| = 100). + // We cannot simply pre-grow the table before insertion, because we must + // guarantee that calling Insert() with a key that already exists doesn't + // invalidate iterators. + size_t insertion_slot; + size_t probe_len; + for (;;) { + PERFETTO_DCHECK((capacity_ & (capacity_ - 1)) == 0); // Must be a pow2. + insertion_slot = kSlotNotFound; + // Start the iteration at the desired slot (key_hash % capacity_) + // searching either for a free slot or a tombstone. In the worst case we + // might end up scanning the whole array of slots. The Probe functions are + // guaranteed to visit all the slots within |capacity_| steps. If we find + // a free slot, we can stop the search immediately (a free slot acts as an + // "end of chain for entries having the same hash". If we find a + // tombstones (a deleted slot) we remember its position, but have to keep + // searching until a free slot to make sure we don't insert a duplicate + // key. + for (probe_len = 0; probe_len < capacity_;) { + const size_t idx = Probe::Calc(key_hash, probe_len, capacity_); + PERFETTO_DCHECK(idx < capacity_); + const uint8_t tag_idx = tags_[idx]; + ++probe_len; + if (tag_idx == kFreeSlot) { + // Rationale for "insertion_slot == kSlotNotFound": if we encountered + // a tombstone while iterating we should reuse that rather than + // taking another slot. + if (AppendOnly || insertion_slot == kSlotNotFound) + insertion_slot = idx; + break; + } + // We should never encounter tombstones in AppendOnly mode. + PERFETTO_DCHECK(!(tag_idx == kTombstone && AppendOnly)); + if (!AppendOnly && tag_idx == kTombstone) { + insertion_slot = idx; + continue; + } + if (tag_idx == tag && keys_[idx] == key) { + // The key is already in the map. + return std::make_pair(&values_[idx], false); + } + } // for (idx) + + // If we got to this point the key does not exist (otherwise we would have + // hit the return above) and we are going to insert a new entry. + // Before doing so, ensure we stay under the target load limit. + if (PERFETTO_UNLIKELY(size_ >= load_limit_)) { + MaybeGrowAndRehash(/*grow=*/true); + continue; + } + PERFETTO_DCHECK(insertion_slot != kSlotNotFound); + break; + } // for (attempt) + + PERFETTO_CHECK(insertion_slot < capacity_); + + // We found a free slot (or a tombstone). Proceed with the insertion. + Value* value_idx = &values_[insertion_slot]; + new (&keys_[insertion_slot]) Key(std::move(key)); + new (value_idx) Value(std::move(value)); + tags_[insertion_slot] = tag; + PERFETTO_DCHECK(probe_len > 0 && probe_len <= capacity_); + max_probe_length_ = std::max(max_probe_length_, probe_len); + size_++; + + return std::make_pair(value_idx, true); + } + + Value* Find(const Key& key) const { + const size_t idx = FindInternal(key); + if (idx == kNotFound) + return nullptr; + return &values_[idx]; + } + + bool Erase(const Key& key) { + if (AppendOnly) + PERFETTO_FATAL("Erase() not supported because AppendOnly=true"); + size_t idx = FindInternal(key); + if (idx == kNotFound) + return false; + EraseInternal(idx); + return true; + } + + void Clear() { + // Avoid trivial heap operations on zero-capacity std::move()-d objects. + if (PERFETTO_UNLIKELY(capacity_ == 0)) + return; + + for (size_t i = 0; i < capacity_; ++i) { + const uint8_t tag = tags_[i]; + if (tag != kFreeSlot && tag != kTombstone) + EraseInternal(i); + } + // Clear all tombstones. We really need to do this for AppendOnly. + MaybeGrowAndRehash(/*grow=*/false); + } + + Value& operator[](Key key) { + auto it_and_inserted = Insert(std::move(key), Value{}); + return *it_and_inserted.first; + } + + Iterator GetIterator() { return Iterator(this); } + const Iterator GetIterator() const { return Iterator(this); } + + size_t size() const { return size_; } + size_t capacity() const { return capacity_; } + + // "protected" here is only for the flat_hash_map_benchmark.cc. Everything + // below is by all means private. + protected: + enum ReservedTags : uint8_t { kFreeSlot = 0, kTombstone = 1 }; + static constexpr size_t kNotFound = std::numeric_limits::max(); + + size_t FindInternal(const Key& key) const { + const size_t key_hash = Hasher{}(key); + const uint8_t tag = HashToTag(key_hash); + PERFETTO_DCHECK((capacity_ & (capacity_ - 1)) == 0); // Must be a pow2. + PERFETTO_DCHECK(max_probe_length_ <= capacity_); + for (size_t i = 0; i < max_probe_length_; ++i) { + const size_t idx = Probe::Calc(key_hash, i, capacity_); + const uint8_t tag_idx = tags_[idx]; + + if (tag_idx == kFreeSlot) + return kNotFound; + // HashToTag() never returns kTombstone, so the tag-check below cannot + // possibly match. Also we just want to skip tombstones. + if (tag_idx == tag && keys_[idx] == key) { + PERFETTO_DCHECK(tag_idx > kTombstone); + return idx; + } + } // for (idx) + return kNotFound; + } + + void EraseInternal(size_t idx) { + PERFETTO_DCHECK(tags_[idx] > kTombstone); + PERFETTO_DCHECK(size_ > 0); + tags_[idx] = kTombstone; + keys_[idx].~Key(); + values_[idx].~Value(); + size_--; + } + + PERFETTO_NO_INLINE void MaybeGrowAndRehash(bool grow) { + PERFETTO_DCHECK(size_ <= capacity_); + const size_t old_capacity = capacity_; + + // Grow quickly up to 1MB, then chill. + const size_t old_size_bytes = old_capacity * (sizeof(Key) + sizeof(Value)); + const size_t grow_factor = old_size_bytes < (1024u * 1024u) ? 8 : 2; + const size_t new_capacity = + grow ? std::max(old_capacity * grow_factor, size_t(1024)) + : old_capacity; + + auto old_tags(std::move(tags_)); + auto old_keys(std::move(keys_)); + auto old_values(std::move(values_)); + size_t old_size = size_; + + // This must be a CHECK (i.e. not just a DCHECK) to prevent UAF attacks on + // 32-bit archs that try to double the size of the table until wrapping. + PERFETTO_CHECK(new_capacity >= old_capacity); + Reset(new_capacity); + + size_t new_size = 0; // Recompute the size. + for (size_t i = 0; i < old_capacity; ++i) { + const uint8_t old_tag = old_tags[i]; + if (old_tag != kFreeSlot && old_tag != kTombstone) { + Insert(std::move(old_keys[i]), std::move(old_values[i])); + old_keys[i].~Key(); // Destroy the old objects. + old_values[i].~Value(); + new_size++; + } + } + PERFETTO_DCHECK(new_size == old_size); + size_ = new_size; + } + + // Doesn't call destructors. Use Clear() for that. + PERFETTO_NO_INLINE void Reset(size_t n) { + PERFETTO_DCHECK((n & (n - 1)) == 0); // Must be a pow2. + + capacity_ = n; + max_probe_length_ = 0; + size_ = 0; + load_limit_ = n * static_cast(load_limit_percent_) / 100; + load_limit_ = std::min(load_limit_, n); + + tags_.reset(new uint8_t[n]); + memset(&tags_[0], 0, n); // Clear all tags. + keys_ = AlignedAllocTyped(n); // Deliberately not 0-initialized. + values_ = AlignedAllocTyped(n); // Deliberately not 0-initialized. + } + + static inline uint8_t HashToTag(size_t full_hash) { + uint8_t tag = full_hash >> (sizeof(full_hash) * 8 - 8); + // Ensure the hash is always >= 2. We use 0, 1 for kFreeSlot and kTombstone. + tag += (tag <= kTombstone) << 1; + PERFETTO_DCHECK(tag > kTombstone); + return tag; + } + + size_t capacity_ = 0; + size_t size_ = 0; + size_t max_probe_length_ = 0; + size_t load_limit_ = 0; // Updated every time |capacity_| changes. + int load_limit_percent_ = + kDefaultLoadLimitPct; // Load factor limit in % of |capacity_|. + + // These arrays have always the |capacity_| elements. + // Note: AlignedUniquePtr just allocates memory, doesn't invoke any ctor/dtor. + std::unique_ptr tags_; + AlignedUniquePtr keys_; + AlignedUniquePtr values_; +}; + +} // namespace base +} // namespace perfetto + +#endif // INCLUDE_PERFETTO_EXT_BASE_FLAT_HASH_MAP_H_ +// gen_amalgamated begin header: src/tracing/core/histogram.h +/* + * Copyright (C) 2023 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef SRC_TRACING_CORE_HISTOGRAM_H_ +#define SRC_TRACING_CORE_HISTOGRAM_H_ + +#include +#include + +#include + +// gen_amalgamated expanded: #include "perfetto/base/logging.h" + +namespace perfetto { + +using HistValue = int64_t; + +// Usage: +// Histogram<10, 100, 1000> h; // A histogram with 3 + 1 (overflow) bucket. +// h.Add(value); +// h.GetBucketSum(0); // Returns SUM(x) for 0 < x <= 10 +// h.GetBucketSum(1); // Returns SUM(x) for 10 < x <= 100 +// h.GetBucketSum(2); // Returns SUM(x) for 100 < x <= 1000 +// h.GetBucketSum(3); // Returns SUM(x) for x > 1000 +// Likewise h.GetBucketCount(x) returns the COUNT(x). +template +class Histogram { + public: + // 1+ is for the overflow bucket (anything > the last threshold). + static constexpr size_t kNumBuckets = 1 + sizeof...(thresholds); + + void Add(HistValue value) { + size_t bucket = BucketForValue(value); + bucket_sum_[bucket] += value; + ++bucket_count_[bucket]; + } + + static constexpr size_t num_buckets() { return kNumBuckets; } + + HistValue GetBucketThres(size_t n) const { + PERFETTO_DCHECK(n < kNumBuckets); + return bucket_thres_[n]; + } + + uint64_t GetBucketCount(size_t n) const { + PERFETTO_DCHECK(n < kNumBuckets); + return bucket_count_[n]; + } + + HistValue GetBucketSum(size_t n) const { + PERFETTO_DCHECK(n < kNumBuckets); + return bucket_sum_[n]; + } + + void Merge(const Histogram& other) { + for (size_t i = 0; i < kNumBuckets; ++i) { + bucket_sum_[i] += other.bucket_sum_[i]; + bucket_count_[i] += other.bucket_count_[i]; + } + } + + private: + static size_t BucketForValue(HistValue value) { + for (size_t i = 0; i < kNumBuckets - 1; i++) { + if (value <= bucket_thres_[i]) + return i; + } + return kNumBuckets - 1; + } + + static constexpr HistValue bucket_thres_[kNumBuckets]{ + thresholds..., std::numeric_limits::max()}; + + HistValue bucket_sum_[kNumBuckets]{}; + uint64_t bucket_count_[kNumBuckets]{}; +}; + +} // namespace perfetto + +#endif // SRC_TRACING_CORE_HISTOGRAM_H_ /* * Copyright (C) 2018 The Android Open Source Project * @@ -48402,12 +54053,14 @@ bool PacketStreamValidator::Validate(const Slices& slices) { #include // gen_amalgamated expanded: #include "perfetto/base/logging.h" +// gen_amalgamated expanded: #include "perfetto/ext/base/flat_hash_map.h" // gen_amalgamated expanded: #include "perfetto/ext/base/paged_memory.h" // gen_amalgamated expanded: #include "perfetto/ext/base/thread_annotations.h" // gen_amalgamated expanded: #include "perfetto/ext/base/utils.h" // gen_amalgamated expanded: #include "perfetto/ext/tracing/core/basic_types.h" // gen_amalgamated expanded: #include "perfetto/ext/tracing/core/slice.h" // gen_amalgamated expanded: #include "perfetto/ext/tracing/core/trace_stats.h" +// gen_amalgamated expanded: #include "src/tracing/core/histogram.h" namespace perfetto { @@ -48538,6 +54191,18 @@ class TraceBuffer { WriterID writer_id; }; + // Holds the "used chunk" stats for each tuple. + struct WriterStats { + Histogram<8, 32, 128, 512, 1024, 2048, 4096, 8192, 12288, 16384> + used_chunk_hist; + }; + + using WriterStatsMap = base::FlatHashMap, + base::QuadraticProbe, + /*AppendOnly=*/true>; + // Can return nullptr if the memory allocation fails. static std::unique_ptr Create(size_t size_in_bytes, OverwritePolicy = kOverwrite); @@ -48637,6 +54302,13 @@ class TraceBuffer { PacketSequenceProperties* sequence_properties, bool* previous_packet_on_sequence_dropped); + // Creates a read-only clone of the trace buffer. The read iterators of the + // new buffer will be reset, as if no Read() had been called. Calls to + // CopyChunkUntrusted() and TryPatchChunkContents() on the returned cloned + // TraceBuffer will CHECK(). + std::unique_ptr CloneReadOnly() const; + + const WriterStatsMap& writer_stats() const { return writer_stats_; } const TraceStats::BufferStats& stats() const { return stats_; } size_t size() const { return size_; } @@ -48716,6 +54388,9 @@ class TraceBuffer { Key(ProducerID p, WriterID w, ChunkID c) : producer_id{p}, writer_id{w}, chunk_id{c} {} + Key(const Key&) noexcept = default; + Key& operator=(const Key&) = default; + explicit Key(const ChunkRecord& cr) : Key(cr.producer_id, cr.writer_id, cr.chunk_id) {} @@ -48755,21 +54430,23 @@ class TraceBuffer { kLastReadPacketSkipped = 1 << 1 }; - ChunkMeta(ChunkRecord* r, - uint16_t p, + ChunkMeta(uint32_t _record_off, + uint16_t _num_fragments, bool complete, - uint8_t f, - uid_t u, - pid_t pid) - : chunk_record{r}, - trusted_uid{u}, - trusted_pid(pid), - flags{f}, - num_fragments{p} { + uint8_t _flags, + uid_t _trusted_uid, + pid_t _trusted_pid) + : record_off{_record_off}, + trusted_uid{_trusted_uid}, + trusted_pid(_trusted_pid), + flags{_flags}, + num_fragments{_num_fragments} { if (complete) index_flags = kComplete; } + ChunkMeta(const ChunkMeta&) noexcept = default; + bool is_complete() const { return index_flags & kComplete; } void set_complete(bool complete) { @@ -48792,9 +54469,9 @@ class TraceBuffer { } } - ChunkRecord* const chunk_record; // Addr of ChunkRecord within |data_|. - const uid_t trusted_uid; // uid of the producer. - const pid_t trusted_pid; // pid of the producer. + const uint32_t record_off; // Offset of ChunkRecord within |data_|. + const uid_t trusted_uid; // uid of the producer. + const pid_t trusted_pid; // pid of the producer. // Flags set by TraceBuffer to track the state of the chunk in the index. uint8_t index_flags = 0; @@ -48889,6 +54566,11 @@ class TraceBuffer { TraceBuffer(const TraceBuffer&) = delete; TraceBuffer& operator=(const TraceBuffer&) = delete; + // Not using the implicit copy ctor to avoid unintended copies. + // This tagged ctor should be used only for Clone(). + struct CloneCtor {}; + TraceBuffer(CloneCtor, const TraceBuffer&); + bool Initialize(size_t size); // Returns an object that allows to iterate over chunks in the |index_| that @@ -48941,7 +54623,9 @@ class TraceBuffer { // TracePacket can be nullptr, in which case the read state is still advanced. // When TracePacket is not nullptr, ProducerID must also be not null and will // be updated with the ProducerID that originally wrote the chunk. - ReadPacketResult ReadNextPacketInChunk(ChunkMeta*, TracePacket*); + ReadPacketResult ReadNextPacketInChunk(ProducerAndWriterID, + ChunkMeta*, + TracePacket*); void DcheckIsAlignedAndWithinBounds(const uint8_t* ptr) const { PERFETTO_DCHECK(ptr >= begin() && ptr <= end() - sizeof(ChunkRecord)); @@ -49002,6 +54686,13 @@ class TraceBuffer { memset(wptr + sizeof(record) + size, 0, rounding_size); } + uint32_t GetOffset(const void* _addr) { + const uintptr_t addr = reinterpret_cast(_addr); + const uintptr_t buf_start = reinterpret_cast(begin()); + PERFETTO_DCHECK(addr >= buf_start && addr < buf_start + size_); + return static_cast(addr - buf_start); + } + uint8_t* begin() const { return reinterpret_cast(data_.Get()); } uint8_t* end() const { return begin() + size_; } size_t size_to_end() const { return static_cast(end() - wptr_); } @@ -49022,6 +54713,10 @@ class TraceBuffer { // See comments at the top of the file. OverwritePolicy overwrite_policy_ = kOverwrite; + // This buffer is a read-only snapshot obtained via Clone(). If this is true + // calls to CopyChunkUntrusted() and TryPatchChunkContents() will CHECK(). + bool read_only_ = false; + // Only used when |overwrite_policy_ == kDiscard|. This is set the first time // a write fails because it would overwrite unread chunks. bool discard_writes_ = false; @@ -49038,6 +54733,9 @@ class TraceBuffer { // Statistics about buffer usage. TraceStats::BufferStats stats_; + // Per-{Producer, Writer} statistics. + WriterStatsMap writer_stats_; + #if PERFETTO_DCHECK_IS_ON() bool changed_since_last_read_ = false; #endif @@ -49095,8 +54793,7 @@ constexpr uint8_t kChunkNeedsPatching = SharedMemoryABI::ChunkHeader::kChunkNeedsPatching; } // namespace. -constexpr size_t TraceBuffer::ChunkRecord::kMaxSize; -constexpr size_t TraceBuffer::InlineChunkHeaderSize = sizeof(ChunkRecord); +const size_t TraceBuffer::InlineChunkHeaderSize = sizeof(ChunkRecord); // static std::unique_ptr TraceBuffer::Create(size_t size_in_bytes, @@ -49120,6 +54817,8 @@ bool TraceBuffer::Initialize(size_t size) { static_assert( SharedMemoryABI::kMinPageSize % sizeof(ChunkRecord) == 0, "sizeof(ChunkRecord) must be an integer divider of a page size"); + auto max_size = std::numeric_limits::max(); + PERFETTO_CHECK(size <= static_cast(max_size)); data_ = base::PagedMemory::Allocate( size, base::PagedMemory::kMayFail | base::PagedMemory::kDontCommit); if (!data_.IsValid()) { @@ -49149,18 +54848,19 @@ void TraceBuffer::CopyChunkUntrusted(ProducerID producer_id_trusted, bool chunk_complete, const uint8_t* src, size_t size) { + PERFETTO_CHECK(!read_only_); + // |record_size| = |size| + sizeof(ChunkRecord), rounded up to avoid to end // up in a fragmented state where size_to_end() < sizeof(ChunkRecord). const size_t record_size = base::AlignUp(size + sizeof(ChunkRecord)); + TRACE_BUFFER_DLOG("CopyChunk @ %" PRIdPTR ", size=%zu", wptr_ - begin(), record_size); if (PERFETTO_UNLIKELY(record_size > max_chunk_size_)) { stats_.set_abi_violations(stats_.abi_violations() + 1); PERFETTO_DCHECK(suppress_client_dchecks_for_testing_); return; } - TRACE_BUFFER_DLOG("CopyChunk @ %lu, size=%zu", wptr_ - begin(), record_size); - #if PERFETTO_DCHECK_IS_ON() changed_since_last_read_ = true; #endif @@ -49195,7 +54895,7 @@ void TraceBuffer::CopyChunkUntrusted(ProducerID producer_id_trusted, const auto it = index_.find(key); if (PERFETTO_UNLIKELY(it != index_.end())) { ChunkMeta* record_meta = &it->second; - ChunkRecord* prev = record_meta->chunk_record; + ChunkRecord* prev = GetChunkRecordAt(begin() + record_meta->record_off); // Verify that the old chunk's metadata corresponds to the new one. // Overridden chunks should never change size, since the page layout is @@ -49247,7 +54947,7 @@ void TraceBuffer::CopyChunkUntrusted(ProducerID producer_id_trusted, } uint8_t* wptr = reinterpret_cast(prev); - TRACE_BUFFER_DLOG(" overriding chunk @ %lu, size=%zu", wptr - begin(), + TRACE_BUFFER_DLOG(" overriding chunk @ %" PRIdPTR ", size=%zu", wptr - begin(), record_size); // Update chunk meta data stored in the index, as it may have changed. @@ -49256,7 +54956,7 @@ void TraceBuffer::CopyChunkUntrusted(ProducerID producer_id_trusted, record_meta->set_complete(chunk_complete); // Override the ChunkRecord contents at the original |wptr|. - TRACE_BUFFER_DLOG(" copying @ [%lu - %lu] %zu", wptr - begin(), + TRACE_BUFFER_DLOG(" copying @ [%" PRIdPTR " - %" PRIdPTR "] %zu", wptr - begin(), uintptr_t(wptr - begin()) + record_size, record_size); WriteChunkRecord(wptr, record, src, size); TRACE_BUFFER_DLOG("Chunk raw: %s", @@ -49310,11 +55010,13 @@ void TraceBuffer::CopyChunkUntrusted(ProducerID producer_id_trusted, // Now first insert the new chunk. At the end, if necessary, add the padding. stats_.set_chunks_written(stats_.chunks_written() + 1); stats_.set_bytes_written(stats_.bytes_written() + record_size); + + uint32_t chunk_off = GetOffset(GetChunkRecordAt(wptr_)); auto it_and_inserted = index_.emplace( - key, ChunkMeta(GetChunkRecordAt(wptr_), num_fragments, chunk_complete, - chunk_flags, producer_uid_trusted, producer_pid_trusted)); + key, ChunkMeta(chunk_off, num_fragments, chunk_complete, chunk_flags, + producer_uid_trusted, producer_pid_trusted)); PERFETTO_DCHECK(it_and_inserted.second); - TRACE_BUFFER_DLOG(" copying @ [%lu - %lu] %zu", wptr_ - begin(), + TRACE_BUFFER_DLOG(" copying @ [%" PRIdPTR " - %" PRIdPTR "] %zu", wptr_ - begin(), uintptr_t(wptr_ - begin()) + record_size, record_size); WriteChunkRecord(wptr_, record, src, size); TRACE_BUFFER_DLOG("Chunk raw: %s", base::HexDump(wptr_, record_size).c_str()); @@ -49404,7 +55106,7 @@ ssize_t TraceBuffer::DeleteNextChunksFor(size_t bytes_to_clear) { will_remove = true; } TRACE_BUFFER_DLOG( - " del index {%" PRIu32 ",%" PRIu32 ",%u} @ [%lu - %lu] %d", + " del index {%" PRIu32 ",%" PRIu32 ",%u} @ [%" PRIdPTR " - %" PRIdPTR "] %d", key.producer_id, key.writer_id, key.chunk_id, next_chunk_ptr - begin(), next_chunk_ptr - begin() + next_chunk.size, will_remove); @@ -49438,7 +55140,7 @@ void TraceBuffer::AddPaddingRecord(size_t size) { PERFETTO_DCHECK(size >= sizeof(ChunkRecord) && size <= ChunkRecord::kMaxSize); ChunkRecord record(size); record.is_padding = 1; - TRACE_BUFFER_DLOG("AddPaddingRecord @ [%lu - %lu] %zu", wptr_ - begin(), + TRACE_BUFFER_DLOG("AddPaddingRecord @ [%" PRIdPTR " - %" PRIdPTR "] %zu", wptr_ - begin(), uintptr_t(wptr_ - begin()) + size, size); WriteChunkRecord(wptr_, record, nullptr, size - sizeof(ChunkRecord)); stats_.set_padding_bytes_written(stats_.padding_bytes_written() + size); @@ -49451,6 +55153,7 @@ bool TraceBuffer::TryPatchChunkContents(ProducerID producer_id, const Patch* patches, size_t patches_size, bool other_patches_pending) { + PERFETTO_CHECK(!read_only_); ChunkMeta::Key key(producer_id, writer_id, chunk_id); auto it = index_.find(key); if (it == index_.end()) { @@ -49461,10 +55164,12 @@ bool TraceBuffer::TryPatchChunkContents(ProducerID producer_id, // Check that the index is consistent with the actual ProducerID/WriterID // stored in the ChunkRecord. - PERFETTO_DCHECK(ChunkMeta::Key(*chunk_meta.chunk_record) == key); - uint8_t* chunk_begin = reinterpret_cast(chunk_meta.chunk_record); + + ChunkRecord* chunk_record = GetChunkRecordAt(begin() + chunk_meta.record_off); + PERFETTO_DCHECK(ChunkMeta::Key(*chunk_record) == key); + uint8_t* chunk_begin = reinterpret_cast(chunk_record); PERFETTO_DCHECK(chunk_begin >= begin()); - uint8_t* chunk_end = chunk_begin + chunk_meta.chunk_record->size; + uint8_t* chunk_end = chunk_begin + chunk_record->size; PERFETTO_DCHECK(chunk_end <= end()); static_assert(Patch::kSize == SharedMemoryABI::kPacketHeaderSize, @@ -49490,14 +55195,13 @@ bool TraceBuffer::TryPatchChunkContents(ProducerID producer_id, memcpy(ptr, &patches[i].data[0], Patch::kSize); } - TRACE_BUFFER_DLOG( - "Chunk raw (after patch): %s", - base::HexDump(chunk_begin, chunk_meta.chunk_record->size).c_str()); + TRACE_BUFFER_DLOG("Chunk raw (after patch): %s", + base::HexDump(chunk_begin, chunk_record->size).c_str()); stats_.set_patches_succeeded(stats_.patches_succeeded() + patches_size); if (!other_patches_pending) { chunk_meta.flags &= ~kChunkNeedsPatching; - chunk_meta.chunk_record->flags = chunk_meta.flags; + chunk_record->flags = chunk_meta.flags; } return true; } @@ -49628,6 +55332,8 @@ bool TraceBuffer::ReadNextTracePacket( const ProducerID trusted_producer_id = read_iter_.producer_id(); const WriterID writer_id = read_iter_.writer_id(); + const ProducerAndWriterID producer_and_writer_id = + MkProducerAndWriterID(trusted_producer_id, writer_id); const uid_t trusted_uid = chunk_meta->trusted_uid; const pid_t trusted_pid = chunk_meta->trusted_pid; @@ -49692,7 +55398,7 @@ bool TraceBuffer::ReadNextTracePacket( // iteration. This happens by virtue of ReadNextPacketInChunk() // incrementing the |num_fragments_read| and marking the fragment as // read even if we didn't really. - ReadNextPacketInChunk(chunk_meta, nullptr); + ReadNextPacketInChunk(producer_and_writer_id, chunk_meta, nullptr); chunk_meta->set_last_read_packet_skipped(true); previous_packet_dropped = true; continue; @@ -49700,7 +55406,8 @@ bool TraceBuffer::ReadNextTracePacket( if (action == kReadOnePacket) { // The easy peasy case B. - ReadPacketResult result = ReadNextPacketInChunk(chunk_meta, packet); + ReadPacketResult result = + ReadNextPacketInChunk(producer_and_writer_id, chunk_meta, packet); if (PERFETTO_LIKELY(result == ReadPacketResult::kSucceeded)) { *sequence_properties = {trusted_producer_id, trusted_uid, trusted_pid, @@ -49821,8 +55528,10 @@ TraceBuffer::ReadAheadResult TraceBuffer::ReadAhead(TracePacket* packet) { // In the unlikely case of a corrupted packet (corrupted or empty // fragment), invalidate the all stitching and move on to the next chunk // in the same sequence, if any. - packet_corruption |= ReadNextPacketInChunk(&*read_iter_, packet) == - ReadPacketResult::kFailedInvalidPacket; + auto pw_id = MkProducerAndWriterID(it.producer_id(), it.writer_id()); + packet_corruption |= + ReadNextPacketInChunk(pw_id, &*read_iter_, packet) == + ReadPacketResult::kFailedInvalidPacket; } if (read_iter_.cur == it.cur) break; @@ -49842,14 +55551,16 @@ TraceBuffer::ReadAheadResult TraceBuffer::ReadAhead(TracePacket* packet) { } TraceBuffer::ReadPacketResult TraceBuffer::ReadNextPacketInChunk( - ChunkMeta* chunk_meta, + ProducerAndWriterID producer_and_writer_id, + ChunkMeta* const chunk_meta, TracePacket* packet) { PERFETTO_DCHECK(chunk_meta->num_fragments_read < chunk_meta->num_fragments); PERFETTO_DCHECK(!(chunk_meta->flags & kChunkNeedsPatching)); - const uint8_t* record_begin = - reinterpret_cast(chunk_meta->chunk_record); - const uint8_t* record_end = record_begin + chunk_meta->chunk_record->size; + const uint8_t* record_begin = begin() + chunk_meta->record_off; + DcheckIsAlignedAndWithinBounds(record_begin); + auto* chunk_record = reinterpret_cast(record_begin); + const uint8_t* record_end = record_begin + chunk_record->size; const uint8_t* packets_begin = record_begin + sizeof(ChunkRecord); const uint8_t* packet_begin = packets_begin + chunk_meta->cur_fragment_offset; @@ -49863,8 +55574,7 @@ TraceBuffer::ReadPacketResult TraceBuffer::ReadNextPacketInChunk( chunk_meta->num_fragments_read = chunk_meta->num_fragments; if (PERFETTO_LIKELY(chunk_meta->is_complete())) { stats_.set_chunks_read(stats_.chunks_read() + 1); - stats_.set_bytes_read(stats_.bytes_read() + - chunk_meta->chunk_record->size); + stats_.set_bytes_read(stats_.bytes_read() + chunk_record->size); } return ReadPacketResult::kFailedInvalidPacket; } @@ -49897,8 +55607,7 @@ TraceBuffer::ReadPacketResult TraceBuffer::ReadNextPacketInChunk( chunk_meta->num_fragments_read = chunk_meta->num_fragments; if (PERFETTO_LIKELY(chunk_meta->is_complete())) { stats_.set_chunks_read(stats_.chunks_read() + 1); - stats_.set_bytes_read(stats_.bytes_read() + - chunk_meta->chunk_record->size); + stats_.set_bytes_read(stats_.bytes_read() + chunk_record->size); } return ReadPacketResult::kFailedInvalidPacket; } @@ -49911,11 +55620,13 @@ TraceBuffer::ReadPacketResult TraceBuffer::ReadNextPacketInChunk( chunk_meta->num_fragments && chunk_meta->is_complete())) { stats_.set_chunks_read(stats_.chunks_read() + 1); - stats_.set_bytes_read(stats_.bytes_read() + chunk_meta->chunk_record->size); + stats_.set_bytes_read(stats_.bytes_read() + chunk_record->size); + auto* writer_stats = writer_stats_.Insert(producer_and_writer_id, {}).first; + writer_stats->used_chunk_hist.Add(chunk_meta->cur_fragment_offset); } else { // We have at least one more packet to parse. It should be within the chunk. if (chunk_meta->cur_fragment_offset + sizeof(ChunkRecord) >= - chunk_meta->chunk_record->size) { + chunk_record->size) { PERFETTO_DCHECK(suppress_client_dchecks_for_testing_); } } @@ -49938,6 +55649,43 @@ void TraceBuffer::DiscardWrite() { TRACE_BUFFER_DLOG(" discarding write"); } +std::unique_ptr TraceBuffer::CloneReadOnly() const { + std::unique_ptr buf(new TraceBuffer(CloneCtor(), *this)); + if (!buf->data_.IsValid()) + return nullptr; // PagedMemory::Allocate() failed. We are out of memory. + return buf; +} + +TraceBuffer::TraceBuffer(CloneCtor, const TraceBuffer& src) + : overwrite_policy_(src.overwrite_policy_), + read_only_(true), + discard_writes_(src.discard_writes_) { + if (!Initialize(src.data_.size())) + return; // TraceBuffer::Clone() will check |data_| and return nullptr. + + // The assignments below must be done after Initialize(). + + data_.EnsureCommitted(data_.size()); + memcpy(data_.Get(), src.data_.Get(), src.data_.size()); + last_chunk_id_written_ = src.last_chunk_id_written_; + + stats_ = src.stats_; + stats_.set_bytes_read(0); + stats_.set_chunks_read(0); + stats_.set_readaheads_failed(0); + stats_.set_readaheads_succeeded(0); + + // Copy the index of chunk metadata and reset the read states. + index_ = ChunkMap(src.index_); + for (auto& kv : index_) { + ChunkMeta& chunk_meta = kv.second; + chunk_meta.num_fragments_read = 0; + chunk_meta.cur_fragment_offset = 0; + chunk_meta.set_last_read_packet_skipped(false); + } + read_iter_ = SequenceIterator(); +} + } // namespace perfetto // gen_amalgamated begin source: src/tracing/core/tracing_service_impl.cc // gen_amalgamated begin header: src/tracing/core/tracing_service_impl.h @@ -49964,6 +55712,7 @@ void TraceBuffer::DiscardWrite() { #include #include +#include #include // gen_amalgamated expanded: #include "perfetto/base/logging.h" @@ -50135,6 +55884,19 @@ class CircularQueue { return *this; } + explicit CircularQueue(const CircularQueue& other) noexcept { + Grow(other.capacity()); + for (const auto& e : const_cast(other)) + emplace_back(e); + PERFETTO_DCHECK(size() == other.size()); + } + + CircularQueue& operator=(const CircularQueue& other) noexcept { + this->~CircularQueue(); // Destroy the current state. + new (this) CircularQueue(other); // Use the copy ctor above. + return *this; + } + ~CircularQueue() { if (!entries_) { PERFETTO_DCHECK(empty()); @@ -50165,6 +55927,16 @@ class CircularQueue { void clear() { erase_front(size()); } + void shrink_to_fit() { + // We only bother shrinking if we can fit in quarter of the capacity we are + // currently using. Moreover, don't bother shrinking below 4096 elements as + // that will cause a lot of reallocations for little benefit. + if (size() > capacity() / 2 || capacity() <= 4096) { + return; + } + ChangeCapacity(capacity() / 2); + } + T& at(size_t idx) { PERFETTO_DCHECK(idx < size()); return *Get(begin_ + idx); @@ -50193,9 +55965,6 @@ class CircularQueue { #endif private: - CircularQueue(const CircularQueue&) = delete; - CircularQueue& operator=(const CircularQueue&) = delete; - void Grow(size_t new_capacity = 0) { // Capacity must be always a power of two. This allows Get() to use a simple // bitwise-AND for handling the wrapping instead of a full division. @@ -50206,6 +55975,13 @@ class CircularQueue { // anything other than crash in this case. PERFETTO_CHECK(new_capacity > capacity_); + ChangeCapacity(new_capacity); + } + + void ChangeCapacity(size_t new_capacity) { + // We should still have enough space to fit all the elements in the queue. + PERFETTO_CHECK(new_capacity >= size()); + AlignedUniquePtr new_vec = AlignedAllocTyped(new_capacity); // Move all elements in the expanded array. @@ -50275,6 +56051,7 @@ class CircularQueue { #include #include #include +#include #include #include #include @@ -50284,8 +56061,8 @@ class CircularQueue { // gen_amalgamated expanded: #include "perfetto/base/status.h" // gen_amalgamated expanded: #include "perfetto/base/time.h" // gen_amalgamated expanded: #include "perfetto/ext/base/circular_queue.h" -// gen_amalgamated expanded: #include "perfetto/ext/base/optional.h" // gen_amalgamated expanded: #include "perfetto/ext/base/periodic_task.h" +// gen_amalgamated expanded: #include "perfetto/ext/base/uuid.h" // gen_amalgamated expanded: #include "perfetto/ext/base/weak_ptr.h" // gen_amalgamated expanded: #include "perfetto/ext/tracing/core/basic_types.h" // gen_amalgamated expanded: #include "perfetto/ext/tracing/core/commit_data_request.h" @@ -50329,8 +56106,6 @@ class TracingServiceImpl : public TracingService { struct DataSourceInstance; public: - static constexpr size_t kDefaultShmPageSize = 4096ul; - static constexpr size_t kDefaultShmSize = 256 * 1024ul; static constexpr size_t kMaxShmSize = 32 * 1024 * 1024ul; static constexpr uint32_t kDataSourceStopTimeoutMs = 5000; static constexpr uint8_t kSyncMarker[] = {0x82, 0x47, 0x7a, 0x76, 0xb2, 0x8d, @@ -50361,6 +56136,7 @@ class TracingServiceImpl : public TracingService { ~ProducerEndpointImpl() override; // TracingService::ProducerEndpoint implementation. + void Disconnect() override; void RegisterDataSource(const DataSourceDescriptor&) override; void UpdateDataSource(const DataSourceDescriptor&) override; void UnregisterDataSource(const std::string& name) override; @@ -50396,11 +56172,11 @@ class TracingServiceImpl : public TracingService { return allowed_target_buffers_.count(buffer_id); } - base::Optional buffer_id_for_writer(WriterID writer_id) const { + std::optional buffer_id_for_writer(WriterID writer_id) const { const auto it = writers_.find(writer_id); if (it != writers_.end()) return it->second; - return base::nullopt; + return std::nullopt; } uid_t uid() const { return uid_; } @@ -50478,12 +56254,17 @@ class TracingServiceImpl : public TracingService { void QueryServiceState(QueryServiceStateCallback) override; void QueryCapabilities(QueryCapabilitiesCallback) override; void SaveTraceForBugreport(SaveTraceForBugreportCallback) override; + void CloneSession(TracingSessionID) override; // Will queue a task to notify the consumer about the state change. void OnDataSourceInstanceStateChange(const ProducerEndpointImpl&, const DataSourceInstance&); void OnAllDataSourcesStarted(); + base::WeakPtr GetWeakPtr() { + return weak_ptr_factory_.GetWeakPtr(); + } + private: friend class TracingServiceImpl; ConsumerEndpointImpl(const ConsumerEndpointImpl&) = delete; @@ -50553,6 +56334,7 @@ class TracingServiceImpl : public TracingService { uint32_t timeout_ms, ConsumerEndpoint::FlushCallback); void FlushAndDisableTracing(TracingSessionID); + void FlushAndCloneSession(ConsumerEndpointImpl*, TracingSessionID); // Starts reading the internal tracing buffers from the tracing session `tsid` // and sends them to `*consumer` (which must be != nullptr). @@ -50675,7 +56457,8 @@ class TracingServiceImpl : public TracingService { DISABLED = 0, CONFIGURED, STARTED, - DISABLING_WAITING_STOP_ACKS + DISABLING_WAITING_STOP_ACKS, + CLONED_READ_ONLY, }; TracingSession(TracingSessionID, @@ -50878,21 +56661,32 @@ class TracingServiceImpl : public TracingService { uint64_t max_file_size_bytes = 0; uint64_t bytes_written_into_file = 0; - // Set when using SaveTraceForBugreport(). This callback will be called - // when the tracing session ends and the data has been saved into the file. - std::function on_disable_callback_for_bugreport; - bool seized_for_bugreport = false; - // Periodic task for snapshotting service events (e.g. clocks, sync markers // etc) base::PeriodicTask snapshot_periodic_task; + // Deferred task that stops the trace when |duration_ms| expires. This is + // to handle the case of |prefer_suspend_clock_for_duration| which cannot + // use PostDelayedTask. + base::PeriodicTask timed_stop_task; + // When non-NULL the packets should be post-processed using the filter. std::unique_ptr trace_filter; uint64_t filter_input_packets = 0; uint64_t filter_input_bytes = 0; uint64_t filter_output_bytes = 0; uint64_t filter_errors = 0; + + // A randomly generated trace identifier. Note that this does NOT always + // match the requested TraceConfig.trace_uuid_msb/lsb. Spcifically, it does + // until a gap-less snapshot is requested. Each snapshot re-generates the + // uuid to avoid emitting two different traces with the same uuid. + base::Uuid trace_uuid; + + // NOTE: when adding new fields here consider whether that state should be + // copied over in DoCloneSession() or not. Ask yourself: is this a + // "runtime state" (e.g. active data sources) or a "trace (meta)data state"? + // If the latter, it should be handled by DoCloneSession()). }; TracingServiceImpl(const TracingServiceImpl&) = delete; @@ -50910,6 +56704,10 @@ class TracingServiceImpl : public TracingService { // session doesn't exists. TracingSession* GetTracingSession(TracingSessionID); + // Returns a pointer to the tracing session that has the highest + // TraceConfig.bugreport_score, if any, or nullptr. + TracingSession* FindTracingSessionWithMaxBugreportScore(); + // Returns a pointer to the |tracing_sessions_| entry, matching the given // uid and detach key, or nullptr if no such session exists. TracingSession* GetDetachedSession(uid_t, const std::string& key); @@ -50938,12 +56736,10 @@ class TracingServiceImpl : public TracingService { void EmitStats(TracingSession*, std::vector*); TraceStats GetTraceStats(TracingSession*); void EmitLifecycleEvents(TracingSession*, std::vector*); - void EmitSeizedForBugreportLifecycleEvent(std::vector*); - void MaybeEmitTraceConfig(TracingSession*, std::vector*); + void MaybeEmitUuidAndTraceConfig(TracingSession*, std::vector*); void MaybeEmitSystemInfo(TracingSession*, std::vector*); void MaybeEmitReceivedTriggers(TracingSession*, std::vector*); void MaybeNotifyAllDataSourcesStarted(TracingSession*); - bool MaybeSaveTraceForBugreport(std::function callback); void OnFlushTimeout(TracingSessionID, FlushRequestID); void OnDisableTracingTimeout(TracingSessionID); void DisableTracingNotifyConsumerAndFlushFile(TracingSession*); @@ -50954,6 +56750,9 @@ class TracingServiceImpl : public TracingService { void ScrapeSharedMemoryBuffers(TracingSession*, ProducerEndpointImpl*); void PeriodicClearIncrementalStateTask(TracingSessionID, bool post_next_only); TraceBuffer* GetBufferByID(BufferID); + base::Status DoCloneSession(ConsumerEndpointImpl*, + TracingSessionID, + bool final_flush_outcome); // Returns true if `*tracing_session` is waiting for a trigger that hasn't // happened. @@ -50983,6 +56782,7 @@ class TracingServiceImpl : public TracingService { std::vector packets); void OnStartTriggersTimeout(TracingSessionID tsid); void MaybeLogUploadEvent(const TraceConfig&, + const base::Uuid&, PerfettoStatsdAtom atom, const std::string& trigger_name = ""); void MaybeLogTriggerEvent(const TraceConfig&, @@ -50990,6 +56790,8 @@ class TracingServiceImpl : public TracingService { const std::string& trigger_name); size_t PurgeExpiredAndCountTriggerInWindow(int64_t now_ns, uint64_t trigger_name_hash); + static void StopOnDurationMsExpiry(base::WeakPtr, + TracingSessionID); base::TaskRunner* const task_runner_; std::unique_ptr shm_factory_; @@ -51090,24 +56892,52 @@ namespace pbzero { class TraceStats_BufferStats; class TraceStats_FilterStats; -enum TraceStats_FinalFlushOutcome : int32_t; +class TraceStats_WriterStats; +namespace perfetto_pbzero_enum_TraceStats { +enum FinalFlushOutcome : int32_t; +} // namespace perfetto_pbzero_enum_TraceStats +using TraceStats_FinalFlushOutcome = perfetto_pbzero_enum_TraceStats::FinalFlushOutcome; -enum TraceStats_FinalFlushOutcome : int32_t { - TraceStats_FinalFlushOutcome_FINAL_FLUSH_UNSPECIFIED = 0, - TraceStats_FinalFlushOutcome_FINAL_FLUSH_SUCCEEDED = 1, - TraceStats_FinalFlushOutcome_FINAL_FLUSH_FAILED = 2, +namespace perfetto_pbzero_enum_TraceStats { +enum FinalFlushOutcome : int32_t { + FINAL_FLUSH_UNSPECIFIED = 0, + FINAL_FLUSH_SUCCEEDED = 1, + FINAL_FLUSH_FAILED = 2, }; +} // namespace perfetto_pbzero_enum_TraceStats +using TraceStats_FinalFlushOutcome = perfetto_pbzero_enum_TraceStats::FinalFlushOutcome; -const TraceStats_FinalFlushOutcome TraceStats_FinalFlushOutcome_MIN = TraceStats_FinalFlushOutcome_FINAL_FLUSH_UNSPECIFIED; -const TraceStats_FinalFlushOutcome TraceStats_FinalFlushOutcome_MAX = TraceStats_FinalFlushOutcome_FINAL_FLUSH_FAILED; -class TraceStats_Decoder : public ::protozero::TypedProtoDecoder { +constexpr TraceStats_FinalFlushOutcome TraceStats_FinalFlushOutcome_MIN = TraceStats_FinalFlushOutcome::FINAL_FLUSH_UNSPECIFIED; +constexpr TraceStats_FinalFlushOutcome TraceStats_FinalFlushOutcome_MAX = TraceStats_FinalFlushOutcome::FINAL_FLUSH_FAILED; + + +PERFETTO_PROTOZERO_CONSTEXPR14_OR_INLINE +const char* TraceStats_FinalFlushOutcome_Name(::perfetto::protos::pbzero::TraceStats_FinalFlushOutcome value) { + switch (value) { + case ::perfetto::protos::pbzero::TraceStats_FinalFlushOutcome::FINAL_FLUSH_UNSPECIFIED: + return "FINAL_FLUSH_UNSPECIFIED"; + + case ::perfetto::protos::pbzero::TraceStats_FinalFlushOutcome::FINAL_FLUSH_SUCCEEDED: + return "FINAL_FLUSH_SUCCEEDED"; + + case ::perfetto::protos::pbzero::TraceStats_FinalFlushOutcome::FINAL_FLUSH_FAILED: + return "FINAL_FLUSH_FAILED"; + } + return "PBZERO_UNKNOWN_ENUM_VALUE"; +} + +class TraceStats_Decoder : public ::protozero::TypedProtoDecoder { public: TraceStats_Decoder(const uint8_t* data, size_t len) : TypedProtoDecoder(data, len) {} explicit TraceStats_Decoder(const std::string& raw) : TypedProtoDecoder(reinterpret_cast(raw.data()), raw.size()) {} explicit TraceStats_Decoder(const ::protozero::ConstBytes& raw) : TypedProtoDecoder(raw.data, raw.size) {} bool has_buffer_stats() const { return at<1>().valid(); } ::protozero::RepeatedFieldIterator<::protozero::ConstBytes> buffer_stats() const { return GetRepeated<::protozero::ConstBytes>(1); } + bool has_chunk_payload_histogram_def() const { return at<17>().valid(); } + ::protozero::RepeatedFieldIterator chunk_payload_histogram_def() const { return GetRepeated(17); } + bool has_writer_stats() const { return at<18>().valid(); } + ::protozero::RepeatedFieldIterator<::protozero::ConstBytes> writer_stats() const { return GetRepeated<::protozero::ConstBytes>(18); } bool has_producers_connected() const { return at<2>().valid(); } uint32_t producers_connected() const { return at<2>().as_uint32(); } bool has_producers_seen() const { return at<3>().valid(); } @@ -51143,6 +56973,8 @@ class TraceStats : public ::protozero::Message { using Decoder = TraceStats_Decoder; enum : int32_t { kBufferStatsFieldNumber = 1, + kChunkPayloadHistogramDefFieldNumber = 17, + kWriterStatsFieldNumber = 18, kProducersConnectedFieldNumber = 2, kProducersSeenFieldNumber = 3, kDataSourcesRegisteredFieldNumber = 4, @@ -51161,11 +56993,16 @@ class TraceStats : public ::protozero::Message { static constexpr const char* GetName() { return ".perfetto.protos.TraceStats"; } using BufferStats = ::perfetto::protos::pbzero::TraceStats_BufferStats; + using WriterStats = ::perfetto::protos::pbzero::TraceStats_WriterStats; using FilterStats = ::perfetto::protos::pbzero::TraceStats_FilterStats; + using FinalFlushOutcome = ::perfetto::protos::pbzero::TraceStats_FinalFlushOutcome; - static const FinalFlushOutcome FINAL_FLUSH_UNSPECIFIED = TraceStats_FinalFlushOutcome_FINAL_FLUSH_UNSPECIFIED; - static const FinalFlushOutcome FINAL_FLUSH_SUCCEEDED = TraceStats_FinalFlushOutcome_FINAL_FLUSH_SUCCEEDED; - static const FinalFlushOutcome FINAL_FLUSH_FAILED = TraceStats_FinalFlushOutcome_FINAL_FLUSH_FAILED; + static inline const char* FinalFlushOutcome_Name(FinalFlushOutcome value) { + return ::perfetto::protos::pbzero::TraceStats_FinalFlushOutcome_Name(value); + } + static const FinalFlushOutcome FINAL_FLUSH_UNSPECIFIED = FinalFlushOutcome::FINAL_FLUSH_UNSPECIFIED; + static const FinalFlushOutcome FINAL_FLUSH_SUCCEEDED = FinalFlushOutcome::FINAL_FLUSH_SUCCEEDED; + static const FinalFlushOutcome FINAL_FLUSH_FAILED = FinalFlushOutcome::FINAL_FLUSH_FAILED; using FieldMetadata_BufferStats = ::protozero::proto_utils::FieldMetadata< @@ -51175,19 +57012,44 @@ class TraceStats : public ::protozero::Message { TraceStats_BufferStats, TraceStats>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_BufferStats kBufferStats() { return {}; } + static constexpr FieldMetadata_BufferStats kBufferStats{}; template T* add_buffer_stats() { return BeginNestedMessage(1); } + using FieldMetadata_ChunkPayloadHistogramDef = + ::protozero::proto_utils::FieldMetadata< + 17, + ::protozero::proto_utils::RepetitionType::kRepeatedNotPacked, + ::protozero::proto_utils::ProtoSchemaType::kInt64, + int64_t, + TraceStats>; + + static constexpr FieldMetadata_ChunkPayloadHistogramDef kChunkPayloadHistogramDef{}; + void add_chunk_payload_histogram_def(int64_t value) { + static constexpr uint32_t field_id = FieldMetadata_ChunkPayloadHistogramDef::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kInt64> + ::Append(*this, field_id, value); + } + + using FieldMetadata_WriterStats = + ::protozero::proto_utils::FieldMetadata< + 18, + ::protozero::proto_utils::RepetitionType::kRepeatedNotPacked, + ::protozero::proto_utils::ProtoSchemaType::kMessage, + TraceStats_WriterStats, + TraceStats>; + + static constexpr FieldMetadata_WriterStats kWriterStats{}; + template T* add_writer_stats() { + return BeginNestedMessage(18); + } + + using FieldMetadata_ProducersConnected = ::protozero::proto_utils::FieldMetadata< 2, @@ -51196,14 +57058,7 @@ class TraceStats : public ::protozero::Message { uint32_t, TraceStats>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ProducersConnected kProducersConnected() { return {}; } + static constexpr FieldMetadata_ProducersConnected kProducersConnected{}; void set_producers_connected(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_ProducersConnected::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -51221,14 +57076,7 @@ class TraceStats : public ::protozero::Message { uint64_t, TraceStats>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ProducersSeen kProducersSeen() { return {}; } + static constexpr FieldMetadata_ProducersSeen kProducersSeen{}; void set_producers_seen(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_ProducersSeen::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -51246,14 +57094,7 @@ class TraceStats : public ::protozero::Message { uint32_t, TraceStats>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_DataSourcesRegistered kDataSourcesRegistered() { return {}; } + static constexpr FieldMetadata_DataSourcesRegistered kDataSourcesRegistered{}; void set_data_sources_registered(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_DataSourcesRegistered::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -51271,14 +57112,7 @@ class TraceStats : public ::protozero::Message { uint64_t, TraceStats>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_DataSourcesSeen kDataSourcesSeen() { return {}; } + static constexpr FieldMetadata_DataSourcesSeen kDataSourcesSeen{}; void set_data_sources_seen(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_DataSourcesSeen::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -51296,14 +57130,7 @@ class TraceStats : public ::protozero::Message { uint32_t, TraceStats>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_TracingSessions kTracingSessions() { return {}; } + static constexpr FieldMetadata_TracingSessions kTracingSessions{}; void set_tracing_sessions(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_TracingSessions::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -51321,14 +57148,7 @@ class TraceStats : public ::protozero::Message { uint32_t, TraceStats>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_TotalBuffers kTotalBuffers() { return {}; } + static constexpr FieldMetadata_TotalBuffers kTotalBuffers{}; void set_total_buffers(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_TotalBuffers::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -51346,14 +57166,7 @@ class TraceStats : public ::protozero::Message { uint64_t, TraceStats>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ChunksDiscarded kChunksDiscarded() { return {}; } + static constexpr FieldMetadata_ChunksDiscarded kChunksDiscarded{}; void set_chunks_discarded(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_ChunksDiscarded::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -51371,14 +57184,7 @@ class TraceStats : public ::protozero::Message { uint64_t, TraceStats>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_PatchesDiscarded kPatchesDiscarded() { return {}; } + static constexpr FieldMetadata_PatchesDiscarded kPatchesDiscarded{}; void set_patches_discarded(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_PatchesDiscarded::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -51396,14 +57202,7 @@ class TraceStats : public ::protozero::Message { uint64_t, TraceStats>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_InvalidPackets kInvalidPackets() { return {}; } + static constexpr FieldMetadata_InvalidPackets kInvalidPackets{}; void set_invalid_packets(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_InvalidPackets::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -51421,14 +57220,7 @@ class TraceStats : public ::protozero::Message { TraceStats_FilterStats, TraceStats>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_FilterStats kFilterStats() { return {}; } + static constexpr FieldMetadata_FilterStats kFilterStats{}; template T* set_filter_stats() { return BeginNestedMessage(11); } @@ -51442,14 +57234,7 @@ class TraceStats : public ::protozero::Message { uint64_t, TraceStats>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_FlushesRequested kFlushesRequested() { return {}; } + static constexpr FieldMetadata_FlushesRequested kFlushesRequested{}; void set_flushes_requested(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_FlushesRequested::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -51467,14 +57252,7 @@ class TraceStats : public ::protozero::Message { uint64_t, TraceStats>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_FlushesSucceeded kFlushesSucceeded() { return {}; } + static constexpr FieldMetadata_FlushesSucceeded kFlushesSucceeded{}; void set_flushes_succeeded(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_FlushesSucceeded::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -51492,14 +57270,7 @@ class TraceStats : public ::protozero::Message { uint64_t, TraceStats>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_FlushesFailed kFlushesFailed() { return {}; } + static constexpr FieldMetadata_FlushesFailed kFlushesFailed{}; void set_flushes_failed(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_FlushesFailed::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -51517,14 +57288,7 @@ class TraceStats : public ::protozero::Message { ::perfetto::protos::pbzero::TraceStats_FinalFlushOutcome, TraceStats>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_FinalFlushOutcome kFinalFlushOutcome() { return {}; } + static constexpr FieldMetadata_FinalFlushOutcome kFinalFlushOutcome{}; void set_final_flush_outcome(::perfetto::protos::pbzero::TraceStats_FinalFlushOutcome value) { static constexpr uint32_t field_id = FieldMetadata_FinalFlushOutcome::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -51570,14 +57334,7 @@ class TraceStats_FilterStats : public ::protozero::Message { uint64_t, TraceStats_FilterStats>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_InputPackets kInputPackets() { return {}; } + static constexpr FieldMetadata_InputPackets kInputPackets{}; void set_input_packets(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_InputPackets::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -51595,14 +57352,7 @@ class TraceStats_FilterStats : public ::protozero::Message { uint64_t, TraceStats_FilterStats>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_InputBytes kInputBytes() { return {}; } + static constexpr FieldMetadata_InputBytes kInputBytes{}; void set_input_bytes(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_InputBytes::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -51620,14 +57370,7 @@ class TraceStats_FilterStats : public ::protozero::Message { uint64_t, TraceStats_FilterStats>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_OutputBytes kOutputBytes() { return {}; } + static constexpr FieldMetadata_OutputBytes kOutputBytes{}; void set_output_bytes(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_OutputBytes::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -51645,14 +57388,7 @@ class TraceStats_FilterStats : public ::protozero::Message { uint64_t, TraceStats_FilterStats>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Errors kErrors() { return {}; } + static constexpr FieldMetadata_Errors kErrors{}; void set_errors(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Errors::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -51663,6 +57399,77 @@ class TraceStats_FilterStats : public ::protozero::Message { } }; +class TraceStats_WriterStats_Decoder : public ::protozero::TypedProtoDecoder { + public: + TraceStats_WriterStats_Decoder(const uint8_t* data, size_t len) : TypedProtoDecoder(data, len) {} + explicit TraceStats_WriterStats_Decoder(const std::string& raw) : TypedProtoDecoder(reinterpret_cast(raw.data()), raw.size()) {} + explicit TraceStats_WriterStats_Decoder(const ::protozero::ConstBytes& raw) : TypedProtoDecoder(raw.data, raw.size) {} + bool has_sequence_id() const { return at<1>().valid(); } + uint64_t sequence_id() const { return at<1>().as_uint64(); } + bool has_chunk_payload_histogram_counts() const { return at<2>().valid(); } + ::protozero::PackedRepeatedFieldIterator<::protozero::proto_utils::ProtoWireType::kVarInt, uint64_t> chunk_payload_histogram_counts(bool* parse_error_ptr) const { return GetPackedRepeated<::protozero::proto_utils::ProtoWireType::kVarInt, uint64_t>(2, parse_error_ptr); } + bool has_chunk_payload_histogram_sum() const { return at<3>().valid(); } + ::protozero::PackedRepeatedFieldIterator<::protozero::proto_utils::ProtoWireType::kVarInt, int64_t> chunk_payload_histogram_sum(bool* parse_error_ptr) const { return GetPackedRepeated<::protozero::proto_utils::ProtoWireType::kVarInt, int64_t>(3, parse_error_ptr); } +}; + +class TraceStats_WriterStats : public ::protozero::Message { + public: + using Decoder = TraceStats_WriterStats_Decoder; + enum : int32_t { + kSequenceIdFieldNumber = 1, + kChunkPayloadHistogramCountsFieldNumber = 2, + kChunkPayloadHistogramSumFieldNumber = 3, + }; + static constexpr const char* GetName() { return ".perfetto.protos.TraceStats.WriterStats"; } + + + using FieldMetadata_SequenceId = + ::protozero::proto_utils::FieldMetadata< + 1, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint64, + uint64_t, + TraceStats_WriterStats>; + + static constexpr FieldMetadata_SequenceId kSequenceId{}; + void set_sequence_id(uint64_t value) { + static constexpr uint32_t field_id = FieldMetadata_SequenceId::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint64> + ::Append(*this, field_id, value); + } + + using FieldMetadata_ChunkPayloadHistogramCounts = + ::protozero::proto_utils::FieldMetadata< + 2, + ::protozero::proto_utils::RepetitionType::kRepeatedPacked, + ::protozero::proto_utils::ProtoSchemaType::kUint64, + uint64_t, + TraceStats_WriterStats>; + + static constexpr FieldMetadata_ChunkPayloadHistogramCounts kChunkPayloadHistogramCounts{}; + void set_chunk_payload_histogram_counts(const ::protozero::PackedVarInt& packed_buffer) { + AppendBytes(FieldMetadata_ChunkPayloadHistogramCounts::kFieldId, packed_buffer.data(), + packed_buffer.size()); + } + + using FieldMetadata_ChunkPayloadHistogramSum = + ::protozero::proto_utils::FieldMetadata< + 3, + ::protozero::proto_utils::RepetitionType::kRepeatedPacked, + ::protozero::proto_utils::ProtoSchemaType::kInt64, + int64_t, + TraceStats_WriterStats>; + + static constexpr FieldMetadata_ChunkPayloadHistogramSum kChunkPayloadHistogramSum{}; + void set_chunk_payload_histogram_sum(const ::protozero::PackedVarInt& packed_buffer) { + AppendBytes(FieldMetadata_ChunkPayloadHistogramSum::kFieldId, packed_buffer.data(), + packed_buffer.size()); + } +}; + class TraceStats_BufferStats_Decoder : public ::protozero::TypedProtoDecoder { public: TraceStats_BufferStats_Decoder(const uint8_t* data, size_t len) : TypedProtoDecoder(data, len) {} @@ -51743,14 +57550,7 @@ class TraceStats_BufferStats : public ::protozero::Message { uint64_t, TraceStats_BufferStats>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_BufferSize kBufferSize() { return {}; } + static constexpr FieldMetadata_BufferSize kBufferSize{}; void set_buffer_size(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_BufferSize::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -51768,14 +57568,7 @@ class TraceStats_BufferStats : public ::protozero::Message { uint64_t, TraceStats_BufferStats>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_BytesWritten kBytesWritten() { return {}; } + static constexpr FieldMetadata_BytesWritten kBytesWritten{}; void set_bytes_written(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_BytesWritten::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -51793,14 +57586,7 @@ class TraceStats_BufferStats : public ::protozero::Message { uint64_t, TraceStats_BufferStats>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_BytesOverwritten kBytesOverwritten() { return {}; } + static constexpr FieldMetadata_BytesOverwritten kBytesOverwritten{}; void set_bytes_overwritten(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_BytesOverwritten::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -51818,14 +57604,7 @@ class TraceStats_BufferStats : public ::protozero::Message { uint64_t, TraceStats_BufferStats>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_BytesRead kBytesRead() { return {}; } + static constexpr FieldMetadata_BytesRead kBytesRead{}; void set_bytes_read(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_BytesRead::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -51843,14 +57622,7 @@ class TraceStats_BufferStats : public ::protozero::Message { uint64_t, TraceStats_BufferStats>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_PaddingBytesWritten kPaddingBytesWritten() { return {}; } + static constexpr FieldMetadata_PaddingBytesWritten kPaddingBytesWritten{}; void set_padding_bytes_written(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_PaddingBytesWritten::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -51868,14 +57640,7 @@ class TraceStats_BufferStats : public ::protozero::Message { uint64_t, TraceStats_BufferStats>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_PaddingBytesCleared kPaddingBytesCleared() { return {}; } + static constexpr FieldMetadata_PaddingBytesCleared kPaddingBytesCleared{}; void set_padding_bytes_cleared(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_PaddingBytesCleared::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -51893,14 +57658,7 @@ class TraceStats_BufferStats : public ::protozero::Message { uint64_t, TraceStats_BufferStats>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ChunksWritten kChunksWritten() { return {}; } + static constexpr FieldMetadata_ChunksWritten kChunksWritten{}; void set_chunks_written(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_ChunksWritten::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -51918,14 +57676,7 @@ class TraceStats_BufferStats : public ::protozero::Message { uint64_t, TraceStats_BufferStats>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ChunksRewritten kChunksRewritten() { return {}; } + static constexpr FieldMetadata_ChunksRewritten kChunksRewritten{}; void set_chunks_rewritten(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_ChunksRewritten::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -51943,14 +57694,7 @@ class TraceStats_BufferStats : public ::protozero::Message { uint64_t, TraceStats_BufferStats>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ChunksOverwritten kChunksOverwritten() { return {}; } + static constexpr FieldMetadata_ChunksOverwritten kChunksOverwritten{}; void set_chunks_overwritten(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_ChunksOverwritten::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -51968,14 +57712,7 @@ class TraceStats_BufferStats : public ::protozero::Message { uint64_t, TraceStats_BufferStats>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ChunksDiscarded kChunksDiscarded() { return {}; } + static constexpr FieldMetadata_ChunksDiscarded kChunksDiscarded{}; void set_chunks_discarded(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_ChunksDiscarded::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -51993,14 +57730,7 @@ class TraceStats_BufferStats : public ::protozero::Message { uint64_t, TraceStats_BufferStats>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ChunksRead kChunksRead() { return {}; } + static constexpr FieldMetadata_ChunksRead kChunksRead{}; void set_chunks_read(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_ChunksRead::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -52018,14 +57748,7 @@ class TraceStats_BufferStats : public ::protozero::Message { uint64_t, TraceStats_BufferStats>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ChunksCommittedOutOfOrder kChunksCommittedOutOfOrder() { return {}; } + static constexpr FieldMetadata_ChunksCommittedOutOfOrder kChunksCommittedOutOfOrder{}; void set_chunks_committed_out_of_order(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_ChunksCommittedOutOfOrder::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -52043,14 +57766,7 @@ class TraceStats_BufferStats : public ::protozero::Message { uint64_t, TraceStats_BufferStats>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_WriteWrapCount kWriteWrapCount() { return {}; } + static constexpr FieldMetadata_WriteWrapCount kWriteWrapCount{}; void set_write_wrap_count(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_WriteWrapCount::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -52068,14 +57784,7 @@ class TraceStats_BufferStats : public ::protozero::Message { uint64_t, TraceStats_BufferStats>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_PatchesSucceeded kPatchesSucceeded() { return {}; } + static constexpr FieldMetadata_PatchesSucceeded kPatchesSucceeded{}; void set_patches_succeeded(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_PatchesSucceeded::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -52093,14 +57802,7 @@ class TraceStats_BufferStats : public ::protozero::Message { uint64_t, TraceStats_BufferStats>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_PatchesFailed kPatchesFailed() { return {}; } + static constexpr FieldMetadata_PatchesFailed kPatchesFailed{}; void set_patches_failed(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_PatchesFailed::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -52118,14 +57820,7 @@ class TraceStats_BufferStats : public ::protozero::Message { uint64_t, TraceStats_BufferStats>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ReadaheadsSucceeded kReadaheadsSucceeded() { return {}; } + static constexpr FieldMetadata_ReadaheadsSucceeded kReadaheadsSucceeded{}; void set_readaheads_succeeded(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_ReadaheadsSucceeded::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -52143,14 +57838,7 @@ class TraceStats_BufferStats : public ::protozero::Message { uint64_t, TraceStats_BufferStats>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ReadaheadsFailed kReadaheadsFailed() { return {}; } + static constexpr FieldMetadata_ReadaheadsFailed kReadaheadsFailed{}; void set_readaheads_failed(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_ReadaheadsFailed::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -52168,14 +57856,7 @@ class TraceStats_BufferStats : public ::protozero::Message { uint64_t, TraceStats_BufferStats>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_AbiViolations kAbiViolations() { return {}; } + static constexpr FieldMetadata_AbiViolations kAbiViolations{}; void set_abi_violations(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_AbiViolations::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -52193,14 +57874,7 @@ class TraceStats_BufferStats : public ::protozero::Message { uint64_t, TraceStats_BufferStats>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_TraceWriterPacketLoss kTraceWriterPacketLoss() { return {}; } + static constexpr FieldMetadata_TraceWriterPacketLoss kTraceWriterPacketLoss{}; void set_trace_writer_packet_loss(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_TraceWriterPacketLoss::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -52249,57 +57923,169 @@ class TraceConfig_TraceFilter; class TraceConfig_TriggerConfig; class TraceConfig_TriggerConfig_Trigger; enum BuiltinClock : int32_t; -enum TraceConfig_BufferConfig_FillPolicy : int32_t; -enum TraceConfig_CompressionType : int32_t; -enum TraceConfig_LockdownModeOperation : int32_t; -enum TraceConfig_StatsdLogging : int32_t; -enum TraceConfig_TriggerConfig_TriggerMode : int32_t; +namespace perfetto_pbzero_enum_TraceConfig_BufferConfig { +enum FillPolicy : int32_t; +} // namespace perfetto_pbzero_enum_TraceConfig_BufferConfig +using TraceConfig_BufferConfig_FillPolicy = perfetto_pbzero_enum_TraceConfig_BufferConfig::FillPolicy; +namespace perfetto_pbzero_enum_TraceConfig { +enum CompressionType : int32_t; +} // namespace perfetto_pbzero_enum_TraceConfig +using TraceConfig_CompressionType = perfetto_pbzero_enum_TraceConfig::CompressionType; +namespace perfetto_pbzero_enum_TraceConfig { +enum LockdownModeOperation : int32_t; +} // namespace perfetto_pbzero_enum_TraceConfig +using TraceConfig_LockdownModeOperation = perfetto_pbzero_enum_TraceConfig::LockdownModeOperation; +namespace perfetto_pbzero_enum_TraceConfig { +enum StatsdLogging : int32_t; +} // namespace perfetto_pbzero_enum_TraceConfig +using TraceConfig_StatsdLogging = perfetto_pbzero_enum_TraceConfig::StatsdLogging; +namespace perfetto_pbzero_enum_TraceConfig_TriggerConfig { +enum TriggerMode : int32_t; +} // namespace perfetto_pbzero_enum_TraceConfig_TriggerConfig +using TraceConfig_TriggerConfig_TriggerMode = perfetto_pbzero_enum_TraceConfig_TriggerConfig::TriggerMode; -enum TraceConfig_LockdownModeOperation : int32_t { - TraceConfig_LockdownModeOperation_LOCKDOWN_UNCHANGED = 0, - TraceConfig_LockdownModeOperation_LOCKDOWN_CLEAR = 1, - TraceConfig_LockdownModeOperation_LOCKDOWN_SET = 2, +namespace perfetto_pbzero_enum_TraceConfig { +enum LockdownModeOperation : int32_t { + LOCKDOWN_UNCHANGED = 0, + LOCKDOWN_CLEAR = 1, + LOCKDOWN_SET = 2, }; +} // namespace perfetto_pbzero_enum_TraceConfig +using TraceConfig_LockdownModeOperation = perfetto_pbzero_enum_TraceConfig::LockdownModeOperation; -const TraceConfig_LockdownModeOperation TraceConfig_LockdownModeOperation_MIN = TraceConfig_LockdownModeOperation_LOCKDOWN_UNCHANGED; -const TraceConfig_LockdownModeOperation TraceConfig_LockdownModeOperation_MAX = TraceConfig_LockdownModeOperation_LOCKDOWN_SET; -enum TraceConfig_CompressionType : int32_t { - TraceConfig_CompressionType_COMPRESSION_TYPE_UNSPECIFIED = 0, - TraceConfig_CompressionType_COMPRESSION_TYPE_DEFLATE = 1, +constexpr TraceConfig_LockdownModeOperation TraceConfig_LockdownModeOperation_MIN = TraceConfig_LockdownModeOperation::LOCKDOWN_UNCHANGED; +constexpr TraceConfig_LockdownModeOperation TraceConfig_LockdownModeOperation_MAX = TraceConfig_LockdownModeOperation::LOCKDOWN_SET; + + +PERFETTO_PROTOZERO_CONSTEXPR14_OR_INLINE +const char* TraceConfig_LockdownModeOperation_Name(::perfetto::protos::pbzero::TraceConfig_LockdownModeOperation value) { + switch (value) { + case ::perfetto::protos::pbzero::TraceConfig_LockdownModeOperation::LOCKDOWN_UNCHANGED: + return "LOCKDOWN_UNCHANGED"; + + case ::perfetto::protos::pbzero::TraceConfig_LockdownModeOperation::LOCKDOWN_CLEAR: + return "LOCKDOWN_CLEAR"; + + case ::perfetto::protos::pbzero::TraceConfig_LockdownModeOperation::LOCKDOWN_SET: + return "LOCKDOWN_SET"; + } + return "PBZERO_UNKNOWN_ENUM_VALUE"; +} + +namespace perfetto_pbzero_enum_TraceConfig { +enum CompressionType : int32_t { + COMPRESSION_TYPE_UNSPECIFIED = 0, + COMPRESSION_TYPE_DEFLATE = 1, }; +} // namespace perfetto_pbzero_enum_TraceConfig +using TraceConfig_CompressionType = perfetto_pbzero_enum_TraceConfig::CompressionType; -const TraceConfig_CompressionType TraceConfig_CompressionType_MIN = TraceConfig_CompressionType_COMPRESSION_TYPE_UNSPECIFIED; -const TraceConfig_CompressionType TraceConfig_CompressionType_MAX = TraceConfig_CompressionType_COMPRESSION_TYPE_DEFLATE; -enum TraceConfig_StatsdLogging : int32_t { - TraceConfig_StatsdLogging_STATSD_LOGGING_UNSPECIFIED = 0, - TraceConfig_StatsdLogging_STATSD_LOGGING_ENABLED = 1, - TraceConfig_StatsdLogging_STATSD_LOGGING_DISABLED = 2, +constexpr TraceConfig_CompressionType TraceConfig_CompressionType_MIN = TraceConfig_CompressionType::COMPRESSION_TYPE_UNSPECIFIED; +constexpr TraceConfig_CompressionType TraceConfig_CompressionType_MAX = TraceConfig_CompressionType::COMPRESSION_TYPE_DEFLATE; + + +PERFETTO_PROTOZERO_CONSTEXPR14_OR_INLINE +const char* TraceConfig_CompressionType_Name(::perfetto::protos::pbzero::TraceConfig_CompressionType value) { + switch (value) { + case ::perfetto::protos::pbzero::TraceConfig_CompressionType::COMPRESSION_TYPE_UNSPECIFIED: + return "COMPRESSION_TYPE_UNSPECIFIED"; + + case ::perfetto::protos::pbzero::TraceConfig_CompressionType::COMPRESSION_TYPE_DEFLATE: + return "COMPRESSION_TYPE_DEFLATE"; + } + return "PBZERO_UNKNOWN_ENUM_VALUE"; +} + +namespace perfetto_pbzero_enum_TraceConfig { +enum StatsdLogging : int32_t { + STATSD_LOGGING_UNSPECIFIED = 0, + STATSD_LOGGING_ENABLED = 1, + STATSD_LOGGING_DISABLED = 2, }; +} // namespace perfetto_pbzero_enum_TraceConfig +using TraceConfig_StatsdLogging = perfetto_pbzero_enum_TraceConfig::StatsdLogging; -const TraceConfig_StatsdLogging TraceConfig_StatsdLogging_MIN = TraceConfig_StatsdLogging_STATSD_LOGGING_UNSPECIFIED; -const TraceConfig_StatsdLogging TraceConfig_StatsdLogging_MAX = TraceConfig_StatsdLogging_STATSD_LOGGING_DISABLED; -enum TraceConfig_TriggerConfig_TriggerMode : int32_t { - TraceConfig_TriggerConfig_TriggerMode_UNSPECIFIED = 0, - TraceConfig_TriggerConfig_TriggerMode_START_TRACING = 1, - TraceConfig_TriggerConfig_TriggerMode_STOP_TRACING = 2, +constexpr TraceConfig_StatsdLogging TraceConfig_StatsdLogging_MIN = TraceConfig_StatsdLogging::STATSD_LOGGING_UNSPECIFIED; +constexpr TraceConfig_StatsdLogging TraceConfig_StatsdLogging_MAX = TraceConfig_StatsdLogging::STATSD_LOGGING_DISABLED; + + +PERFETTO_PROTOZERO_CONSTEXPR14_OR_INLINE +const char* TraceConfig_StatsdLogging_Name(::perfetto::protos::pbzero::TraceConfig_StatsdLogging value) { + switch (value) { + case ::perfetto::protos::pbzero::TraceConfig_StatsdLogging::STATSD_LOGGING_UNSPECIFIED: + return "STATSD_LOGGING_UNSPECIFIED"; + + case ::perfetto::protos::pbzero::TraceConfig_StatsdLogging::STATSD_LOGGING_ENABLED: + return "STATSD_LOGGING_ENABLED"; + + case ::perfetto::protos::pbzero::TraceConfig_StatsdLogging::STATSD_LOGGING_DISABLED: + return "STATSD_LOGGING_DISABLED"; + } + return "PBZERO_UNKNOWN_ENUM_VALUE"; +} + +namespace perfetto_pbzero_enum_TraceConfig_TriggerConfig { +enum TriggerMode : int32_t { + UNSPECIFIED = 0, + START_TRACING = 1, + STOP_TRACING = 2, }; +} // namespace perfetto_pbzero_enum_TraceConfig_TriggerConfig +using TraceConfig_TriggerConfig_TriggerMode = perfetto_pbzero_enum_TraceConfig_TriggerConfig::TriggerMode; -const TraceConfig_TriggerConfig_TriggerMode TraceConfig_TriggerConfig_TriggerMode_MIN = TraceConfig_TriggerConfig_TriggerMode_UNSPECIFIED; -const TraceConfig_TriggerConfig_TriggerMode TraceConfig_TriggerConfig_TriggerMode_MAX = TraceConfig_TriggerConfig_TriggerMode_STOP_TRACING; -enum TraceConfig_BufferConfig_FillPolicy : int32_t { - TraceConfig_BufferConfig_FillPolicy_UNSPECIFIED = 0, - TraceConfig_BufferConfig_FillPolicy_RING_BUFFER = 1, - TraceConfig_BufferConfig_FillPolicy_DISCARD = 2, +constexpr TraceConfig_TriggerConfig_TriggerMode TraceConfig_TriggerConfig_TriggerMode_MIN = TraceConfig_TriggerConfig_TriggerMode::UNSPECIFIED; +constexpr TraceConfig_TriggerConfig_TriggerMode TraceConfig_TriggerConfig_TriggerMode_MAX = TraceConfig_TriggerConfig_TriggerMode::STOP_TRACING; + + +PERFETTO_PROTOZERO_CONSTEXPR14_OR_INLINE +const char* TraceConfig_TriggerConfig_TriggerMode_Name(::perfetto::protos::pbzero::TraceConfig_TriggerConfig_TriggerMode value) { + switch (value) { + case ::perfetto::protos::pbzero::TraceConfig_TriggerConfig_TriggerMode::UNSPECIFIED: + return "UNSPECIFIED"; + + case ::perfetto::protos::pbzero::TraceConfig_TriggerConfig_TriggerMode::START_TRACING: + return "START_TRACING"; + + case ::perfetto::protos::pbzero::TraceConfig_TriggerConfig_TriggerMode::STOP_TRACING: + return "STOP_TRACING"; + } + return "PBZERO_UNKNOWN_ENUM_VALUE"; +} + +namespace perfetto_pbzero_enum_TraceConfig_BufferConfig { +enum FillPolicy : int32_t { + UNSPECIFIED = 0, + RING_BUFFER = 1, + DISCARD = 2, }; +} // namespace perfetto_pbzero_enum_TraceConfig_BufferConfig +using TraceConfig_BufferConfig_FillPolicy = perfetto_pbzero_enum_TraceConfig_BufferConfig::FillPolicy; -const TraceConfig_BufferConfig_FillPolicy TraceConfig_BufferConfig_FillPolicy_MIN = TraceConfig_BufferConfig_FillPolicy_UNSPECIFIED; -const TraceConfig_BufferConfig_FillPolicy TraceConfig_BufferConfig_FillPolicy_MAX = TraceConfig_BufferConfig_FillPolicy_DISCARD; -class TraceConfig_Decoder : public ::protozero::TypedProtoDecoder { +constexpr TraceConfig_BufferConfig_FillPolicy TraceConfig_BufferConfig_FillPolicy_MIN = TraceConfig_BufferConfig_FillPolicy::UNSPECIFIED; +constexpr TraceConfig_BufferConfig_FillPolicy TraceConfig_BufferConfig_FillPolicy_MAX = TraceConfig_BufferConfig_FillPolicy::DISCARD; + + +PERFETTO_PROTOZERO_CONSTEXPR14_OR_INLINE +const char* TraceConfig_BufferConfig_FillPolicy_Name(::perfetto::protos::pbzero::TraceConfig_BufferConfig_FillPolicy value) { + switch (value) { + case ::perfetto::protos::pbzero::TraceConfig_BufferConfig_FillPolicy::UNSPECIFIED: + return "UNSPECIFIED"; + + case ::perfetto::protos::pbzero::TraceConfig_BufferConfig_FillPolicy::RING_BUFFER: + return "RING_BUFFER"; + + case ::perfetto::protos::pbzero::TraceConfig_BufferConfig_FillPolicy::DISCARD: + return "DISCARD"; + } + return "PBZERO_UNKNOWN_ENUM_VALUE"; +} + +class TraceConfig_Decoder : public ::protozero::TypedProtoDecoder { public: TraceConfig_Decoder(const uint8_t* data, size_t len) : TypedProtoDecoder(data, len) {} explicit TraceConfig_Decoder(const std::string& raw) : TypedProtoDecoder(reinterpret_cast(raw.data()), raw.size()) {} @@ -52312,6 +58098,8 @@ class TraceConfig_Decoder : public ::protozero::TypedProtoDecoder().as_bytes(); } bool has_duration_ms() const { return at<3>().valid(); } uint32_t duration_ms() const { return at<3>().as_uint32(); } + bool has_prefer_suspend_clock_for_duration() const { return at<36>().valid(); } + bool prefer_suspend_clock_for_duration() const { return at<36>().as_bool(); } bool has_enable_extra_guardrails() const { return at<4>().valid(); } bool enable_extra_guardrails() const { return at<4>().as_bool(); } bool has_lockdown_mode() const { return at<5>().valid(); } @@ -52378,6 +58166,7 @@ class TraceConfig : public ::protozero::Message { kDataSourcesFieldNumber = 2, kBuiltinDataSourcesFieldNumber = 20, kDurationMsFieldNumber = 3, + kPreferSuspendClockForDurationFieldNumber = 36, kEnableExtraGuardrailsFieldNumber = 4, kLockdownModeFieldNumber = 5, kProducersFieldNumber = 6, @@ -52421,17 +58210,29 @@ class TraceConfig : public ::protozero::Message { using TraceFilter = ::perfetto::protos::pbzero::TraceConfig_TraceFilter; using AndroidReportConfig = ::perfetto::protos::pbzero::TraceConfig_AndroidReportConfig; using CmdTraceStartDelay = ::perfetto::protos::pbzero::TraceConfig_CmdTraceStartDelay; + using LockdownModeOperation = ::perfetto::protos::pbzero::TraceConfig_LockdownModeOperation; + static inline const char* LockdownModeOperation_Name(LockdownModeOperation value) { + return ::perfetto::protos::pbzero::TraceConfig_LockdownModeOperation_Name(value); + } + using CompressionType = ::perfetto::protos::pbzero::TraceConfig_CompressionType; + static inline const char* CompressionType_Name(CompressionType value) { + return ::perfetto::protos::pbzero::TraceConfig_CompressionType_Name(value); + } + using StatsdLogging = ::perfetto::protos::pbzero::TraceConfig_StatsdLogging; - static const LockdownModeOperation LOCKDOWN_UNCHANGED = TraceConfig_LockdownModeOperation_LOCKDOWN_UNCHANGED; - static const LockdownModeOperation LOCKDOWN_CLEAR = TraceConfig_LockdownModeOperation_LOCKDOWN_CLEAR; - static const LockdownModeOperation LOCKDOWN_SET = TraceConfig_LockdownModeOperation_LOCKDOWN_SET; - static const CompressionType COMPRESSION_TYPE_UNSPECIFIED = TraceConfig_CompressionType_COMPRESSION_TYPE_UNSPECIFIED; - static const CompressionType COMPRESSION_TYPE_DEFLATE = TraceConfig_CompressionType_COMPRESSION_TYPE_DEFLATE; - static const StatsdLogging STATSD_LOGGING_UNSPECIFIED = TraceConfig_StatsdLogging_STATSD_LOGGING_UNSPECIFIED; - static const StatsdLogging STATSD_LOGGING_ENABLED = TraceConfig_StatsdLogging_STATSD_LOGGING_ENABLED; - static const StatsdLogging STATSD_LOGGING_DISABLED = TraceConfig_StatsdLogging_STATSD_LOGGING_DISABLED; + static inline const char* StatsdLogging_Name(StatsdLogging value) { + return ::perfetto::protos::pbzero::TraceConfig_StatsdLogging_Name(value); + } + static const LockdownModeOperation LOCKDOWN_UNCHANGED = LockdownModeOperation::LOCKDOWN_UNCHANGED; + static const LockdownModeOperation LOCKDOWN_CLEAR = LockdownModeOperation::LOCKDOWN_CLEAR; + static const LockdownModeOperation LOCKDOWN_SET = LockdownModeOperation::LOCKDOWN_SET; + static const CompressionType COMPRESSION_TYPE_UNSPECIFIED = CompressionType::COMPRESSION_TYPE_UNSPECIFIED; + static const CompressionType COMPRESSION_TYPE_DEFLATE = CompressionType::COMPRESSION_TYPE_DEFLATE; + static const StatsdLogging STATSD_LOGGING_UNSPECIFIED = StatsdLogging::STATSD_LOGGING_UNSPECIFIED; + static const StatsdLogging STATSD_LOGGING_ENABLED = StatsdLogging::STATSD_LOGGING_ENABLED; + static const StatsdLogging STATSD_LOGGING_DISABLED = StatsdLogging::STATSD_LOGGING_DISABLED; using FieldMetadata_Buffers = ::protozero::proto_utils::FieldMetadata< @@ -52441,14 +58242,7 @@ class TraceConfig : public ::protozero::Message { TraceConfig_BufferConfig, TraceConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Buffers kBuffers() { return {}; } + static constexpr FieldMetadata_Buffers kBuffers{}; template T* add_buffers() { return BeginNestedMessage(1); } @@ -52462,14 +58256,7 @@ class TraceConfig : public ::protozero::Message { TraceConfig_DataSource, TraceConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_DataSources kDataSources() { return {}; } + static constexpr FieldMetadata_DataSources kDataSources{}; template T* add_data_sources() { return BeginNestedMessage(2); } @@ -52483,14 +58270,7 @@ class TraceConfig : public ::protozero::Message { TraceConfig_BuiltinDataSource, TraceConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_BuiltinDataSources kBuiltinDataSources() { return {}; } + static constexpr FieldMetadata_BuiltinDataSources kBuiltinDataSources{}; template T* set_builtin_data_sources() { return BeginNestedMessage(20); } @@ -52504,14 +58284,7 @@ class TraceConfig : public ::protozero::Message { uint32_t, TraceConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_DurationMs kDurationMs() { return {}; } + static constexpr FieldMetadata_DurationMs kDurationMs{}; void set_duration_ms(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_DurationMs::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -52521,6 +58294,24 @@ class TraceConfig : public ::protozero::Message { ::Append(*this, field_id, value); } + using FieldMetadata_PreferSuspendClockForDuration = + ::protozero::proto_utils::FieldMetadata< + 36, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kBool, + bool, + TraceConfig>; + + static constexpr FieldMetadata_PreferSuspendClockForDuration kPreferSuspendClockForDuration{}; + void set_prefer_suspend_clock_for_duration(bool value) { + static constexpr uint32_t field_id = FieldMetadata_PreferSuspendClockForDuration::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kBool> + ::Append(*this, field_id, value); + } + using FieldMetadata_EnableExtraGuardrails = ::protozero::proto_utils::FieldMetadata< 4, @@ -52529,14 +58320,7 @@ class TraceConfig : public ::protozero::Message { bool, TraceConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_EnableExtraGuardrails kEnableExtraGuardrails() { return {}; } + static constexpr FieldMetadata_EnableExtraGuardrails kEnableExtraGuardrails{}; void set_enable_extra_guardrails(bool value) { static constexpr uint32_t field_id = FieldMetadata_EnableExtraGuardrails::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -52554,14 +58338,7 @@ class TraceConfig : public ::protozero::Message { ::perfetto::protos::pbzero::TraceConfig_LockdownModeOperation, TraceConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_LockdownMode kLockdownMode() { return {}; } + static constexpr FieldMetadata_LockdownMode kLockdownMode{}; void set_lockdown_mode(::perfetto::protos::pbzero::TraceConfig_LockdownModeOperation value) { static constexpr uint32_t field_id = FieldMetadata_LockdownMode::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -52579,14 +58356,7 @@ class TraceConfig : public ::protozero::Message { TraceConfig_ProducerConfig, TraceConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Producers kProducers() { return {}; } + static constexpr FieldMetadata_Producers kProducers{}; template T* add_producers() { return BeginNestedMessage(6); } @@ -52600,14 +58370,7 @@ class TraceConfig : public ::protozero::Message { TraceConfig_StatsdMetadata, TraceConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_StatsdMetadata kStatsdMetadata() { return {}; } + static constexpr FieldMetadata_StatsdMetadata kStatsdMetadata{}; template T* set_statsd_metadata() { return BeginNestedMessage(7); } @@ -52621,14 +58384,7 @@ class TraceConfig : public ::protozero::Message { bool, TraceConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_WriteIntoFile kWriteIntoFile() { return {}; } + static constexpr FieldMetadata_WriteIntoFile kWriteIntoFile{}; void set_write_into_file(bool value) { static constexpr uint32_t field_id = FieldMetadata_WriteIntoFile::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -52646,17 +58402,13 @@ class TraceConfig : public ::protozero::Message { std::string, TraceConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_OutputPath kOutputPath() { return {}; } + static constexpr FieldMetadata_OutputPath kOutputPath{}; void set_output_path(const char* data, size_t size) { AppendBytes(FieldMetadata_OutputPath::kFieldId, data, size); } + void set_output_path(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_OutputPath::kFieldId, chars.data, chars.size); + } void set_output_path(std::string value) { static constexpr uint32_t field_id = FieldMetadata_OutputPath::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -52674,14 +58426,7 @@ class TraceConfig : public ::protozero::Message { uint32_t, TraceConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_FileWritePeriodMs kFileWritePeriodMs() { return {}; } + static constexpr FieldMetadata_FileWritePeriodMs kFileWritePeriodMs{}; void set_file_write_period_ms(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_FileWritePeriodMs::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -52699,14 +58444,7 @@ class TraceConfig : public ::protozero::Message { uint64_t, TraceConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_MaxFileSizeBytes kMaxFileSizeBytes() { return {}; } + static constexpr FieldMetadata_MaxFileSizeBytes kMaxFileSizeBytes{}; void set_max_file_size_bytes(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_MaxFileSizeBytes::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -52724,14 +58462,7 @@ class TraceConfig : public ::protozero::Message { TraceConfig_GuardrailOverrides, TraceConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_GuardrailOverrides kGuardrailOverrides() { return {}; } + static constexpr FieldMetadata_GuardrailOverrides kGuardrailOverrides{}; template T* set_guardrail_overrides() { return BeginNestedMessage(11); } @@ -52745,14 +58476,7 @@ class TraceConfig : public ::protozero::Message { bool, TraceConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_DeferredStart kDeferredStart() { return {}; } + static constexpr FieldMetadata_DeferredStart kDeferredStart{}; void set_deferred_start(bool value) { static constexpr uint32_t field_id = FieldMetadata_DeferredStart::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -52770,14 +58494,7 @@ class TraceConfig : public ::protozero::Message { uint32_t, TraceConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_FlushPeriodMs kFlushPeriodMs() { return {}; } + static constexpr FieldMetadata_FlushPeriodMs kFlushPeriodMs{}; void set_flush_period_ms(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_FlushPeriodMs::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -52795,14 +58512,7 @@ class TraceConfig : public ::protozero::Message { uint32_t, TraceConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_FlushTimeoutMs kFlushTimeoutMs() { return {}; } + static constexpr FieldMetadata_FlushTimeoutMs kFlushTimeoutMs{}; void set_flush_timeout_ms(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_FlushTimeoutMs::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -52820,14 +58530,7 @@ class TraceConfig : public ::protozero::Message { uint32_t, TraceConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_DataSourceStopTimeoutMs kDataSourceStopTimeoutMs() { return {}; } + static constexpr FieldMetadata_DataSourceStopTimeoutMs kDataSourceStopTimeoutMs{}; void set_data_source_stop_timeout_ms(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_DataSourceStopTimeoutMs::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -52845,14 +58548,7 @@ class TraceConfig : public ::protozero::Message { bool, TraceConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_NotifyTraceur kNotifyTraceur() { return {}; } + static constexpr FieldMetadata_NotifyTraceur kNotifyTraceur{}; void set_notify_traceur(bool value) { static constexpr uint32_t field_id = FieldMetadata_NotifyTraceur::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -52870,14 +58566,7 @@ class TraceConfig : public ::protozero::Message { int32_t, TraceConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_BugreportScore kBugreportScore() { return {}; } + static constexpr FieldMetadata_BugreportScore kBugreportScore{}; void set_bugreport_score(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_BugreportScore::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -52895,14 +58584,7 @@ class TraceConfig : public ::protozero::Message { TraceConfig_TriggerConfig, TraceConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_TriggerConfig kTriggerConfig() { return {}; } + static constexpr FieldMetadata_TriggerConfig kTriggerConfig{}; template T* set_trigger_config() { return BeginNestedMessage(17); } @@ -52916,17 +58598,13 @@ class TraceConfig : public ::protozero::Message { std::string, TraceConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ActivateTriggers kActivateTriggers() { return {}; } + static constexpr FieldMetadata_ActivateTriggers kActivateTriggers{}; void add_activate_triggers(const char* data, size_t size) { AppendBytes(FieldMetadata_ActivateTriggers::kFieldId, data, size); } + void add_activate_triggers(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_ActivateTriggers::kFieldId, chars.data, chars.size); + } void add_activate_triggers(std::string value) { static constexpr uint32_t field_id = FieldMetadata_ActivateTriggers::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -52944,14 +58622,7 @@ class TraceConfig : public ::protozero::Message { TraceConfig_IncrementalStateConfig, TraceConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_IncrementalStateConfig kIncrementalStateConfig() { return {}; } + static constexpr FieldMetadata_IncrementalStateConfig kIncrementalStateConfig{}; template T* set_incremental_state_config() { return BeginNestedMessage(21); } @@ -52965,14 +58636,7 @@ class TraceConfig : public ::protozero::Message { bool, TraceConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_AllowUserBuildTracing kAllowUserBuildTracing() { return {}; } + static constexpr FieldMetadata_AllowUserBuildTracing kAllowUserBuildTracing{}; void set_allow_user_build_tracing(bool value) { static constexpr uint32_t field_id = FieldMetadata_AllowUserBuildTracing::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -52990,17 +58654,13 @@ class TraceConfig : public ::protozero::Message { std::string, TraceConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_UniqueSessionName kUniqueSessionName() { return {}; } + static constexpr FieldMetadata_UniqueSessionName kUniqueSessionName{}; void set_unique_session_name(const char* data, size_t size) { AppendBytes(FieldMetadata_UniqueSessionName::kFieldId, data, size); } + void set_unique_session_name(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_UniqueSessionName::kFieldId, chars.data, chars.size); + } void set_unique_session_name(std::string value) { static constexpr uint32_t field_id = FieldMetadata_UniqueSessionName::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -53018,14 +58678,7 @@ class TraceConfig : public ::protozero::Message { ::perfetto::protos::pbzero::TraceConfig_CompressionType, TraceConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_CompressionType kCompressionType() { return {}; } + static constexpr FieldMetadata_CompressionType kCompressionType{}; void set_compression_type(::perfetto::protos::pbzero::TraceConfig_CompressionType value) { static constexpr uint32_t field_id = FieldMetadata_CompressionType::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -53043,14 +58696,7 @@ class TraceConfig : public ::protozero::Message { TraceConfig_IncidentReportConfig, TraceConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_IncidentReportConfig kIncidentReportConfig() { return {}; } + static constexpr FieldMetadata_IncidentReportConfig kIncidentReportConfig{}; template T* set_incident_report_config() { return BeginNestedMessage(25); } @@ -53064,14 +58710,7 @@ class TraceConfig : public ::protozero::Message { ::perfetto::protos::pbzero::TraceConfig_StatsdLogging, TraceConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_StatsdLogging kStatsdLogging() { return {}; } + static constexpr FieldMetadata_StatsdLogging kStatsdLogging{}; void set_statsd_logging(::perfetto::protos::pbzero::TraceConfig_StatsdLogging value) { static constexpr uint32_t field_id = FieldMetadata_StatsdLogging::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -53089,14 +58728,7 @@ class TraceConfig : public ::protozero::Message { int64_t, TraceConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_TraceUuidMsb kTraceUuidMsb() { return {}; } + static constexpr FieldMetadata_TraceUuidMsb kTraceUuidMsb{}; void set_trace_uuid_msb(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_TraceUuidMsb::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -53114,14 +58746,7 @@ class TraceConfig : public ::protozero::Message { int64_t, TraceConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_TraceUuidLsb kTraceUuidLsb() { return {}; } + static constexpr FieldMetadata_TraceUuidLsb kTraceUuidLsb{}; void set_trace_uuid_lsb(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_TraceUuidLsb::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -53139,14 +58764,7 @@ class TraceConfig : public ::protozero::Message { TraceConfig_TraceFilter, TraceConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_TraceFilter kTraceFilter() { return {}; } + static constexpr FieldMetadata_TraceFilter kTraceFilter{}; template T* set_trace_filter() { return BeginNestedMessage(33); } @@ -53160,14 +58778,7 @@ class TraceConfig : public ::protozero::Message { TraceConfig_AndroidReportConfig, TraceConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_AndroidReportConfig kAndroidReportConfig() { return {}; } + static constexpr FieldMetadata_AndroidReportConfig kAndroidReportConfig{}; template T* set_android_report_config() { return BeginNestedMessage(34); } @@ -53181,14 +58792,7 @@ class TraceConfig : public ::protozero::Message { TraceConfig_CmdTraceStartDelay, TraceConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_CmdTraceStartDelay kCmdTraceStartDelay() { return {}; } + static constexpr FieldMetadata_CmdTraceStartDelay kCmdTraceStartDelay{}; template T* set_cmd_trace_start_delay() { return BeginNestedMessage(35); } @@ -53224,14 +58828,7 @@ class TraceConfig_CmdTraceStartDelay : public ::protozero::Message { uint32_t, TraceConfig_CmdTraceStartDelay>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_MinDelayMs kMinDelayMs() { return {}; } + static constexpr FieldMetadata_MinDelayMs kMinDelayMs{}; void set_min_delay_ms(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_MinDelayMs::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -53249,14 +58846,7 @@ class TraceConfig_CmdTraceStartDelay : public ::protozero::Message { uint32_t, TraceConfig_CmdTraceStartDelay>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_MaxDelayMs kMaxDelayMs() { return {}; } + static constexpr FieldMetadata_MaxDelayMs kMaxDelayMs{}; void set_max_delay_ms(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_MaxDelayMs::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -53302,17 +58892,13 @@ class TraceConfig_AndroidReportConfig : public ::protozero::Message { std::string, TraceConfig_AndroidReportConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ReporterServicePackage kReporterServicePackage() { return {}; } + static constexpr FieldMetadata_ReporterServicePackage kReporterServicePackage{}; void set_reporter_service_package(const char* data, size_t size) { AppendBytes(FieldMetadata_ReporterServicePackage::kFieldId, data, size); } + void set_reporter_service_package(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_ReporterServicePackage::kFieldId, chars.data, chars.size); + } void set_reporter_service_package(std::string value) { static constexpr uint32_t field_id = FieldMetadata_ReporterServicePackage::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -53330,17 +58916,13 @@ class TraceConfig_AndroidReportConfig : public ::protozero::Message { std::string, TraceConfig_AndroidReportConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ReporterServiceClass kReporterServiceClass() { return {}; } + static constexpr FieldMetadata_ReporterServiceClass kReporterServiceClass{}; void set_reporter_service_class(const char* data, size_t size) { AppendBytes(FieldMetadata_ReporterServiceClass::kFieldId, data, size); } + void set_reporter_service_class(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_ReporterServiceClass::kFieldId, chars.data, chars.size); + } void set_reporter_service_class(std::string value) { static constexpr uint32_t field_id = FieldMetadata_ReporterServiceClass::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -53358,14 +58940,7 @@ class TraceConfig_AndroidReportConfig : public ::protozero::Message { bool, TraceConfig_AndroidReportConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_SkipReport kSkipReport() { return {}; } + static constexpr FieldMetadata_SkipReport kSkipReport{}; void set_skip_report(bool value) { static constexpr uint32_t field_id = FieldMetadata_SkipReport::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -53383,14 +58958,7 @@ class TraceConfig_AndroidReportConfig : public ::protozero::Message { bool, TraceConfig_AndroidReportConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_UsePipeInFrameworkForTesting kUsePipeInFrameworkForTesting() { return {}; } + static constexpr FieldMetadata_UsePipeInFrameworkForTesting kUsePipeInFrameworkForTesting{}; void set_use_pipe_in_framework_for_testing(bool value) { static constexpr uint32_t field_id = FieldMetadata_UsePipeInFrameworkForTesting::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -53427,17 +58995,13 @@ class TraceConfig_TraceFilter : public ::protozero::Message { std::string, TraceConfig_TraceFilter>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Bytecode kBytecode() { return {}; } + static constexpr FieldMetadata_Bytecode kBytecode{}; void set_bytecode(const uint8_t* data, size_t size) { AppendBytes(FieldMetadata_Bytecode::kFieldId, data, size); } + void set_bytecode(::protozero::ConstBytes bytes) { + AppendBytes(FieldMetadata_Bytecode::kFieldId, bytes.data, bytes.size); + } void set_bytecode(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Bytecode::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -53486,17 +59050,13 @@ class TraceConfig_IncidentReportConfig : public ::protozero::Message { std::string, TraceConfig_IncidentReportConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_DestinationPackage kDestinationPackage() { return {}; } + static constexpr FieldMetadata_DestinationPackage kDestinationPackage{}; void set_destination_package(const char* data, size_t size) { AppendBytes(FieldMetadata_DestinationPackage::kFieldId, data, size); } + void set_destination_package(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_DestinationPackage::kFieldId, chars.data, chars.size); + } void set_destination_package(std::string value) { static constexpr uint32_t field_id = FieldMetadata_DestinationPackage::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -53514,17 +59074,13 @@ class TraceConfig_IncidentReportConfig : public ::protozero::Message { std::string, TraceConfig_IncidentReportConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_DestinationClass kDestinationClass() { return {}; } + static constexpr FieldMetadata_DestinationClass kDestinationClass{}; void set_destination_class(const char* data, size_t size) { AppendBytes(FieldMetadata_DestinationClass::kFieldId, data, size); } + void set_destination_class(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_DestinationClass::kFieldId, chars.data, chars.size); + } void set_destination_class(std::string value) { static constexpr uint32_t field_id = FieldMetadata_DestinationClass::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -53542,14 +59098,7 @@ class TraceConfig_IncidentReportConfig : public ::protozero::Message { int32_t, TraceConfig_IncidentReportConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_PrivacyLevel kPrivacyLevel() { return {}; } + static constexpr FieldMetadata_PrivacyLevel kPrivacyLevel{}; void set_privacy_level(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_PrivacyLevel::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -53567,14 +59116,7 @@ class TraceConfig_IncidentReportConfig : public ::protozero::Message { bool, TraceConfig_IncidentReportConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_SkipIncidentd kSkipIncidentd() { return {}; } + static constexpr FieldMetadata_SkipIncidentd kSkipIncidentd{}; void set_skip_incidentd(bool value) { static constexpr uint32_t field_id = FieldMetadata_SkipIncidentd::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -53592,14 +59134,7 @@ class TraceConfig_IncidentReportConfig : public ::protozero::Message { bool, TraceConfig_IncidentReportConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_SkipDropbox kSkipDropbox() { return {}; } + static constexpr FieldMetadata_SkipDropbox kSkipDropbox{}; void set_skip_dropbox(bool value) { static constexpr uint32_t field_id = FieldMetadata_SkipDropbox::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -53636,14 +59171,7 @@ class TraceConfig_IncrementalStateConfig : public ::protozero::Message { uint32_t, TraceConfig_IncrementalStateConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ClearPeriodMs kClearPeriodMs() { return {}; } + static constexpr FieldMetadata_ClearPeriodMs kClearPeriodMs{}; void set_clear_period_ms(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_ClearPeriodMs::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -53678,10 +59206,14 @@ class TraceConfig_TriggerConfig : public ::protozero::Message { static constexpr const char* GetName() { return ".perfetto.protos.TraceConfig.TriggerConfig"; } using Trigger = ::perfetto::protos::pbzero::TraceConfig_TriggerConfig_Trigger; + using TriggerMode = ::perfetto::protos::pbzero::TraceConfig_TriggerConfig_TriggerMode; - static const TriggerMode UNSPECIFIED = TraceConfig_TriggerConfig_TriggerMode_UNSPECIFIED; - static const TriggerMode START_TRACING = TraceConfig_TriggerConfig_TriggerMode_START_TRACING; - static const TriggerMode STOP_TRACING = TraceConfig_TriggerConfig_TriggerMode_STOP_TRACING; + static inline const char* TriggerMode_Name(TriggerMode value) { + return ::perfetto::protos::pbzero::TraceConfig_TriggerConfig_TriggerMode_Name(value); + } + static const TriggerMode UNSPECIFIED = TriggerMode::UNSPECIFIED; + static const TriggerMode START_TRACING = TriggerMode::START_TRACING; + static const TriggerMode STOP_TRACING = TriggerMode::STOP_TRACING; using FieldMetadata_TriggerMode = ::protozero::proto_utils::FieldMetadata< @@ -53691,14 +59223,7 @@ class TraceConfig_TriggerConfig : public ::protozero::Message { ::perfetto::protos::pbzero::TraceConfig_TriggerConfig_TriggerMode, TraceConfig_TriggerConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_TriggerMode kTriggerMode() { return {}; } + static constexpr FieldMetadata_TriggerMode kTriggerMode{}; void set_trigger_mode(::perfetto::protos::pbzero::TraceConfig_TriggerConfig_TriggerMode value) { static constexpr uint32_t field_id = FieldMetadata_TriggerMode::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -53716,14 +59241,7 @@ class TraceConfig_TriggerConfig : public ::protozero::Message { TraceConfig_TriggerConfig_Trigger, TraceConfig_TriggerConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Triggers kTriggers() { return {}; } + static constexpr FieldMetadata_Triggers kTriggers{}; template T* add_triggers() { return BeginNestedMessage(2); } @@ -53737,14 +59255,7 @@ class TraceConfig_TriggerConfig : public ::protozero::Message { uint32_t, TraceConfig_TriggerConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_TriggerTimeoutMs kTriggerTimeoutMs() { return {}; } + static constexpr FieldMetadata_TriggerTimeoutMs kTriggerTimeoutMs{}; void set_trigger_timeout_ms(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_TriggerTimeoutMs::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -53793,17 +59304,13 @@ class TraceConfig_TriggerConfig_Trigger : public ::protozero::Message { std::string, TraceConfig_TriggerConfig_Trigger>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Name kName() { return {}; } + static constexpr FieldMetadata_Name kName{}; void set_name(const char* data, size_t size) { AppendBytes(FieldMetadata_Name::kFieldId, data, size); } + void set_name(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Name::kFieldId, chars.data, chars.size); + } void set_name(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Name::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -53821,17 +59328,13 @@ class TraceConfig_TriggerConfig_Trigger : public ::protozero::Message { std::string, TraceConfig_TriggerConfig_Trigger>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ProducerNameRegex kProducerNameRegex() { return {}; } + static constexpr FieldMetadata_ProducerNameRegex kProducerNameRegex{}; void set_producer_name_regex(const char* data, size_t size) { AppendBytes(FieldMetadata_ProducerNameRegex::kFieldId, data, size); } + void set_producer_name_regex(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_ProducerNameRegex::kFieldId, chars.data, chars.size); + } void set_producer_name_regex(std::string value) { static constexpr uint32_t field_id = FieldMetadata_ProducerNameRegex::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -53849,14 +59352,7 @@ class TraceConfig_TriggerConfig_Trigger : public ::protozero::Message { uint32_t, TraceConfig_TriggerConfig_Trigger>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_StopDelayMs kStopDelayMs() { return {}; } + static constexpr FieldMetadata_StopDelayMs kStopDelayMs{}; void set_stop_delay_ms(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_StopDelayMs::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -53874,14 +59370,7 @@ class TraceConfig_TriggerConfig_Trigger : public ::protozero::Message { uint32_t, TraceConfig_TriggerConfig_Trigger>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_MaxPer24H kMaxPer24H() { return {}; } + static constexpr FieldMetadata_MaxPer24H kMaxPer24H{}; void set_max_per_24_h(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_MaxPer24H::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -53899,14 +59388,7 @@ class TraceConfig_TriggerConfig_Trigger : public ::protozero::Message { double, TraceConfig_TriggerConfig_Trigger>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_SkipProbability kSkipProbability() { return {}; } + static constexpr FieldMetadata_SkipProbability kSkipProbability{}; void set_skip_probability(double value) { static constexpr uint32_t field_id = FieldMetadata_SkipProbability::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -53917,13 +59399,15 @@ class TraceConfig_TriggerConfig_Trigger : public ::protozero::Message { } }; -class TraceConfig_GuardrailOverrides_Decoder : public ::protozero::TypedProtoDecoder { +class TraceConfig_GuardrailOverrides_Decoder : public ::protozero::TypedProtoDecoder { public: TraceConfig_GuardrailOverrides_Decoder(const uint8_t* data, size_t len) : TypedProtoDecoder(data, len) {} explicit TraceConfig_GuardrailOverrides_Decoder(const std::string& raw) : TypedProtoDecoder(reinterpret_cast(raw.data()), raw.size()) {} explicit TraceConfig_GuardrailOverrides_Decoder(const ::protozero::ConstBytes& raw) : TypedProtoDecoder(raw.data, raw.size) {} bool has_max_upload_per_day_bytes() const { return at<1>().valid(); } uint64_t max_upload_per_day_bytes() const { return at<1>().as_uint64(); } + bool has_max_tracing_buffer_size_kb() const { return at<2>().valid(); } + uint32_t max_tracing_buffer_size_kb() const { return at<2>().as_uint32(); } }; class TraceConfig_GuardrailOverrides : public ::protozero::Message { @@ -53931,6 +59415,7 @@ class TraceConfig_GuardrailOverrides : public ::protozero::Message { using Decoder = TraceConfig_GuardrailOverrides_Decoder; enum : int32_t { kMaxUploadPerDayBytesFieldNumber = 1, + kMaxTracingBufferSizeKbFieldNumber = 2, }; static constexpr const char* GetName() { return ".perfetto.protos.TraceConfig.GuardrailOverrides"; } @@ -53943,14 +59428,7 @@ class TraceConfig_GuardrailOverrides : public ::protozero::Message { uint64_t, TraceConfig_GuardrailOverrides>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_MaxUploadPerDayBytes kMaxUploadPerDayBytes() { return {}; } + static constexpr FieldMetadata_MaxUploadPerDayBytes kMaxUploadPerDayBytes{}; void set_max_upload_per_day_bytes(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_MaxUploadPerDayBytes::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -53959,6 +59437,24 @@ class TraceConfig_GuardrailOverrides : public ::protozero::Message { ::protozero::proto_utils::ProtoSchemaType::kUint64> ::Append(*this, field_id, value); } + + using FieldMetadata_MaxTracingBufferSizeKb = + ::protozero::proto_utils::FieldMetadata< + 2, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint32, + uint32_t, + TraceConfig_GuardrailOverrides>; + + static constexpr FieldMetadata_MaxTracingBufferSizeKb kMaxTracingBufferSizeKb{}; + void set_max_tracing_buffer_size_kb(uint32_t value) { + static constexpr uint32_t field_id = FieldMetadata_MaxTracingBufferSizeKb::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint32> + ::Append(*this, field_id, value); + } }; class TraceConfig_StatsdMetadata_Decoder : public ::protozero::TypedProtoDecoder { @@ -53996,14 +59492,7 @@ class TraceConfig_StatsdMetadata : public ::protozero::Message { int64_t, TraceConfig_StatsdMetadata>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_TriggeringAlertId kTriggeringAlertId() { return {}; } + static constexpr FieldMetadata_TriggeringAlertId kTriggeringAlertId{}; void set_triggering_alert_id(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_TriggeringAlertId::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -54021,14 +59510,7 @@ class TraceConfig_StatsdMetadata : public ::protozero::Message { int32_t, TraceConfig_StatsdMetadata>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_TriggeringConfigUid kTriggeringConfigUid() { return {}; } + static constexpr FieldMetadata_TriggeringConfigUid kTriggeringConfigUid{}; void set_triggering_config_uid(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_TriggeringConfigUid::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -54046,14 +59528,7 @@ class TraceConfig_StatsdMetadata : public ::protozero::Message { int64_t, TraceConfig_StatsdMetadata>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_TriggeringConfigId kTriggeringConfigId() { return {}; } + static constexpr FieldMetadata_TriggeringConfigId kTriggeringConfigId{}; void set_triggering_config_id(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_TriggeringConfigId::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -54071,14 +59546,7 @@ class TraceConfig_StatsdMetadata : public ::protozero::Message { int64_t, TraceConfig_StatsdMetadata>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_TriggeringSubscriptionId kTriggeringSubscriptionId() { return {}; } + static constexpr FieldMetadata_TriggeringSubscriptionId kTriggeringSubscriptionId{}; void set_triggering_subscription_id(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_TriggeringSubscriptionId::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -54121,17 +59589,13 @@ class TraceConfig_ProducerConfig : public ::protozero::Message { std::string, TraceConfig_ProducerConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ProducerName kProducerName() { return {}; } + static constexpr FieldMetadata_ProducerName kProducerName{}; void set_producer_name(const char* data, size_t size) { AppendBytes(FieldMetadata_ProducerName::kFieldId, data, size); } + void set_producer_name(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_ProducerName::kFieldId, chars.data, chars.size); + } void set_producer_name(std::string value) { static constexpr uint32_t field_id = FieldMetadata_ProducerName::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -54149,14 +59613,7 @@ class TraceConfig_ProducerConfig : public ::protozero::Message { uint32_t, TraceConfig_ProducerConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ShmSizeKb kShmSizeKb() { return {}; } + static constexpr FieldMetadata_ShmSizeKb kShmSizeKb{}; void set_shm_size_kb(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_ShmSizeKb::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -54174,14 +59631,7 @@ class TraceConfig_ProducerConfig : public ::protozero::Message { uint32_t, TraceConfig_ProducerConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_PageSizeKb kPageSizeKb() { return {}; } + static constexpr FieldMetadata_PageSizeKb kPageSizeKb{}; void set_page_size_kb(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_PageSizeKb::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -54192,7 +59642,7 @@ class TraceConfig_ProducerConfig : public ::protozero::Message { } }; -class TraceConfig_BuiltinDataSource_Decoder : public ::protozero::TypedProtoDecoder { +class TraceConfig_BuiltinDataSource_Decoder : public ::protozero::TypedProtoDecoder { public: TraceConfig_BuiltinDataSource_Decoder(const uint8_t* data, size_t len) : TypedProtoDecoder(data, len) {} explicit TraceConfig_BuiltinDataSource_Decoder(const std::string& raw) : TypedProtoDecoder(reinterpret_cast(raw.data()), raw.size()) {} @@ -54211,6 +59661,8 @@ class TraceConfig_BuiltinDataSource_Decoder : public ::protozero::TypedProtoDeco uint32_t snapshot_interval_ms() const { return at<6>().as_uint32(); } bool has_prefer_suspend_clock_for_snapshot() const { return at<7>().valid(); } bool prefer_suspend_clock_for_snapshot() const { return at<7>().as_bool(); } + bool has_disable_chunk_usage_histograms() const { return at<8>().valid(); } + bool disable_chunk_usage_histograms() const { return at<8>().as_bool(); } }; class TraceConfig_BuiltinDataSource : public ::protozero::Message { @@ -54224,6 +59676,7 @@ class TraceConfig_BuiltinDataSource : public ::protozero::Message { kPrimaryTraceClockFieldNumber = 5, kSnapshotIntervalMsFieldNumber = 6, kPreferSuspendClockForSnapshotFieldNumber = 7, + kDisableChunkUsageHistogramsFieldNumber = 8, }; static constexpr const char* GetName() { return ".perfetto.protos.TraceConfig.BuiltinDataSource"; } @@ -54236,14 +59689,7 @@ class TraceConfig_BuiltinDataSource : public ::protozero::Message { bool, TraceConfig_BuiltinDataSource>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_DisableClockSnapshotting kDisableClockSnapshotting() { return {}; } + static constexpr FieldMetadata_DisableClockSnapshotting kDisableClockSnapshotting{}; void set_disable_clock_snapshotting(bool value) { static constexpr uint32_t field_id = FieldMetadata_DisableClockSnapshotting::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -54261,14 +59707,7 @@ class TraceConfig_BuiltinDataSource : public ::protozero::Message { bool, TraceConfig_BuiltinDataSource>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_DisableTraceConfig kDisableTraceConfig() { return {}; } + static constexpr FieldMetadata_DisableTraceConfig kDisableTraceConfig{}; void set_disable_trace_config(bool value) { static constexpr uint32_t field_id = FieldMetadata_DisableTraceConfig::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -54286,14 +59725,7 @@ class TraceConfig_BuiltinDataSource : public ::protozero::Message { bool, TraceConfig_BuiltinDataSource>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_DisableSystemInfo kDisableSystemInfo() { return {}; } + static constexpr FieldMetadata_DisableSystemInfo kDisableSystemInfo{}; void set_disable_system_info(bool value) { static constexpr uint32_t field_id = FieldMetadata_DisableSystemInfo::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -54311,14 +59743,7 @@ class TraceConfig_BuiltinDataSource : public ::protozero::Message { bool, TraceConfig_BuiltinDataSource>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_DisableServiceEvents kDisableServiceEvents() { return {}; } + static constexpr FieldMetadata_DisableServiceEvents kDisableServiceEvents{}; void set_disable_service_events(bool value) { static constexpr uint32_t field_id = FieldMetadata_DisableServiceEvents::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -54336,14 +59761,7 @@ class TraceConfig_BuiltinDataSource : public ::protozero::Message { ::perfetto::protos::pbzero::BuiltinClock, TraceConfig_BuiltinDataSource>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_PrimaryTraceClock kPrimaryTraceClock() { return {}; } + static constexpr FieldMetadata_PrimaryTraceClock kPrimaryTraceClock{}; void set_primary_trace_clock(::perfetto::protos::pbzero::BuiltinClock value) { static constexpr uint32_t field_id = FieldMetadata_PrimaryTraceClock::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -54361,14 +59779,7 @@ class TraceConfig_BuiltinDataSource : public ::protozero::Message { uint32_t, TraceConfig_BuiltinDataSource>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_SnapshotIntervalMs kSnapshotIntervalMs() { return {}; } + static constexpr FieldMetadata_SnapshotIntervalMs kSnapshotIntervalMs{}; void set_snapshot_interval_ms(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_SnapshotIntervalMs::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -54386,14 +59797,7 @@ class TraceConfig_BuiltinDataSource : public ::protozero::Message { bool, TraceConfig_BuiltinDataSource>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_PreferSuspendClockForSnapshot kPreferSuspendClockForSnapshot() { return {}; } + static constexpr FieldMetadata_PreferSuspendClockForSnapshot kPreferSuspendClockForSnapshot{}; void set_prefer_suspend_clock_for_snapshot(bool value) { static constexpr uint32_t field_id = FieldMetadata_PreferSuspendClockForSnapshot::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -54402,6 +59806,24 @@ class TraceConfig_BuiltinDataSource : public ::protozero::Message { ::protozero::proto_utils::ProtoSchemaType::kBool> ::Append(*this, field_id, value); } + + using FieldMetadata_DisableChunkUsageHistograms = + ::protozero::proto_utils::FieldMetadata< + 8, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kBool, + bool, + TraceConfig_BuiltinDataSource>; + + static constexpr FieldMetadata_DisableChunkUsageHistograms kDisableChunkUsageHistograms{}; + void set_disable_chunk_usage_histograms(bool value) { + static constexpr uint32_t field_id = FieldMetadata_DisableChunkUsageHistograms::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kBool> + ::Append(*this, field_id, value); + } }; class TraceConfig_DataSource_Decoder : public ::protozero::TypedProtoDecoder { @@ -54436,14 +59858,7 @@ class TraceConfig_DataSource : public ::protozero::Message { DataSourceConfig, TraceConfig_DataSource>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Config kConfig() { return {}; } + static constexpr FieldMetadata_Config kConfig{}; template T* set_config() { return BeginNestedMessage(1); } @@ -54457,17 +59872,13 @@ class TraceConfig_DataSource : public ::protozero::Message { std::string, TraceConfig_DataSource>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ProducerNameFilter kProducerNameFilter() { return {}; } + static constexpr FieldMetadata_ProducerNameFilter kProducerNameFilter{}; void add_producer_name_filter(const char* data, size_t size) { AppendBytes(FieldMetadata_ProducerNameFilter::kFieldId, data, size); } + void add_producer_name_filter(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_ProducerNameFilter::kFieldId, chars.data, chars.size); + } void add_producer_name_filter(std::string value) { static constexpr uint32_t field_id = FieldMetadata_ProducerNameFilter::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -54485,17 +59896,13 @@ class TraceConfig_DataSource : public ::protozero::Message { std::string, TraceConfig_DataSource>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ProducerNameRegexFilter kProducerNameRegexFilter() { return {}; } + static constexpr FieldMetadata_ProducerNameRegexFilter kProducerNameRegexFilter{}; void add_producer_name_regex_filter(const char* data, size_t size) { AppendBytes(FieldMetadata_ProducerNameRegexFilter::kFieldId, data, size); } + void add_producer_name_regex_filter(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_ProducerNameRegexFilter::kFieldId, chars.data, chars.size); + } void add_producer_name_regex_filter(std::string value) { static constexpr uint32_t field_id = FieldMetadata_ProducerNameRegexFilter::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -54526,10 +59933,14 @@ class TraceConfig_BufferConfig : public ::protozero::Message { }; static constexpr const char* GetName() { return ".perfetto.protos.TraceConfig.BufferConfig"; } + using FillPolicy = ::perfetto::protos::pbzero::TraceConfig_BufferConfig_FillPolicy; - static const FillPolicy UNSPECIFIED = TraceConfig_BufferConfig_FillPolicy_UNSPECIFIED; - static const FillPolicy RING_BUFFER = TraceConfig_BufferConfig_FillPolicy_RING_BUFFER; - static const FillPolicy DISCARD = TraceConfig_BufferConfig_FillPolicy_DISCARD; + static inline const char* FillPolicy_Name(FillPolicy value) { + return ::perfetto::protos::pbzero::TraceConfig_BufferConfig_FillPolicy_Name(value); + } + static const FillPolicy UNSPECIFIED = FillPolicy::UNSPECIFIED; + static const FillPolicy RING_BUFFER = FillPolicy::RING_BUFFER; + static const FillPolicy DISCARD = FillPolicy::DISCARD; using FieldMetadata_SizeKb = ::protozero::proto_utils::FieldMetadata< @@ -54539,14 +59950,7 @@ class TraceConfig_BufferConfig : public ::protozero::Message { uint32_t, TraceConfig_BufferConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_SizeKb kSizeKb() { return {}; } + static constexpr FieldMetadata_SizeKb kSizeKb{}; void set_size_kb(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_SizeKb::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -54564,14 +59968,7 @@ class TraceConfig_BufferConfig : public ::protozero::Message { ::perfetto::protos::pbzero::TraceConfig_BufferConfig_FillPolicy, TraceConfig_BufferConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_FillPolicy kFillPolicy() { return {}; } + static constexpr FieldMetadata_FillPolicy kFillPolicy{}; void set_fill_policy(::perfetto::protos::pbzero::TraceConfig_BufferConfig_FillPolicy value) { static constexpr uint32_t field_id = FieldMetadata_FillPolicy::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -54647,14 +60044,7 @@ class TracingServiceEvent : public ::protozero::Message { bool, TracingServiceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_TracingStarted kTracingStarted() { return {}; } + static constexpr FieldMetadata_TracingStarted kTracingStarted{}; void set_tracing_started(bool value) { static constexpr uint32_t field_id = FieldMetadata_TracingStarted::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -54672,14 +60062,7 @@ class TracingServiceEvent : public ::protozero::Message { bool, TracingServiceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_AllDataSourcesStarted kAllDataSourcesStarted() { return {}; } + static constexpr FieldMetadata_AllDataSourcesStarted kAllDataSourcesStarted{}; void set_all_data_sources_started(bool value) { static constexpr uint32_t field_id = FieldMetadata_AllDataSourcesStarted::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -54697,14 +60080,7 @@ class TracingServiceEvent : public ::protozero::Message { bool, TracingServiceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_AllDataSourcesFlushed kAllDataSourcesFlushed() { return {}; } + static constexpr FieldMetadata_AllDataSourcesFlushed kAllDataSourcesFlushed{}; void set_all_data_sources_flushed(bool value) { static constexpr uint32_t field_id = FieldMetadata_AllDataSourcesFlushed::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -54722,14 +60098,7 @@ class TracingServiceEvent : public ::protozero::Message { bool, TracingServiceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ReadTracingBuffersCompleted kReadTracingBuffersCompleted() { return {}; } + static constexpr FieldMetadata_ReadTracingBuffersCompleted kReadTracingBuffersCompleted{}; void set_read_tracing_buffers_completed(bool value) { static constexpr uint32_t field_id = FieldMetadata_ReadTracingBuffersCompleted::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -54747,14 +60116,7 @@ class TracingServiceEvent : public ::protozero::Message { bool, TracingServiceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_TracingDisabled kTracingDisabled() { return {}; } + static constexpr FieldMetadata_TracingDisabled kTracingDisabled{}; void set_tracing_disabled(bool value) { static constexpr uint32_t field_id = FieldMetadata_TracingDisabled::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -54772,14 +60134,7 @@ class TracingServiceEvent : public ::protozero::Message { bool, TracingServiceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_SeizedForBugreport kSeizedForBugreport() { return {}; } + static constexpr FieldMetadata_SeizedForBugreport kSeizedForBugreport{}; void set_seized_for_bugreport(bool value) { static constexpr uint32_t field_id = FieldMetadata_SeizedForBugreport::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -54815,7 +60170,7 @@ namespace pbzero { class Utsname; -class SystemInfo_Decoder : public ::protozero::TypedProtoDecoder { +class SystemInfo_Decoder : public ::protozero::TypedProtoDecoder { public: SystemInfo_Decoder(const uint8_t* data, size_t len) : TypedProtoDecoder(data, len) {} explicit SystemInfo_Decoder(const std::string& raw) : TypedProtoDecoder(reinterpret_cast(raw.data()), raw.size()) {} @@ -54830,6 +60185,8 @@ class SystemInfo_Decoder : public ::protozero::TypedProtoDecoder().as_string(); } bool has_android_sdk_version() const { return at<5>().valid(); } uint64_t android_sdk_version() const { return at<5>().as_uint64(); } + bool has_page_size() const { return at<6>().valid(); } + uint32_t page_size() const { return at<6>().as_uint32(); } }; class SystemInfo : public ::protozero::Message { @@ -54841,6 +60198,7 @@ class SystemInfo : public ::protozero::Message { kHzFieldNumber = 3, kTracingServiceVersionFieldNumber = 4, kAndroidSdkVersionFieldNumber = 5, + kPageSizeFieldNumber = 6, }; static constexpr const char* GetName() { return ".perfetto.protos.SystemInfo"; } @@ -54853,14 +60211,7 @@ class SystemInfo : public ::protozero::Message { Utsname, SystemInfo>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Utsname kUtsname() { return {}; } + static constexpr FieldMetadata_Utsname kUtsname{}; template T* set_utsname() { return BeginNestedMessage(1); } @@ -54874,17 +60225,13 @@ class SystemInfo : public ::protozero::Message { std::string, SystemInfo>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_AndroidBuildFingerprint kAndroidBuildFingerprint() { return {}; } + static constexpr FieldMetadata_AndroidBuildFingerprint kAndroidBuildFingerprint{}; void set_android_build_fingerprint(const char* data, size_t size) { AppendBytes(FieldMetadata_AndroidBuildFingerprint::kFieldId, data, size); } + void set_android_build_fingerprint(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_AndroidBuildFingerprint::kFieldId, chars.data, chars.size); + } void set_android_build_fingerprint(std::string value) { static constexpr uint32_t field_id = FieldMetadata_AndroidBuildFingerprint::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -54902,14 +60249,7 @@ class SystemInfo : public ::protozero::Message { int64_t, SystemInfo>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Hz kHz() { return {}; } + static constexpr FieldMetadata_Hz kHz{}; void set_hz(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_Hz::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -54927,17 +60267,13 @@ class SystemInfo : public ::protozero::Message { std::string, SystemInfo>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_TracingServiceVersion kTracingServiceVersion() { return {}; } + static constexpr FieldMetadata_TracingServiceVersion kTracingServiceVersion{}; void set_tracing_service_version(const char* data, size_t size) { AppendBytes(FieldMetadata_TracingServiceVersion::kFieldId, data, size); } + void set_tracing_service_version(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_TracingServiceVersion::kFieldId, chars.data, chars.size); + } void set_tracing_service_version(std::string value) { static constexpr uint32_t field_id = FieldMetadata_TracingServiceVersion::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -54955,14 +60291,7 @@ class SystemInfo : public ::protozero::Message { uint64_t, SystemInfo>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_AndroidSdkVersion kAndroidSdkVersion() { return {}; } + static constexpr FieldMetadata_AndroidSdkVersion kAndroidSdkVersion{}; void set_android_sdk_version(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_AndroidSdkVersion::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -54971,6 +60300,24 @@ class SystemInfo : public ::protozero::Message { ::protozero::proto_utils::ProtoSchemaType::kUint64> ::Append(*this, field_id, value); } + + using FieldMetadata_PageSize = + ::protozero::proto_utils::FieldMetadata< + 6, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint32, + uint32_t, + SystemInfo>; + + static constexpr FieldMetadata_PageSize kPageSize{}; + void set_page_size(uint32_t value) { + static constexpr uint32_t field_id = FieldMetadata_PageSize::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint32> + ::Append(*this, field_id, value); + } }; class Utsname_Decoder : public ::protozero::TypedProtoDecoder { @@ -55008,17 +60355,13 @@ class Utsname : public ::protozero::Message { std::string, Utsname>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Sysname kSysname() { return {}; } + static constexpr FieldMetadata_Sysname kSysname{}; void set_sysname(const char* data, size_t size) { AppendBytes(FieldMetadata_Sysname::kFieldId, data, size); } + void set_sysname(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Sysname::kFieldId, chars.data, chars.size); + } void set_sysname(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Sysname::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -55036,17 +60379,13 @@ class Utsname : public ::protozero::Message { std::string, Utsname>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Version kVersion() { return {}; } + static constexpr FieldMetadata_Version kVersion{}; void set_version(const char* data, size_t size) { AppendBytes(FieldMetadata_Version::kFieldId, data, size); } + void set_version(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Version::kFieldId, chars.data, chars.size); + } void set_version(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Version::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -55064,17 +60403,13 @@ class Utsname : public ::protozero::Message { std::string, Utsname>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Release kRelease() { return {}; } + static constexpr FieldMetadata_Release kRelease{}; void set_release(const char* data, size_t size) { AppendBytes(FieldMetadata_Release::kFieldId, data, size); } + void set_release(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Release::kFieldId, chars.data, chars.size); + } void set_release(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Release::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -55092,17 +60427,13 @@ class Utsname : public ::protozero::Message { std::string, Utsname>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Machine kMachine() { return {}; } + static constexpr FieldMetadata_Machine kMachine{}; void set_machine(const char* data, size_t size) { AppendBytes(FieldMetadata_Machine::kFieldId, data, size); } + void set_machine(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Machine::kFieldId, chars.data, chars.size); + } void set_machine(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Machine::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -55113,6 +60444,88 @@ class Utsname : public ::protozero::Message { } }; +} // Namespace. +} // Namespace. +} // Namespace. +#endif // Include guard. +// gen_amalgamated begin header: gen/protos/perfetto/trace/trace_uuid.pbzero.h +// Autogenerated by the ProtoZero compiler plugin. DO NOT EDIT. + +#ifndef PERFETTO_PROTOS_PROTOS_PERFETTO_TRACE_TRACE_UUID_PROTO_H_ +#define PERFETTO_PROTOS_PROTOS_PERFETTO_TRACE_TRACE_UUID_PROTO_H_ + +#include +#include + +// gen_amalgamated expanded: #include "perfetto/protozero/field_writer.h" +// gen_amalgamated expanded: #include "perfetto/protozero/message.h" +// gen_amalgamated expanded: #include "perfetto/protozero/packed_repeated_fields.h" +// gen_amalgamated expanded: #include "perfetto/protozero/proto_decoder.h" +// gen_amalgamated expanded: #include "perfetto/protozero/proto_utils.h" + +namespace perfetto { +namespace protos { +namespace pbzero { + + +class TraceUuid_Decoder : public ::protozero::TypedProtoDecoder { + public: + TraceUuid_Decoder(const uint8_t* data, size_t len) : TypedProtoDecoder(data, len) {} + explicit TraceUuid_Decoder(const std::string& raw) : TypedProtoDecoder(reinterpret_cast(raw.data()), raw.size()) {} + explicit TraceUuid_Decoder(const ::protozero::ConstBytes& raw) : TypedProtoDecoder(raw.data, raw.size) {} + bool has_msb() const { return at<1>().valid(); } + int64_t msb() const { return at<1>().as_int64(); } + bool has_lsb() const { return at<2>().valid(); } + int64_t lsb() const { return at<2>().as_int64(); } +}; + +class TraceUuid : public ::protozero::Message { + public: + using Decoder = TraceUuid_Decoder; + enum : int32_t { + kMsbFieldNumber = 1, + kLsbFieldNumber = 2, + }; + static constexpr const char* GetName() { return ".perfetto.protos.TraceUuid"; } + + + using FieldMetadata_Msb = + ::protozero::proto_utils::FieldMetadata< + 1, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kInt64, + int64_t, + TraceUuid>; + + static constexpr FieldMetadata_Msb kMsb{}; + void set_msb(int64_t value) { + static constexpr uint32_t field_id = FieldMetadata_Msb::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kInt64> + ::Append(*this, field_id, value); + } + + using FieldMetadata_Lsb = + ::protozero::proto_utils::FieldMetadata< + 2, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kInt64, + int64_t, + TraceUuid>; + + static constexpr FieldMetadata_Lsb kLsb{}; + void set_lsb(int64_t value) { + static constexpr uint32_t field_id = FieldMetadata_Lsb::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kInt64> + ::Append(*this, field_id, value); + } +}; + } // Namespace. } // Namespace. } // Namespace. @@ -55169,17 +60582,13 @@ class Trigger : public ::protozero::Message { std::string, Trigger>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_TriggerName kTriggerName() { return {}; } + static constexpr FieldMetadata_TriggerName kTriggerName{}; void set_trigger_name(const char* data, size_t size) { AppendBytes(FieldMetadata_TriggerName::kFieldId, data, size); } + void set_trigger_name(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_TriggerName::kFieldId, chars.data, chars.size); + } void set_trigger_name(std::string value) { static constexpr uint32_t field_id = FieldMetadata_TriggerName::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -55197,17 +60606,13 @@ class Trigger : public ::protozero::Message { std::string, Trigger>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ProducerName kProducerName() { return {}; } + static constexpr FieldMetadata_ProducerName kProducerName{}; void set_producer_name(const char* data, size_t size) { AppendBytes(FieldMetadata_ProducerName::kFieldId, data, size); } + void set_producer_name(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_ProducerName::kFieldId, chars.data, chars.size); + } void set_producer_name(std::string value) { static constexpr uint32_t field_id = FieldMetadata_ProducerName::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -55225,14 +60630,7 @@ class Trigger : public ::protozero::Message { int32_t, Trigger>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_TrustedProducerUid kTrustedProducerUid() { return {}; } + static constexpr FieldMetadata_TrustedProducerUid kTrustedProducerUid{}; void set_trusted_producer_uid(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_TrustedProducerUid::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -55337,6 +60735,7 @@ class Trigger : public ::protozero::Message { // gen_amalgamated expanded: #include "protos/perfetto/trace/perfetto/tracing_service_event.pbzero.h" // gen_amalgamated expanded: #include "protos/perfetto/trace/system_info.pbzero.h" // gen_amalgamated expanded: #include "protos/perfetto/trace/trace_packet.pbzero.h" +// gen_amalgamated expanded: #include "protos/perfetto/trace/trace_uuid.pbzero.h" // gen_amalgamated expanded: #include "protos/perfetto/trace/trigger.pbzero.h" // General note: this class must assume that Producers are malicious and will @@ -55350,15 +60749,6 @@ class Trigger : public ::protozero::Message { namespace perfetto { -#if PERFETTO_BUILDFLAG(PERFETTO_OS_ANDROID) && \ - PERFETTO_BUILDFLAG(PERFETTO_ANDROID_BUILD) -// These are the only SELinux approved dir for trace files that are created -// directly by traced. -const char* kTraceDirBasePath = "/data/misc/perfetto-traces/"; -const char* kAndroidProductionBugreportTracePath = - "/data/misc/perfetto-traces/bugreport/systrace.pftrace"; -#endif - namespace { constexpr int kMaxBuffersPerConsumer = 128; constexpr uint32_t kDefaultSnapshotsIntervalMs = 10 * 1000; @@ -55489,9 +60879,7 @@ bool NameMatchesFilter(const std::string& name, return filter_matches || filter_regex_matches; } -// Used when: -// 1. TraceConfig.write_into_file == true and output_path is not empty. -// 2. Calling SaveTraceForBugreport(), from perfetto --save-for-bugreport. +// Used when TraceConfig.write_into_file == true and output_path is not empty. base::ScopedFile CreateTraceFile(const std::string& path, bool overwrite) { #if PERFETTO_BUILDFLAG(PERFETTO_OS_ANDROID) && \ PERFETTO_BUILDFLAG(PERFETTO_ANDROID_BUILD) @@ -55499,6 +60887,9 @@ base::ScopedFile CreateTraceFile(const std::string& path, bool overwrite) { // It just improves the actionability of the error when people try to save the // trace in a location that is not SELinux-allowed (a generic "permission // denied" vs "don't put it here, put it there"). + // These are the only SELinux approved dir for trace files that are created + // directly by traced. + static const char* kTraceDirBasePath = "/data/misc/perfetto-traces/"; if (!base::StartsWith(path, kTraceDirBasePath)) { PERFETTO_ELOG("Invalid output_path %s. On Android it must be within %s.", path.c_str(), kTraceDirBasePath); @@ -55519,10 +60910,6 @@ base::ScopedFile CreateTraceFile(const std::string& path, bool overwrite) { return fd; } -std::string GetBugreportTmpPath() { - return GetBugreportPath() + ".tmp"; -} - bool ShouldLogEvent(const TraceConfig& cfg) { switch (cfg.statsd_logging()) { case TraceConfig::STATSD_LOGGING_ENABLED: @@ -55530,10 +60917,10 @@ bool ShouldLogEvent(const TraceConfig& cfg) { case TraceConfig::STATSD_LOGGING_DISABLED: return false; case TraceConfig::STATSD_LOGGING_UNSPECIFIED: - // For backward compatibility with older versions of perfetto_cmd. - return cfg.enable_extra_guardrails(); + break; } - PERFETTO_FATAL("For GCC"); + // For backward compatibility with older versions of perfetto_cmd. + return cfg.enable_extra_guardrails(); } // Appends `data` (which has `size` bytes), to `*packet`. Splits the data in @@ -55561,24 +60948,6 @@ void AppendOwnedSlicesToPacket(std::unique_ptr data, } // namespace -// These constants instead are defined in the header because are used by tests. -constexpr size_t TracingServiceImpl::kDefaultShmSize; -constexpr size_t TracingServiceImpl::kDefaultShmPageSize; - -constexpr size_t TracingServiceImpl::kMaxShmSize; -constexpr uint32_t TracingServiceImpl::kDataSourceStopTimeoutMs; -constexpr uint8_t TracingServiceImpl::kSyncMarker[]; - -std::string GetBugreportPath() { -#if PERFETTO_BUILDFLAG(PERFETTO_OS_ANDROID) && \ - PERFETTO_BUILDFLAG(PERFETTO_ANDROID_BUILD) - return kAndroidProductionBugreportTracePath; -#else - // Only for tests, SaveTraceForBugreport is not used on other OSes. - return base::GetSysTempDir() + "/bugreport.pftrace"; -#endif -} - // static std::unique_ptr TracingService::CreateInstance( std::unique_ptr shm_factory, @@ -55816,9 +61185,17 @@ base::Status TracingServiceImpl::EnableTracing(ConsumerEndpointImpl* consumer, const TraceConfig& cfg, base::ScopedFile fd) { PERFETTO_DCHECK_THREAD(thread_checker_); - PERFETTO_DLOG("Enabling tracing for consumer %p", - reinterpret_cast(consumer)); - MaybeLogUploadEvent(cfg, PerfettoStatsdAtom::kTracedEnableTracing); + + // If the producer is specifying a UUID, respect that (at least for the first + // snapshot). Otherwise generate a new UUID. + base::Uuid uuid(cfg.trace_uuid_lsb(), cfg.trace_uuid_msb()); + if (!uuid) + uuid = base::Uuidv4(); + + PERFETTO_DLOG("Enabling tracing for consumer %p, UUID: %s", + reinterpret_cast(consumer), + uuid.ToPrettyString().c_str()); + MaybeLogUploadEvent(cfg, uuid, PerfettoStatsdAtom::kTracedEnableTracing); if (cfg.lockdown_mode() == TraceConfig::LOCKDOWN_SET) lockdown_mode_ = true; if (cfg.lockdown_mode() == TraceConfig::LOCKDOWN_CLEAR) @@ -55831,7 +61208,8 @@ base::Status TracingServiceImpl::EnableTracing(ConsumerEndpointImpl* consumer, GetTracingSession(consumer->tracing_session_id_); if (tracing_session) { MaybeLogUploadEvent( - cfg, PerfettoStatsdAtom::kTracedEnableTracingExistingTraceSession); + cfg, uuid, + PerfettoStatsdAtom::kTracedEnableTracingExistingTraceSession); return PERFETTO_SVC_ERR( "A Consumer is trying to EnableTracing() but another tracing " "session is already active (forgot a call to FreeBuffers() ?)"); @@ -55842,7 +61220,7 @@ base::Status TracingServiceImpl::EnableTracing(ConsumerEndpointImpl* consumer, ? kGuardrailsMaxTracingDurationMillis : kMaxTracingDurationMillis; if (cfg.duration_ms() > max_duration_ms) { - MaybeLogUploadEvent(cfg, + MaybeLogUploadEvent(cfg, uuid, PerfettoStatsdAtom::kTracedEnableTracingTooLongTrace); return PERFETTO_SVC_ERR("Requested too long trace (%" PRIu32 "ms > %" PRIu32 " ms)", @@ -55851,20 +61229,30 @@ base::Status TracingServiceImpl::EnableTracing(ConsumerEndpointImpl* consumer, const bool has_trigger_config = cfg.trigger_config().trigger_mode() != TraceConfig::TriggerConfig::UNSPECIFIED; - if (has_trigger_config && (cfg.trigger_config().trigger_timeout_ms() == 0 || - cfg.trigger_config().trigger_timeout_ms() > - kGuardrailsMaxTracingDurationMillis)) { + if (has_trigger_config && + (cfg.trigger_config().trigger_timeout_ms() == 0 || + cfg.trigger_config().trigger_timeout_ms() > max_duration_ms)) { MaybeLogUploadEvent( - cfg, PerfettoStatsdAtom::kTracedEnableTracingInvalidTriggerTimeout); + cfg, uuid, + PerfettoStatsdAtom::kTracedEnableTracingInvalidTriggerTimeout); return PERFETTO_SVC_ERR( "Traces with START_TRACING triggers must provide a positive " "trigger_timeout_ms < 7 days (received %" PRIu32 "ms)", cfg.trigger_config().trigger_timeout_ms()); } + // This check has been introduced in May 2023 after finding b/274931668. + if (static_cast(cfg.trigger_config().trigger_mode()) > + TraceConfig::TriggerConfig::TriggerMode_MAX) { + MaybeLogUploadEvent( + cfg, uuid, PerfettoStatsdAtom::kTracedEnableTracingInvalidTriggerMode); + return PERFETTO_SVC_ERR( + "The trace config specified an invalid trigger_mode"); + } + if (has_trigger_config && cfg.duration_ms() != 0) { MaybeLogUploadEvent( - cfg, PerfettoStatsdAtom::kTracedEnableTracingDurationWithTrigger); + cfg, uuid, PerfettoStatsdAtom::kTracedEnableTracingDurationWithTrigger); return PERFETTO_SVC_ERR( "duration_ms was set, this must not be set for traces with triggers."); } @@ -55879,7 +61267,8 @@ base::Status TracingServiceImpl::EnableTracing(ConsumerEndpointImpl* consumer, // emitting them wildy out of order breaking windowed sorting in trace // processor). MaybeLogUploadEvent( - cfg, PerfettoStatsdAtom::kTracedEnableTracingStopTracingWriteIntoFile); + cfg, uuid, + PerfettoStatsdAtom::kTracedEnableTracingStopTracingWriteIntoFile); return PERFETTO_SVC_ERR( "Specifying trigger mode STOP_TRACING and write_into_file together is " "unsupported"); @@ -55889,7 +61278,8 @@ base::Status TracingServiceImpl::EnableTracing(ConsumerEndpointImpl* consumer, for (const auto& trigger : cfg.trigger_config().triggers()) { if (!triggers.insert(trigger.name()).second) { MaybeLogUploadEvent( - cfg, PerfettoStatsdAtom::kTracedEnableTracingDuplicateTriggerName); + cfg, uuid, + PerfettoStatsdAtom::kTracedEnableTracingDuplicateTriggerName); return PERFETTO_SVC_ERR("Duplicate trigger name: %s", trigger.name().c_str()); } @@ -55898,7 +61288,8 @@ base::Status TracingServiceImpl::EnableTracing(ConsumerEndpointImpl* consumer, if (cfg.enable_extra_guardrails()) { if (cfg.deferred_start()) { MaybeLogUploadEvent( - cfg, PerfettoStatsdAtom::kTracedEnableTracingInvalidDeferredStart); + cfg, uuid, + PerfettoStatsdAtom::kTracedEnableTracingInvalidDeferredStart); return PERFETTO_SVC_ERR( "deferred_start=true is not supported in unsupervised traces"); } @@ -55906,24 +61297,30 @@ base::Status TracingServiceImpl::EnableTracing(ConsumerEndpointImpl* consumer, for (const auto& buf : cfg.buffers()) { if (buf.size_kb() % 4 != 0) { MaybeLogUploadEvent( - cfg, PerfettoStatsdAtom::kTracedEnableTracingInvalidBufferSize); + cfg, uuid, + PerfettoStatsdAtom::kTracedEnableTracingInvalidBufferSize); return PERFETTO_SVC_ERR( "buffers.size_kb must be a multiple of 4, got %" PRIu32, buf.size_kb()); } buf_size_sum += buf.size_kb(); } - if (buf_size_sum > kGuardrailsMaxTracingBufferSizeKb) { + + uint32_t max_tracing_buffer_size_kb = + std::max(kGuardrailsMaxTracingBufferSizeKb, + cfg.guardrail_overrides().max_tracing_buffer_size_kb()); + if (buf_size_sum > max_tracing_buffer_size_kb) { MaybeLogUploadEvent( - cfg, PerfettoStatsdAtom::kTracedEnableTracingBufferSizeTooLarge); + cfg, uuid, + PerfettoStatsdAtom::kTracedEnableTracingBufferSizeTooLarge); return PERFETTO_SVC_ERR("Requested too large trace buffer (%" PRIu64 "kB > %" PRIu32 " kB)", - buf_size_sum, kGuardrailsMaxTracingBufferSizeKb); + buf_size_sum, max_tracing_buffer_size_kb); } } if (cfg.buffers_size() > kMaxBuffersPerConsumer) { - MaybeLogUploadEvent(cfg, + MaybeLogUploadEvent(cfg, uuid, PerfettoStatsdAtom::kTracedEnableTracingTooManyBuffers); return PERFETTO_SVC_ERR("Too many buffers configured (%d)", cfg.buffers_size()); @@ -55936,7 +61333,7 @@ base::Status TracingServiceImpl::EnableTracing(ConsumerEndpointImpl* consumer, size_t target_buffer = cfg_data_source.config().target_buffer(); if (target_buffer >= num_buffers) { MaybeLogUploadEvent( - cfg, PerfettoStatsdAtom::kTracedEnableTracingOobTargetBuffer); + cfg, uuid, PerfettoStatsdAtom::kTracedEnableTracingOobTargetBuffer); return PERFETTO_SVC_ERR( "Data source \"%s\" specified an out of bounds target_buffer (%zu >= " "%zu)", @@ -55947,9 +61344,12 @@ base::Status TracingServiceImpl::EnableTracing(ConsumerEndpointImpl* consumer, if (!cfg.unique_session_name().empty()) { const std::string& name = cfg.unique_session_name(); for (auto& kv : tracing_sessions_) { + if (kv.second.state == TracingSession::CLONED_READ_ONLY) + continue; // Don't consider cloned sessions in uniqueness checks. if (kv.second.config.unique_session_name() == name) { MaybeLogUploadEvent( - cfg, PerfettoStatsdAtom::kTracedEnableTracingDuplicateSessionName); + cfg, uuid, + PerfettoStatsdAtom::kTracedEnableTracingDuplicateSessionName); static const char fmt[] = "A trace with this unique session name (%s) already exists"; // This happens frequently, don't make it an "E"LOG. @@ -55980,7 +61380,8 @@ base::Status TracingServiceImpl::EnableTracing(ConsumerEndpointImpl* consumer, previous_s = now_s; } else { MaybeLogUploadEvent( - cfg, PerfettoStatsdAtom::kTracedEnableTracingSessionNameTooRecent); + cfg, uuid, + PerfettoStatsdAtom::kTracedEnableTracingSessionNameTooRecent); return PERFETTO_SVC_ERR( "A trace with unique session name \"%s\" began less than %" PRId64 "s ago (%" PRId64 "s)", @@ -56000,7 +61401,8 @@ base::Status TracingServiceImpl::EnableTracing(ConsumerEndpointImpl* consumer, } if (sessions_for_uid >= per_uid_limit) { MaybeLogUploadEvent( - cfg, PerfettoStatsdAtom::kTracedEnableTracingTooManySessionsForUid); + cfg, uuid, + PerfettoStatsdAtom::kTracedEnableTracingTooManySessionsForUid); return PERFETTO_SVC_ERR( "Too many concurrent tracing sesions (%d) for uid %d limit is %d", sessions_for_uid, static_cast(consumer->uid_), per_uid_limit); @@ -56012,7 +61414,8 @@ base::Status TracingServiceImpl::EnableTracing(ConsumerEndpointImpl* consumer, // trace_probes and the way it handles stalls in the shmem buffer. if (tracing_sessions_.size() >= kMaxConcurrentTracingSessions) { MaybeLogUploadEvent( - cfg, PerfettoStatsdAtom::kTracedEnableTracingTooManyConcurrentSessions); + cfg, uuid, + PerfettoStatsdAtom::kTracedEnableTracingTooManyConcurrentSessions); return PERFETTO_SVC_ERR("Too many concurrent tracing sesions (%zu)", tracing_sessions_.size()); } @@ -56027,7 +61430,7 @@ base::Status TracingServiceImpl::EnableTracing(ConsumerEndpointImpl* consumer, trace_filter.reset(new protozero::MessageFilter()); if (!trace_filter->LoadFilterBytecode(bytecode.data(), bytecode.size())) { MaybeLogUploadEvent( - cfg, PerfettoStatsdAtom::kTracedEnableTracingInvalidFilter); + cfg, uuid, PerfettoStatsdAtom::kTracedEnableTracingInvalidFilter); return PERFETTO_SVC_ERR("Trace filter bytecode invalid, aborting"); } // The filter is created using perfetto.protos.Trace as root message @@ -56041,7 +61444,7 @@ base::Status TracingServiceImpl::EnableTracing(ConsumerEndpointImpl* consumer, uint32_t packet_field_id = TracePacket::kPacketFieldNumber; if (!trace_filter->SetFilterRoot(&packet_field_id, 1)) { MaybeLogUploadEvent( - cfg, PerfettoStatsdAtom::kTracedEnableTracingInvalidFilter); + cfg, uuid, PerfettoStatsdAtom::kTracedEnableTracingInvalidFilter); return PERFETTO_SVC_ERR("Failed to set filter root."); } } @@ -56053,15 +61456,17 @@ base::Status TracingServiceImpl::EnableTracing(ConsumerEndpointImpl* consumer, std::forward_as_tuple(tsid, consumer, cfg, task_runner_)) .first->second; + tracing_session->trace_uuid = uuid; + if (trace_filter) tracing_session->trace_filter = std::move(trace_filter); if (cfg.write_into_file()) { if (!fd ^ !cfg.output_path().empty()) { - tracing_sessions_.erase(tsid); MaybeLogUploadEvent( - tracing_session->config, + tracing_session->config, uuid, PerfettoStatsdAtom::kTracedEnableTracingInvalidFdOutputFile); + tracing_sessions_.erase(tsid); return PERFETTO_SVC_ERR( "When write_into_file==true either a FD needs to be passed or " "output_path must be populated (but not both)"); @@ -56070,7 +61475,7 @@ base::Status TracingServiceImpl::EnableTracing(ConsumerEndpointImpl* consumer, fd = CreateTraceFile(cfg.output_path(), /*overwrite=*/false); if (!fd) { MaybeLogUploadEvent( - tracing_session->config, + tracing_session->config, uuid, PerfettoStatsdAtom::kTracedEnableTracingFailedToCreateFile); tracing_sessions_.erase(tsid); return PERFETTO_SVC_ERR("Failed to create the trace file %s", @@ -56090,6 +61495,7 @@ base::Status TracingServiceImpl::EnableTracing(ConsumerEndpointImpl* consumer, // Initialize the log buffers. bool did_allocate_all_buffers = true; + bool invalid_buffer_config = false; // Allocate the trace buffers. Also create a map to translate a consumer // relative index (TraceConfig.DataSourceConfig.target_buffer) into the @@ -56106,14 +61512,24 @@ base::Status TracingServiceImpl::EnableTracing(ConsumerEndpointImpl* consumer, break; } tracing_session->buffers_index.push_back(global_id); - const size_t buf_size_bytes = buffer_cfg.size_kb() * 1024u; - total_buf_size_kb += buffer_cfg.size_kb(); + // TraceBuffer size is limited to 32-bit. + const uint32_t buf_size_kb = buffer_cfg.size_kb(); + const uint64_t buf_size_bytes = buf_size_kb * static_cast(1024); + const size_t buf_size = static_cast(buf_size_bytes); + if (buf_size_bytes == 0 || + buf_size_bytes > std::numeric_limits::max() || + buf_size != buf_size_bytes) { + invalid_buffer_config = true; + did_allocate_all_buffers = false; + break; + } + total_buf_size_kb += buf_size_kb; TraceBuffer::OverwritePolicy policy = buffer_cfg.fill_policy() == TraceConfig::BufferConfig::DISCARD ? TraceBuffer::kDiscard : TraceBuffer::kOverwrite; - auto it_and_inserted = buffers_.emplace( - global_id, TraceBuffer::Create(buf_size_bytes, policy)); + auto it_and_inserted = + buffers_.emplace(global_id, TraceBuffer::Create(buf_size, policy)); PERFETTO_DCHECK(it_and_inserted.second); // buffers_.count(global_id) == 0. std::unique_ptr& trace_buffer = it_and_inserted.first->second; if (!trace_buffer) { @@ -56122,25 +61538,29 @@ base::Status TracingServiceImpl::EnableTracing(ConsumerEndpointImpl* consumer, } } - UpdateMemoryGuardrail(); - // This can happen if either: // - All the kMaxTraceBufferID slots are taken. - // - OOM, or, more relistically, we exhausted virtual memory. + // - OOM, or, more realistically, we exhausted virtual memory. + // - The buffer size in the config is invalid. // In any case, free all the previously allocated buffers and abort. - // TODO(fmayer): add a test to cover this case, this is quite subtle. if (!did_allocate_all_buffers) { for (BufferID global_id : tracing_session->buffers_index) { buffer_ids_.Free(global_id); buffers_.erase(global_id); } - tracing_sessions_.erase(tsid); - MaybeLogUploadEvent(tracing_session->config, + MaybeLogUploadEvent(tracing_session->config, uuid, PerfettoStatsdAtom::kTracedEnableTracingOom); + tracing_sessions_.erase(tsid); + if (invalid_buffer_config) { + return PERFETTO_SVC_ERR( + "Failed to allocate tracing buffers: Invalid buffer sizes"); + } return PERFETTO_SVC_ERR( "Failed to allocate tracing buffers: OOM or too many buffers"); } + UpdateMemoryGuardrail(); + consumer->tracing_session_id_ = tsid; // Setup the data sources on the producers without starting them. @@ -56189,14 +61609,20 @@ base::Status TracingServiceImpl::EnableTracing(ConsumerEndpointImpl* consumer, tracing_session->config.set_duration_ms( cfg.trigger_config().trigger_timeout_ms()); break; + + // The case of unknown modes (coming from future versions of the service) + // is handled few lines above (search for TriggerMode_MAX). } tracing_session->state = TracingSession::CONFIGURED; PERFETTO_LOG( "Configured tracing session %" PRIu64 - ", #sources:%zu, duration:%d ms, #buffers:%d, total " + ", #sources:%zu, duration:%d ms%s, #buffers:%d, total " "buffer size:%zu KB, total sessions:%zu, uid:%d session name: \"%s\"", tsid, cfg.data_sources().size(), tracing_session->config.duration_ms(), + tracing_session->config.prefer_suspend_clock_for_duration() + ? " (suspend_clock)" + : "", cfg.buffers_size(), total_buf_size_kb, tracing_sessions_.size(), static_cast(consumer->uid_), cfg.unique_session_name().c_str()); @@ -56339,12 +61765,12 @@ base::Status TracingServiceImpl::StartTracing(TracingSessionID tsid) { "StartTracing() failed, invalid session ID %" PRIu64, tsid); } - MaybeLogUploadEvent(tracing_session->config, + MaybeLogUploadEvent(tracing_session->config, tracing_session->trace_uuid, PerfettoStatsdAtom::kTracedStartTracing); if (tracing_session->state != TracingSession::CONFIGURED) { MaybeLogUploadEvent( - tracing_session->config, + tracing_session->config, tracing_session->trace_uuid, PerfettoStatsdAtom::kTracedStartTracingInvalidSessionState); return PERFETTO_SVC_ERR("StartTracing() failed, invalid session state: %d", tracing_session->state); @@ -56396,28 +61822,19 @@ base::Status TracingServiceImpl::StartTracing(TracingSessionID tsid) { // Trigger delayed task if the trace is time limited. const uint32_t trace_duration_ms = tracing_session->config.duration_ms(); if (trace_duration_ms > 0) { - task_runner_->PostDelayedTask( - [weak_this, tsid] { - // Skip entirely the flush if the trace session doesn't exist anymore. - // This is to prevent misleading error messages to be logged. - if (!weak_this) - return; - auto* tracing_session_ptr = weak_this->GetTracingSession(tsid); - if (!tracing_session_ptr) - return; - // If this trace was using STOP_TRACING triggers and we've seen - // one, then the trigger overrides the normal timeout. In this - // case we just return and let the other task clean up this trace. - if (tracing_session_ptr->config.trigger_config().trigger_mode() == - TraceConfig::TriggerConfig::STOP_TRACING && - !tracing_session_ptr->received_triggers.empty()) - return; - // In all other cases (START_TRACING or no triggers) we flush - // after |trace_duration_ms| unconditionally. - weak_this->FlushAndDisableTracing(tsid); - }, - trace_duration_ms); - } + auto stop_task = + std::bind(&TracingServiceImpl::StopOnDurationMsExpiry, weak_this, tsid); + if (tracing_session->config.prefer_suspend_clock_for_duration()) { + base::PeriodicTask::Args stop_args; + stop_args.use_suspend_aware_timer = true; + stop_args.period_ms = trace_duration_ms; + stop_args.one_shot = true; + stop_args.task = std::move(stop_task); + tracing_session->timed_stop_task.Start(stop_args); + } else { + task_runner_->PostDelayedTask(std::move(stop_task), trace_duration_ms); + } + } // if (trace_duration_ms > 0). // Start the periodic drain tasks if we should to save the trace into a file. if (tracing_session->config.write_into_file()) { @@ -56454,6 +61871,29 @@ base::Status TracingServiceImpl::StartTracing(TracingSessionID tsid) { return base::OkStatus(); } +// static +void TracingServiceImpl::StopOnDurationMsExpiry( + base::WeakPtr weak_this, + TracingSessionID tsid) { + // Skip entirely the flush if the trace session doesn't exist anymore. + // This is to prevent misleading error messages to be logged. + if (!weak_this) + return; + auto* tracing_session_ptr = weak_this->GetTracingSession(tsid); + if (!tracing_session_ptr) + return; + // If this trace was using STOP_TRACING triggers and we've seen + // one, then the trigger overrides the normal timeout. In this + // case we just return and let the other task clean up this trace. + if (tracing_session_ptr->config.trigger_config().trigger_mode() == + TraceConfig::TriggerConfig::STOP_TRACING && + !tracing_session_ptr->received_triggers.empty()) + return; + // In all other cases (START_TRACING or no triggers) we flush + // after |trace_duration_ms| unconditionally. + weak_this->FlushAndDisableTracing(tsid); +} + void TracingServiceImpl::StartDataSourceInstance( ProducerEndpointImpl* producer, TracingSession* tracing_session, @@ -56490,7 +61930,7 @@ void TracingServiceImpl::DisableTracing(TracingSessionID tsid, return; } - MaybeLogUploadEvent(tracing_session->config, + MaybeLogUploadEvent(tracing_session->config, tracing_session->trace_uuid, PerfettoStatsdAtom::kTracedDisableTracing); switch (tracing_session->state) { @@ -56499,6 +61939,10 @@ void TracingServiceImpl::DisableTracing(TracingSessionID tsid, PERFETTO_DCHECK(tracing_session->AllDataSourceInstancesStopped()); return; + case TracingSession::CLONED_READ_ONLY: + PERFETTO_DLOG("DisableTracing() cannot be called on a cloned session"); + return; + // This is either: // A) The case of a graceful DisableTracing() call followed by a call to // FreeBuffers(), iff |disable_immediately| == true. In this case we want @@ -56676,7 +62120,7 @@ void TracingServiceImpl::ActivateTriggers( for (const auto& trigger_name : triggers) { PERFETTO_DLOG("Received ActivateTriggers request for \"%s\"", trigger_name.c_str()); - base::Hash hash; + base::Hasher hash; hash.Update(trigger_name.c_str(), trigger_name.size()); std::string triggered_session_name; base::Uuid triggered_session_uuid; @@ -56698,9 +62142,10 @@ void TracingServiceImpl::ActivateTriggers( [&trigger_name](const TraceConfig::TriggerConfig::Trigger& trigger) { return trigger.name() == trigger_name; }); - if (iter == tracing_session.config.trigger_config().triggers().end()) { + if (iter == tracing_session.config.trigger_config().triggers().end()) + continue; + if (tracing_session.state == TracingSession::CLONED_READ_ONLY) continue; - } // If this trigger requires a certain producer to have sent it // (non-empty producer_name()) ensure the producer who sent this trigger @@ -56737,9 +62182,8 @@ void TracingServiceImpl::ActivateTriggers( trigger_matched = true; triggered_session_id = tracing_session.id; triggered_session_name = tracing_session.config.unique_session_name(); - triggered_session_uuid.set_lsb_msb( - tracing_session.config.trace_uuid_lsb(), - tracing_session.config.trace_uuid_msb()); + triggered_session_uuid.set_lsb_msb(tracing_session.trace_uuid.lsb(), + tracing_session.trace_uuid.msb()); trigger_mode = static_cast( tracing_session.config.trigger_config().trigger_mode()); @@ -56759,9 +62203,9 @@ void TracingServiceImpl::ActivateTriggers( break; trigger_activated = true; - MaybeLogUploadEvent(tracing_session.config, - PerfettoStatsdAtom::kTracedTriggerStartTracing, - iter->name()); + MaybeLogUploadEvent( + tracing_session.config, tracing_session.trace_uuid, + PerfettoStatsdAtom::kTracedTriggerStartTracing, iter->name()); // We override the trace duration to be the trigger's requested // value, this ensures that the trace will end after this amount @@ -56778,9 +62222,9 @@ void TracingServiceImpl::ActivateTriggers( break; trigger_activated = true; - MaybeLogUploadEvent(tracing_session.config, - PerfettoStatsdAtom::kTracedTriggerStopTracing, - iter->name()); + MaybeLogUploadEvent( + tracing_session.config, tracing_session.trace_uuid, + PerfettoStatsdAtom::kTracedTriggerStopTracing, iter->name()); // Now that we've seen a trigger we need to stop, flush, and disable // this session after the configured |stop_delay_ms|. @@ -56819,9 +62263,9 @@ void TracingServiceImpl::ActivateTriggers( } // for (trigger_name : triggers) } -// Always invoked kDataSourceStopTimeoutMs after DisableTracing(). In nominal -// conditions all data sources should have acked the stop and this will early -// out. +// Always invoked TraceConfig.data_source_stop_timeout_ms (by default +// kDataSourceStopTimeoutMs) after DisableTracing(). In nominal conditions all +// data sources should have acked the stop and this will early out. void TracingServiceImpl::OnDisableTracingTimeout(TracingSessionID tsid) { PERFETTO_DCHECK_THREAD(thread_checker_); TracingSession* tracing_session = GetTracingSession(tsid); @@ -56866,12 +62310,7 @@ void TracingServiceImpl::DisableTracingNotifyConsumerAndFlushFile( ReadBuffersIntoFile(tracing_session->id); } - if (tracing_session->on_disable_callback_for_bugreport) { - std::move(tracing_session->on_disable_callback_for_bugreport)(); - tracing_session->on_disable_callback_for_bugreport = nullptr; - } - - MaybeLogUploadEvent(tracing_session->config, + MaybeLogUploadEvent(tracing_session->config, tracing_session->trace_uuid, PerfettoStatsdAtom::kTracedNotifyTracingDisabled); if (tracing_session->consumer_maybe_null) @@ -57103,7 +62542,7 @@ void TracingServiceImpl::ScrapeSharedMemoryBuffers( // reset to 0 by the service when the chunk was freed). WriterID writer_id = chunk.writer_id(); - base::Optional target_buffer_id = + std::optional target_buffer_id = producer->buffer_id_for_writer(writer_id); // We can only scrape this chunk if we know which log buffer to copy it @@ -57252,21 +62691,6 @@ bool TracingServiceImpl::ReadBuffersIntoConsumer( return false; } - // If a bugreport request happened and the trace was stolen for that, give - // an empty trace with a clear signal to the consumer. This deals only with - // the case of readback-from-IPC. A similar code-path deals with the - // write_into_file case in MaybeSaveTraceForBugreport(). - if (tracing_session->seized_for_bugreport) { - std::vector packets; - if (!tracing_session->config.builtin_data_sources() - .disable_service_events()) { - EmitSeizedForBugreportLifecycleEvent(&packets); - } - EmitLifecycleEvents(tracing_session, &packets); - consumer->consumer_->OnTraceData(std::move(packets), /*has_more=*/false); - return true; - } - if (IsWaitingForTrigger(tracing_session)) return false; @@ -57315,8 +62739,7 @@ bool TracingServiceImpl::ReadBuffersIntoFile(TracingSessionID tsid) { if (!tracing_session->write_into_file) return false; - if (!tracing_session->seized_for_bugreport && - IsWaitingForTrigger(tracing_session)) + if (IsWaitingForTrigger(tracing_session)) return false; // ReadBuffers() can allocate memory internally, for filtering. By limiting @@ -57357,6 +62780,13 @@ bool TracingServiceImpl::ReadBuffersIntoFile(TracingSessionID tsid) { } bool TracingServiceImpl::IsWaitingForTrigger(TracingSession* tracing_session) { + // Ignore the logic below for cloned tracing sessions. In this case we + // actually want to read the (cloned) trace buffers even if no trigger was + // hit. + if (tracing_session->state == TracingSession::CLONED_READ_ONLY) { + return false; + } + // When a tracing session is waiting for a trigger, it is considered empty. If // a tracing session finishes and moves into DISABLED without ever receiving a // trigger, the trace should never return any data. This includes the @@ -57400,7 +62830,7 @@ std::vector TracingServiceImpl::ReadBuffers( } if (!tracing_session->config.builtin_data_sources().disable_trace_config()) { - MaybeEmitTraceConfig(tracing_session, &packets); + MaybeEmitUuidAndTraceConfig(tracing_session, &packets); MaybeEmitReceivedTriggers(tracing_session, &packets); } if (!tracing_session->config.builtin_data_sources().disable_system_info()) @@ -57662,29 +63092,28 @@ void TracingServiceImpl::FreeBuffers(TracingSessionID tsid) { PERFETTO_DCHECK(buffers_.count(buffer_id) == 1); buffers_.erase(buffer_id); } - bool notify_traceur = tracing_session->config.notify_traceur(); + bool notify_traceur = + tracing_session->config.notify_traceur() && + tracing_session->state != TracingSession::CLONED_READ_ONLY; bool is_long_trace = (tracing_session->config.write_into_file() && tracing_session->config.file_write_period_ms() < kMillisPerDay); - bool seized_for_bugreport = tracing_session->seized_for_bugreport; tracing_sessions_.erase(tsid); tracing_session = nullptr; UpdateMemoryGuardrail(); PERFETTO_LOG("Tracing session %" PRIu64 " ended, total sessions:%zu", tsid, tracing_sessions_.size()); - #if PERFETTO_BUILDFLAG(PERFETTO_ANDROID_BUILD) && \ PERFETTO_BUILDFLAG(PERFETTO_OS_ANDROID) - if (notify_traceur && (seized_for_bugreport || is_long_trace)) { + if (notify_traceur && is_long_trace) { PERFETTO_LAZY_LOAD(android_internal::NotifyTraceSessionEnded, notify_fn); - if (!notify_fn || !notify_fn(seized_for_bugreport)) + if (!notify_fn || !notify_fn(/*session_stolen=*/false)) PERFETTO_ELOG("Failed to notify Traceur long tracing has ended"); } #else base::ignore_result(notify_traceur); base::ignore_result(is_long_trace); - base::ignore_result(seized_for_bugreport); #endif } @@ -57913,6 +63342,16 @@ TracingServiceImpl::DataSourceInstance* TracingServiceImpl::SetupDataSource( DataSourceConfig& ds_config = ds_instance->config; ds_config.set_trace_duration_ms(tracing_session->config.duration_ms()); + + // Rationale for `if (prefer) set_prefer(true)`, rather than `set(prefer)`: + // ComputeStartupConfigHash() in tracing_muxer_impl.cc compares hashes of the + // DataSourceConfig and expects to know (and clear) the fields generated by + // the tracing service. Unconditionally adding a new field breaks backward + // compatibility of startup tracing with older SDKs, because the serialization + // also propagates unkonwn fields, breaking the hash matching check. + if (tracing_session->config.prefer_suspend_clock_for_duration()) + ds_config.set_prefer_suspend_clock_for_duration(true); + ds_config.set_stop_timeout_ms(tracing_session->data_source_stop_timeout_ms()); ds_config.set_enable_extra_guardrails( tracing_session->config.enable_extra_guardrails()); @@ -58034,7 +63473,7 @@ void TracingServiceImpl::CopyProducerPageIntoLogBuffer( // If the writer was registered by the producer, it should only write into the // buffer it was registered with. - base::Optional associated_buffer = + std::optional associated_buffer = producer->buffer_id_for_writer(writer_id); if (associated_buffer && *associated_buffer != buffer_id) { PERFETTO_ELOG("Writer %" PRIu16 " of producer %" PRIu16 @@ -58138,6 +63577,23 @@ TracingServiceImpl::TracingSession* TracingServiceImpl::GetTracingSession( return &it->second; } +TracingServiceImpl::TracingSession* +TracingServiceImpl::FindTracingSessionWithMaxBugreportScore() { + TracingSession* max_session = nullptr; + for (auto& session_id_and_session : tracing_sessions_) { + auto& session = session_id_and_session.second; + const int32_t score = session.config.bugreport_score(); + // Exclude sessions with 0 (or below) score. By default tracing sessions + // should NOT be eligible to be attached to bugreports. + if (score <= 0 || session.state != TracingSession::STARTED) + continue; + + if (!max_session || score > max_session->config.bugreport_score()) + max_session = &session; + } + return max_session; +} + ProducerID TracingServiceImpl::GetNextProducerID() { PERFETTO_DCHECK_THREAD(thread_checker_); PERFETTO_CHECK(producers_.size() < kMaxProducerID); @@ -58460,20 +63916,80 @@ TraceStats TracingServiceImpl::GetTraceStats(TracingSession* tracing_session) { } *trace_stats.add_buffer_stats() = buf->stats(); } // for (buf in session). + + if (!tracing_session->config.builtin_data_sources() + .disable_chunk_usage_histograms()) { + // Emit chunk usage stats broken down by sequence ID (i.e. by trace-writer). + // Writer stats are updated by each TraceBuffer object at ReadBuffers time, + // and there can be >1 buffer per session. However, we want to report only + // one histogram per writer. A trace writer never writes to more than one + // buffer (it's technically allowed but doesn't happen in the current impl + // of the tracing SDK). Per-buffer breakdowns would be completely useless. + TraceBuffer::WriterStatsMap merged_stats; + + // First merge all the per-buffer histograms into one-per-writer. + for (const BufferID buf_id : tracing_session->buffers_index) { + const TraceBuffer* buf = GetBufferByID(buf_id); + if (!buf) + continue; + for (auto it = buf->writer_stats().GetIterator(); it; ++it) { + auto& hist = merged_stats.Insert(it.key(), {}).first->used_chunk_hist; + hist.Merge(it.value().used_chunk_hist); + } + } + + // Serialize the merged per-writer histogram into the stats proto. + bool has_written_bucket_definition = false; + for (auto it = merged_stats.GetIterator(); it; ++it) { + const auto& hist = it.value().used_chunk_hist; + ProducerID p; + WriterID w; + GetProducerAndWriterID(it.key(), &p, &w); + if (!has_written_bucket_definition) { + // Serialize one-off the histogram bucket definition, which is the same + // for all entries in the map. + has_written_bucket_definition = true; + // The -1 in the for loop below is to skip the implicit overflow bucket. + for (size_t i = 0; i < hist.num_buckets() - 1; ++i) { + trace_stats.add_chunk_payload_histogram_def(hist.GetBucketThres(i)); + } + } + auto* wri_stats = trace_stats.add_writer_stats(); + wri_stats->set_sequence_id(tracing_session->GetPacketSequenceID(p, w)); + for (size_t i = 0; i < hist.num_buckets(); ++i) { + wri_stats->add_chunk_payload_histogram_counts(hist.GetBucketCount(i)); + wri_stats->add_chunk_payload_histogram_sum(hist.GetBucketSum(i)); + } + } // for (writer in merged_stats.GetIterator()) + } // if (!disable_chunk_usage_histograms) + return trace_stats; } -void TracingServiceImpl::MaybeEmitTraceConfig( +void TracingServiceImpl::MaybeEmitUuidAndTraceConfig( TracingSession* tracing_session, std::vector* packets) { if (tracing_session->did_emit_config) return; tracing_session->did_emit_config = true; - protozero::HeapBuffered packet; - packet->set_trusted_uid(static_cast(uid_)); - packet->set_trusted_packet_sequence_id(kServicePacketSequenceID); - tracing_session->config.Serialize(packet->set_trace_config()); - SerializeAndAppendPacket(packets, packet.SerializeAsArray()); + + { + protozero::HeapBuffered packet; + packet->set_trusted_uid(static_cast(uid_)); + packet->set_trusted_packet_sequence_id(kServicePacketSequenceID); + auto* uuid = packet->set_trace_uuid(); + uuid->set_lsb(tracing_session->trace_uuid.lsb()); + uuid->set_msb(tracing_session->trace_uuid.msb()); + SerializeAndAppendPacket(packets, packet.SerializeAsArray()); + } + + { + protozero::HeapBuffered packet; + packet->set_trusted_uid(static_cast(uid_)); + packet->set_trusted_packet_sequence_id(kServicePacketSequenceID); + tracing_session->config.Serialize(packet->set_trace_config()); + SerializeAndAppendPacket(packets, packet.SerializeAsArray()); + } } void TracingServiceImpl::MaybeEmitSystemInfo( @@ -58505,13 +64021,14 @@ void TracingServiceImpl::MaybeEmitSystemInfo( } std::string sdk_str_value = base::GetAndroidProp("ro.build.version.sdk"); - base::Optional sdk_value = base::StringToUInt64(sdk_str_value); + std::optional sdk_value = base::StringToUInt64(sdk_str_value); if (sdk_value.has_value()) { info->set_android_sdk_version(*sdk_value); } else { PERFETTO_ELOG("Unable to read ro.build.version.sdk"); } info->set_hz(sysconf(_SC_CLK_TCK)); + info->set_page_size(static_cast(sysconf(_SC_PAGESIZE))); #endif // PERFETTO_BUILDFLAG(PERFETTO_OS_ANDROID) packet->set_trusted_uid(static_cast(uid_)); packet->set_trusted_packet_sequence_id(kServicePacketSequenceID); @@ -58552,18 +64069,6 @@ void TracingServiceImpl::EmitLifecycleEvents( SerializeAndAppendPacket(packets, std::move(pair.second)); } -void TracingServiceImpl::EmitSeizedForBugreportLifecycleEvent( - std::vector* packets) { - protozero::HeapBuffered packet; - packet->set_timestamp(static_cast(base::GetBootTimeNs().count())); - packet->set_trusted_uid(static_cast(uid_)); - packet->set_trusted_packet_sequence_id(kServicePacketSequenceID); - auto* service_event = packet->set_service_event(); - service_event->AppendVarInt( - protos::pbzero::TracingServiceEvent::kSeizedForBugreportFieldNumber, 1); - SerializeAndAppendPacket(packets, packet.SerializeAsArray()); -} - void TracingServiceImpl::MaybeEmitReceivedTriggers( TracingSession* tracing_session, std::vector* packets) { @@ -58586,103 +64091,16 @@ void TracingServiceImpl::MaybeEmitReceivedTriggers( } } -bool TracingServiceImpl::MaybeSaveTraceForBugreport( - std::function callback) { - TracingSession* max_session = nullptr; - TracingSessionID max_tsid = 0; - for (auto& session_id_and_session : tracing_sessions_) { - auto& session = session_id_and_session.second; - const int32_t score = session.config.bugreport_score(); - // Exclude sessions with 0 (or below) score. By default tracing sessions - // should NOT be eligible to be attached to bugreports. - if (score <= 0 || session.state != TracingSession::STARTED) - continue; - - // Also don't try to steal long traces with write_into_file if their content - // has been already partially written into a file, as we would get partial - // traces on both sides. We can't just copy the original file into the - // bugreport because the file could be too big (GBs) for bugreports. - // The only case where it's legit to steal traces with write_into_file, is - // when the consumer specified a very large write_period_ms (e.g. 24h), - // meaning that this is effectively a ring-buffer trace. Traceur (the - // Android System Tracing app), which uses --detach, does this to have a - // consistent invocation path for long-traces and ring-buffer-mode traces. - if (session.write_into_file && session.bytes_written_into_file > 0) - continue; - - // If we are already in the process of finalizing another trace for - // bugreport, don't even start another one, as they would try to write onto - // the same file. - if (session.on_disable_callback_for_bugreport) - return false; - - if (!max_session || score > max_session->config.bugreport_score()) { - max_session = &session; - max_tsid = session_id_and_session.first; - } - } - - // No eligible trace found. - if (!max_session) - return false; - - PERFETTO_LOG("Seizing trace for bugreport. tsid:%" PRIu64 - " state:%d wf:%d score:%d name:\"%s\"", - max_tsid, max_session->state, !!max_session->write_into_file, - max_session->config.bugreport_score(), - max_session->config.unique_session_name().c_str()); - - auto br_fd = CreateTraceFile(GetBugreportTmpPath(), /*overwrite=*/true); - if (!br_fd) - return false; - - if (max_session->write_into_file) { - auto fd = *max_session->write_into_file; - // If we are stealing a write_into_file session, add a marker that explains - // why the trace has been stolen rather than creating an empty file. This is - // only for write_into_file traces. A similar code path deals with the case - // of reading-back a seized trace from IPC in ReadBuffersIntoConsumer(). - if (!max_session->config.builtin_data_sources().disable_service_events()) { - std::vector packets; - EmitSeizedForBugreportLifecycleEvent(&packets); - for (auto& packet : packets) { - char* preamble; - size_t preamble_size = 0; - std::tie(preamble, preamble_size) = packet.GetProtoPreamble(); - base::WriteAll(fd, preamble, preamble_size); - for (const Slice& slice : packet.slices()) { - base::WriteAll(fd, slice.start, slice.size); - } - } // for (packets) - } // if (!disable_service_events()) - } // if (max_session->write_into_file) - max_session->write_into_file = std::move(br_fd); - max_session->on_disable_callback_for_bugreport = std::move(callback); - max_session->seized_for_bugreport = true; - - // Post a task to avoid that early FlushAndDisableTracing() failures invoke - // the callback before we return. That would re-enter in a weird way the - // callstack of the calling ConsumerEndpointImpl::SaveTraceForBugreport(). - auto weak_this = weak_ptr_factory_.GetWeakPtr(); - task_runner_->PostTask([weak_this, max_tsid] { - if (weak_this) - weak_this->FlushAndDisableTracing(max_tsid); - }); - return true; -} - void TracingServiceImpl::MaybeLogUploadEvent(const TraceConfig& cfg, + const base::Uuid& uuid, PerfettoStatsdAtom atom, const std::string& trigger_name) { if (!ShouldLogEvent(cfg)) return; - // If the UUID is not set for some reason, don't log anything. - if (cfg.trace_uuid_lsb() == 0 && cfg.trace_uuid_msb() == 0) - return; - - android_stats::MaybeLogUploadEvent(atom, cfg.trace_uuid_lsb(), - cfg.trace_uuid_msb(), trigger_name); + PERFETTO_DCHECK(uuid); // The UUID must be set at this point. + android_stats::MaybeLogUploadEvent(atom, uuid.lsb(), uuid.msb(), + trigger_name); } void TracingServiceImpl::MaybeLogTriggerEvent(const TraceConfig& cfg, @@ -58711,6 +64129,128 @@ size_t TracingServiceImpl::PurgeExpiredAndCountTriggerInWindow( return trigger_count; } +void TracingServiceImpl::FlushAndCloneSession(ConsumerEndpointImpl* consumer, + TracingSessionID tsid) { + PERFETTO_DCHECK_THREAD(thread_checker_); + + if (tsid == kBugreportSessionId) { + TracingSession* session = FindTracingSessionWithMaxBugreportScore(); + if (!session) { + consumer->consumer_->OnSessionCloned( + false, "No tracing sessions eligible for bugreport found"); + return; + } + tsid = session->id; + } + + auto weak_this = weak_ptr_factory_.GetWeakPtr(); + auto weak_consumer = consumer->GetWeakPtr(); + Flush(tsid, 0, [weak_this, tsid, weak_consumer](bool final_flush_outcome) { + PERFETTO_LOG("FlushAndCloneSession(%" PRIu64 ") started, success=%d", tsid, + final_flush_outcome); + if (!weak_this || !weak_consumer) + return; + base::Status result = + weak_this->DoCloneSession(&*weak_consumer, tsid, final_flush_outcome); + weak_consumer->consumer_->OnSessionCloned(result.ok(), result.message()); + }); +} + +base::Status TracingServiceImpl::DoCloneSession(ConsumerEndpointImpl* consumer, + TracingSessionID src_tsid, + bool final_flush_outcome) { + PERFETTO_DLOG("CloneSession(%" PRIu64 ") started, consumer uid: %d", src_tsid, + static_cast(consumer->uid_)); + + TracingSession* src = GetTracingSession(src_tsid); + + // The session might be gone by the time we try to clone it. + if (!src) + return PERFETTO_SVC_ERR("session not found"); + + if (consumer->tracing_session_id_) { + return PERFETTO_SVC_ERR( + "The consumer is already attached to another tracing session"); + } + + if (src->consumer_uid != consumer->uid_ && consumer->uid_ != 0) + return PERFETTO_SVC_ERR("Not allowed to clone a session from another UID"); + + // First clone all TraceBuffer(s). This can fail because of ENOMEM. If it + // happens bail out early before creating any session. + std::vector>> buf_snaps; + buf_snaps.reserve(src->num_buffers()); + bool buf_clone_failed = false; + for (BufferID src_buf_id : src->buffers_index) { + TraceBuffer* src_buf = GetBufferByID(src_buf_id); + std::unique_ptr buf_snap = src_buf->CloneReadOnly(); + BufferID buf_global_id = buffer_ids_.Allocate(); + buf_clone_failed |= !buf_snap.get() || !buf_global_id; + buf_snaps.emplace_back(buf_global_id, std::move(buf_snap)); + } + + // Free up allocated IDs in case of failure. No need to free the TraceBuffers, + // as they are still owned by the temporary |buf_snaps|. + if (buf_clone_failed) { + for (auto& kv : buf_snaps) { + if (kv.first) + buffer_ids_.Free(kv.first); + } + return PERFETTO_SVC_ERR("Buffer allocation failed"); + } + + const TracingSessionID tsid = ++last_tracing_session_id_; + TracingSession* cloned_session = + &tracing_sessions_ + .emplace( + std::piecewise_construct, std::forward_as_tuple(tsid), + std::forward_as_tuple(tsid, consumer, src->config, task_runner_)) + .first->second; + + cloned_session->state = TracingSession::CLONED_READ_ONLY; + cloned_session->trace_uuid = base::Uuidv4(); // Generate a new UUID. + + for (auto& kv : buf_snaps) { + BufferID buf_global_id = kv.first; + std::unique_ptr& buf = kv.second; + buffers_.emplace(buf_global_id, std::move(buf)); + cloned_session->buffers_index.emplace_back(buf_global_id); + } + UpdateMemoryGuardrail(); + + // Copy over relevant state that we want to persist in the cloned session. + // Mostly stats and metadata that is emitted in the trace file by the service. + cloned_session->received_triggers = src->received_triggers; + cloned_session->lifecycle_events = + std::vector(src->lifecycle_events); + cloned_session->initial_clock_snapshot = src->initial_clock_snapshot; + cloned_session->clock_snapshot_ring_buffer = src->clock_snapshot_ring_buffer; + cloned_session->invalid_packets = src->invalid_packets; + cloned_session->flushes_requested = src->flushes_requested; + cloned_session->flushes_succeeded = src->flushes_succeeded; + cloned_session->flushes_failed = src->flushes_failed; + if (src->trace_filter) { + // Copy the trace filter. + cloned_session->trace_filter.reset( + new protozero::MessageFilter(*src->trace_filter)); + } + + SnapshotLifecyleEvent( + cloned_session, + protos::pbzero::TracingServiceEvent::kTracingDisabledFieldNumber, + true /* snapshot_clocks */); + + PERFETTO_DLOG("Consumer (uid:%d) cloned tracing session %" PRIu64 + " -> %" PRIu64, + static_cast(consumer->uid_), src_tsid, tsid); + + consumer->tracing_session_id_ = tsid; + cloned_session->final_flush_outcome = final_flush_outcome + ? TraceStats::FINAL_FLUSH_SUCCEEDED + : TraceStats::FINAL_FLUSH_FAILED; + return base::OkStatus(); +} + //////////////////////////////////////////////////////////////////////////////// // TracingServiceImpl::ConsumerEndpointImpl implementation //////////////////////////////////////////////////////////////////////////////// @@ -58996,6 +64536,9 @@ void TracingServiceImpl::ConsumerEndpointImpl::QueryServiceState( case TracingSession::State::DISABLING_WAITING_STOP_ACKS: session->set_state("STOP_WAIT"); break; + case TracingSession::State::CLONED_READ_ONLY: + session->set_state("CLONED_READ_ONLY"); + break; } } callback(/*success=*/true, svc_state); @@ -59017,21 +64560,16 @@ void TracingServiceImpl::ConsumerEndpointImpl::QueryCapabilities( void TracingServiceImpl::ConsumerEndpointImpl::SaveTraceForBugreport( SaveTraceForBugreportCallback consumer_callback) { + consumer_callback(false, + "SaveTraceForBugreport is deprecated. Use " + "CloneSession(kBugreportSessionId) instead."); +} + +void TracingServiceImpl::ConsumerEndpointImpl::CloneSession( + TracingSessionID tsid) { PERFETTO_DCHECK_THREAD(thread_checker_); - auto on_complete_callback = [consumer_callback] { - if (rename(GetBugreportTmpPath().c_str(), GetBugreportPath().c_str())) { - consumer_callback(false, "rename(" + GetBugreportTmpPath() + ", " + - GetBugreportPath() + ") failed (" + - strerror(errno) + ")"); - } else { - consumer_callback(true, GetBugreportPath()); - } - }; - if (!service_->MaybeSaveTraceForBugreport(std::move(on_complete_callback))) { - consumer_callback(false, - "No trace with TraceConfig.bugreport_score > 0 eligible " - "for bug reporting was found"); - } + // FlushAndCloneSession will call OnSessionCloned after the async flush. + service_->FlushAndCloneSession(this, tsid); } //////////////////////////////////////////////////////////////////////////////// @@ -59066,6 +64604,12 @@ TracingServiceImpl::ProducerEndpointImpl::~ProducerEndpointImpl() { producer_->OnDisconnect(); } +void TracingServiceImpl::ProducerEndpointImpl::Disconnect() { + PERFETTO_DCHECK_THREAD(thread_checker_); + // Disconnection is only supported via destroying the ProducerEndpoint. + PERFETTO_FATAL("Not supported"); +} + void TracingServiceImpl::ProducerEndpointImpl::RegisterDataSource( const DataSourceDescriptor& desc) { PERFETTO_DCHECK_THREAD(thread_checker_); @@ -59345,7 +64889,8 @@ TracingServiceImpl::TracingSession::TracingSession( consumer_maybe_null(consumer), consumer_uid(consumer->uid_), config(new_config), - snapshot_periodic_task(task_runner) { + snapshot_periodic_task(task_runner), + timed_stop_task(task_runner) { // all_data_sources_flushed is special because we store up to 64 events of // this type. Other events will go through the default case in // SnapshotLifecycleEvent() where they will be given a max history of 1. @@ -59488,6 +65033,8 @@ TracingService* InProcessTracingBackend::GetOrCreateService( namespace perfetto { namespace protos { namespace gen { +class CloneSessionResponse; +class CloneSessionRequest; class SaveTraceForBugreportResponse; class SaveTraceForBugreportRequest; class QueryCapabilitiesResponse; @@ -59507,6 +65054,7 @@ class ObserveEventsRequest; class GetTraceStatsResponse; class TraceStats; class TraceStats_FilterStats; +class TraceStats_WriterStats; class TraceStats_BufferStats; class GetTraceStatsRequest; class AttachResponse; @@ -59528,6 +65076,7 @@ class TestConfig; class TestConfig_DummyFields; class InterceptorConfig; class ChromeConfig; +class SystemInfoConfig; class TraceConfig_BufferConfig; class AttachRequest; class DetachResponse; @@ -59570,6 +65119,82 @@ namespace perfetto { namespace protos { namespace gen { +class PERFETTO_EXPORT_COMPONENT CloneSessionResponse : public ::protozero::CppMessageObj { + public: + enum FieldNumbers { + kSuccessFieldNumber = 1, + kErrorFieldNumber = 2, + }; + + CloneSessionResponse(); + ~CloneSessionResponse() override; + CloneSessionResponse(CloneSessionResponse&&) noexcept; + CloneSessionResponse& operator=(CloneSessionResponse&&); + CloneSessionResponse(const CloneSessionResponse&); + CloneSessionResponse& operator=(const CloneSessionResponse&); + bool operator==(const CloneSessionResponse&) const; + bool operator!=(const CloneSessionResponse& other) const { return !(*this == other); } + + bool ParseFromArray(const void*, size_t) override; + std::string SerializeAsString() const override; + std::vector SerializeAsArray() const override; + void Serialize(::protozero::Message*) const; + + bool has_success() const { return _has_field_[1]; } + bool success() const { return success_; } + void set_success(bool value) { success_ = value; _has_field_.set(1); } + + bool has_error() const { return _has_field_[2]; } + const std::string& error() const { return error_; } + void set_error(const std::string& value) { error_ = value; _has_field_.set(2); } + + private: + bool success_{}; + std::string error_{}; + + // Allows to preserve unknown protobuf fields for compatibility + // with future versions of .proto files. + std::string unknown_fields_; + + std::bitset<3> _has_field_{}; +}; + + +class PERFETTO_EXPORT_COMPONENT CloneSessionRequest : public ::protozero::CppMessageObj { + public: + enum FieldNumbers { + kSessionIdFieldNumber = 1, + }; + + CloneSessionRequest(); + ~CloneSessionRequest() override; + CloneSessionRequest(CloneSessionRequest&&) noexcept; + CloneSessionRequest& operator=(CloneSessionRequest&&); + CloneSessionRequest(const CloneSessionRequest&); + CloneSessionRequest& operator=(const CloneSessionRequest&); + bool operator==(const CloneSessionRequest&) const; + bool operator!=(const CloneSessionRequest& other) const { return !(*this == other); } + + bool ParseFromArray(const void*, size_t) override; + std::string SerializeAsString() const override; + std::vector SerializeAsArray() const override; + void Serialize(::protozero::Message*) const; + + bool has_session_id() const { return _has_field_[1]; } + uint64_t session_id() const { return session_id_; } + void set_session_id(uint64_t value) { session_id_ = value; _has_field_.set(1); } + + private: + uint64_t session_id_{}; + + // Allows to preserve unknown protobuf fields for compatibility + // with future versions of .proto files. + std::string unknown_fields_; + + std::bitset<2> _has_field_{}; +}; + + class PERFETTO_EXPORT_COMPONENT SaveTraceForBugreportResponse : public ::protozero::CppMessageObj { public: enum FieldNumbers { @@ -60545,6 +66170,7 @@ class PERFETTO_EXPORT_COMPONENT EnableTracingRequest : public ::protozero::CppMe } // namespace gen #endif // PERFETTO_PROTOS_PROTOS_PERFETTO_IPC_CONSUMER_PORT_PROTO_CPP_H_ +// gen_amalgamated expanded: #include "perfetto/protozero/gen_field_helpers.h" // gen_amalgamated expanded: #include "perfetto/protozero/message.h" // gen_amalgamated expanded: #include "perfetto/protozero/packed_repeated_fields.h" // gen_amalgamated expanded: #include "perfetto/protozero/proto_decoder.h" @@ -60557,6 +66183,7 @@ class PERFETTO_EXPORT_COMPONENT EnableTracingRequest : public ::protozero::CppMe // gen_amalgamated expanded: #include "protos/perfetto/ipc/consumer_port.gen.h" // gen_amalgamated expanded: #include "protos/perfetto/config/trace_config.gen.h" // gen_amalgamated expanded: #include "protos/perfetto/config/data_source_config.gen.h" +// gen_amalgamated expanded: #include "protos/perfetto/config/system_info/system_info.gen.h" // gen_amalgamated expanded: #include "protos/perfetto/config/track_event/track_event_config.gen.h" // gen_amalgamated expanded: #include "protos/perfetto/config/test_config.gen.h" // gen_amalgamated expanded: #include "protos/perfetto/config/sys_stats/sys_stats_config.gen.h" @@ -60566,6 +66193,8 @@ class PERFETTO_EXPORT_COMPONENT EnableTracingRequest : public ::protozero::CppMe // gen_amalgamated expanded: #include "protos/perfetto/config/profiling/java_hprof_config.gen.h" // gen_amalgamated expanded: #include "protos/perfetto/config/profiling/heapprofd_config.gen.h" // gen_amalgamated expanded: #include "protos/perfetto/config/process_stats/process_stats_config.gen.h" +// gen_amalgamated expanded: #include "protos/perfetto/config/statsd/statsd_tracing_config.gen.h" +// gen_amalgamated expanded: #include "protos/perfetto/config/statsd/atom_ids.gen.h" // gen_amalgamated expanded: #include "protos/perfetto/config/power/android_power_config.gen.h" // gen_amalgamated expanded: #include "protos/perfetto/config/interceptor_config.gen.h" // gen_amalgamated expanded: #include "protos/perfetto/config/interceptors/console_config.gen.h" @@ -60575,6 +66204,8 @@ class PERFETTO_EXPORT_COMPONENT EnableTracingRequest : public ::protozero::CppMe // gen_amalgamated expanded: #include "protos/perfetto/config/ftrace/ftrace_config.gen.h" // gen_amalgamated expanded: #include "protos/perfetto/config/chrome/chrome_config.gen.h" // gen_amalgamated expanded: #include "protos/perfetto/config/android/packages_list_config.gen.h" +// gen_amalgamated expanded: #include "protos/perfetto/config/android/network_trace_config.gen.h" +// gen_amalgamated expanded: #include "protos/perfetto/config/android/android_system_property_config.gen.h" // gen_amalgamated expanded: #include "protos/perfetto/config/android/android_polled_state_config.gen.h" // gen_amalgamated expanded: #include "protos/perfetto/config/android/android_log_config.gen.h" // gen_amalgamated expanded: #include "protos/perfetto/common/android_log_constants.gen.h" @@ -60594,6 +66225,125 @@ namespace perfetto { namespace protos { namespace gen { +CloneSessionResponse::CloneSessionResponse() = default; +CloneSessionResponse::~CloneSessionResponse() = default; +CloneSessionResponse::CloneSessionResponse(const CloneSessionResponse&) = default; +CloneSessionResponse& CloneSessionResponse::operator=(const CloneSessionResponse&) = default; +CloneSessionResponse::CloneSessionResponse(CloneSessionResponse&&) noexcept = default; +CloneSessionResponse& CloneSessionResponse::operator=(CloneSessionResponse&&) = default; + +bool CloneSessionResponse::operator==(const CloneSessionResponse& other) const { + return unknown_fields_ == other.unknown_fields_ + && success_ == other.success_ + && error_ == other.error_; +} + +bool CloneSessionResponse::ParseFromArray(const void* raw, size_t size) { + unknown_fields_.clear(); + bool packed_error = false; + + ::protozero::ProtoDecoder dec(raw, size); + for (auto field = dec.ReadField(); field.valid(); field = dec.ReadField()) { + if (field.id() < _has_field_.size()) { + _has_field_.set(field.id()); + } + switch (field.id()) { + case 1 /* success */: + field.get(&success_); + break; + case 2 /* error */: + ::protozero::internal::gen_helpers::DeserializeString(field, &error_); + break; + default: + field.SerializeAndAppendTo(&unknown_fields_); + break; + } + } + return !packed_error && !dec.bytes_left(); +} + +std::string CloneSessionResponse::SerializeAsString() const { + ::protozero::internal::gen_helpers::MessageSerializer msg; + Serialize(msg.get()); + return msg.SerializeAsString(); +} + +std::vector CloneSessionResponse::SerializeAsArray() const { + ::protozero::internal::gen_helpers::MessageSerializer msg; + Serialize(msg.get()); + return msg.SerializeAsArray(); +} + +void CloneSessionResponse::Serialize(::protozero::Message* msg) const { + // Field 1: success + if (_has_field_[1]) { + ::protozero::internal::gen_helpers::SerializeTinyVarInt(1, success_, msg); + } + + // Field 2: error + if (_has_field_[2]) { + ::protozero::internal::gen_helpers::SerializeString(2, error_, msg); + } + + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); +} + + +CloneSessionRequest::CloneSessionRequest() = default; +CloneSessionRequest::~CloneSessionRequest() = default; +CloneSessionRequest::CloneSessionRequest(const CloneSessionRequest&) = default; +CloneSessionRequest& CloneSessionRequest::operator=(const CloneSessionRequest&) = default; +CloneSessionRequest::CloneSessionRequest(CloneSessionRequest&&) noexcept = default; +CloneSessionRequest& CloneSessionRequest::operator=(CloneSessionRequest&&) = default; + +bool CloneSessionRequest::operator==(const CloneSessionRequest& other) const { + return unknown_fields_ == other.unknown_fields_ + && session_id_ == other.session_id_; +} + +bool CloneSessionRequest::ParseFromArray(const void* raw, size_t size) { + unknown_fields_.clear(); + bool packed_error = false; + + ::protozero::ProtoDecoder dec(raw, size); + for (auto field = dec.ReadField(); field.valid(); field = dec.ReadField()) { + if (field.id() < _has_field_.size()) { + _has_field_.set(field.id()); + } + switch (field.id()) { + case 1 /* session_id */: + field.get(&session_id_); + break; + default: + field.SerializeAndAppendTo(&unknown_fields_); + break; + } + } + return !packed_error && !dec.bytes_left(); +} + +std::string CloneSessionRequest::SerializeAsString() const { + ::protozero::internal::gen_helpers::MessageSerializer msg; + Serialize(msg.get()); + return msg.SerializeAsString(); +} + +std::vector CloneSessionRequest::SerializeAsArray() const { + ::protozero::internal::gen_helpers::MessageSerializer msg; + Serialize(msg.get()); + return msg.SerializeAsArray(); +} + +void CloneSessionRequest::Serialize(::protozero::Message* msg) const { + // Field 1: session_id + if (_has_field_[1]) { + ::protozero::internal::gen_helpers::SerializeVarInt(1, session_id_, msg); + } + + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); +} + + SaveTraceForBugreportResponse::SaveTraceForBugreportResponse() = default; SaveTraceForBugreportResponse::~SaveTraceForBugreportResponse() = default; SaveTraceForBugreportResponse::SaveTraceForBugreportResponse(const SaveTraceForBugreportResponse&) = default; @@ -60621,7 +66371,7 @@ bool SaveTraceForBugreportResponse::ParseFromArray(const void* raw, size_t size) field.get(&success_); break; case 2 /* msg */: - field.get(&msg_); + ::protozero::internal::gen_helpers::DeserializeString(field, &msg_); break; default: field.SerializeAndAppendTo(&unknown_fields_); @@ -60632,13 +66382,13 @@ bool SaveTraceForBugreportResponse::ParseFromArray(const void* raw, size_t size) } std::string SaveTraceForBugreportResponse::SerializeAsString() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsString(); } std::vector SaveTraceForBugreportResponse::SerializeAsArray() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsArray(); } @@ -60646,15 +66396,15 @@ std::vector SaveTraceForBugreportResponse::SerializeAsArray() const { void SaveTraceForBugreportResponse::Serialize(::protozero::Message* msg) const { // Field 1: success if (_has_field_[1]) { - msg->AppendTinyVarInt(1, success_); + ::protozero::internal::gen_helpers::SerializeTinyVarInt(1, success_, msg); } // Field 2: msg if (_has_field_[2]) { - msg->AppendString(2, msg_); + ::protozero::internal::gen_helpers::SerializeString(2, msg_, msg); } - msg->AppendRawProtoBytes(unknown_fields_.data(), unknown_fields_.size()); + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); } @@ -60688,19 +66438,19 @@ bool SaveTraceForBugreportRequest::ParseFromArray(const void* raw, size_t size) } std::string SaveTraceForBugreportRequest::SerializeAsString() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsString(); } std::vector SaveTraceForBugreportRequest::SerializeAsArray() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsArray(); } void SaveTraceForBugreportRequest::Serialize(::protozero::Message* msg) const { - msg->AppendRawProtoBytes(unknown_fields_.data(), unknown_fields_.size()); + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); } @@ -60738,13 +66488,13 @@ bool QueryCapabilitiesResponse::ParseFromArray(const void* raw, size_t size) { } std::string QueryCapabilitiesResponse::SerializeAsString() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsString(); } std::vector QueryCapabilitiesResponse::SerializeAsArray() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsArray(); } @@ -60755,7 +66505,7 @@ void QueryCapabilitiesResponse::Serialize(::protozero::Message* msg) const { (*capabilities_).Serialize(msg->BeginNestedMessage<::protozero::Message>(1)); } - msg->AppendRawProtoBytes(unknown_fields_.data(), unknown_fields_.size()); + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); } @@ -60789,19 +66539,19 @@ bool QueryCapabilitiesRequest::ParseFromArray(const void* raw, size_t size) { } std::string QueryCapabilitiesRequest::SerializeAsString() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsString(); } std::vector QueryCapabilitiesRequest::SerializeAsArray() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsArray(); } void QueryCapabilitiesRequest::Serialize(::protozero::Message* msg) const { - msg->AppendRawProtoBytes(unknown_fields_.data(), unknown_fields_.size()); + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); } @@ -60839,13 +66589,13 @@ bool QueryServiceStateResponse::ParseFromArray(const void* raw, size_t size) { } std::string QueryServiceStateResponse::SerializeAsString() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsString(); } std::vector QueryServiceStateResponse::SerializeAsArray() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsArray(); } @@ -60856,7 +66606,7 @@ void QueryServiceStateResponse::Serialize(::protozero::Message* msg) const { (*service_state_).Serialize(msg->BeginNestedMessage<::protozero::Message>(1)); } - msg->AppendRawProtoBytes(unknown_fields_.data(), unknown_fields_.size()); + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); } @@ -60890,19 +66640,19 @@ bool QueryServiceStateRequest::ParseFromArray(const void* raw, size_t size) { } std::string QueryServiceStateRequest::SerializeAsString() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsString(); } std::vector QueryServiceStateRequest::SerializeAsArray() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsArray(); } void QueryServiceStateRequest::Serialize(::protozero::Message* msg) const { - msg->AppendRawProtoBytes(unknown_fields_.data(), unknown_fields_.size()); + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); } @@ -60940,13 +66690,13 @@ bool ObserveEventsResponse::ParseFromArray(const void* raw, size_t size) { } std::string ObserveEventsResponse::SerializeAsString() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsString(); } std::vector ObserveEventsResponse::SerializeAsArray() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsArray(); } @@ -60957,7 +66707,7 @@ void ObserveEventsResponse::Serialize(::protozero::Message* msg) const { (*events_).Serialize(msg->BeginNestedMessage<::protozero::Message>(1)); } - msg->AppendRawProtoBytes(unknown_fields_.data(), unknown_fields_.size()); + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); } @@ -60997,13 +66747,13 @@ bool ObserveEventsRequest::ParseFromArray(const void* raw, size_t size) { } std::string ObserveEventsRequest::SerializeAsString() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsString(); } std::vector ObserveEventsRequest::SerializeAsArray() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsArray(); } @@ -61011,10 +66761,10 @@ std::vector ObserveEventsRequest::SerializeAsArray() const { void ObserveEventsRequest::Serialize(::protozero::Message* msg) const { // Field 1: events_to_observe for (auto& it : events_to_observe_) { - msg->AppendVarInt(1, it); + ::protozero::internal::gen_helpers::SerializeVarInt(1, it, msg); } - msg->AppendRawProtoBytes(unknown_fields_.data(), unknown_fields_.size()); + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); } @@ -61052,13 +66802,13 @@ bool GetTraceStatsResponse::ParseFromArray(const void* raw, size_t size) { } std::string GetTraceStatsResponse::SerializeAsString() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsString(); } std::vector GetTraceStatsResponse::SerializeAsArray() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsArray(); } @@ -61069,7 +66819,7 @@ void GetTraceStatsResponse::Serialize(::protozero::Message* msg) const { (*trace_stats_).Serialize(msg->BeginNestedMessage<::protozero::Message>(1)); } - msg->AppendRawProtoBytes(unknown_fields_.data(), unknown_fields_.size()); + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); } @@ -61103,19 +66853,19 @@ bool GetTraceStatsRequest::ParseFromArray(const void* raw, size_t size) { } std::string GetTraceStatsRequest::SerializeAsString() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsString(); } std::vector GetTraceStatsRequest::SerializeAsArray() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsArray(); } void GetTraceStatsRequest::Serialize(::protozero::Message* msg) const { - msg->AppendRawProtoBytes(unknown_fields_.data(), unknown_fields_.size()); + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); } @@ -61153,13 +66903,13 @@ bool AttachResponse::ParseFromArray(const void* raw, size_t size) { } std::string AttachResponse::SerializeAsString() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsString(); } std::vector AttachResponse::SerializeAsArray() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsArray(); } @@ -61170,7 +66920,7 @@ void AttachResponse::Serialize(::protozero::Message* msg) const { (*trace_config_).Serialize(msg->BeginNestedMessage<::protozero::Message>(1)); } - msg->AppendRawProtoBytes(unknown_fields_.data(), unknown_fields_.size()); + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); } @@ -61197,7 +66947,7 @@ bool AttachRequest::ParseFromArray(const void* raw, size_t size) { } switch (field.id()) { case 1 /* key */: - field.get(&key_); + ::protozero::internal::gen_helpers::DeserializeString(field, &key_); break; default: field.SerializeAndAppendTo(&unknown_fields_); @@ -61208,13 +66958,13 @@ bool AttachRequest::ParseFromArray(const void* raw, size_t size) { } std::string AttachRequest::SerializeAsString() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsString(); } std::vector AttachRequest::SerializeAsArray() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsArray(); } @@ -61222,10 +66972,10 @@ std::vector AttachRequest::SerializeAsArray() const { void AttachRequest::Serialize(::protozero::Message* msg) const { // Field 1: key if (_has_field_[1]) { - msg->AppendString(1, key_); + ::protozero::internal::gen_helpers::SerializeString(1, key_, msg); } - msg->AppendRawProtoBytes(unknown_fields_.data(), unknown_fields_.size()); + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); } @@ -61259,19 +67009,19 @@ bool DetachResponse::ParseFromArray(const void* raw, size_t size) { } std::string DetachResponse::SerializeAsString() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsString(); } std::vector DetachResponse::SerializeAsArray() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsArray(); } void DetachResponse::Serialize(::protozero::Message* msg) const { - msg->AppendRawProtoBytes(unknown_fields_.data(), unknown_fields_.size()); + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); } @@ -61298,7 +67048,7 @@ bool DetachRequest::ParseFromArray(const void* raw, size_t size) { } switch (field.id()) { case 1 /* key */: - field.get(&key_); + ::protozero::internal::gen_helpers::DeserializeString(field, &key_); break; default: field.SerializeAndAppendTo(&unknown_fields_); @@ -61309,13 +67059,13 @@ bool DetachRequest::ParseFromArray(const void* raw, size_t size) { } std::string DetachRequest::SerializeAsString() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsString(); } std::vector DetachRequest::SerializeAsArray() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsArray(); } @@ -61323,10 +67073,10 @@ std::vector DetachRequest::SerializeAsArray() const { void DetachRequest::Serialize(::protozero::Message* msg) const { // Field 1: key if (_has_field_[1]) { - msg->AppendString(1, key_); + ::protozero::internal::gen_helpers::SerializeString(1, key_, msg); } - msg->AppendRawProtoBytes(unknown_fields_.data(), unknown_fields_.size()); + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); } @@ -61360,19 +67110,19 @@ bool FlushResponse::ParseFromArray(const void* raw, size_t size) { } std::string FlushResponse::SerializeAsString() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsString(); } std::vector FlushResponse::SerializeAsArray() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsArray(); } void FlushResponse::Serialize(::protozero::Message* msg) const { - msg->AppendRawProtoBytes(unknown_fields_.data(), unknown_fields_.size()); + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); } @@ -61410,13 +67160,13 @@ bool FlushRequest::ParseFromArray(const void* raw, size_t size) { } std::string FlushRequest::SerializeAsString() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsString(); } std::vector FlushRequest::SerializeAsArray() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsArray(); } @@ -61424,10 +67174,10 @@ std::vector FlushRequest::SerializeAsArray() const { void FlushRequest::Serialize(::protozero::Message* msg) const { // Field 1: timeout_ms if (_has_field_[1]) { - msg->AppendVarInt(1, timeout_ms_); + ::protozero::internal::gen_helpers::SerializeVarInt(1, timeout_ms_, msg); } - msg->AppendRawProtoBytes(unknown_fields_.data(), unknown_fields_.size()); + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); } @@ -61461,19 +67211,19 @@ bool FreeBuffersResponse::ParseFromArray(const void* raw, size_t size) { } std::string FreeBuffersResponse::SerializeAsString() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsString(); } std::vector FreeBuffersResponse::SerializeAsArray() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsArray(); } void FreeBuffersResponse::Serialize(::protozero::Message* msg) const { - msg->AppendRawProtoBytes(unknown_fields_.data(), unknown_fields_.size()); + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); } @@ -61513,13 +67263,13 @@ bool FreeBuffersRequest::ParseFromArray(const void* raw, size_t size) { } std::string FreeBuffersRequest::SerializeAsString() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsString(); } std::vector FreeBuffersRequest::SerializeAsArray() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsArray(); } @@ -61527,10 +67277,10 @@ std::vector FreeBuffersRequest::SerializeAsArray() const { void FreeBuffersRequest::Serialize(::protozero::Message* msg) const { // Field 1: buffer_ids for (auto& it : buffer_ids_) { - msg->AppendVarInt(1, it); + ::protozero::internal::gen_helpers::SerializeVarInt(1, it, msg); } - msg->AppendRawProtoBytes(unknown_fields_.data(), unknown_fields_.size()); + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); } @@ -61573,13 +67323,13 @@ bool ReadBuffersResponse::ParseFromArray(const void* raw, size_t size) { } std::string ReadBuffersResponse::SerializeAsString() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsString(); } std::vector ReadBuffersResponse::SerializeAsArray() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsArray(); } @@ -61590,7 +67340,7 @@ void ReadBuffersResponse::Serialize(::protozero::Message* msg) const { it.Serialize(msg->BeginNestedMessage<::protozero::Message>(2)); } - msg->AppendRawProtoBytes(unknown_fields_.data(), unknown_fields_.size()); + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); } @@ -61632,13 +67382,13 @@ bool ReadBuffersResponse_Slice::ParseFromArray(const void* raw, size_t size) { } std::string ReadBuffersResponse_Slice::SerializeAsString() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsString(); } std::vector ReadBuffersResponse_Slice::SerializeAsArray() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsArray(); } @@ -61646,15 +67396,15 @@ std::vector ReadBuffersResponse_Slice::SerializeAsArray() const { void ReadBuffersResponse_Slice::Serialize(::protozero::Message* msg) const { // Field 1: data if (_has_field_[1]) { - msg->AppendString(1, data_); + ::protozero::internal::gen_helpers::SerializeString(1, data_, msg); } // Field 2: last_slice_for_packet if (_has_field_[2]) { - msg->AppendTinyVarInt(2, last_slice_for_packet_); + ::protozero::internal::gen_helpers::SerializeTinyVarInt(2, last_slice_for_packet_, msg); } - msg->AppendRawProtoBytes(unknown_fields_.data(), unknown_fields_.size()); + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); } @@ -61688,19 +67438,19 @@ bool ReadBuffersRequest::ParseFromArray(const void* raw, size_t size) { } std::string ReadBuffersRequest::SerializeAsString() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsString(); } std::vector ReadBuffersRequest::SerializeAsArray() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsArray(); } void ReadBuffersRequest::Serialize(::protozero::Message* msg) const { - msg->AppendRawProtoBytes(unknown_fields_.data(), unknown_fields_.size()); + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); } @@ -61734,19 +67484,19 @@ bool DisableTracingResponse::ParseFromArray(const void* raw, size_t size) { } std::string DisableTracingResponse::SerializeAsString() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsString(); } std::vector DisableTracingResponse::SerializeAsArray() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsArray(); } void DisableTracingResponse::Serialize(::protozero::Message* msg) const { - msg->AppendRawProtoBytes(unknown_fields_.data(), unknown_fields_.size()); + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); } @@ -61780,19 +67530,19 @@ bool DisableTracingRequest::ParseFromArray(const void* raw, size_t size) { } std::string DisableTracingRequest::SerializeAsString() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsString(); } std::vector DisableTracingRequest::SerializeAsArray() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsArray(); } void DisableTracingRequest::Serialize(::protozero::Message* msg) const { - msg->AppendRawProtoBytes(unknown_fields_.data(), unknown_fields_.size()); + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); } @@ -61826,19 +67576,19 @@ bool ChangeTraceConfigResponse::ParseFromArray(const void* raw, size_t size) { } std::string ChangeTraceConfigResponse::SerializeAsString() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsString(); } std::vector ChangeTraceConfigResponse::SerializeAsArray() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsArray(); } void ChangeTraceConfigResponse::Serialize(::protozero::Message* msg) const { - msg->AppendRawProtoBytes(unknown_fields_.data(), unknown_fields_.size()); + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); } @@ -61876,13 +67626,13 @@ bool ChangeTraceConfigRequest::ParseFromArray(const void* raw, size_t size) { } std::string ChangeTraceConfigRequest::SerializeAsString() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsString(); } std::vector ChangeTraceConfigRequest::SerializeAsArray() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsArray(); } @@ -61893,7 +67643,7 @@ void ChangeTraceConfigRequest::Serialize(::protozero::Message* msg) const { (*trace_config_).Serialize(msg->BeginNestedMessage<::protozero::Message>(1)); } - msg->AppendRawProtoBytes(unknown_fields_.data(), unknown_fields_.size()); + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); } @@ -61927,19 +67677,19 @@ bool StartTracingResponse::ParseFromArray(const void* raw, size_t size) { } std::string StartTracingResponse::SerializeAsString() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsString(); } std::vector StartTracingResponse::SerializeAsArray() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsArray(); } void StartTracingResponse::Serialize(::protozero::Message* msg) const { - msg->AppendRawProtoBytes(unknown_fields_.data(), unknown_fields_.size()); + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); } @@ -61973,19 +67723,19 @@ bool StartTracingRequest::ParseFromArray(const void* raw, size_t size) { } std::string StartTracingRequest::SerializeAsString() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsString(); } std::vector StartTracingRequest::SerializeAsArray() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsArray(); } void StartTracingRequest::Serialize(::protozero::Message* msg) const { - msg->AppendRawProtoBytes(unknown_fields_.data(), unknown_fields_.size()); + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); } @@ -62016,7 +67766,7 @@ bool EnableTracingResponse::ParseFromArray(const void* raw, size_t size) { field.get(&disabled_); break; case 3 /* error */: - field.get(&error_); + ::protozero::internal::gen_helpers::DeserializeString(field, &error_); break; default: field.SerializeAndAppendTo(&unknown_fields_); @@ -62027,13 +67777,13 @@ bool EnableTracingResponse::ParseFromArray(const void* raw, size_t size) { } std::string EnableTracingResponse::SerializeAsString() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsString(); } std::vector EnableTracingResponse::SerializeAsArray() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsArray(); } @@ -62041,15 +67791,15 @@ std::vector EnableTracingResponse::SerializeAsArray() const { void EnableTracingResponse::Serialize(::protozero::Message* msg) const { // Field 1: disabled if (_has_field_[1]) { - msg->AppendTinyVarInt(1, disabled_); + ::protozero::internal::gen_helpers::SerializeTinyVarInt(1, disabled_, msg); } // Field 3: error if (_has_field_[3]) { - msg->AppendString(3, error_); + ::protozero::internal::gen_helpers::SerializeString(3, error_, msg); } - msg->AppendRawProtoBytes(unknown_fields_.data(), unknown_fields_.size()); + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); } @@ -62091,13 +67841,13 @@ bool EnableTracingRequest::ParseFromArray(const void* raw, size_t size) { } std::string EnableTracingRequest::SerializeAsString() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsString(); } std::vector EnableTracingRequest::SerializeAsArray() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsArray(); } @@ -62110,10 +67860,10 @@ void EnableTracingRequest::Serialize(::protozero::Message* msg) const { // Field 2: attach_notification_only if (_has_field_[2]) { - msg->AppendTinyVarInt(2, attach_notification_only_); + ::protozero::internal::gen_helpers::SerializeTinyVarInt(2, attach_notification_only_, msg); } - msg->AppendRawProtoBytes(unknown_fields_.data(), unknown_fields_.size()); + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); } } // namespace perfetto @@ -62153,6 +67903,7 @@ class TestConfig; class TestConfig_DummyFields; class InterceptorConfig; class ChromeConfig; +class SystemInfoConfig; class GetAsyncCommandResponse_SetupDataSource; class GetAsyncCommandResponse_SetupTracing; class GetAsyncCommandRequest; @@ -63272,6 +69023,7 @@ class PERFETTO_EXPORT_COMPONENT InitializeConnectionRequest : public ::protozero } // namespace gen #endif // PERFETTO_PROTOS_PROTOS_PERFETTO_IPC_PRODUCER_PORT_PROTO_CPP_H_ +// gen_amalgamated expanded: #include "perfetto/protozero/gen_field_helpers.h" // gen_amalgamated expanded: #include "perfetto/protozero/message.h" // gen_amalgamated expanded: #include "perfetto/protozero/packed_repeated_fields.h" // gen_amalgamated expanded: #include "perfetto/protozero/proto_decoder.h" @@ -63287,6 +69039,7 @@ class PERFETTO_EXPORT_COMPONENT InitializeConnectionRequest : public ::protozero // gen_amalgamated expanded: #include "protos/perfetto/common/gpu_counter_descriptor.gen.h" // gen_amalgamated expanded: #include "protos/perfetto/common/ftrace_descriptor.gen.h" // gen_amalgamated expanded: #include "protos/perfetto/config/data_source_config.gen.h" +// gen_amalgamated expanded: #include "protos/perfetto/config/system_info/system_info.gen.h" // gen_amalgamated expanded: #include "protos/perfetto/config/track_event/track_event_config.gen.h" // gen_amalgamated expanded: #include "protos/perfetto/config/test_config.gen.h" // gen_amalgamated expanded: #include "protos/perfetto/config/sys_stats/sys_stats_config.gen.h" @@ -63296,6 +69049,8 @@ class PERFETTO_EXPORT_COMPONENT InitializeConnectionRequest : public ::protozero // gen_amalgamated expanded: #include "protos/perfetto/config/profiling/java_hprof_config.gen.h" // gen_amalgamated expanded: #include "protos/perfetto/config/profiling/heapprofd_config.gen.h" // gen_amalgamated expanded: #include "protos/perfetto/config/process_stats/process_stats_config.gen.h" +// gen_amalgamated expanded: #include "protos/perfetto/config/statsd/statsd_tracing_config.gen.h" +// gen_amalgamated expanded: #include "protos/perfetto/config/statsd/atom_ids.gen.h" // gen_amalgamated expanded: #include "protos/perfetto/config/power/android_power_config.gen.h" // gen_amalgamated expanded: #include "protos/perfetto/config/interceptor_config.gen.h" // gen_amalgamated expanded: #include "protos/perfetto/config/interceptors/console_config.gen.h" @@ -63305,6 +69060,8 @@ class PERFETTO_EXPORT_COMPONENT InitializeConnectionRequest : public ::protozero // gen_amalgamated expanded: #include "protos/perfetto/config/ftrace/ftrace_config.gen.h" // gen_amalgamated expanded: #include "protos/perfetto/config/chrome/chrome_config.gen.h" // gen_amalgamated expanded: #include "protos/perfetto/config/android/packages_list_config.gen.h" +// gen_amalgamated expanded: #include "protos/perfetto/config/android/network_trace_config.gen.h" +// gen_amalgamated expanded: #include "protos/perfetto/config/android/android_system_property_config.gen.h" // gen_amalgamated expanded: #include "protos/perfetto/config/android/android_polled_state_config.gen.h" // gen_amalgamated expanded: #include "protos/perfetto/config/android/android_log_config.gen.h" // gen_amalgamated expanded: #include "protos/perfetto/common/android_log_constants.gen.h" @@ -63345,19 +69102,19 @@ bool SyncResponse::ParseFromArray(const void* raw, size_t size) { } std::string SyncResponse::SerializeAsString() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsString(); } std::vector SyncResponse::SerializeAsArray() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsArray(); } void SyncResponse::Serialize(::protozero::Message* msg) const { - msg->AppendRawProtoBytes(unknown_fields_.data(), unknown_fields_.size()); + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); } @@ -63391,19 +69148,19 @@ bool SyncRequest::ParseFromArray(const void* raw, size_t size) { } std::string SyncRequest::SerializeAsString() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsString(); } std::vector SyncRequest::SerializeAsArray() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsArray(); } void SyncRequest::Serialize(::protozero::Message* msg) const { - msg->AppendRawProtoBytes(unknown_fields_.data(), unknown_fields_.size()); + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); } @@ -63461,13 +69218,13 @@ bool GetAsyncCommandResponse::ParseFromArray(const void* raw, size_t size) { } std::string GetAsyncCommandResponse::SerializeAsString() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsString(); } std::vector GetAsyncCommandResponse::SerializeAsArray() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsArray(); } @@ -63503,7 +69260,7 @@ void GetAsyncCommandResponse::Serialize(::protozero::Message* msg) const { (*clear_incremental_state_).Serialize(msg->BeginNestedMessage<::protozero::Message>(7)); } - msg->AppendRawProtoBytes(unknown_fields_.data(), unknown_fields_.size()); + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); } @@ -63543,13 +69300,13 @@ bool GetAsyncCommandResponse_ClearIncrementalState::ParseFromArray(const void* r } std::string GetAsyncCommandResponse_ClearIncrementalState::SerializeAsString() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsString(); } std::vector GetAsyncCommandResponse_ClearIncrementalState::SerializeAsArray() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsArray(); } @@ -63557,10 +69314,10 @@ std::vector GetAsyncCommandResponse_ClearIncrementalState::SerializeAsA void GetAsyncCommandResponse_ClearIncrementalState::Serialize(::protozero::Message* msg) const { // Field 1: data_source_ids for (auto& it : data_source_ids_) { - msg->AppendVarInt(1, it); + ::protozero::internal::gen_helpers::SerializeVarInt(1, it, msg); } - msg->AppendRawProtoBytes(unknown_fields_.data(), unknown_fields_.size()); + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); } @@ -63604,13 +69361,13 @@ bool GetAsyncCommandResponse_Flush::ParseFromArray(const void* raw, size_t size) } std::string GetAsyncCommandResponse_Flush::SerializeAsString() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsString(); } std::vector GetAsyncCommandResponse_Flush::SerializeAsArray() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsArray(); } @@ -63618,15 +69375,15 @@ std::vector GetAsyncCommandResponse_Flush::SerializeAsArray() const { void GetAsyncCommandResponse_Flush::Serialize(::protozero::Message* msg) const { // Field 1: data_source_ids for (auto& it : data_source_ids_) { - msg->AppendVarInt(1, it); + ::protozero::internal::gen_helpers::SerializeVarInt(1, it, msg); } // Field 2: request_id if (_has_field_[2]) { - msg->AppendVarInt(2, request_id_); + ::protozero::internal::gen_helpers::SerializeVarInt(2, request_id_, msg); } - msg->AppendRawProtoBytes(unknown_fields_.data(), unknown_fields_.size()); + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); } @@ -63664,13 +69421,13 @@ bool GetAsyncCommandResponse_StopDataSource::ParseFromArray(const void* raw, siz } std::string GetAsyncCommandResponse_StopDataSource::SerializeAsString() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsString(); } std::vector GetAsyncCommandResponse_StopDataSource::SerializeAsArray() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsArray(); } @@ -63678,10 +69435,10 @@ std::vector GetAsyncCommandResponse_StopDataSource::SerializeAsArray() void GetAsyncCommandResponse_StopDataSource::Serialize(::protozero::Message* msg) const { // Field 1: instance_id if (_has_field_[1]) { - msg->AppendVarInt(1, instance_id_); + ::protozero::internal::gen_helpers::SerializeVarInt(1, instance_id_, msg); } - msg->AppendRawProtoBytes(unknown_fields_.data(), unknown_fields_.size()); + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); } @@ -63723,13 +69480,13 @@ bool GetAsyncCommandResponse_StartDataSource::ParseFromArray(const void* raw, si } std::string GetAsyncCommandResponse_StartDataSource::SerializeAsString() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsString(); } std::vector GetAsyncCommandResponse_StartDataSource::SerializeAsArray() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsArray(); } @@ -63737,7 +69494,7 @@ std::vector GetAsyncCommandResponse_StartDataSource::SerializeAsArray() void GetAsyncCommandResponse_StartDataSource::Serialize(::protozero::Message* msg) const { // Field 1: new_instance_id if (_has_field_[1]) { - msg->AppendVarInt(1, new_instance_id_); + ::protozero::internal::gen_helpers::SerializeVarInt(1, new_instance_id_, msg); } // Field 2: config @@ -63745,7 +69502,7 @@ void GetAsyncCommandResponse_StartDataSource::Serialize(::protozero::Message* ms (*config_).Serialize(msg->BeginNestedMessage<::protozero::Message>(2)); } - msg->AppendRawProtoBytes(unknown_fields_.data(), unknown_fields_.size()); + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); } @@ -63787,13 +69544,13 @@ bool GetAsyncCommandResponse_SetupDataSource::ParseFromArray(const void* raw, si } std::string GetAsyncCommandResponse_SetupDataSource::SerializeAsString() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsString(); } std::vector GetAsyncCommandResponse_SetupDataSource::SerializeAsArray() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsArray(); } @@ -63801,7 +69558,7 @@ std::vector GetAsyncCommandResponse_SetupDataSource::SerializeAsArray() void GetAsyncCommandResponse_SetupDataSource::Serialize(::protozero::Message* msg) const { // Field 1: new_instance_id if (_has_field_[1]) { - msg->AppendVarInt(1, new_instance_id_); + ::protozero::internal::gen_helpers::SerializeVarInt(1, new_instance_id_, msg); } // Field 2: config @@ -63809,7 +69566,7 @@ void GetAsyncCommandResponse_SetupDataSource::Serialize(::protozero::Message* ms (*config_).Serialize(msg->BeginNestedMessage<::protozero::Message>(2)); } - msg->AppendRawProtoBytes(unknown_fields_.data(), unknown_fields_.size()); + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); } @@ -63840,7 +69597,7 @@ bool GetAsyncCommandResponse_SetupTracing::ParseFromArray(const void* raw, size_ field.get(&shared_buffer_page_size_kb_); break; case 2 /* shm_key_windows */: - field.get(&shm_key_windows_); + ::protozero::internal::gen_helpers::DeserializeString(field, &shm_key_windows_); break; default: field.SerializeAndAppendTo(&unknown_fields_); @@ -63851,13 +69608,13 @@ bool GetAsyncCommandResponse_SetupTracing::ParseFromArray(const void* raw, size_ } std::string GetAsyncCommandResponse_SetupTracing::SerializeAsString() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsString(); } std::vector GetAsyncCommandResponse_SetupTracing::SerializeAsArray() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsArray(); } @@ -63865,15 +69622,15 @@ std::vector GetAsyncCommandResponse_SetupTracing::SerializeAsArray() co void GetAsyncCommandResponse_SetupTracing::Serialize(::protozero::Message* msg) const { // Field 1: shared_buffer_page_size_kb if (_has_field_[1]) { - msg->AppendVarInt(1, shared_buffer_page_size_kb_); + ::protozero::internal::gen_helpers::SerializeVarInt(1, shared_buffer_page_size_kb_, msg); } // Field 2: shm_key_windows if (_has_field_[2]) { - msg->AppendString(2, shm_key_windows_); + ::protozero::internal::gen_helpers::SerializeString(2, shm_key_windows_, msg); } - msg->AppendRawProtoBytes(unknown_fields_.data(), unknown_fields_.size()); + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); } @@ -63907,19 +69664,19 @@ bool GetAsyncCommandRequest::ParseFromArray(const void* raw, size_t size) { } std::string GetAsyncCommandRequest::SerializeAsString() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsString(); } std::vector GetAsyncCommandRequest::SerializeAsArray() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsArray(); } void GetAsyncCommandRequest::Serialize(::protozero::Message* msg) const { - msg->AppendRawProtoBytes(unknown_fields_.data(), unknown_fields_.size()); + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); } @@ -63953,19 +69710,19 @@ bool ActivateTriggersResponse::ParseFromArray(const void* raw, size_t size) { } std::string ActivateTriggersResponse::SerializeAsString() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsString(); } std::vector ActivateTriggersResponse::SerializeAsArray() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsArray(); } void ActivateTriggersResponse::Serialize(::protozero::Message* msg) const { - msg->AppendRawProtoBytes(unknown_fields_.data(), unknown_fields_.size()); + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); } @@ -63994,7 +69751,7 @@ bool ActivateTriggersRequest::ParseFromArray(const void* raw, size_t size) { switch (field.id()) { case 1 /* trigger_names */: trigger_names_.emplace_back(); - field.get(&trigger_names_.back()); + ::protozero::internal::gen_helpers::DeserializeString(field, &trigger_names_.back()); break; default: field.SerializeAndAppendTo(&unknown_fields_); @@ -64005,13 +69762,13 @@ bool ActivateTriggersRequest::ParseFromArray(const void* raw, size_t size) { } std::string ActivateTriggersRequest::SerializeAsString() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsString(); } std::vector ActivateTriggersRequest::SerializeAsArray() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsArray(); } @@ -64019,10 +69776,10 @@ std::vector ActivateTriggersRequest::SerializeAsArray() const { void ActivateTriggersRequest::Serialize(::protozero::Message* msg) const { // Field 1: trigger_names for (auto& it : trigger_names_) { - msg->AppendString(1, it); + ::protozero::internal::gen_helpers::SerializeString(1, it, msg); } - msg->AppendRawProtoBytes(unknown_fields_.data(), unknown_fields_.size()); + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); } @@ -64056,19 +69813,19 @@ bool NotifyDataSourceStoppedResponse::ParseFromArray(const void* raw, size_t siz } std::string NotifyDataSourceStoppedResponse::SerializeAsString() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsString(); } std::vector NotifyDataSourceStoppedResponse::SerializeAsArray() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsArray(); } void NotifyDataSourceStoppedResponse::Serialize(::protozero::Message* msg) const { - msg->AppendRawProtoBytes(unknown_fields_.data(), unknown_fields_.size()); + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); } @@ -64106,13 +69863,13 @@ bool NotifyDataSourceStoppedRequest::ParseFromArray(const void* raw, size_t size } std::string NotifyDataSourceStoppedRequest::SerializeAsString() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsString(); } std::vector NotifyDataSourceStoppedRequest::SerializeAsArray() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsArray(); } @@ -64120,10 +69877,10 @@ std::vector NotifyDataSourceStoppedRequest::SerializeAsArray() const { void NotifyDataSourceStoppedRequest::Serialize(::protozero::Message* msg) const { // Field 1: data_source_id if (_has_field_[1]) { - msg->AppendVarInt(1, data_source_id_); + ::protozero::internal::gen_helpers::SerializeVarInt(1, data_source_id_, msg); } - msg->AppendRawProtoBytes(unknown_fields_.data(), unknown_fields_.size()); + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); } @@ -64157,19 +69914,19 @@ bool NotifyDataSourceStartedResponse::ParseFromArray(const void* raw, size_t siz } std::string NotifyDataSourceStartedResponse::SerializeAsString() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsString(); } std::vector NotifyDataSourceStartedResponse::SerializeAsArray() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsArray(); } void NotifyDataSourceStartedResponse::Serialize(::protozero::Message* msg) const { - msg->AppendRawProtoBytes(unknown_fields_.data(), unknown_fields_.size()); + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); } @@ -64207,13 +69964,13 @@ bool NotifyDataSourceStartedRequest::ParseFromArray(const void* raw, size_t size } std::string NotifyDataSourceStartedRequest::SerializeAsString() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsString(); } std::vector NotifyDataSourceStartedRequest::SerializeAsArray() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsArray(); } @@ -64221,10 +69978,10 @@ std::vector NotifyDataSourceStartedRequest::SerializeAsArray() const { void NotifyDataSourceStartedRequest::Serialize(::protozero::Message* msg) const { // Field 1: data_source_id if (_has_field_[1]) { - msg->AppendVarInt(1, data_source_id_); + ::protozero::internal::gen_helpers::SerializeVarInt(1, data_source_id_, msg); } - msg->AppendRawProtoBytes(unknown_fields_.data(), unknown_fields_.size()); + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); } @@ -64258,19 +70015,19 @@ bool CommitDataResponse::ParseFromArray(const void* raw, size_t size) { } std::string CommitDataResponse::SerializeAsString() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsString(); } std::vector CommitDataResponse::SerializeAsArray() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsArray(); } void CommitDataResponse::Serialize(::protozero::Message* msg) const { - msg->AppendRawProtoBytes(unknown_fields_.data(), unknown_fields_.size()); + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); } @@ -64304,19 +70061,19 @@ bool UnregisterTraceWriterResponse::ParseFromArray(const void* raw, size_t size) } std::string UnregisterTraceWriterResponse::SerializeAsString() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsString(); } std::vector UnregisterTraceWriterResponse::SerializeAsArray() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsArray(); } void UnregisterTraceWriterResponse::Serialize(::protozero::Message* msg) const { - msg->AppendRawProtoBytes(unknown_fields_.data(), unknown_fields_.size()); + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); } @@ -64354,13 +70111,13 @@ bool UnregisterTraceWriterRequest::ParseFromArray(const void* raw, size_t size) } std::string UnregisterTraceWriterRequest::SerializeAsString() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsString(); } std::vector UnregisterTraceWriterRequest::SerializeAsArray() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsArray(); } @@ -64368,10 +70125,10 @@ std::vector UnregisterTraceWriterRequest::SerializeAsArray() const { void UnregisterTraceWriterRequest::Serialize(::protozero::Message* msg) const { // Field 1: trace_writer_id if (_has_field_[1]) { - msg->AppendVarInt(1, trace_writer_id_); + ::protozero::internal::gen_helpers::SerializeVarInt(1, trace_writer_id_, msg); } - msg->AppendRawProtoBytes(unknown_fields_.data(), unknown_fields_.size()); + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); } @@ -64405,19 +70162,19 @@ bool RegisterTraceWriterResponse::ParseFromArray(const void* raw, size_t size) { } std::string RegisterTraceWriterResponse::SerializeAsString() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsString(); } std::vector RegisterTraceWriterResponse::SerializeAsArray() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsArray(); } void RegisterTraceWriterResponse::Serialize(::protozero::Message* msg) const { - msg->AppendRawProtoBytes(unknown_fields_.data(), unknown_fields_.size()); + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); } @@ -64459,13 +70216,13 @@ bool RegisterTraceWriterRequest::ParseFromArray(const void* raw, size_t size) { } std::string RegisterTraceWriterRequest::SerializeAsString() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsString(); } std::vector RegisterTraceWriterRequest::SerializeAsArray() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsArray(); } @@ -64473,15 +70230,15 @@ std::vector RegisterTraceWriterRequest::SerializeAsArray() const { void RegisterTraceWriterRequest::Serialize(::protozero::Message* msg) const { // Field 1: trace_writer_id if (_has_field_[1]) { - msg->AppendVarInt(1, trace_writer_id_); + ::protozero::internal::gen_helpers::SerializeVarInt(1, trace_writer_id_, msg); } // Field 2: target_buffer if (_has_field_[2]) { - msg->AppendVarInt(2, target_buffer_); + ::protozero::internal::gen_helpers::SerializeVarInt(2, target_buffer_, msg); } - msg->AppendRawProtoBytes(unknown_fields_.data(), unknown_fields_.size()); + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); } @@ -64515,19 +70272,19 @@ bool UnregisterDataSourceResponse::ParseFromArray(const void* raw, size_t size) } std::string UnregisterDataSourceResponse::SerializeAsString() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsString(); } std::vector UnregisterDataSourceResponse::SerializeAsArray() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsArray(); } void UnregisterDataSourceResponse::Serialize(::protozero::Message* msg) const { - msg->AppendRawProtoBytes(unknown_fields_.data(), unknown_fields_.size()); + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); } @@ -64554,7 +70311,7 @@ bool UnregisterDataSourceRequest::ParseFromArray(const void* raw, size_t size) { } switch (field.id()) { case 1 /* data_source_name */: - field.get(&data_source_name_); + ::protozero::internal::gen_helpers::DeserializeString(field, &data_source_name_); break; default: field.SerializeAndAppendTo(&unknown_fields_); @@ -64565,13 +70322,13 @@ bool UnregisterDataSourceRequest::ParseFromArray(const void* raw, size_t size) { } std::string UnregisterDataSourceRequest::SerializeAsString() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsString(); } std::vector UnregisterDataSourceRequest::SerializeAsArray() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsArray(); } @@ -64579,10 +70336,10 @@ std::vector UnregisterDataSourceRequest::SerializeAsArray() const { void UnregisterDataSourceRequest::Serialize(::protozero::Message* msg) const { // Field 1: data_source_name if (_has_field_[1]) { - msg->AppendString(1, data_source_name_); + ::protozero::internal::gen_helpers::SerializeString(1, data_source_name_, msg); } - msg->AppendRawProtoBytes(unknown_fields_.data(), unknown_fields_.size()); + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); } @@ -64616,19 +70373,19 @@ bool UpdateDataSourceResponse::ParseFromArray(const void* raw, size_t size) { } std::string UpdateDataSourceResponse::SerializeAsString() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsString(); } std::vector UpdateDataSourceResponse::SerializeAsArray() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsArray(); } void UpdateDataSourceResponse::Serialize(::protozero::Message* msg) const { - msg->AppendRawProtoBytes(unknown_fields_.data(), unknown_fields_.size()); + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); } @@ -64666,13 +70423,13 @@ bool UpdateDataSourceRequest::ParseFromArray(const void* raw, size_t size) { } std::string UpdateDataSourceRequest::SerializeAsString() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsString(); } std::vector UpdateDataSourceRequest::SerializeAsArray() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsArray(); } @@ -64683,7 +70440,7 @@ void UpdateDataSourceRequest::Serialize(::protozero::Message* msg) const { (*data_source_descriptor_).Serialize(msg->BeginNestedMessage<::protozero::Message>(1)); } - msg->AppendRawProtoBytes(unknown_fields_.data(), unknown_fields_.size()); + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); } @@ -64710,7 +70467,7 @@ bool RegisterDataSourceResponse::ParseFromArray(const void* raw, size_t size) { } switch (field.id()) { case 1 /* error */: - field.get(&error_); + ::protozero::internal::gen_helpers::DeserializeString(field, &error_); break; default: field.SerializeAndAppendTo(&unknown_fields_); @@ -64721,13 +70478,13 @@ bool RegisterDataSourceResponse::ParseFromArray(const void* raw, size_t size) { } std::string RegisterDataSourceResponse::SerializeAsString() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsString(); } std::vector RegisterDataSourceResponse::SerializeAsArray() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsArray(); } @@ -64735,10 +70492,10 @@ std::vector RegisterDataSourceResponse::SerializeAsArray() const { void RegisterDataSourceResponse::Serialize(::protozero::Message* msg) const { // Field 1: error if (_has_field_[1]) { - msg->AppendString(1, error_); + ::protozero::internal::gen_helpers::SerializeString(1, error_, msg); } - msg->AppendRawProtoBytes(unknown_fields_.data(), unknown_fields_.size()); + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); } @@ -64776,13 +70533,13 @@ bool RegisterDataSourceRequest::ParseFromArray(const void* raw, size_t size) { } std::string RegisterDataSourceRequest::SerializeAsString() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsString(); } std::vector RegisterDataSourceRequest::SerializeAsArray() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsArray(); } @@ -64793,7 +70550,7 @@ void RegisterDataSourceRequest::Serialize(::protozero::Message* msg) const { (*data_source_descriptor_).Serialize(msg->BeginNestedMessage<::protozero::Message>(1)); } - msg->AppendRawProtoBytes(unknown_fields_.data(), unknown_fields_.size()); + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); } @@ -64835,13 +70592,13 @@ bool InitializeConnectionResponse::ParseFromArray(const void* raw, size_t size) } std::string InitializeConnectionResponse::SerializeAsString() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsString(); } std::vector InitializeConnectionResponse::SerializeAsArray() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsArray(); } @@ -64849,15 +70606,15 @@ std::vector InitializeConnectionResponse::SerializeAsArray() const { void InitializeConnectionResponse::Serialize(::protozero::Message* msg) const { // Field 1: using_shmem_provided_by_producer if (_has_field_[1]) { - msg->AppendTinyVarInt(1, using_shmem_provided_by_producer_); + ::protozero::internal::gen_helpers::SerializeTinyVarInt(1, using_shmem_provided_by_producer_, msg); } // Field 2: direct_smb_patching_supported if (_has_field_[2]) { - msg->AppendTinyVarInt(2, direct_smb_patching_supported_); + ::protozero::internal::gen_helpers::SerializeTinyVarInt(2, direct_smb_patching_supported_, msg); } - msg->AppendRawProtoBytes(unknown_fields_.data(), unknown_fields_.size()); + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); } @@ -64896,7 +70653,7 @@ bool InitializeConnectionRequest::ParseFromArray(const void* raw, size_t size) { field.get(&shared_memory_size_hint_bytes_); break; case 3 /* producer_name */: - field.get(&producer_name_); + ::protozero::internal::gen_helpers::DeserializeString(field, &producer_name_); break; case 4 /* smb_scraping_mode */: field.get(&smb_scraping_mode_); @@ -64905,10 +70662,10 @@ bool InitializeConnectionRequest::ParseFromArray(const void* raw, size_t size) { field.get(&producer_provided_shmem_); break; case 8 /* sdk_version */: - field.get(&sdk_version_); + ::protozero::internal::gen_helpers::DeserializeString(field, &sdk_version_); break; case 7 /* shm_key_windows */: - field.get(&shm_key_windows_); + ::protozero::internal::gen_helpers::DeserializeString(field, &shm_key_windows_); break; default: field.SerializeAndAppendTo(&unknown_fields_); @@ -64919,13 +70676,13 @@ bool InitializeConnectionRequest::ParseFromArray(const void* raw, size_t size) { } std::string InitializeConnectionRequest::SerializeAsString() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsString(); } std::vector InitializeConnectionRequest::SerializeAsArray() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsArray(); } @@ -64933,40 +70690,40 @@ std::vector InitializeConnectionRequest::SerializeAsArray() const { void InitializeConnectionRequest::Serialize(::protozero::Message* msg) const { // Field 1: shared_memory_page_size_hint_bytes if (_has_field_[1]) { - msg->AppendVarInt(1, shared_memory_page_size_hint_bytes_); + ::protozero::internal::gen_helpers::SerializeVarInt(1, shared_memory_page_size_hint_bytes_, msg); } // Field 2: shared_memory_size_hint_bytes if (_has_field_[2]) { - msg->AppendVarInt(2, shared_memory_size_hint_bytes_); + ::protozero::internal::gen_helpers::SerializeVarInt(2, shared_memory_size_hint_bytes_, msg); } // Field 3: producer_name if (_has_field_[3]) { - msg->AppendString(3, producer_name_); + ::protozero::internal::gen_helpers::SerializeString(3, producer_name_, msg); } // Field 4: smb_scraping_mode if (_has_field_[4]) { - msg->AppendVarInt(4, smb_scraping_mode_); + ::protozero::internal::gen_helpers::SerializeVarInt(4, smb_scraping_mode_, msg); } // Field 6: producer_provided_shmem if (_has_field_[6]) { - msg->AppendTinyVarInt(6, producer_provided_shmem_); + ::protozero::internal::gen_helpers::SerializeTinyVarInt(6, producer_provided_shmem_, msg); } // Field 8: sdk_version if (_has_field_[8]) { - msg->AppendString(8, sdk_version_); + ::protozero::internal::gen_helpers::SerializeString(8, sdk_version_, msg); } // Field 7: shm_key_windows if (_has_field_[7]) { - msg->AppendString(7, shm_key_windows_); + ::protozero::internal::gen_helpers::SerializeString(7, shm_key_windows_, msg); } - msg->AppendRawProtoBytes(unknown_fields_.data(), unknown_fields_.size()); + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); } } // namespace perfetto @@ -65359,6 +71116,7 @@ class PERFETTO_EXPORT_COMPONENT IPCFrame_BindService : public ::protozero::CppMe } // namespace gen #endif // PERFETTO_PROTOS_PROTOS_PERFETTO_IPC_WIRE_PROTOCOL_PROTO_CPP_H_ +// gen_amalgamated expanded: #include "perfetto/protozero/gen_field_helpers.h" // gen_amalgamated expanded: #include "perfetto/protozero/message.h" // gen_amalgamated expanded: #include "perfetto/protozero/packed_repeated_fields.h" // gen_amalgamated expanded: #include "perfetto/protozero/proto_decoder.h" @@ -65434,13 +71192,13 @@ bool IPCFrame::ParseFromArray(const void* raw, size_t size) { } std::string IPCFrame::SerializeAsString() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsString(); } std::vector IPCFrame::SerializeAsArray() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsArray(); } @@ -65448,7 +71206,7 @@ std::vector IPCFrame::SerializeAsArray() const { void IPCFrame::Serialize(::protozero::Message* msg) const { // Field 2: request_id if (_has_field_[2]) { - msg->AppendVarInt(2, request_id_); + ::protozero::internal::gen_helpers::SerializeVarInt(2, request_id_, msg); } // Field 3: msg_bind_service @@ -65478,10 +71236,10 @@ void IPCFrame::Serialize(::protozero::Message* msg) const { // Field 1: data_for_testing for (auto& it : data_for_testing_) { - msg->AppendString(1, it); + ::protozero::internal::gen_helpers::SerializeString(1, it, msg); } - msg->AppendRawProtoBytes(unknown_fields_.data(), unknown_fields_.size()); + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); } @@ -65508,7 +71266,7 @@ bool IPCFrame_RequestError::ParseFromArray(const void* raw, size_t size) { } switch (field.id()) { case 1 /* error */: - field.get(&error_); + ::protozero::internal::gen_helpers::DeserializeString(field, &error_); break; default: field.SerializeAndAppendTo(&unknown_fields_); @@ -65519,13 +71277,13 @@ bool IPCFrame_RequestError::ParseFromArray(const void* raw, size_t size) { } std::string IPCFrame_RequestError::SerializeAsString() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsString(); } std::vector IPCFrame_RequestError::SerializeAsArray() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsArray(); } @@ -65533,10 +71291,10 @@ std::vector IPCFrame_RequestError::SerializeAsArray() const { void IPCFrame_RequestError::Serialize(::protozero::Message* msg) const { // Field 1: error if (_has_field_[1]) { - msg->AppendString(1, error_); + ::protozero::internal::gen_helpers::SerializeString(1, error_, msg); } - msg->AppendRawProtoBytes(unknown_fields_.data(), unknown_fields_.size()); + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); } @@ -65582,13 +71340,13 @@ bool IPCFrame_InvokeMethodReply::ParseFromArray(const void* raw, size_t size) { } std::string IPCFrame_InvokeMethodReply::SerializeAsString() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsString(); } std::vector IPCFrame_InvokeMethodReply::SerializeAsArray() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsArray(); } @@ -65596,20 +71354,20 @@ std::vector IPCFrame_InvokeMethodReply::SerializeAsArray() const { void IPCFrame_InvokeMethodReply::Serialize(::protozero::Message* msg) const { // Field 1: success if (_has_field_[1]) { - msg->AppendTinyVarInt(1, success_); + ::protozero::internal::gen_helpers::SerializeTinyVarInt(1, success_, msg); } // Field 2: has_more if (_has_field_[2]) { - msg->AppendTinyVarInt(2, has_more_); + ::protozero::internal::gen_helpers::SerializeTinyVarInt(2, has_more_, msg); } // Field 3: reply_proto if (_has_field_[3]) { - msg->AppendString(3, reply_proto_); + ::protozero::internal::gen_helpers::SerializeString(3, reply_proto_, msg); } - msg->AppendRawProtoBytes(unknown_fields_.data(), unknown_fields_.size()); + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); } @@ -65659,13 +71417,13 @@ bool IPCFrame_InvokeMethod::ParseFromArray(const void* raw, size_t size) { } std::string IPCFrame_InvokeMethod::SerializeAsString() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsString(); } std::vector IPCFrame_InvokeMethod::SerializeAsArray() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsArray(); } @@ -65673,25 +71431,25 @@ std::vector IPCFrame_InvokeMethod::SerializeAsArray() const { void IPCFrame_InvokeMethod::Serialize(::protozero::Message* msg) const { // Field 1: service_id if (_has_field_[1]) { - msg->AppendVarInt(1, service_id_); + ::protozero::internal::gen_helpers::SerializeVarInt(1, service_id_, msg); } // Field 2: method_id if (_has_field_[2]) { - msg->AppendVarInt(2, method_id_); + ::protozero::internal::gen_helpers::SerializeVarInt(2, method_id_, msg); } // Field 3: args_proto if (_has_field_[3]) { - msg->AppendString(3, args_proto_); + ::protozero::internal::gen_helpers::SerializeString(3, args_proto_, msg); } // Field 4: drop_reply if (_has_field_[4]) { - msg->AppendTinyVarInt(4, drop_reply_); + ::protozero::internal::gen_helpers::SerializeTinyVarInt(4, drop_reply_, msg); } - msg->AppendRawProtoBytes(unknown_fields_.data(), unknown_fields_.size()); + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); } @@ -65742,13 +71500,13 @@ bool IPCFrame_BindServiceReply::ParseFromArray(const void* raw, size_t size) { } std::string IPCFrame_BindServiceReply::SerializeAsString() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsString(); } std::vector IPCFrame_BindServiceReply::SerializeAsArray() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsArray(); } @@ -65756,12 +71514,12 @@ std::vector IPCFrame_BindServiceReply::SerializeAsArray() const { void IPCFrame_BindServiceReply::Serialize(::protozero::Message* msg) const { // Field 1: success if (_has_field_[1]) { - msg->AppendTinyVarInt(1, success_); + ::protozero::internal::gen_helpers::SerializeTinyVarInt(1, success_, msg); } // Field 2: service_id if (_has_field_[2]) { - msg->AppendVarInt(2, service_id_); + ::protozero::internal::gen_helpers::SerializeVarInt(2, service_id_, msg); } // Field 3: methods @@ -65769,7 +71527,7 @@ void IPCFrame_BindServiceReply::Serialize(::protozero::Message* msg) const { it.Serialize(msg->BeginNestedMessage<::protozero::Message>(3)); } - msg->AppendRawProtoBytes(unknown_fields_.data(), unknown_fields_.size()); + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); } @@ -65800,7 +71558,7 @@ bool IPCFrame_BindServiceReply_MethodInfo::ParseFromArray(const void* raw, size_ field.get(&id_); break; case 2 /* name */: - field.get(&name_); + ::protozero::internal::gen_helpers::DeserializeString(field, &name_); break; default: field.SerializeAndAppendTo(&unknown_fields_); @@ -65811,13 +71569,13 @@ bool IPCFrame_BindServiceReply_MethodInfo::ParseFromArray(const void* raw, size_ } std::string IPCFrame_BindServiceReply_MethodInfo::SerializeAsString() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsString(); } std::vector IPCFrame_BindServiceReply_MethodInfo::SerializeAsArray() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsArray(); } @@ -65825,15 +71583,15 @@ std::vector IPCFrame_BindServiceReply_MethodInfo::SerializeAsArray() co void IPCFrame_BindServiceReply_MethodInfo::Serialize(::protozero::Message* msg) const { // Field 1: id if (_has_field_[1]) { - msg->AppendVarInt(1, id_); + ::protozero::internal::gen_helpers::SerializeVarInt(1, id_, msg); } // Field 2: name if (_has_field_[2]) { - msg->AppendString(2, name_); + ::protozero::internal::gen_helpers::SerializeString(2, name_, msg); } - msg->AppendRawProtoBytes(unknown_fields_.data(), unknown_fields_.size()); + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); } @@ -65860,7 +71618,7 @@ bool IPCFrame_BindService::ParseFromArray(const void* raw, size_t size) { } switch (field.id()) { case 1 /* service_name */: - field.get(&service_name_); + ::protozero::internal::gen_helpers::DeserializeString(field, &service_name_); break; default: field.SerializeAndAppendTo(&unknown_fields_); @@ -65871,13 +71629,13 @@ bool IPCFrame_BindService::ParseFromArray(const void* raw, size_t size) { } std::string IPCFrame_BindService::SerializeAsString() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsString(); } std::vector IPCFrame_BindService::SerializeAsArray() const { - ::protozero::HeapBuffered<::protozero::Message> msg; + ::protozero::internal::gen_helpers::MessageSerializer msg; Serialize(msg.get()); return msg.SerializeAsArray(); } @@ -65885,10 +71643,10 @@ std::vector IPCFrame_BindService::SerializeAsArray() const { void IPCFrame_BindService::Serialize(::protozero::Message* msg) const { // Field 1: service_name if (_has_field_[1]) { - msg->AppendString(1, service_name_); + ::protozero::internal::gen_helpers::SerializeString(1, service_name_, msg); } - msg->AppendRawProtoBytes(unknown_fields_.data(), unknown_fields_.size()); + protozero::internal::gen_helpers::SerializeUnknownFields(unknown_fields_, msg); } } // namespace perfetto @@ -65923,6 +71681,7 @@ void IPCFrame_BindService::Serialize(::protozero::Message* msg) const { #include #include +#include // gen_amalgamated expanded: #include "perfetto/base/build_config.h" // gen_amalgamated expanded: #include "perfetto/base/export.h" @@ -65967,14 +71726,15 @@ enum class SockFamily { kUnix = 200, kInet, kInet6 }; // Controls the getsockopt(SO_PEERCRED) behavior, which allows to obtain the // peer credentials. enum class SockPeerCredMode { - // Obtain the peer credentials immediatley after connection and cache them. + // Obtain the peer credentials immediately after connection and cache them. kReadOnConnect = 0, // Don't read peer credentials at all. Calls to peer_uid()/peer_pid() will // hit a DCHECK and return kInvalidUid/Pid in release builds. kIgnore = 1, -#if PERFETTO_BUILDFLAG(PERFETTO_OS_WIN) +#if PERFETTO_BUILDFLAG(PERFETTO_OS_WIN) || \ + PERFETTO_BUILDFLAG(PERFETTO_OS_FUCHSIA) kDefault = kIgnore, #else kDefault = kReadOnConnect, @@ -66016,7 +71776,7 @@ class UnixSocketRaw { void Shutdown(); void SetBlocking(bool); void DcheckIsBlocking(bool expected) const; // No-op on release and Win. - void RetainOnExec(); + void SetRetainOnExec(bool retain); SockType type() const { return type_; } SockFamily family() const { return family_; } SocketHandle fd() const { return *fd_; } @@ -66132,6 +71892,8 @@ class PERFETTO_EXPORT_COMPONENT UnixSocket { EventListener& operator=(EventListener&&) noexcept = default; // After Listen(). + // |self| may be null if the connection was not accepted via a listen + // socket. virtual void OnNewIncomingConnection( UnixSocket* self, std::unique_ptr new_connection); @@ -66445,7 +72207,7 @@ inline int GetSockFamily(SockFamily family) { } inline int GetSockType(SockType type) { -#ifdef SOCK_CLOEXEC +#if defined(SOCK_CLOEXEC) constexpr int kSockCloExec = SOCK_CLOEXEC; #else constexpr int kSockCloExec = 0; @@ -66466,7 +72228,7 @@ SockaddrAny MakeSockAddr(SockFamily family, const std::string& socket_name) { case SockFamily::kUnix: { struct sockaddr_un saddr {}; const size_t name_len = socket_name.size(); - if (name_len >= sizeof(saddr.sun_path)) { + if (name_len + 1 /* for trailing \0 */ >= sizeof(saddr.sun_path)) { errno = ENAMETOOLONG; return SockaddrAny(); } @@ -66485,6 +72247,12 @@ SockaddrAny MakeSockAddr(SockFamily family, const std::string& socket_name) { saddr.sun_family = AF_UNIX; auto size = static_cast( __builtin_offsetof(sockaddr_un, sun_path) + name_len + 1); + + // Abstract sockets do NOT require a trailing null terminator (which is + // instad mandatory for filesystem sockets). Any byte up to `size`, + // including '\0' will become part of the socket name. + if (saddr.sun_path[0] == '\0') + --size; PERFETTO_CHECK(static_cast(size) <= sizeof(saddr)); return SockaddrAny(&saddr, size); } @@ -66576,9 +72344,9 @@ std::pair UnixSocketRaw::CreatePairPosix( SockFamily family, SockType type) { int fds[2]; - if (socketpair(GetSockFamily(family), GetSockType(type), 0, fds) != 0) + if (socketpair(GetSockFamily(family), GetSockType(type), 0, fds) != 0) { return std::make_pair(UnixSocketRaw(), UnixSocketRaw()); - + } return std::make_pair(UnixSocketRaw(ScopedFile(fds[0]), family, type), UnixSocketRaw(ScopedFile(fds[1]), family, type)); } @@ -66629,8 +72397,7 @@ UnixSocketRaw::UnixSocketRaw(ScopedSocketHandle fd, #else // There is no reason why a socket should outlive the process in case of // exec() by default, this is just working around a broken unix design. - int fcntl_res = fcntl(*fd_, F_SETFD, FD_CLOEXEC); - PERFETTO_CHECK(fcntl_res == 0); + SetRetainOnExec(false); #endif } @@ -66661,13 +72428,20 @@ void UnixSocketRaw::SetBlocking(bool is_blocking) { #endif } -void UnixSocketRaw::RetainOnExec() { -#if !PERFETTO_BUILDFLAG(PERFETTO_OS_WIN) +void UnixSocketRaw::SetRetainOnExec(bool retain) { +#if !PERFETTO_BUILDFLAG(PERFETTO_OS_WIN) && \ + !PERFETTO_BUILDFLAG(PERFETTO_OS_FUCHSIA) PERFETTO_DCHECK(fd_); int flags = fcntl(*fd_, F_GETFD, 0); - flags &= ~static_cast(FD_CLOEXEC); + if (retain) { + flags &= ~static_cast(FD_CLOEXEC); + } else { + flags |= FD_CLOEXEC; + } int fcntl_res = fcntl(*fd_, F_SETFD, flags); PERFETTO_CHECK(fcntl_res == 0); +#else + ignore_result(retain); #endif } @@ -67418,16 +73192,13 @@ using MethodID = uint32_t; using ClientID = uint64_t; using RequestID = uint64_t; -#if PERFETTO_BUILDFLAG(PERFETTO_OS_WIN) || \ - PERFETTO_BUILDFLAG(PERFETTO_OS_FUCHSIA) +#if PERFETTO_BUILDFLAG(PERFETTO_OS_WIN) // AF_UNIX on Windows is supported only on Windows 10 from build 17063. // Also it doesn't bring major advantages compared to a TCP socket. // See go/perfetto-win . -// AF_UNIX sockets are not supported on Fuchsia. The typical IPC flow involves -// adoption of connected kernel sockets. constexpr bool kUseTCPSocket = true; #else -// On Android, Linux, Mac use a AF_UNIX socket. +// Android, Linux, Mac, Fuchsia use local sockets. constexpr bool kUseTCPSocket = false; #endif @@ -68130,6 +73901,7 @@ class Client { base::ScopedSocketHandle socket_fd; const char* socket_name = nullptr; bool retry = false; // Only for connecting with |socket_name|. + std::function receive_shmem_fd_cb_fuchsia; }; static std::unique_ptr CreateInstance(ConnArgs, base::TaskRunner*); @@ -68206,6 +73978,11 @@ class Host { static std::unique_ptr CreateInstance(base::ScopedSocketHandle, base::TaskRunner*); + // Creates a Host which is not backed by a POSIX listening socket. + // Instead, it accepts sockets passed in via AdoptConnectedSocket_Fuchsia(). + // See go/fuchsetto for more details. + static std::unique_ptr CreateInstance_Fuchsia(base::TaskRunner*); + virtual ~Host(); // Registers a new service and makes it available to remote IPC peers. @@ -68216,6 +73993,17 @@ class Host { // case of errors (e.g., another service with the same name is already // registered). virtual bool ExposeService(std::unique_ptr) = 0; + + // Accepts a pre-connected socket handle and a callback used to send a + // shared memory FD to the remote client. + // The callback returns false if the FD could not be sent. + // Should only be used in conjunction with CreateInstance_Fuchsia(). + virtual void AdoptConnectedSocket_Fuchsia( + base::ScopedSocketHandle, + std::function send_fd_cb) = 0; + + // Overrides the default send timeout for the per-connection sockets. + virtual void SetSocketSendTimeoutMs(uint32_t timeout_ms) = 0; }; } // namespace ipc @@ -68885,6 +74673,17 @@ void ClientImpl::OnDisconnect(base::UnixSocket*) { service_proxy->OnDisconnect(); }); } + for (const auto& it : queued_requests_) { + const QueuedRequest& queued_request = it.second; + if (queued_request.type != Frame::kMsgBindServiceFieldNumber) { + continue; + } + base::WeakPtr service_proxy = queued_request.service_proxy; + task_runner_->PostTask([service_proxy] { + if (service_proxy) + service_proxy->OnConnect(false); + }); + } service_bindings_.clear(); queued_bindings_.clear(); } @@ -69162,6 +74961,7 @@ base::WeakPtr ServiceProxy::GetWeakPtr() const { #include // gen_amalgamated expanded: #include "perfetto/base/task_runner.h" +// gen_amalgamated expanded: #include "perfetto/ext/base/scoped_file.h" // gen_amalgamated expanded: #include "perfetto/ext/base/thread_checker.h" // gen_amalgamated expanded: #include "perfetto/ext/base/unix_socket.h" // gen_amalgamated expanded: #include "perfetto/ext/ipc/deferred.h" @@ -69171,14 +74971,21 @@ base::WeakPtr ServiceProxy::GetWeakPtr() const { namespace perfetto { namespace ipc { +constexpr uint32_t kDefaultIpcTxTimeoutMs = 10000; + class HostImpl : public Host, public base::UnixSocket::EventListener { public: HostImpl(const char* socket_name, base::TaskRunner*); HostImpl(base::ScopedSocketHandle, base::TaskRunner*); + HostImpl(base::TaskRunner* task_runner); ~HostImpl() override; // Host implementation. bool ExposeService(std::unique_ptr) override; + void AdoptConnectedSocket_Fuchsia( + base::ScopedSocketHandle, + std::function send_fd_cb) override; + void SetSocketSendTimeoutMs(uint32_t timeout_ms) override; // base::UnixSocket::EventListener implementation. void OnNewIncomingConnection(base::UnixSocket*, @@ -69196,6 +75003,7 @@ class HostImpl : public Host, public base::UnixSocket::EventListener { std::unique_ptr sock; BufferedFrameDeserializer frame_deserializer; base::ScopedFile received_fd; + std::function send_fd_cb_fuchsia; }; struct ExposedService { ExposedService(ServiceID, const std::string&, std::unique_ptr); @@ -69227,6 +75035,7 @@ class HostImpl : public Host, public base::UnixSocket::EventListener { std::map clients_by_socket_; ServiceID last_service_id_ = 0; ClientID last_client_id_ = 0; + uint32_t socket_tx_timeout_ms_ = kDefaultIpcTxTimeoutMs; PERFETTO_THREAD_CHECKER(thread_checker_) base::WeakPtrFactory weak_ptr_factory_; // Keep last. }; @@ -69321,6 +75130,12 @@ std::unique_ptr Host::CreateInstance(base::ScopedSocketHandle socket_fd, return std::unique_ptr(std::move(host)); } +// static +std::unique_ptr Host::CreateInstance_Fuchsia( + base::TaskRunner* task_runner) { + return std::unique_ptr(new HostImpl(task_runner)); +} + HostImpl::HostImpl(base::ScopedSocketHandle socket_fd, base::TaskRunner* task_runner) : task_runner_(task_runner), weak_ptr_factory_(this) { @@ -69339,6 +75154,11 @@ HostImpl::HostImpl(const char* socket_name, base::TaskRunner* task_runner) } } +HostImpl::HostImpl(base::TaskRunner* task_runner) + : task_runner_(task_runner), weak_ptr_factory_(this) { + PERFETTO_DCHECK_THREAD(thread_checker_); +} + HostImpl::~HostImpl() = default; bool HostImpl::ExposeService(std::unique_ptr service) { @@ -69354,6 +75174,31 @@ bool HostImpl::ExposeService(std::unique_ptr service) { return true; } +void HostImpl::AdoptConnectedSocket_Fuchsia( + base::ScopedSocketHandle connected_socket, + std::function send_fd_cb) { + PERFETTO_DCHECK_THREAD(thread_checker_); + PERFETTO_DCHECK(connected_socket); + // Should not be used in conjunction with listen sockets. + PERFETTO_DCHECK(!sock_); + + auto unix_socket = base::UnixSocket::AdoptConnected( + std::move(connected_socket), this, task_runner_, kHostSockFamily, + base::SockType::kStream); + + auto* unix_socket_ptr = unix_socket.get(); + OnNewIncomingConnection(nullptr, std::move(unix_socket)); + ClientConnection* client_connection = clients_by_socket_[unix_socket_ptr]; + client_connection->send_fd_cb_fuchsia = std::move(send_fd_cb); + PERFETTO_DCHECK(client_connection->send_fd_cb_fuchsia); +} + +void HostImpl::SetSocketSendTimeoutMs(uint32_t timeout_ms) { + PERFETTO_DCHECK_THREAD(thread_checker_); + // Should be less than the watchdog period (30s). + socket_tx_timeout_ms_ = timeout_ms; +} + void HostImpl::OnNewIncomingConnection( base::UnixSocket*, std::unique_ptr new_conn) { @@ -69363,8 +75208,7 @@ void HostImpl::OnNewIncomingConnection( clients_by_socket_[new_conn.get()] = client.get(); client->id = client_id; client->sock = std::move(new_conn); - // Watchdog is 30 seconds, so set the socket timeout to 10 seconds. - client->sock->SetTxTimeout(10000); + client->sock->SetTxTimeout(socket_tx_timeout_ms_); clients_[client_id] = std::move(client); } @@ -69514,6 +75358,18 @@ void HostImpl::SendFrame(ClientConnection* client, const Frame& frame, int fd) { std::string buf = BufferedFrameDeserializer::Serialize(frame); + // On Fuchsia, |send_fd_cb_fuchsia_| is used to send the FD to the client + // and therefore must be set. + PERFETTO_DCHECK(!PERFETTO_BUILDFLAG(PERFETTO_OS_FUCHSIA) || + client->send_fd_cb_fuchsia); + if (client->send_fd_cb_fuchsia && fd != base::ScopedFile::kInvalid) { + if (!client->send_fd_cb_fuchsia(fd)) { + client->sock->Shutdown(true); + return; + } + fd = base::ScopedFile::kInvalid; + } + // When a new Client connects in OnNewClientConnection we set a timeout on // Send (see call to SetTxTimeout). // @@ -69649,6 +75505,9 @@ class ConsumerPort : public ::perfetto::ipc::Service { using DeferredSaveTraceForBugreportResponse = ::perfetto::ipc::Deferred; virtual void SaveTraceForBugreport(const SaveTraceForBugreportRequest&, DeferredSaveTraceForBugreportResponse) = 0; + using DeferredCloneSessionResponse = ::perfetto::ipc::Deferred; + virtual void CloneSession(const CloneSessionRequest&, DeferredCloneSessionResponse) = 0; + }; @@ -69703,6 +75562,9 @@ class ConsumerPortProxy : public ::perfetto::ipc::ServiceProxy { using DeferredSaveTraceForBugreportResponse = ::perfetto::ipc::Deferred; void SaveTraceForBugreport(const SaveTraceForBugreportRequest&, DeferredSaveTraceForBugreportResponse, int fd = -1); + using DeferredCloneSessionResponse = ::perfetto::ipc::Deferred; + void CloneSession(const CloneSessionRequest&, DeferredCloneSessionResponse, int fd = -1); + }; } // namespace perfetto @@ -69861,6 +75723,12 @@ namespace gen { &_IPC_Decoder, &_IPC_Decoder, &_IPC_Invoker}); + + desc->methods.emplace_back(::perfetto::ipc::ServiceDescriptor::Method{ + "CloneSession", + &_IPC_Decoder, + &_IPC_Decoder, + &_IPC_Invoker}); desc->methods.shrink_to_fit(); return desc; } @@ -69957,6 +75825,11 @@ void ConsumerPortProxy::SaveTraceForBugreport(const SaveTraceForBugreportRequest BeginInvoke("SaveTraceForBugreport", request, ::perfetto::ipc::DeferredBase(std::move(reply)), fd); } + +void ConsumerPortProxy::CloneSession(const CloneSessionRequest& request, DeferredCloneSessionResponse reply, int fd) { + BeginInvoke("CloneSession", request, ::perfetto::ipc::DeferredBase(std::move(reply)), + fd); +} } // namespace perfetto } // namespace protos } // namespace gen @@ -70573,8 +76446,9 @@ base::ScopedFile CreateMemfd(const char*, unsigned int) { #if PERFETTO_BUILDFLAG(PERFETTO_OS_LINUX) || \ PERFETTO_BUILDFLAG(PERFETTO_OS_ANDROID) || \ - PERFETTO_BUILDFLAG(PERFETTO_OS_APPLE) || \ - PERFETTO_BUILDFLAG(PERFETTO_OS_FUCHSIA) + PERFETTO_BUILDFLAG(PERFETTO_OS_APPLE) || \ + PERFETTO_BUILDFLAG(PERFETTO_OS_FUCHSIA) || \ + PERFETTO_BUILDFLAG(PERFETTO_OS_WASM) #include @@ -70652,7 +76526,8 @@ class PosixSharedMemory : public SharedMemory { #if PERFETTO_BUILDFLAG(PERFETTO_OS_LINUX) || \ PERFETTO_BUILDFLAG(PERFETTO_OS_ANDROID) || \ PERFETTO_BUILDFLAG(PERFETTO_OS_APPLE) || \ - PERFETTO_BUILDFLAG(PERFETTO_OS_FUCHSIA) + PERFETTO_BUILDFLAG(PERFETTO_OS_FUCHSIA) || \ + PERFETTO_BUILDFLAG(PERFETTO_OS_WASM) #include #include @@ -71084,6 +76959,7 @@ class ConsumerIPCClientImpl : public TracingService::ConsumerEndpoint, void QueryServiceState(QueryServiceStateCallback) override; void QueryCapabilities(QueryCapabilitiesCallback) override; void SaveTraceForBugreport(SaveTraceForBugreportCallback) override; + void CloneSession(TracingSessionID) override; // ipc::ServiceProxy::EventListener implementation. // These methods are invoked by the IPC layer, which knows nothing about @@ -71599,6 +77475,34 @@ void ConsumerIPCClientImpl::SaveTraceForBugreport( consumer_port_.SaveTraceForBugreport(req, std::move(async_response)); } +void ConsumerIPCClientImpl::CloneSession(TracingSessionID tsid) { + if (!connected_) { + PERFETTO_DLOG("Cannot CloneSession(), not connected to tracing service"); + return; + } + + protos::gen::CloneSessionRequest req; + req.set_session_id(tsid); + ipc::Deferred async_response; + auto weak_this = weak_ptr_factory_.GetWeakPtr(); + + async_response.Bind( + [weak_this]( + ipc::AsyncResult response) { + if (!weak_this) + return; + if (!response) { + // If the IPC fails, we are talking to an older version of the service + // that didn't support CloneSession at all. + weak_this->consumer_->OnSessionCloned( + false, "CloneSession IPC not supported"); + } else { + weak_this->consumer_->OnSessionCloned(response->success(), + response->error()); + } + }); + consumer_port_.CloneSession(req, std::move(async_response)); +} } // namespace perfetto // gen_amalgamated begin source: src/tracing/ipc/producer/producer_ipc_client_impl.cc // gen_amalgamated begin header: src/tracing/ipc/producer/producer_ipc_client_impl.h @@ -71728,6 +77632,7 @@ class PERFETTO_EXPORT_COMPONENT ProducerIPCClient { #include // gen_amalgamated expanded: #include "perfetto/ext/base/thread_checker.h" +// gen_amalgamated expanded: #include "perfetto/ext/base/weak_ptr.h" // gen_amalgamated expanded: #include "perfetto/ext/ipc/client.h" // gen_amalgamated expanded: #include "perfetto/ext/ipc/service_proxy.h" // gen_amalgamated expanded: #include "perfetto/ext/tracing/core/basic_types.h" @@ -71767,6 +77672,7 @@ class ProducerIPCClientImpl : public TracingService::ProducerEndpoint, // TracingService::ProducerEndpoint implementation. // These methods are invoked by the actual Producer(s) code by clients of the // tracing library, which know nothing about the IPC transport. + void Disconnect() override; void RegisterDataSource(const DataSourceDescriptor&) override; void UpdateDataSource(const DataSourceDescriptor&) override; void UnregisterDataSource(const std::string& name) override; @@ -71796,6 +77702,10 @@ class ProducerIPCClientImpl : public TracingService::ProducerEndpoint, ipc::Client* GetClientForTesting() { return ipc_channel_.get(); } private: + // Drops the provider connection if a protocol error was detected while + // processing an IPC command. + void ScheduleDisconnect(); + // Invoked soon after having established the connection with the service. void OnConnectionInitialized(bool connection_succeeded, bool using_shmem_provided_by_producer, @@ -71809,12 +77719,15 @@ class ProducerIPCClientImpl : public TracingService::ProducerEndpoint, Producer* const producer_; base::TaskRunner* const task_runner_; + // A callback used to receive the shmem region out of band of the socket. + std::function receive_shmem_fd_cb_fuchsia_; + // The object that owns the client socket and takes care of IPC traffic. std::unique_ptr ipc_channel_; // The proxy interface for the producer port of the service. It is bound // to |ipc_channel_| and (de)serializes method invocations over the wire. - protos::gen::ProducerPortProxy producer_port_; + std::unique_ptr producer_port_; std::unique_ptr shared_memory_; std::unique_ptr shared_memory_arbiter_; @@ -71828,6 +77741,7 @@ class ProducerIPCClientImpl : public TracingService::ProducerEndpoint, bool is_shmem_provided_by_producer_ = false; bool direct_smb_patching_supported_ = false; std::vector> pending_sync_reqs_; + base::WeakPtrFactory weak_factory_{this}; PERFETTO_THREAD_CHECKER(thread_checker_) }; @@ -71933,9 +77847,12 @@ ProducerIPCClientImpl::ProducerIPCClientImpl( std::unique_ptr shm_arbiter) : producer_(producer), task_runner_(task_runner), + receive_shmem_fd_cb_fuchsia_( + std::move(conn_args.receive_shmem_fd_cb_fuchsia)), ipc_channel_( ipc::Client::CreateInstance(std::move(conn_args), task_runner)), - producer_port_(this /* event_listener */), + producer_port_( + new protos::gen::ProducerPortProxy(this /* event_listener */)), shared_memory_(std::move(shm)), shared_memory_arbiter_(std::move(shm_arbiter)), name_(producer_name), @@ -71954,7 +77871,7 @@ ProducerIPCClientImpl::ProducerIPCClientImpl( shared_buffer_page_size_kb_ = shared_memory_page_size_hint_bytes_ / 1024; } - ipc_channel_->BindService(producer_port_.GetWeakPtr()); + ipc_channel_->BindService(producer_port_->GetWeakPtr()); PERFETTO_DCHECK_THREAD(thread_checker_); } @@ -71962,6 +77879,19 @@ ProducerIPCClientImpl::~ProducerIPCClientImpl() { PERFETTO_DCHECK_THREAD(thread_checker_); } +void ProducerIPCClientImpl::Disconnect() { + PERFETTO_DCHECK_THREAD(thread_checker_); + if (!producer_port_) + return; + // Reset the producer port so that no further IPCs are received and IPC + // callbacks are no longer executed. Also reset the IPC channel so that the + // service is notified of the disconnection. + producer_port_.reset(); + ipc_channel_.reset(); + // Perform disconnect synchronously. + OnDisconnect(); +} + // Called by the IPC layer if the BindService() succeeds. void ProducerIPCClientImpl::OnConnect() { PERFETTO_DCHECK_THREAD(thread_checker_); @@ -72011,7 +77941,7 @@ void ProducerIPCClientImpl::OnConnect() { } req.set_sdk_version(base::GetVersionString()); - producer_port_.InitializeConnection(req, std::move(on_init), shm_fd); + producer_port_->InitializeConnection(req, std::move(on_init), shm_fd); // Create the back channel to receive commands from the Service. ipc::Deferred on_cmd; @@ -72021,8 +77951,8 @@ void ProducerIPCClientImpl::OnConnect() { return; // The IPC channel was closed and |resp| was auto-rejected. OnServiceRequest(*resp); }); - producer_port_.GetAsyncCommand(protos::gen::GetAsyncCommandRequest(), - std::move(on_cmd)); + producer_port_->GetAsyncCommand(protos::gen::GetAsyncCommandRequest(), + std::move(on_cmd)); // If there are pending Sync() requests, send them now. for (const auto& pending_sync : pending_sync_reqs_) @@ -72038,6 +77968,24 @@ void ProducerIPCClientImpl::OnDisconnect() { producer_->OnDisconnect(); // Note: may delete |this|. } +void ProducerIPCClientImpl::ScheduleDisconnect() { + // |ipc_channel| doesn't allow disconnection in the middle of handling + // an IPC call, so the connection drop must take place over two phases. + + // First, synchronously drop the |producer_port_| so that no more IPC + // messages are handled. + producer_port_.reset(); + + // Then schedule an async task for performing the remainder of the + // disconnection operations outside the context of the IPC method handler. + auto weak_this = weak_factory_.GetWeakPtr(); + task_runner_->PostTask([weak_this]() { + if (weak_this) { + weak_this->Disconnect(); + } + }); +} + void ProducerIPCClientImpl::OnConnectionInitialized( bool connection_succeeded, bool using_shmem_provided_by_producer, @@ -72055,7 +78003,7 @@ void ProducerIPCClientImpl::OnConnectionInitialized( // TODO(eseckler): Handle adoption failure more gracefully. if (shared_memory_ && !is_shmem_provided_by_producer_) { PERFETTO_DLOG("Service failed adopt producer-provided SMB, disconnecting."); - ipc_channel_.reset(); + Disconnect(); return; } } @@ -72100,6 +78048,23 @@ void ProducerIPCClientImpl::OnServiceRequest( const std::string& shm_key = cmd.setup_tracing().shm_key_windows(); if (!shm_key.empty()) ipc_shared_memory = SharedMemoryWindows::Attach(shm_key); +#elif PERFETTO_BUILDFLAG(PERFETTO_OS_FUCHSIA) + // On Fuchsia, the embedder is responsible for routing the shared memory + // FD, which is provided to this code via a blocking callback. + PERFETTO_CHECK(receive_shmem_fd_cb_fuchsia_); + + base::ScopedFile shmem_fd(receive_shmem_fd_cb_fuchsia_()); + if (!shmem_fd) { + // Failure to get a shared memory buffer is a protocol violation and + // therefore we should drop the Protocol connection. + PERFETTO_ELOG("Could not get shared memory FD from embedder."); + ScheduleDisconnect(); + return; + } + + ipc_shared_memory = + PosixSharedMemory::AttachToFd(std::move(shmem_fd), + /*require_seals_if_supported=*/false); #else base::ScopedFile shmem_fd = ipc_channel_->TakeReceivedFD(); if (shmem_fd) { @@ -72174,7 +78139,7 @@ void ProducerIPCClientImpl::RegisterDataSource( if (!response) PERFETTO_DLOG("RegisterDataSource() failed: connection reset"); }); - producer_port_.RegisterDataSource(req, std::move(async_response)); + producer_port_->RegisterDataSource(req, std::move(async_response)); } void ProducerIPCClientImpl::UpdateDataSource( @@ -72192,7 +78157,7 @@ void ProducerIPCClientImpl::UpdateDataSource( if (!response) PERFETTO_DLOG("UpdateDataSource() failed: connection reset"); }); - producer_port_.UpdateDataSource(req, std::move(async_response)); + producer_port_->UpdateDataSource(req, std::move(async_response)); } void ProducerIPCClientImpl::UnregisterDataSource(const std::string& name) { @@ -72204,7 +78169,7 @@ void ProducerIPCClientImpl::UnregisterDataSource(const std::string& name) { } protos::gen::UnregisterDataSourceRequest req; req.set_data_source_name(name); - producer_port_.UnregisterDataSource( + producer_port_->UnregisterDataSource( req, ipc::Deferred()); } @@ -72219,7 +78184,7 @@ void ProducerIPCClientImpl::RegisterTraceWriter(uint32_t writer_id, protos::gen::RegisterTraceWriterRequest req; req.set_trace_writer_id(writer_id); req.set_target_buffer(target_buffer); - producer_port_.RegisterTraceWriter( + producer_port_->RegisterTraceWriter( req, ipc::Deferred()); } @@ -72232,7 +78197,7 @@ void ProducerIPCClientImpl::UnregisterTraceWriter(uint32_t writer_id) { } protos::gen::UnregisterTraceWriterRequest req; req.set_trace_writer_id(writer_id); - producer_port_.UnregisterTraceWriter( + producer_port_->UnregisterTraceWriter( req, ipc::Deferred()); } @@ -72256,7 +78221,7 @@ void ProducerIPCClientImpl::CommitData(const CommitDataRequest& req, callback(); }); } - producer_port_.CommitData(req, std::move(async_response)); + producer_port_->CommitData(req, std::move(async_response)); } void ProducerIPCClientImpl::NotifyDataSourceStarted(DataSourceInstanceID id) { @@ -72268,7 +78233,7 @@ void ProducerIPCClientImpl::NotifyDataSourceStarted(DataSourceInstanceID id) { } protos::gen::NotifyDataSourceStartedRequest req; req.set_data_source_id(id); - producer_port_.NotifyDataSourceStarted( + producer_port_->NotifyDataSourceStarted( req, ipc::Deferred()); } @@ -72281,7 +78246,7 @@ void ProducerIPCClientImpl::NotifyDataSourceStopped(DataSourceInstanceID id) { } protos::gen::NotifyDataSourceStoppedRequest req; req.set_data_source_id(id); - producer_port_.NotifyDataSourceStopped( + producer_port_->NotifyDataSourceStopped( req, ipc::Deferred()); } @@ -72297,7 +78262,7 @@ void ProducerIPCClientImpl::ActivateTriggers( for (const auto& name : triggers) { *proto_req.add_trigger_names() = name; } - producer_port_.ActivateTriggers( + producer_port_->ActivateTriggers( proto_req, ipc::Deferred()); } @@ -72315,7 +78280,7 @@ void ProducerIPCClientImpl::Sync(std::function callback) { // still a (weaker) linearization fence. callback(); }); - producer_port_.Sync(protos::gen::SyncRequest(), std::move(resp)); + producer_port_->Sync(protos::gen::SyncRequest(), std::move(resp)); } std::unique_ptr ProducerIPCClientImpl::CreateTraceWriter( @@ -72423,6 +78388,8 @@ class ConsumerIPCService : public protos::gen::ConsumerPort { DeferredQueryCapabilitiesResponse) override; void SaveTraceForBugreport(const protos::gen::SaveTraceForBugreportRequest&, DeferredSaveTraceForBugreportResponse) override; + void CloneSession(const protos::gen::CloneSessionRequest&, + DeferredCloneSessionResponse) override; void OnClientDisconnected() override; private: @@ -72444,6 +78411,7 @@ class ConsumerIPCService : public protos::gen::ConsumerPort { void OnAttach(bool, const TraceConfig&) override; void OnTraceStats(bool, const TraceStats&) override; void OnObservableEvents(const ObservableEvents&) override; + void OnSessionCloned(bool, const std::string&) override; void CloseObserveEventsResponseStream(); @@ -72470,6 +78438,9 @@ class ConsumerIPCService : public protos::gen::ConsumerPort { // As above, but for GetTraceStats(). DeferredGetTraceStatsResponse get_trace_stats_response; + // As above, but for CloneSession(). + DeferredCloneSessionResponse clone_session_response; + // After ObserveEvents() is invoked, this binds the async callback that // allows to stream ObservableEvents back to the client. DeferredObserveEventsResponse observe_events_response; @@ -72842,6 +78813,14 @@ void ConsumerIPCService::SaveTraceForBugreport( remote_consumer->service_endpoint->SaveTraceForBugreport(callback); } +void ConsumerIPCService::CloneSession( + const protos::gen::CloneSessionRequest& req, + DeferredCloneSessionResponse resp) { + RemoteConsumer* remote_consumer = GetConsumerForCurrentRequest(); + remote_consumer->clone_session_response = std::move(resp); + remote_consumer->service_endpoint->CloneSession(req.session_id()); +} + // Called by the service in response to // service_endpoint->SaveTraceForBugreport(). void ConsumerIPCService::OnSaveTraceForBugreportCallback( @@ -72991,6 +78970,18 @@ void ConsumerIPCService::RemoteConsumer::CloseObserveEventsResponseStream() { observe_events_response.Resolve(std::move(result)); } +void ConsumerIPCService::RemoteConsumer::OnSessionCloned( + bool success, + const std::string& error) { + if (!clone_session_response.IsBound()) + return; + + auto resp = ipc::AsyncResult::Create(); + resp->set_success(success); + resp->set_error(error); + std::move(clone_session_response).Resolve(std::move(resp)); +} + } // namespace perfetto // gen_amalgamated begin source: src/tracing/ipc/service/producer_ipc_service.cc // gen_amalgamated begin header: src/tracing/ipc/service/producer_ipc_service.h @@ -73706,6 +79697,10 @@ namespace base { class TaskRunner; } // namespace base. +namespace ipc { +class Host; +} // namespace ipc + class TracingService; // Creates an instance of the service (business logic + UNIX socket transport). @@ -73729,6 +79724,10 @@ class PERFETTO_EXPORT_COMPONENT ServiceIPCHost { virtual bool Start(base::ScopedSocketHandle producer_socket_fd, base::ScopedSocketHandle consumer_socket_fd) = 0; + // Allows callers to supply preconstructed Hosts. + virtual bool Start(std::unique_ptr producer_host, + std::unique_ptr consumer_host) = 0; + virtual TracingService* service() const = 0; protected: @@ -73785,6 +79784,8 @@ class ServiceIPCHostImpl : public ServiceIPCHost { const char* consumer_socket_name) override; bool Start(base::ScopedSocketHandle producer_socket_fd, base::ScopedSocketHandle consumer_socket_fd) override; + bool Start(std::unique_ptr producer_host, + std::unique_ptr consumer_host) override; TracingService* service() const override; @@ -73839,6 +79840,10 @@ class ServiceIPCHostImpl : public ServiceIPCHost { namespace perfetto { +namespace { +constexpr uint32_t kProducerSocketTxTimeoutMs = 10; +} + // TODO(fmayer): implement per-uid connection limit (b/69093705). // Implements the publicly exposed factory method declared in @@ -73877,6 +79882,19 @@ bool ServiceIPCHostImpl::Start(base::ScopedSocketHandle producer_socket_fd, return DoStart(); } +bool ServiceIPCHostImpl::Start(std::unique_ptr producer_host, + std::unique_ptr consumer_host) { + PERFETTO_CHECK(!svc_); // Check if already started. + PERFETTO_DCHECK(producer_host); + PERFETTO_DCHECK(consumer_host); + + // Initialize the IPC transport. + producer_ipc_port_ = std::move(producer_host); + consumer_ipc_port_ = std::move(consumer_host); + + return DoStart(); +} + bool ServiceIPCHostImpl::DoStart() { // Create and initialize the platform-independent tracing business logic. #if PERFETTO_BUILDFLAG(PERFETTO_OS_WIN) @@ -73893,6 +79911,16 @@ bool ServiceIPCHostImpl::DoStart() { return false; } + // Lower the timeout for blocking socket sends to producers as we shouldn't + // normally exhaust the kernel send buffer unless the producer is + // unresponsive. We'll drop the connection if the timeout is hit (see + // UnixSocket::Send). Context in b/236813972, b/193234818. + // Consumer port continues using the default timeout (10s) as there are + // generally fewer consumer processes, and they're better behaved. Also the + // consumer port ipcs might exhaust the send buffer under normal operation + // due to large messages such as ReadBuffersResponse. + producer_ipc_port_->SetSocketSendTimeoutMs(kProducerSocketTxTimeoutMs); + // TODO(fmayer): add a test that destroyes the ServiceIPCHostImpl soon after // Start() and checks that no spurious callbacks are issued. bool producer_service_exposed = producer_ipc_port_->ExposeService( @@ -73945,40 +79973,81 @@ ServiceIPCHost::~ServiceIPCHost() = default; // gen_amalgamated expanded: #include "perfetto/base/logging.h" // gen_amalgamated expanded: #include "perfetto/base/task_runner.h" // gen_amalgamated expanded: #include "perfetto/ext/tracing/core/tracing_service.h" -// gen_amalgamated expanded: #include "perfetto/ext/tracing/ipc/consumer_ipc_client.h" // gen_amalgamated expanded: #include "perfetto/ext/tracing/ipc/default_socket.h" // gen_amalgamated expanded: #include "perfetto/ext/tracing/ipc/producer_ipc_client.h" +#if PERFETTO_BUILDFLAG(PERFETTO_SYSTEM_CONSUMER) +// gen_amalgamated expanded: #include "perfetto/ext/tracing/ipc/consumer_ipc_client.h" +#endif + +#if PERFETTO_BUILDFLAG(PERFETTO_OS_WIN) +// gen_amalgamated expanded: #include "src/tracing/ipc/shared_memory_windows.h" +#else +// gen_amalgamated expanded: #include "src/tracing/ipc/posix_shared_memory.h" +#endif + namespace perfetto { namespace internal { // static -TracingBackend* SystemTracingBackend::GetInstance() { - static auto* instance = new SystemTracingBackend(); +TracingProducerBackend* SystemProducerTracingBackend::GetInstance() { + static auto* instance = new SystemProducerTracingBackend(); return instance; } -SystemTracingBackend::SystemTracingBackend() {} +SystemProducerTracingBackend::SystemProducerTracingBackend() {} -std::unique_ptr SystemTracingBackend::ConnectProducer( +std::unique_ptr SystemProducerTracingBackend::ConnectProducer( const ConnectProducerArgs& args) { PERFETTO_DCHECK(args.task_runner->RunsTasksOnCurrentThread()); + std::unique_ptr shm; + std::unique_ptr arbiter; + uint32_t shmem_size_hint = args.shmem_size_hint_bytes; + uint32_t shmem_page_size_hint = args.shmem_page_size_hint_bytes; + if (args.use_producer_provided_smb) { + if (shmem_size_hint == 0) + shmem_size_hint = TracingService::kDefaultShmSize; + if (shmem_page_size_hint == 0) + shmem_page_size_hint = TracingService::kDefaultShmPageSize; +#if PERFETTO_BUILDFLAG(PERFETTO_OS_WIN) + shm = SharedMemoryWindows::Create(shmem_size_hint); +#else + shm = PosixSharedMemory::Create(shmem_size_hint); +#endif + arbiter = SharedMemoryArbiter::CreateUnboundInstance(shm.get(), + shmem_page_size_hint); + } + auto endpoint = ProducerIPCClient::Connect( GetProducerSocket(), args.producer, args.producer_name, args.task_runner, - TracingService::ProducerSMBScrapingMode::kEnabled, - args.shmem_size_hint_bytes, args.shmem_page_size_hint_bytes, nullptr, - nullptr, ProducerIPCClient::ConnectionFlags::kRetryIfUnreachable); + TracingService::ProducerSMBScrapingMode::kEnabled, shmem_size_hint, + shmem_page_size_hint, std::move(shm), std::move(arbiter), + ProducerIPCClient::ConnectionFlags::kRetryIfUnreachable); PERFETTO_CHECK(endpoint); return endpoint; } -std::unique_ptr SystemTracingBackend::ConnectConsumer( +// static +TracingConsumerBackend* SystemConsumerTracingBackend::GetInstance() { + static auto* instance = new SystemConsumerTracingBackend(); + return instance; +} + +SystemConsumerTracingBackend::SystemConsumerTracingBackend() {} + +std::unique_ptr SystemConsumerTracingBackend::ConnectConsumer( const ConnectConsumerArgs& args) { +#if PERFETTO_BUILDFLAG(PERFETTO_SYSTEM_CONSUMER) auto endpoint = ConsumerIPCClient::Connect(GetConsumerSocket(), args.consumer, args.task_runner); PERFETTO_CHECK(endpoint); return endpoint; +#else + base::ignore_result(args); + PERFETTO_FATAL("System backend consumer support disabled"); + return nullptr; +#endif } } // namespace internal @@ -74004,6 +80073,7 @@ std::unique_ptr SystemTracingBackend::ConnectConsumer( #if PERFETTO_BUILDFLAG(PERFETTO_OS_LINUX) || \ PERFETTO_BUILDFLAG(PERFETTO_OS_ANDROID) || \ + PERFETTO_BUILDFLAG(PERFETTO_OS_FUCHSIA) || \ PERFETTO_BUILDFLAG(PERFETTO_OS_APPLE) // gen_amalgamated expanded: #include "perfetto/ext/base/file_utils.h" @@ -74029,6 +80099,7 @@ class PlatformPosix : public Platform { std::unique_ptr CreateTaskRunner( const CreateTaskRunnerArgs&) override; std::string GetCurrentProcessName() override; + void Shutdown() override; private: pthread_key_t tls_key_{}; @@ -74056,10 +80127,23 @@ PlatformPosix::PlatformPosix() { } PlatformPosix::~PlatformPosix() { + // pthread_key_delete doesn't call destructors, so do it manually for the + // calling thread. + void* tls_ptr = pthread_getspecific(tls_key_); + delete static_cast(tls_ptr); + pthread_key_delete(tls_key_); g_instance = nullptr; } +void PlatformPosix::Shutdown() { + PERFETTO_CHECK(g_instance == this); + delete this; + PERFETTO_CHECK(!g_instance); + // We're not clearing out the instance in GetDefaultPlatform() since it's not + // possible to re-initialize Perfetto after calling this function anyway. +} + ThreadLocalObject* PlatformPosix::GetOrCreateThreadLocalObject() { // In chromium this should be implemented using base::ThreadLocalStorage. void* tls_ptr = pthread_getspecific(tls_key_); @@ -74102,7 +80186,7 @@ Platform* Platform::GetDefaultPlatform() { } } // namespace perfetto -#endif // OS_LINUX || OS_ANDROID || OS_APPLE +#endif // OS_LINUX || OS_ANDROID || OS_APPLE || OS_FUCHSIA // gen_amalgamated begin source: src/tracing/platform_windows.cc /* * Copyright (C) 2021 The Android Open Source Project @@ -74247,7 +80331,7 @@ extern "C" { // called. void NTAPI PerfettoOnThreadExit(PVOID, DWORD, PVOID); -void NTAPI PerfettoOnThreadExit(PVOID module, DWORD reason, PVOID reserved) { +void NTAPI PerfettoOnThreadExit(PVOID, DWORD reason, PVOID) { if (reason == DLL_THREAD_DETACH || reason == DLL_PROCESS_DETACH) { if (perfetto::PlatformWindows::instance) perfetto::PlatformWindows::instance->OnThreadExit(); diff --git a/projects/rocprofiler/plugin/perfetto/perfetto_sdk/sdk/perfetto.h b/projects/rocprofiler/plugin/perfetto/perfetto_sdk/sdk/perfetto.h index 2235ef4839..e9e4d30635 100644 --- a/projects/rocprofiler/plugin/perfetto/perfetto_sdk/sdk/perfetto.h +++ b/projects/rocprofiler/plugin/perfetto/perfetto_sdk/sdk/perfetto.h @@ -15,54 +15,7 @@ // This file is automatically generated by gen_amalgamated. Do not edit. // gen_amalgamated begin header: include/perfetto/tracing.h -// gen_amalgamated begin header: include/perfetto/tracing/buffer_exhausted_policy.h -/* - * Copyright (C) 2019 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef INCLUDE_PERFETTO_TRACING_BUFFER_EXHAUSTED_POLICY_H_ -#define INCLUDE_PERFETTO_TRACING_BUFFER_EXHAUSTED_POLICY_H_ - -namespace perfetto { - -// Determines how SharedMemoryArbiterImpl::GetNewChunk() behaves when no free -// chunks are available. -enum class BufferExhaustedPolicy { - // SharedMemoryArbiterImpl::GetNewChunk() will stall if no free SMB chunk is - // available and wait for the tracing service to free one. Note that this - // requires that messages the arbiter sends to the tracing service (from any - // TraceWriter thread) will be received by it, even if all TraceWriter threads - // are stalled. - kStall, - - // SharedMemoryArbiterImpl::GetNewChunk() will return an invalid chunk if no - // free SMB chunk is available. In this case, the TraceWriter will fall back - // to a garbage chunk and drop written data until acquiring a future chunk - // succeeds again. - kDrop, - - // TODO(eseckler): Switch to kDrop by default and change the Android code to - // explicitly request kStall instead. - kDefault = kStall -}; - -} // namespace perfetto - -#endif // INCLUDE_PERFETTO_TRACING_BUFFER_EXHAUSTED_POLICY_H_ -// gen_amalgamated begin header: include/perfetto/tracing/console_interceptor.h -// gen_amalgamated begin header: include/perfetto/base/compiler.h +// gen_amalgamated begin header: include/perfetto/base/time.h // gen_amalgamated begin header: include/perfetto/base/build_config.h // gen_amalgamated begin header: gen/build_config/perfetto_build_flags.h /* @@ -112,6 +65,7 @@ enum class BufferExhaustedPolicy { #define PERFETTO_BUILDFLAG_DEFINE_PERFETTO_STDERR_CRASH_DUMP() (0) #define PERFETTO_BUILDFLAG_DEFINE_PERFETTO_X64_CPU_OPT() (0) #define PERFETTO_BUILDFLAG_DEFINE_PERFETTO_LLVM_DEMANGLE() (0) +#define PERFETTO_BUILDFLAG_DEFINE_PERFETTO_SYSTEM_CONSUMER() (1) // clang-format on #endif // GEN_BUILD_CONFIG_PERFETTO_BUILD_FLAGS_H_ @@ -259,6 +213,8 @@ enum class BufferExhaustedPolicy { // gen_amalgamated expanded: #include "perfetto_build_flags.h" // no-include-violation-check #endif // INCLUDE_PERFETTO_BASE_BUILD_CONFIG_H_ +// gen_amalgamated begin header: include/perfetto/base/logging.h +// gen_amalgamated begin header: include/perfetto/base/compiler.h // gen_amalgamated begin header: include/perfetto/public/compiler.h /* * Copyright (C) 2022 The Android Open Source Project @@ -279,6 +235,8 @@ enum class BufferExhaustedPolicy { #ifndef INCLUDE_PERFETTO_PUBLIC_COMPILER_H_ #define INCLUDE_PERFETTO_PUBLIC_COMPILER_H_ +#include + #if defined(__GNUC__) || defined(__clang__) #define PERFETTO_LIKELY(_x) __builtin_expect(!!(_x), 1) #define PERFETTO_UNLIKELY(_x) __builtin_expect(!!(_x), 0) @@ -287,6 +245,30 @@ enum class BufferExhaustedPolicy { #define PERFETTO_UNLIKELY(_x) (_x) #endif +// PERFETTO_STATIC_CAST(TYPE, VAL): avoids the -Wold-style-cast warning when +// writing code that needs to be compiled as C and C++. +#ifdef __cplusplus +#define PERFETTO_STATIC_CAST(TYPE, VAL) static_cast(VAL) +#else +#define PERFETTO_STATIC_CAST(TYPE, VAL) ((TYPE)(VAL)) +#endif + +// PERFETTO_REINTERPRET_CAST(TYPE, VAL): avoids the -Wold-style-cast warning +// when writing code that needs to be compiled as C and C++. +#ifdef __cplusplus +#define PERFETTO_REINTERPRET_CAST(TYPE, VAL) reinterpret_cast(VAL) +#else +#define PERFETTO_REINTERPRET_CAST(TYPE, VAL) ((TYPE)(VAL)) +#endif + +// PERFETTO_NULL: avoids the -Wzero-as-null-pointer-constant warning when +// writing code that needs to be compiled as C and C++. +#ifdef __cplusplus +#define PERFETTO_NULL nullptr +#else +#define PERFETTO_NULL NULL +#endif + #endif // INCLUDE_PERFETTO_PUBLIC_COMPILER_H_ /* * Copyright (C) 2019 The Android Open Source Project @@ -427,6 +409,13 @@ extern "C" void __asan_unpoison_memory_region(void const volatile*, size_t); #define PERFETTO_NO_THREAD_SAFETY_ANALYSIS #endif +// Disables undefined behavior analysis for a function. +#if defined(__clang__) +#define PERFETTO_NO_SANITIZE_UNDEFINED __attribute__((no_sanitize("undefined"))) +#else +#define PERFETTO_NO_SANITIZE_UNDEFINED +#endif + // Avoid calling the exit-time destructor on an object with static lifetime. #if PERFETTO_HAS_ATTRIBUTE(no_destroy) #define PERFETTO_HAS_NO_DESTROY() 1 @@ -453,7 +442,6 @@ inline void ignore_result(const T&...) {} } // namespace perfetto #endif // INCLUDE_PERFETTO_BASE_COMPILER_H_ -// gen_amalgamated begin header: include/perfetto/base/logging.h // gen_amalgamated begin header: include/perfetto/base/export.h // gen_amalgamated begin header: include/perfetto/public/abi/export.h /* @@ -484,11 +472,24 @@ inline void ignore_result(const T&...) {} #endif // PERFETTO_SDK_EXPORT: Exports a symbol from the perfetto SDK shared library. -#if defined(PERFETTO_IMPLEMENTATION) +// +// This is controlled by two defines (that likely come from the compiler command +// line): +// * PERFETTO_SDK_DISABLE_SHLIB_EXPORT: If this is defined, no export +// annotations are added. This might be useful when static linking. +// * PERFETTO_SDK_SHLIB_IMPLEMENTATION: This must be defined when compiling the +// shared library itself (in order to export the symbols), but must be +// undefined when compiling objects that use the shared library (in order to +// import the symbols). +#if !defined(PERFETTO_SDK_DISABLE_SHLIB_EXPORT) +#if defined(PERFETTO_SHLIB_SDK_IMPLEMENTATION) #define PERFETTO_SDK_EXPORT PERFETTO_INTERNAL_DLL_EXPORT #else #define PERFETTO_SDK_EXPORT PERFETTO_INTERNAL_DLL_IMPORT #endif +#else // defined(PERFETTO_SDK_DISABLE_SHLIB_EXPORT) +#define PERFETTO_SDK_EXPORT +#endif // defined(PERFETTO_SDK_DISABLE_SHLIB_EXPORT) #endif // INCLUDE_PERFETTO_PUBLIC_ABI_EXPORT_H_ /* @@ -525,7 +526,9 @@ inline void ignore_result(const T&...) {} #else // !PERFETTO_BUILDFLAG(PERFETTO_COMPONENT_BUILD) +#if !defined(PERFETTO_EXPORT_COMPONENT) #define PERFETTO_EXPORT_COMPONENT +#endif // !defined(PERFETTO_EXPORT_COMPONENT) #endif // PERFETTO_BUILDFLAG(PERFETTO_COMPONENT_BUILD) @@ -778,6 +781,295 @@ inline void MaybeSerializeLastLogsForCrashReporting() {} } // namespace perfetto #endif // INCLUDE_PERFETTO_BASE_LOGGING_H_ +/* + * Copyright (C) 2018 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef INCLUDE_PERFETTO_BASE_TIME_H_ +#define INCLUDE_PERFETTO_BASE_TIME_H_ + +#include + +#include +#include + +// gen_amalgamated expanded: #include "perfetto/base/build_config.h" +// gen_amalgamated expanded: #include "perfetto/base/logging.h" + +#if PERFETTO_BUILDFLAG(PERFETTO_OS_APPLE) +#include +#include +#include +#include +#endif + +#if PERFETTO_BUILDFLAG(PERFETTO_OS_WASM) +#include +#endif + +namespace perfetto { +namespace base { + +using TimeSeconds = std::chrono::seconds; +using TimeMillis = std::chrono::milliseconds; +using TimeNanos = std::chrono::nanoseconds; + +inline TimeNanos FromPosixTimespec(const struct timespec& ts) { + return TimeNanos(ts.tv_sec * 1000000000LL + ts.tv_nsec); +} + +void SleepMicroseconds(unsigned interval_us); + +#if PERFETTO_BUILDFLAG(PERFETTO_OS_WIN) + +TimeNanos GetWallTimeNs(); +TimeNanos GetThreadCPUTimeNs(); +inline TimeNanos GetWallTimeRawNs() { + return GetWallTimeNs(); +} + +// TODO: Clock that counts time during suspend is not implemented on Windows. +inline TimeNanos GetBootTimeNs() { + return GetWallTimeNs(); +} + +#elif PERFETTO_BUILDFLAG(PERFETTO_OS_APPLE) + +inline TimeNanos GetWallTimeNs() { + auto init_time_factor = []() -> uint64_t { + mach_timebase_info_data_t timebase_info; + mach_timebase_info(&timebase_info); + return timebase_info.numer / timebase_info.denom; + }; + + static uint64_t monotonic_timebase_factor = init_time_factor(); + return TimeNanos(mach_absolute_time() * monotonic_timebase_factor); +} + +inline TimeNanos GetWallTimeRawNs() { + return GetWallTimeNs(); +} + +// TODO: Clock that counts time during suspend is not implemented on Mac. +inline TimeNanos GetBootTimeNs() { + return GetWallTimeNs(); +} + +inline TimeNanos GetThreadCPUTimeNs() { + mach_port_t this_thread = mach_thread_self(); + mach_msg_type_number_t count = THREAD_BASIC_INFO_COUNT; + thread_basic_info_data_t info{}; + kern_return_t kr = + thread_info(this_thread, THREAD_BASIC_INFO, + reinterpret_cast(&info), &count); + mach_port_deallocate(mach_task_self(), this_thread); + + if (kr != KERN_SUCCESS) { + PERFETTO_DFATAL("Failed to get CPU time."); + return TimeNanos(0); + } + return TimeNanos(info.user_time.seconds * 1000000000LL + + info.user_time.microseconds * 1000LL + + info.system_time.seconds * 1000000000LL + + info.system_time.microseconds * 1000LL); +} + +#elif PERFETTO_BUILDFLAG(PERFETTO_OS_WASM) + +inline TimeNanos GetWallTimeNs() { + return TimeNanos(static_cast(emscripten_get_now()) * 1000000); +} + +inline TimeNanos GetWallTimeRawNs() { + return GetWallTimeNs(); +} + +inline TimeNanos GetThreadCPUTimeNs() { + return TimeNanos(0); +} + +// TODO: Clock that counts time during suspend is not implemented on WASM. +inline TimeNanos GetBootTimeNs() { + return GetWallTimeNs(); +} + +#elif PERFETTO_BUILDFLAG(PERFETTO_OS_NACL) + +// Tracing time doesn't need to work on NaCl since its going away shortly. We +// just need to compile on it. The only function NaCl could support is +// GetWallTimeNs(), but to prevent false hope we leave it unimplemented. + +inline TimeNanos GetWallTimeNs() { + return TimeNanos(0); +} + +inline TimeNanos GetWallTimeRawNs() { + return TimeNanos(0); +} + +inline TimeNanos GetThreadCPUTimeNs() { + return TimeNanos(0); +} + +inline TimeNanos GetBootTimeNs() { + return TimeNanos(0); +} + +#else // posix + +constexpr clockid_t kWallTimeClockSource = CLOCK_MONOTONIC; + +inline TimeNanos GetTimeInternalNs(clockid_t clk_id) { + struct timespec ts = {}; + PERFETTO_CHECK(clock_gettime(clk_id, &ts) == 0); + return FromPosixTimespec(ts); +} + +// Return ns from boot. Conversely to GetWallTimeNs, this clock counts also time +// during suspend (when supported). +inline TimeNanos GetBootTimeNs() { + // Determine if CLOCK_BOOTTIME is available on the first call. + static const clockid_t kBootTimeClockSource = [] { + struct timespec ts = {}; + int res = clock_gettime(CLOCK_BOOTTIME, &ts); + return res == 0 ? CLOCK_BOOTTIME : kWallTimeClockSource; + }(); + return GetTimeInternalNs(kBootTimeClockSource); +} + +inline TimeNanos GetWallTimeNs() { + return GetTimeInternalNs(kWallTimeClockSource); +} + +inline TimeNanos GetWallTimeRawNs() { + return GetTimeInternalNs(CLOCK_MONOTONIC_RAW); +} + +inline TimeNanos GetThreadCPUTimeNs() { + return GetTimeInternalNs(CLOCK_THREAD_CPUTIME_ID); +} +#endif + +inline TimeSeconds GetBootTimeS() { + return std::chrono::duration_cast(GetBootTimeNs()); +} + +inline TimeMillis GetBootTimeMs() { + return std::chrono::duration_cast(GetBootTimeNs()); +} + +inline TimeMillis GetWallTimeMs() { + return std::chrono::duration_cast(GetWallTimeNs()); +} + +inline TimeSeconds GetWallTimeS() { + return std::chrono::duration_cast(GetWallTimeNs()); +} + +inline struct timespec ToPosixTimespec(TimeMillis time) { + struct timespec ts {}; + const long time_s = static_cast(time.count() / 1000); + ts.tv_sec = time_s; + ts.tv_nsec = (static_cast(time.count()) - time_s * 1000L) * 1000000L; + return ts; +} + +std::string GetTimeFmt(const std::string& fmt); + +inline int64_t TimeGm(struct tm* tms) { +#if PERFETTO_BUILDFLAG(PERFETTO_OS_WIN) + return static_cast(_mkgmtime(tms)); +#elif PERFETTO_BUILDFLAG(PERFETTO_OS_NACL) + // NaCL has no timegm. + if (tms) // Kinda if (true), but avoids "mark as noreturn" errors. + PERFETTO_FATAL("timegm not supported"); + return -1; +#else + return static_cast(timegm(tms)); +#endif +} + +// Creates a time_t-compatible timestamp (seconds since epoch) from a tuple of +// y-m-d-h-m-s. It's a saner version of timegm(). Some remarks: +// The year is just the actual year (it's Y-1900 in timegm()). +// The month ranges 1-12 (it's 0-11 in timegm()). +inline int64_t MkTime(int year, int month, int day, int h, int m, int s) { + PERFETTO_DCHECK(year >= 1900); + PERFETTO_DCHECK(month > 0 && month <= 12); + PERFETTO_DCHECK(day > 0 && day <= 31); + struct tm tms {}; + tms.tm_year = year - 1900; + tms.tm_mon = month - 1; + tms.tm_mday = day; + tms.tm_hour = h; + tms.tm_min = m; + tms.tm_sec = s; + return TimeGm(&tms); +} + +} // namespace base +} // namespace perfetto + +#endif // INCLUDE_PERFETTO_BASE_TIME_H_ +// gen_amalgamated begin header: include/perfetto/tracing/buffer_exhausted_policy.h +/* + * Copyright (C) 2019 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef INCLUDE_PERFETTO_TRACING_BUFFER_EXHAUSTED_POLICY_H_ +#define INCLUDE_PERFETTO_TRACING_BUFFER_EXHAUSTED_POLICY_H_ + +namespace perfetto { + +// Determines how SharedMemoryArbiterImpl::GetNewChunk() behaves when no free +// chunks are available. +enum class BufferExhaustedPolicy { + // SharedMemoryArbiterImpl::GetNewChunk() will stall if no free SMB chunk is + // available and wait for the tracing service to free one. Note that this + // requires that messages the arbiter sends to the tracing service (from any + // TraceWriter thread) will be received by it, even if all TraceWriter threads + // are stalled. + kStall, + + // SharedMemoryArbiterImpl::GetNewChunk() will return an invalid chunk if no + // free SMB chunk is available. In this case, the TraceWriter will fall back + // to a garbage chunk and drop written data until acquiring a future chunk + // succeeds again. + kDrop, + + // TODO(eseckler): Switch to kDrop by default and change the Android code to + // explicitly request kStall instead. + kDefault = kStall +}; + +} // namespace perfetto + +#endif // INCLUDE_PERFETTO_TRACING_BUFFER_EXHAUSTED_POLICY_H_ +// gen_amalgamated begin header: include/perfetto/tracing/console_interceptor.h // gen_amalgamated begin header: include/perfetto/tracing/interceptor.h // gen_amalgamated begin header: include/perfetto/protozero/field.h // gen_amalgamated begin header: include/perfetto/protozero/contiguous_memory_range.h @@ -820,6 +1112,96 @@ struct ContiguousMemoryRange { #endif // INCLUDE_PERFETTO_PROTOZERO_CONTIGUOUS_MEMORY_RANGE_H_ // gen_amalgamated begin header: include/perfetto/protozero/proto_utils.h +// gen_amalgamated begin header: include/perfetto/public/pb_utils.h +/* + * Copyright (C) 2022 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef INCLUDE_PERFETTO_PUBLIC_PB_UTILS_H_ +#define INCLUDE_PERFETTO_PUBLIC_PB_UTILS_H_ + +#include + +// gen_amalgamated expanded: #include "perfetto/public/compiler.h" + +// Type of fields that can be found in a protobuf serialized message. +enum PerfettoPbWireType { + PERFETTO_PB_WIRE_TYPE_VARINT = 0, + PERFETTO_PB_WIRE_TYPE_FIXED64 = 1, + PERFETTO_PB_WIRE_TYPE_DELIMITED = 2, + PERFETTO_PB_WIRE_TYPE_FIXED32 = 5, +}; + +// Creates a field tag, which encodes the field type and the field id. +static inline uint32_t PerfettoPbMakeTag(int32_t field_id, + enum PerfettoPbWireType wire_type) { + return ((PERFETTO_STATIC_CAST(uint32_t, field_id)) << 3) | + PERFETTO_STATIC_CAST(uint32_t, wire_type); +} + +enum { + // Maximum bytes size of a 64-bit integer encoded as a VarInt. + PERFETTO_PB_VARINT_MAX_SIZE_64 = 10, + // Maximum bytes size of a 32-bit integer encoded as a VarInt. + PERFETTO_PB_VARINT_MAX_SIZE_32 = 5, +}; + +// Encodes `value` as a VarInt into `*dst`. +// +// `dst` must point into a buffer big enough to represent `value`: +// PERFETTO_PB_VARINT_MAX_SIZE_* can help. +static inline uint8_t* PerfettoPbWriteVarInt(uint64_t value, uint8_t* dst) { + uint8_t byte; + while (value >= 0x80) { + byte = (value & 0x7f) | 0x80; + *dst++ = byte; + value >>= 7; + } + byte = value & 0x7f; + *dst++ = byte; + + return dst; +} + +// Parses a VarInt from the encoded buffer [start, end). |end| is STL-style and +// points one byte past the end of buffer. +// The parsed int value is stored in the output arg |value|. Returns a pointer +// to the next unconsumed byte (so start < retval <= end) or |start| if the +// VarInt could not be fully parsed because there was not enough space in the +// buffer. +static inline const uint8_t* PerfettoPbParseVarInt(const uint8_t* start, + const uint8_t* end, + uint64_t* out_value) { + const uint8_t* pos = start; + uint64_t value = 0; + for (uint32_t shift = 0; pos < end && shift < 64u; shift += 7) { + // Cache *pos into |cur_byte| to prevent that the compiler dereferences the + // pointer twice (here and in the if() below) due to char* aliasing rules. + uint8_t cur_byte = *pos++; + value |= PERFETTO_STATIC_CAST(uint64_t, cur_byte & 0x7f) << shift; + if ((cur_byte & 0x80) == 0) { + // In valid cases we get here. + *out_value = value; + return pos; + } + } + *out_value = 0; + return start; +} + +#endif // INCLUDE_PERFETTO_PUBLIC_PB_UTILS_H_ /* * Copyright (C) 2017 The Android Open Source Project * @@ -845,6 +1227,16 @@ struct ContiguousMemoryRange { #include // gen_amalgamated expanded: #include "perfetto/base/logging.h" +// gen_amalgamated expanded: #include "perfetto/public/pb_utils.h" + +// Helper macro for the constexpr functions containing +// the switch statement: if C++14 is supported, this macro +// resolves to `constexpr` and just `inline` otherwise. +#if __cpp_constexpr >= 201304 +#define PERFETTO_PROTOZERO_CONSTEXPR14_OR_INLINE constexpr +#else +#define PERFETTO_PROTOZERO_CONSTEXPR14_OR_INLINE inline +#endif namespace protozero { namespace proto_utils { @@ -991,7 +1383,9 @@ inline typename std::make_signed::type ZigZagDecode(T value) { } template -inline uint8_t* WriteVarInt(T value, uint8_t* target) { +auto ExtendValueForVarIntSerialization(T value) -> typename std::make_unsigned< + typename std::conditional::value, T, int64_t>::type>:: + type { // If value is <= 0 we must first sign extend to int64_t (see [1]). // Finally we always cast to an unsigned value to to avoid arithmetic // (sign expanding) shifts in the while loop. @@ -1011,6 +1405,13 @@ inline uint8_t* WriteVarInt(T value, uint8_t* target) { MaybeExtendedType extended_value = static_cast(value); UnsignedType unsigned_value = static_cast(extended_value); + return unsigned_value; +} + +template +inline uint8_t* WriteVarInt(T value, uint8_t* target) { + auto unsigned_value = ExtendValueForVarIntSerialization(value); + while (unsigned_value >= 0x80) { *target++ = static_cast(unsigned_value) | 0x80; unsigned_value >>= 7; @@ -1057,21 +1458,7 @@ void StaticAssertSingleBytePreamble() { inline const uint8_t* ParseVarInt(const uint8_t* start, const uint8_t* end, uint64_t* out_value) { - const uint8_t* pos = start; - uint64_t value = 0; - for (uint32_t shift = 0; pos < end && shift < 64u; shift += 7) { - // Cache *pos into |cur_byte| to prevent that the compiler dereferences the - // pointer twice (here and in the if() below) due to char* aliasing rules. - uint8_t cur_byte = *pos++; - value |= static_cast(cur_byte & 0x7f) << shift; - if ((cur_byte & 0x80) == 0) { - // In valid cases we get here. - *out_value = value; - return pos; - } - } - *out_value = 0; - return start; + return PerfettoPbParseVarInt(start, end, out_value); } enum class RepetitionType { @@ -1106,21 +1493,6 @@ struct FieldMetadata : public FieldMetadataBase { using message_type = MessageType; }; -namespace internal { - -// Ideally we would create variables of FieldMetadata<...> type directly, -// but before C++17's support for constexpr inline variables arrive, we have to -// actually use pointers to inline functions instead to avoid having to define -// symbols in *.pbzero.cc files. -// -// Note: protozero bindings will generate Message::kFieldName variable and which -// can then be passed to TRACE_EVENT macro for inline writing of typed messages. -// The fact that the former can be passed to the latter is a part of the stable -// API, while the particular type is not and users should not rely on it. -template -using FieldMetadataHelper = T (*)(void); - -} // namespace internal } // namespace proto_utils } // namespace protozero @@ -1447,7 +1819,7 @@ namespace internal { // with the definition in tracing/core/basic_types.h using BufferId = uint16_t; -// This is a direct index in the TracingMuxer::backends_ vector. +// This is an id of a backend in the TracingMuxer::producer_backends_ list. // Backends are only added and never removed. using TracingBackendId = size_t; @@ -1516,8 +1888,23 @@ class PERFETTO_EXPORT_COMPONENT ScatteredStreamWriter { public: class PERFETTO_EXPORT_COMPONENT Delegate { public: + static constexpr size_t kPatchSize = 4; virtual ~Delegate(); + + // Returns a new chunk for writing. virtual ContiguousMemoryRange GetNewBuffer() = 0; + + // Signals the delegate that the location pointed by `to_patch` (which must + // be in the last chunk returned by GetNewBuffer()), kPatchSize long, needs + // to be updated later (after potentially multiple GetNewBuffer calls). + // + // The caller must write to the returned location later. If the returned + // pointer is nullptr, the caller should not write anything. + // + // The implementation considers the patch ready to apply when the caller + // writes the first byte a value that's different than 0 (the + // implementation periodically checks for this). + virtual uint8_t* AnnotatePatch(uint8_t* patch_addr); }; explicit ScatteredStreamWriter(Delegate* delegate); @@ -1541,7 +1928,12 @@ class PERFETTO_EXPORT_COMPONENT ScatteredStreamWriter { write_ptr_ = end; } - inline void WriteBytes(const uint8_t* src, size_t size) { + inline void WriteBytes(const uint8_t* src, + size_t size) PERFETTO_NO_SANITIZE_UNDEFINED { + // If the stream writer hasn't been initialized, constructing the end + // pointer below invokes undefined behavior because `write_ptr_` is null. + // Since this function is on the hot path, we suppress the warning instead + // of adding a conditional branch. uint8_t* const end = write_ptr_ + size; if (PERFETTO_LIKELY(end <= cur_range_.end)) return WriteBytesUnsafe(src, size); @@ -1569,25 +1961,39 @@ class PERFETTO_EXPORT_COMPONENT ScatteredStreamWriter { // Subsequent WriteByte(s) will write into |range|. void Reset(ContiguousMemoryRange range); + // Commits the current chunk and gets a new chunk from the delegate. + void Extend(); + // Number of contiguous free bytes in |cur_range_| that can be written without // requesting a new buffer. size_t bytes_available() const { return static_cast(cur_range_.end - write_ptr_); } + ContiguousMemoryRange cur_range() const { return cur_range_; } + uint8_t* write_ptr() const { return write_ptr_; } + void set_write_ptr(uint8_t* write_ptr) { + assert(cur_range_.begin <= write_ptr && write_ptr <= cur_range_.end); + write_ptr_ = write_ptr; + } + uint64_t written() const { return written_previously_ + static_cast(write_ptr_ - cur_range_.begin); } + uint64_t written_previously() const { return written_previously_; } + + uint8_t* AnnotatePatch(uint8_t* patch_addr) { + return delegate_->AnnotatePatch(patch_addr); + } + private: ScatteredStreamWriter(const ScatteredStreamWriter&) = delete; ScatteredStreamWriter& operator=(const ScatteredStreamWriter&) = delete; - void Extend(); - Delegate* const delegate_; ContiguousMemoryRange cur_range_; uint8_t* write_ptr_; @@ -1870,6 +2276,7 @@ class PERFETTO_EXPORT_COMPONENT Message { // gen_amalgamated expanded: #include "perfetto/base/export.h" // gen_amalgamated expanded: #include "perfetto/protozero/message.h" +// gen_amalgamated expanded: #include "perfetto/protozero/scattered_stream_writer.h" namespace protozero { @@ -1888,11 +2295,30 @@ class Message; class PERFETTO_EXPORT_COMPONENT MessageHandleBase { public: - ~MessageHandleBase(); + ~MessageHandleBase() { + if (message_) { +#if PERFETTO_DCHECK_IS_ON() + PERFETTO_DCHECK(generation_ == message_->generation_); +#endif + FinalizeMessage(); + } + } // Move-only type. - MessageHandleBase(MessageHandleBase&&) noexcept; - MessageHandleBase& operator=(MessageHandleBase&&); + MessageHandleBase(MessageHandleBase&& other) noexcept { + Move(std::move(other)); + } + + MessageHandleBase& operator=(MessageHandleBase&& other) noexcept { + // If the current handle was pointing to a message and is being reset to a + // new one, finalize the old message. However, if the other message is the + // same as the one we point to, don't finalize. + if (message_ && message_ != other.message_) + FinalizeMessage(); + Move(std::move(other)); + return *this; + } + explicit operator bool() const { #if PERFETTO_DCHECK_IS_ON() PERFETTO_DCHECK(!message_ || generation_ == message_->generation_); @@ -1900,8 +2326,29 @@ class PERFETTO_EXPORT_COMPONENT MessageHandleBase { return !!message_; } + // Returns a (non-owned, it should not be deleted) pointer to the + // ScatteredStreamWriter used to write the message data. The Message becomes + // unusable after this point. + // + // The caller can now write directly, without using protozero::Message. + ScatteredStreamWriter* TakeStreamWriter() { + ScatteredStreamWriter* stream_writer = message_->stream_writer_; +#if PERFETTO_DCHECK_IS_ON() + message_->set_handle(nullptr); +#endif + message_ = nullptr; + return stream_writer; + } + protected: - explicit MessageHandleBase(Message* = nullptr); + explicit MessageHandleBase(Message* message = nullptr) : message_(message) { +#if PERFETTO_DCHECK_IS_ON() + generation_ = message_ ? message->generation_ : 0; + if (message_) + message_->set_handle(this); +#endif + } + Message* operator->() const { #if PERFETTO_DCHECK_IS_ON() PERFETTO_DCHECK(!message_ || generation_ == message_->generation_); @@ -1921,7 +2368,16 @@ class PERFETTO_EXPORT_COMPONENT MessageHandleBase { message_ = nullptr; } - void Move(MessageHandleBase&&); + void Move(MessageHandleBase&& other) { + message_ = other.message_; + other.message_ = nullptr; +#if PERFETTO_DCHECK_IS_ON() + if (message_) { + generation_ = message_->generation_; + message_->set_handle(this); + } +#endif + } void FinalizeMessage() { message_->Finalize(); } @@ -2001,6 +2457,13 @@ class TraceWriterBase { // the TraceWriter instance is destroyed, (ii) a subsequence NewTracePacket() // call is made on the same TraceWriter instance. // + // The caller can use protozero::MessageHandle::TakeStreamWriter() to write. + // + // The caller must call ->Finalize() on the returned trace packet (the handle + // destructor will take care of that) or explicitly call FinishTracePacket (if + // using TakeStreamWriter) before calling any method on the same TraceWriter + // instance. + // // The returned packet handle is always valid, but note that, when using // BufferExhaustedPolicy::kDrop and the SMB is exhausted, it may be assigned // a garbage chunk and any trace data written into it will be lost. For more @@ -2008,6 +2471,14 @@ class TraceWriterBase { virtual protozero::MessageHandle NewTracePacket() = 0; + // Tells the TraceWriterBase that the previous packet started with + // NewTracePacket() is finished. + // + // Calling this is optional: the TraceWriterBase can realize that the previous + // packet is finished when the next NewTracePacket() is called. It is still + // useful, because the next NewTracePacket may not happen for a while. + virtual void FinishTracePacket() = 0; + // Commits the data pending for the current chunk. This can be called // only if the handle returned by NewTracePacket() has been destroyed (i.e. we // cannot Flush() while writing a TracePacket). @@ -2089,7 +2560,7 @@ struct DataSourceState { // Keep this flag as the first field. This allows the compiler to directly // dereference the DataSourceState* pointer in the trace fast-path without // doing extra pointr arithmetic. - bool trace_lambda_enabled = false; + std::atomic trace_lambda_enabled{false}; // The overall TracingMuxerImpl instance id, which gets incremented by // ResetForTesting. @@ -2115,11 +2586,25 @@ struct DataSourceState { // Only the tuple (backend_id, data_source_instance_id) is globally unique. uint64_t data_source_instance_id = 0; + // Set to a non-0 target buffer reservation ID iff startup tracing is + // currently enabled for this data source. + std::atomic startup_target_buffer_reservation{0}; + + // If the data source was originally started for startup tracing, this is set + // to the startup session's ID. + uint64_t startup_session_id = 0; + // A hash of the trace config used by this instance. This is used to // de-duplicate instances for data sources with identical names (e.g., track // event). uint64_t config_hash = 0; + // Similar to config_hash, but excludes target buffers and service-set fields + // for matching of startup-tracing data source instances to sessions later + // started by the service. + // Learn more: ComputeStartupConfigHash + uint64_t startup_config_hash = 0; + // If this data source is being intercepted (see Interceptor), this field // contains the non-zero id of a registered interceptor which should receive // trace packets for this session. Note: interceptor id 1 refers to the first @@ -2178,35 +2663,33 @@ struct DataSourceStaticState { static_assert(sizeof(valid_instances.load()) * 8 >= kMaxDataSourceInstances, "kMaxDataSourceInstances too high"); } + + void ResetForTesting() { + id = 0; + index = kMaxDataSources; + valid_instances.store(0, std::memory_order_release); + instances = {}; + incremental_state_generation.store(0, std::memory_order_release); + } }; // Per-DataSource-instance thread-local state. struct DataSourceInstanceThreadLocalState { - - void Reset() { - trace_writer.reset(); - incremental_state.reset(); - data_source_custom_tls.reset(); - muxer_id_for_testing = 0; - backend_id = 0; - backend_connection_id = 0; - buffer_id = 0; - data_source_instance_id = 0; - incremental_state_generation = 0; - is_intercepted = false; - } + void Reset() { *this = DataSourceInstanceThreadLocalState{}; } std::unique_ptr trace_writer; using ObjectWithDeleter = std::unique_ptr; ObjectWithDeleter incremental_state = {nullptr, [](void*) {}}; ObjectWithDeleter data_source_custom_tls = {nullptr, [](void*) {}}; - uint32_t incremental_state_generation; - uint32_t muxer_id_for_testing; - TracingBackendId backend_id; - uint32_t backend_connection_id; - BufferId buffer_id; - uint64_t data_source_instance_id; - bool is_intercepted; + uint32_t incremental_state_generation = 0; + uint32_t muxer_id_for_testing = 0; + TracingBackendId backend_id = 0; + uint32_t backend_connection_id = 0; + BufferId buffer_id = 0; + uint64_t data_source_instance_id = 0; + bool is_intercepted = false; + uint64_t last_empty_packet_position = 0; + uint16_t startup_target_buffer_reservation = 0; }; // Per-DataSource-type thread-local state. @@ -2256,7 +2739,8 @@ namespace perfetto { template class LockedHandle { public: - LockedHandle(std::recursive_mutex* mtx, T* obj) : lock_(*mtx), obj_(obj) {} + LockedHandle(std::unique_lock lock, T* obj) + : lock_(std::move(lock)), obj_(obj) {} LockedHandle() = default; // For the invalid case. LockedHandle(LockedHandle&&) = default; LockedHandle& operator=(LockedHandle&&) = default; @@ -2547,8 +3031,9 @@ class PERFETTO_EXPORT_COMPONENT Interceptor : public InterceptorBase { auto* internal_state = static_state_->TryGet(data_source_instance_index_); if (!internal_state) return LockedHandle(); + std::unique_lock lock(internal_state->lock); return LockedHandle( - &internal_state->lock, + std::move(lock), static_cast(internal_state->interceptor.get())); } @@ -3203,7 +3688,7 @@ class PackedRepeatedFieldIterator { // points at the start of the next element to be decoded. // |read_ptr_| might be null if the backing proto field isn't set. const uint8_t* read_ptr_; - CppType curr_value_ = 0; + CppType curr_value_ = {}; // Set to false once we've exhausted the iterator, or encountered an error. bool curr_value_valid_ = true; @@ -3430,6 +3915,7 @@ namespace perfetto { namespace protos { namespace pbzero { +class ChromeActiveProcesses; class ChromeApplicationStateInfo; class ChromeCompositorSchedulerState; class ChromeContentSettingsEventInfo; @@ -3448,40 +3934,121 @@ class LogMessage; class SourceLocation; class TaskExecution; class TrackEvent_LegacyEvent; -enum TrackEvent_LegacyEvent_FlowDirection : int32_t; -enum TrackEvent_LegacyEvent_InstantEventScope : int32_t; -enum TrackEvent_Type : int32_t; +namespace perfetto_pbzero_enum_TrackEvent_LegacyEvent { +enum FlowDirection : int32_t; +} // namespace perfetto_pbzero_enum_TrackEvent_LegacyEvent +using TrackEvent_LegacyEvent_FlowDirection = perfetto_pbzero_enum_TrackEvent_LegacyEvent::FlowDirection; +namespace perfetto_pbzero_enum_TrackEvent_LegacyEvent { +enum InstantEventScope : int32_t; +} // namespace perfetto_pbzero_enum_TrackEvent_LegacyEvent +using TrackEvent_LegacyEvent_InstantEventScope = perfetto_pbzero_enum_TrackEvent_LegacyEvent::InstantEventScope; +namespace perfetto_pbzero_enum_TrackEvent { +enum Type : int32_t; +} // namespace perfetto_pbzero_enum_TrackEvent +using TrackEvent_Type = perfetto_pbzero_enum_TrackEvent::Type; -enum TrackEvent_Type : int32_t { - TrackEvent_Type_TYPE_UNSPECIFIED = 0, - TrackEvent_Type_TYPE_SLICE_BEGIN = 1, - TrackEvent_Type_TYPE_SLICE_END = 2, - TrackEvent_Type_TYPE_INSTANT = 3, - TrackEvent_Type_TYPE_COUNTER = 4, +namespace perfetto_pbzero_enum_TrackEvent { +enum Type : int32_t { + TYPE_UNSPECIFIED = 0, + TYPE_SLICE_BEGIN = 1, + TYPE_SLICE_END = 2, + TYPE_INSTANT = 3, + TYPE_COUNTER = 4, }; +} // namespace perfetto_pbzero_enum_TrackEvent +using TrackEvent_Type = perfetto_pbzero_enum_TrackEvent::Type; -const TrackEvent_Type TrackEvent_Type_MIN = TrackEvent_Type_TYPE_UNSPECIFIED; -const TrackEvent_Type TrackEvent_Type_MAX = TrackEvent_Type_TYPE_COUNTER; -enum TrackEvent_LegacyEvent_FlowDirection : int32_t { - TrackEvent_LegacyEvent_FlowDirection_FLOW_UNSPECIFIED = 0, - TrackEvent_LegacyEvent_FlowDirection_FLOW_IN = 1, - TrackEvent_LegacyEvent_FlowDirection_FLOW_OUT = 2, - TrackEvent_LegacyEvent_FlowDirection_FLOW_INOUT = 3, +constexpr TrackEvent_Type TrackEvent_Type_MIN = TrackEvent_Type::TYPE_UNSPECIFIED; +constexpr TrackEvent_Type TrackEvent_Type_MAX = TrackEvent_Type::TYPE_COUNTER; + + +PERFETTO_PROTOZERO_CONSTEXPR14_OR_INLINE +const char* TrackEvent_Type_Name(::perfetto::protos::pbzero::TrackEvent_Type value) { + switch (value) { + case ::perfetto::protos::pbzero::TrackEvent_Type::TYPE_UNSPECIFIED: + return "TYPE_UNSPECIFIED"; + + case ::perfetto::protos::pbzero::TrackEvent_Type::TYPE_SLICE_BEGIN: + return "TYPE_SLICE_BEGIN"; + + case ::perfetto::protos::pbzero::TrackEvent_Type::TYPE_SLICE_END: + return "TYPE_SLICE_END"; + + case ::perfetto::protos::pbzero::TrackEvent_Type::TYPE_INSTANT: + return "TYPE_INSTANT"; + + case ::perfetto::protos::pbzero::TrackEvent_Type::TYPE_COUNTER: + return "TYPE_COUNTER"; + } + return "PBZERO_UNKNOWN_ENUM_VALUE"; +} + +namespace perfetto_pbzero_enum_TrackEvent_LegacyEvent { +enum FlowDirection : int32_t { + FLOW_UNSPECIFIED = 0, + FLOW_IN = 1, + FLOW_OUT = 2, + FLOW_INOUT = 3, }; +} // namespace perfetto_pbzero_enum_TrackEvent_LegacyEvent +using TrackEvent_LegacyEvent_FlowDirection = perfetto_pbzero_enum_TrackEvent_LegacyEvent::FlowDirection; -const TrackEvent_LegacyEvent_FlowDirection TrackEvent_LegacyEvent_FlowDirection_MIN = TrackEvent_LegacyEvent_FlowDirection_FLOW_UNSPECIFIED; -const TrackEvent_LegacyEvent_FlowDirection TrackEvent_LegacyEvent_FlowDirection_MAX = TrackEvent_LegacyEvent_FlowDirection_FLOW_INOUT; -enum TrackEvent_LegacyEvent_InstantEventScope : int32_t { - TrackEvent_LegacyEvent_InstantEventScope_SCOPE_UNSPECIFIED = 0, - TrackEvent_LegacyEvent_InstantEventScope_SCOPE_GLOBAL = 1, - TrackEvent_LegacyEvent_InstantEventScope_SCOPE_PROCESS = 2, - TrackEvent_LegacyEvent_InstantEventScope_SCOPE_THREAD = 3, +constexpr TrackEvent_LegacyEvent_FlowDirection TrackEvent_LegacyEvent_FlowDirection_MIN = TrackEvent_LegacyEvent_FlowDirection::FLOW_UNSPECIFIED; +constexpr TrackEvent_LegacyEvent_FlowDirection TrackEvent_LegacyEvent_FlowDirection_MAX = TrackEvent_LegacyEvent_FlowDirection::FLOW_INOUT; + + +PERFETTO_PROTOZERO_CONSTEXPR14_OR_INLINE +const char* TrackEvent_LegacyEvent_FlowDirection_Name(::perfetto::protos::pbzero::TrackEvent_LegacyEvent_FlowDirection value) { + switch (value) { + case ::perfetto::protos::pbzero::TrackEvent_LegacyEvent_FlowDirection::FLOW_UNSPECIFIED: + return "FLOW_UNSPECIFIED"; + + case ::perfetto::protos::pbzero::TrackEvent_LegacyEvent_FlowDirection::FLOW_IN: + return "FLOW_IN"; + + case ::perfetto::protos::pbzero::TrackEvent_LegacyEvent_FlowDirection::FLOW_OUT: + return "FLOW_OUT"; + + case ::perfetto::protos::pbzero::TrackEvent_LegacyEvent_FlowDirection::FLOW_INOUT: + return "FLOW_INOUT"; + } + return "PBZERO_UNKNOWN_ENUM_VALUE"; +} + +namespace perfetto_pbzero_enum_TrackEvent_LegacyEvent { +enum InstantEventScope : int32_t { + SCOPE_UNSPECIFIED = 0, + SCOPE_GLOBAL = 1, + SCOPE_PROCESS = 2, + SCOPE_THREAD = 3, }; +} // namespace perfetto_pbzero_enum_TrackEvent_LegacyEvent +using TrackEvent_LegacyEvent_InstantEventScope = perfetto_pbzero_enum_TrackEvent_LegacyEvent::InstantEventScope; -const TrackEvent_LegacyEvent_InstantEventScope TrackEvent_LegacyEvent_InstantEventScope_MIN = TrackEvent_LegacyEvent_InstantEventScope_SCOPE_UNSPECIFIED; -const TrackEvent_LegacyEvent_InstantEventScope TrackEvent_LegacyEvent_InstantEventScope_MAX = TrackEvent_LegacyEvent_InstantEventScope_SCOPE_THREAD; + +constexpr TrackEvent_LegacyEvent_InstantEventScope TrackEvent_LegacyEvent_InstantEventScope_MIN = TrackEvent_LegacyEvent_InstantEventScope::SCOPE_UNSPECIFIED; +constexpr TrackEvent_LegacyEvent_InstantEventScope TrackEvent_LegacyEvent_InstantEventScope_MAX = TrackEvent_LegacyEvent_InstantEventScope::SCOPE_THREAD; + + +PERFETTO_PROTOZERO_CONSTEXPR14_OR_INLINE +const char* TrackEvent_LegacyEvent_InstantEventScope_Name(::perfetto::protos::pbzero::TrackEvent_LegacyEvent_InstantEventScope value) { + switch (value) { + case ::perfetto::protos::pbzero::TrackEvent_LegacyEvent_InstantEventScope::SCOPE_UNSPECIFIED: + return "SCOPE_UNSPECIFIED"; + + case ::perfetto::protos::pbzero::TrackEvent_LegacyEvent_InstantEventScope::SCOPE_GLOBAL: + return "SCOPE_GLOBAL"; + + case ::perfetto::protos::pbzero::TrackEvent_LegacyEvent_InstantEventScope::SCOPE_PROCESS: + return "SCOPE_PROCESS"; + + case ::perfetto::protos::pbzero::TrackEvent_LegacyEvent_InstantEventScope::SCOPE_THREAD: + return "SCOPE_THREAD"; + } + return "PBZERO_UNKNOWN_ENUM_VALUE"; +} class EventName_Decoder : public ::protozero::TypedProtoDecoder { public: @@ -3512,14 +4079,7 @@ class EventName : public ::protozero::Message { uint64_t, EventName>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Iid kIid() { return {}; } + static constexpr FieldMetadata_Iid kIid{}; void set_iid(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Iid::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -3537,17 +4097,13 @@ class EventName : public ::protozero::Message { std::string, EventName>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Name kName() { return {}; } + static constexpr FieldMetadata_Name kName{}; void set_name(const char* data, size_t size) { AppendBytes(FieldMetadata_Name::kFieldId, data, size); } + void set_name(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Name::kFieldId, chars.data, chars.size); + } void set_name(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Name::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -3587,14 +4143,7 @@ class EventCategory : public ::protozero::Message { uint64_t, EventCategory>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Iid kIid() { return {}; } + static constexpr FieldMetadata_Iid kIid{}; void set_iid(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Iid::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -3612,17 +4161,13 @@ class EventCategory : public ::protozero::Message { std::string, EventCategory>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Name kName() { return {}; } + static constexpr FieldMetadata_Name kName{}; void set_name(const char* data, size_t size) { AppendBytes(FieldMetadata_Name::kFieldId, data, size); } + void set_name(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Name::kFieldId, chars.data, chars.size); + } void set_name(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Name::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -3665,14 +4210,7 @@ class TrackEventDefaults : public ::protozero::Message { uint64_t, TrackEventDefaults>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_TrackUuid kTrackUuid() { return {}; } + static constexpr FieldMetadata_TrackUuid kTrackUuid{}; void set_track_uuid(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_TrackUuid::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -3690,14 +4228,7 @@ class TrackEventDefaults : public ::protozero::Message { uint64_t, TrackEventDefaults>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ExtraCounterTrackUuids kExtraCounterTrackUuids() { return {}; } + static constexpr FieldMetadata_ExtraCounterTrackUuids kExtraCounterTrackUuids{}; void add_extra_counter_track_uuids(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_ExtraCounterTrackUuids::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -3715,14 +4246,7 @@ class TrackEventDefaults : public ::protozero::Message { uint64_t, TrackEventDefaults>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ExtraDoubleCounterTrackUuids kExtraDoubleCounterTrackUuids() { return {}; } + static constexpr FieldMetadata_ExtraDoubleCounterTrackUuids kExtraDoubleCounterTrackUuids{}; void add_extra_double_counter_track_uuids(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_ExtraDoubleCounterTrackUuids::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -3733,7 +4257,7 @@ class TrackEventDefaults : public ::protozero::Message { } }; -class TrackEvent_Decoder : public ::protozero::TypedProtoDecoder { +class TrackEvent_Decoder : public ::protozero::TypedProtoDecoder { public: TrackEvent_Decoder(const uint8_t* data, size_t len) : TypedProtoDecoder(data, len) {} explicit TrackEvent_Decoder(const std::string& raw) : TypedProtoDecoder(reinterpret_cast(raw.data()), raw.size()) {} @@ -3762,10 +4286,14 @@ class TrackEvent_Decoder : public ::protozero::TypedProtoDecoder extra_double_counter_track_uuids() const { return GetRepeated(45); } bool has_extra_double_counter_values() const { return at<46>().valid(); } ::protozero::RepeatedFieldIterator extra_double_counter_values() const { return GetRepeated(46); } - bool has_flow_ids() const { return at<36>().valid(); } - ::protozero::RepeatedFieldIterator flow_ids() const { return GetRepeated(36); } - bool has_terminating_flow_ids() const { return at<42>().valid(); } - ::protozero::RepeatedFieldIterator terminating_flow_ids() const { return GetRepeated(42); } + bool has_flow_ids_old() const { return at<36>().valid(); } + ::protozero::RepeatedFieldIterator flow_ids_old() const { return GetRepeated(36); } + bool has_flow_ids() const { return at<47>().valid(); } + ::protozero::RepeatedFieldIterator flow_ids() const { return GetRepeated(47); } + bool has_terminating_flow_ids_old() const { return at<42>().valid(); } + ::protozero::RepeatedFieldIterator terminating_flow_ids_old() const { return GetRepeated(42); } + bool has_terminating_flow_ids() const { return at<48>().valid(); } + ::protozero::RepeatedFieldIterator terminating_flow_ids() const { return GetRepeated(48); } bool has_debug_annotations() const { return at<4>().valid(); } ::protozero::RepeatedFieldIterator<::protozero::ConstBytes> debug_annotations() const { return GetRepeated<::protozero::ConstBytes>(4); } bool has_task_execution() const { return at<5>().valid(); } @@ -3794,6 +4322,8 @@ class TrackEvent_Decoder : public ::protozero::TypedProtoDecoder().as_bytes(); } bool has_chrome_content_settings_event_info() const { return at<43>().valid(); } ::protozero::ConstBytes chrome_content_settings_event_info() const { return at<43>().as_bytes(); } + bool has_chrome_active_processes() const { return at<49>().valid(); } + ::protozero::ConstBytes chrome_active_processes() const { return at<49>().as_bytes(); } bool has_source_location() const { return at<33>().valid(); } ::protozero::ConstBytes source_location() const { return at<33>().as_bytes(); } bool has_source_location_iid() const { return at<34>().valid(); } @@ -3834,8 +4364,10 @@ class TrackEvent : public ::protozero::Message { kExtraCounterValuesFieldNumber = 12, kExtraDoubleCounterTrackUuidsFieldNumber = 45, kExtraDoubleCounterValuesFieldNumber = 46, - kFlowIdsFieldNumber = 36, - kTerminatingFlowIdsFieldNumber = 42, + kFlowIdsOldFieldNumber = 36, + kFlowIdsFieldNumber = 47, + kTerminatingFlowIdsOldFieldNumber = 42, + kTerminatingFlowIdsFieldNumber = 48, kDebugAnnotationsFieldNumber = 4, kTaskExecutionFieldNumber = 5, kLogMessageFieldNumber = 21, @@ -3850,6 +4382,7 @@ class TrackEvent : public ::protozero::Message { kChromeRendererSchedulerStateFieldNumber = 40, kChromeWindowHandleEventInfoFieldNumber = 41, kChromeContentSettingsEventInfoFieldNumber = 43, + kChromeActiveProcessesFieldNumber = 49, kSourceLocationFieldNumber = 33, kSourceLocationIidFieldNumber = 34, kChromeMessagePumpFieldNumber = 35, @@ -3865,12 +4398,16 @@ class TrackEvent : public ::protozero::Message { static constexpr const char* GetName() { return ".perfetto.protos.TrackEvent"; } using LegacyEvent = ::perfetto::protos::pbzero::TrackEvent_LegacyEvent; + using Type = ::perfetto::protos::pbzero::TrackEvent_Type; - static const Type TYPE_UNSPECIFIED = TrackEvent_Type_TYPE_UNSPECIFIED; - static const Type TYPE_SLICE_BEGIN = TrackEvent_Type_TYPE_SLICE_BEGIN; - static const Type TYPE_SLICE_END = TrackEvent_Type_TYPE_SLICE_END; - static const Type TYPE_INSTANT = TrackEvent_Type_TYPE_INSTANT; - static const Type TYPE_COUNTER = TrackEvent_Type_TYPE_COUNTER; + static inline const char* Type_Name(Type value) { + return ::perfetto::protos::pbzero::TrackEvent_Type_Name(value); + } + static const Type TYPE_UNSPECIFIED = Type::TYPE_UNSPECIFIED; + static const Type TYPE_SLICE_BEGIN = Type::TYPE_SLICE_BEGIN; + static const Type TYPE_SLICE_END = Type::TYPE_SLICE_END; + static const Type TYPE_INSTANT = Type::TYPE_INSTANT; + static const Type TYPE_COUNTER = Type::TYPE_COUNTER; using FieldMetadata_CategoryIids = ::protozero::proto_utils::FieldMetadata< @@ -3880,14 +4417,7 @@ class TrackEvent : public ::protozero::Message { uint64_t, TrackEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_CategoryIids kCategoryIids() { return {}; } + static constexpr FieldMetadata_CategoryIids kCategoryIids{}; void add_category_iids(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_CategoryIids::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -3905,17 +4435,13 @@ class TrackEvent : public ::protozero::Message { std::string, TrackEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Categories kCategories() { return {}; } + static constexpr FieldMetadata_Categories kCategories{}; void add_categories(const char* data, size_t size) { AppendBytes(FieldMetadata_Categories::kFieldId, data, size); } + void add_categories(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Categories::kFieldId, chars.data, chars.size); + } void add_categories(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Categories::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -3933,14 +4459,7 @@ class TrackEvent : public ::protozero::Message { uint64_t, TrackEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_NameIid kNameIid() { return {}; } + static constexpr FieldMetadata_NameIid kNameIid{}; void set_name_iid(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_NameIid::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -3958,17 +4477,13 @@ class TrackEvent : public ::protozero::Message { std::string, TrackEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Name kName() { return {}; } + static constexpr FieldMetadata_Name kName{}; void set_name(const char* data, size_t size) { AppendBytes(FieldMetadata_Name::kFieldId, data, size); } + void set_name(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Name::kFieldId, chars.data, chars.size); + } void set_name(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Name::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -3986,14 +4501,7 @@ class TrackEvent : public ::protozero::Message { ::perfetto::protos::pbzero::TrackEvent_Type, TrackEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Type kType() { return {}; } + static constexpr FieldMetadata_Type kType{}; void set_type(::perfetto::protos::pbzero::TrackEvent_Type value) { static constexpr uint32_t field_id = FieldMetadata_Type::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -4011,14 +4519,7 @@ class TrackEvent : public ::protozero::Message { uint64_t, TrackEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_TrackUuid kTrackUuid() { return {}; } + static constexpr FieldMetadata_TrackUuid kTrackUuid{}; void set_track_uuid(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_TrackUuid::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -4036,14 +4537,7 @@ class TrackEvent : public ::protozero::Message { int64_t, TrackEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_CounterValue kCounterValue() { return {}; } + static constexpr FieldMetadata_CounterValue kCounterValue{}; void set_counter_value(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_CounterValue::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -4061,14 +4555,7 @@ class TrackEvent : public ::protozero::Message { double, TrackEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_DoubleCounterValue kDoubleCounterValue() { return {}; } + static constexpr FieldMetadata_DoubleCounterValue kDoubleCounterValue{}; void set_double_counter_value(double value) { static constexpr uint32_t field_id = FieldMetadata_DoubleCounterValue::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -4086,14 +4573,7 @@ class TrackEvent : public ::protozero::Message { uint64_t, TrackEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ExtraCounterTrackUuids kExtraCounterTrackUuids() { return {}; } + static constexpr FieldMetadata_ExtraCounterTrackUuids kExtraCounterTrackUuids{}; void add_extra_counter_track_uuids(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_ExtraCounterTrackUuids::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -4111,14 +4591,7 @@ class TrackEvent : public ::protozero::Message { int64_t, TrackEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ExtraCounterValues kExtraCounterValues() { return {}; } + static constexpr FieldMetadata_ExtraCounterValues kExtraCounterValues{}; void add_extra_counter_values(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_ExtraCounterValues::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -4136,14 +4609,7 @@ class TrackEvent : public ::protozero::Message { uint64_t, TrackEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ExtraDoubleCounterTrackUuids kExtraDoubleCounterTrackUuids() { return {}; } + static constexpr FieldMetadata_ExtraDoubleCounterTrackUuids kExtraDoubleCounterTrackUuids{}; void add_extra_double_counter_track_uuids(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_ExtraDoubleCounterTrackUuids::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -4161,14 +4627,7 @@ class TrackEvent : public ::protozero::Message { double, TrackEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ExtraDoubleCounterValues kExtraDoubleCounterValues() { return {}; } + static constexpr FieldMetadata_ExtraDoubleCounterValues kExtraDoubleCounterValues{}; void add_extra_double_counter_values(double value) { static constexpr uint32_t field_id = FieldMetadata_ExtraDoubleCounterValues::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -4178,7 +4637,7 @@ class TrackEvent : public ::protozero::Message { ::Append(*this, field_id, value); } - using FieldMetadata_FlowIds = + using FieldMetadata_FlowIdsOld = ::protozero::proto_utils::FieldMetadata< 36, ::protozero::proto_utils::RepetitionType::kRepeatedNotPacked, @@ -4186,18 +4645,47 @@ class TrackEvent : public ::protozero::Message { uint64_t, TrackEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_FlowIds kFlowIds() { return {}; } + static constexpr FieldMetadata_FlowIdsOld kFlowIdsOld{}; + void add_flow_ids_old(uint64_t value) { + static constexpr uint32_t field_id = FieldMetadata_FlowIdsOld::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint64> + ::Append(*this, field_id, value); + } + + using FieldMetadata_FlowIds = + ::protozero::proto_utils::FieldMetadata< + 47, + ::protozero::proto_utils::RepetitionType::kRepeatedNotPacked, + ::protozero::proto_utils::ProtoSchemaType::kFixed64, + uint64_t, + TrackEvent>; + + static constexpr FieldMetadata_FlowIds kFlowIds{}; void add_flow_ids(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_FlowIds::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kFixed64> + ::Append(*this, field_id, value); + } + + using FieldMetadata_TerminatingFlowIdsOld = + ::protozero::proto_utils::FieldMetadata< + 42, + ::protozero::proto_utils::RepetitionType::kRepeatedNotPacked, + ::protozero::proto_utils::ProtoSchemaType::kUint64, + uint64_t, + TrackEvent>; + + static constexpr FieldMetadata_TerminatingFlowIdsOld kTerminatingFlowIdsOld{}; + void add_terminating_flow_ids_old(uint64_t value) { + static constexpr uint32_t field_id = FieldMetadata_TerminatingFlowIdsOld::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. ::protozero::internal::FieldWriter< ::protozero::proto_utils::ProtoSchemaType::kUint64> ::Append(*this, field_id, value); @@ -4205,26 +4693,19 @@ class TrackEvent : public ::protozero::Message { using FieldMetadata_TerminatingFlowIds = ::protozero::proto_utils::FieldMetadata< - 42, + 48, ::protozero::proto_utils::RepetitionType::kRepeatedNotPacked, - ::protozero::proto_utils::ProtoSchemaType::kUint64, + ::protozero::proto_utils::ProtoSchemaType::kFixed64, uint64_t, TrackEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_TerminatingFlowIds kTerminatingFlowIds() { return {}; } + static constexpr FieldMetadata_TerminatingFlowIds kTerminatingFlowIds{}; void add_terminating_flow_ids(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_TerminatingFlowIds::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) // method based on the type of the field. ::protozero::internal::FieldWriter< - ::protozero::proto_utils::ProtoSchemaType::kUint64> + ::protozero::proto_utils::ProtoSchemaType::kFixed64> ::Append(*this, field_id, value); } @@ -4236,14 +4717,7 @@ class TrackEvent : public ::protozero::Message { DebugAnnotation, TrackEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_DebugAnnotations kDebugAnnotations() { return {}; } + static constexpr FieldMetadata_DebugAnnotations kDebugAnnotations{}; template T* add_debug_annotations() { return BeginNestedMessage(4); } @@ -4257,14 +4731,7 @@ class TrackEvent : public ::protozero::Message { TaskExecution, TrackEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_TaskExecution kTaskExecution() { return {}; } + static constexpr FieldMetadata_TaskExecution kTaskExecution{}; template T* set_task_execution() { return BeginNestedMessage(5); } @@ -4278,14 +4745,7 @@ class TrackEvent : public ::protozero::Message { LogMessage, TrackEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_LogMessage kLogMessage() { return {}; } + static constexpr FieldMetadata_LogMessage kLogMessage{}; template T* set_log_message() { return BeginNestedMessage(21); } @@ -4299,14 +4759,7 @@ class TrackEvent : public ::protozero::Message { ChromeCompositorSchedulerState, TrackEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_CcSchedulerState kCcSchedulerState() { return {}; } + static constexpr FieldMetadata_CcSchedulerState kCcSchedulerState{}; template T* set_cc_scheduler_state() { return BeginNestedMessage(24); } @@ -4320,14 +4773,7 @@ class TrackEvent : public ::protozero::Message { ChromeUserEvent, TrackEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ChromeUserEvent kChromeUserEvent() { return {}; } + static constexpr FieldMetadata_ChromeUserEvent kChromeUserEvent{}; template T* set_chrome_user_event() { return BeginNestedMessage(25); } @@ -4341,14 +4787,7 @@ class TrackEvent : public ::protozero::Message { ChromeKeyedService, TrackEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ChromeKeyedService kChromeKeyedService() { return {}; } + static constexpr FieldMetadata_ChromeKeyedService kChromeKeyedService{}; template T* set_chrome_keyed_service() { return BeginNestedMessage(26); } @@ -4362,14 +4801,7 @@ class TrackEvent : public ::protozero::Message { ChromeLegacyIpc, TrackEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ChromeLegacyIpc kChromeLegacyIpc() { return {}; } + static constexpr FieldMetadata_ChromeLegacyIpc kChromeLegacyIpc{}; template T* set_chrome_legacy_ipc() { return BeginNestedMessage(27); } @@ -4383,14 +4815,7 @@ class TrackEvent : public ::protozero::Message { ChromeHistogramSample, TrackEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ChromeHistogramSample kChromeHistogramSample() { return {}; } + static constexpr FieldMetadata_ChromeHistogramSample kChromeHistogramSample{}; template T* set_chrome_histogram_sample() { return BeginNestedMessage(28); } @@ -4404,14 +4829,7 @@ class TrackEvent : public ::protozero::Message { ChromeLatencyInfo, TrackEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ChromeLatencyInfo kChromeLatencyInfo() { return {}; } + static constexpr FieldMetadata_ChromeLatencyInfo kChromeLatencyInfo{}; template T* set_chrome_latency_info() { return BeginNestedMessage(29); } @@ -4425,14 +4843,7 @@ class TrackEvent : public ::protozero::Message { ChromeFrameReporter, TrackEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ChromeFrameReporter kChromeFrameReporter() { return {}; } + static constexpr FieldMetadata_ChromeFrameReporter kChromeFrameReporter{}; template T* set_chrome_frame_reporter() { return BeginNestedMessage(32); } @@ -4446,14 +4857,7 @@ class TrackEvent : public ::protozero::Message { ChromeApplicationStateInfo, TrackEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ChromeApplicationStateInfo kChromeApplicationStateInfo() { return {}; } + static constexpr FieldMetadata_ChromeApplicationStateInfo kChromeApplicationStateInfo{}; template T* set_chrome_application_state_info() { return BeginNestedMessage(39); } @@ -4467,14 +4871,7 @@ class TrackEvent : public ::protozero::Message { ChromeRendererSchedulerState, TrackEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ChromeRendererSchedulerState kChromeRendererSchedulerState() { return {}; } + static constexpr FieldMetadata_ChromeRendererSchedulerState kChromeRendererSchedulerState{}; template T* set_chrome_renderer_scheduler_state() { return BeginNestedMessage(40); } @@ -4488,14 +4885,7 @@ class TrackEvent : public ::protozero::Message { ChromeWindowHandleEventInfo, TrackEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ChromeWindowHandleEventInfo kChromeWindowHandleEventInfo() { return {}; } + static constexpr FieldMetadata_ChromeWindowHandleEventInfo kChromeWindowHandleEventInfo{}; template T* set_chrome_window_handle_event_info() { return BeginNestedMessage(41); } @@ -4509,19 +4899,26 @@ class TrackEvent : public ::protozero::Message { ChromeContentSettingsEventInfo, TrackEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ChromeContentSettingsEventInfo kChromeContentSettingsEventInfo() { return {}; } + static constexpr FieldMetadata_ChromeContentSettingsEventInfo kChromeContentSettingsEventInfo{}; template T* set_chrome_content_settings_event_info() { return BeginNestedMessage(43); } + using FieldMetadata_ChromeActiveProcesses = + ::protozero::proto_utils::FieldMetadata< + 49, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kMessage, + ChromeActiveProcesses, + TrackEvent>; + + static constexpr FieldMetadata_ChromeActiveProcesses kChromeActiveProcesses{}; + template T* set_chrome_active_processes() { + return BeginNestedMessage(49); + } + + using FieldMetadata_SourceLocation = ::protozero::proto_utils::FieldMetadata< 33, @@ -4530,14 +4927,7 @@ class TrackEvent : public ::protozero::Message { SourceLocation, TrackEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_SourceLocation kSourceLocation() { return {}; } + static constexpr FieldMetadata_SourceLocation kSourceLocation{}; template T* set_source_location() { return BeginNestedMessage(33); } @@ -4551,14 +4941,7 @@ class TrackEvent : public ::protozero::Message { uint64_t, TrackEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_SourceLocationIid kSourceLocationIid() { return {}; } + static constexpr FieldMetadata_SourceLocationIid kSourceLocationIid{}; void set_source_location_iid(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_SourceLocationIid::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -4576,14 +4959,7 @@ class TrackEvent : public ::protozero::Message { ChromeMessagePump, TrackEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ChromeMessagePump kChromeMessagePump() { return {}; } + static constexpr FieldMetadata_ChromeMessagePump kChromeMessagePump{}; template T* set_chrome_message_pump() { return BeginNestedMessage(35); } @@ -4597,14 +4973,7 @@ class TrackEvent : public ::protozero::Message { ChromeMojoEventInfo, TrackEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ChromeMojoEventInfo kChromeMojoEventInfo() { return {}; } + static constexpr FieldMetadata_ChromeMojoEventInfo kChromeMojoEventInfo{}; template T* set_chrome_mojo_event_info() { return BeginNestedMessage(38); } @@ -4618,14 +4987,7 @@ class TrackEvent : public ::protozero::Message { int64_t, TrackEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_TimestampDeltaUs kTimestampDeltaUs() { return {}; } + static constexpr FieldMetadata_TimestampDeltaUs kTimestampDeltaUs{}; void set_timestamp_delta_us(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_TimestampDeltaUs::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -4643,14 +5005,7 @@ class TrackEvent : public ::protozero::Message { int64_t, TrackEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_TimestampAbsoluteUs kTimestampAbsoluteUs() { return {}; } + static constexpr FieldMetadata_TimestampAbsoluteUs kTimestampAbsoluteUs{}; void set_timestamp_absolute_us(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_TimestampAbsoluteUs::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -4668,14 +5023,7 @@ class TrackEvent : public ::protozero::Message { int64_t, TrackEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ThreadTimeDeltaUs kThreadTimeDeltaUs() { return {}; } + static constexpr FieldMetadata_ThreadTimeDeltaUs kThreadTimeDeltaUs{}; void set_thread_time_delta_us(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_ThreadTimeDeltaUs::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -4693,14 +5041,7 @@ class TrackEvent : public ::protozero::Message { int64_t, TrackEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ThreadTimeAbsoluteUs kThreadTimeAbsoluteUs() { return {}; } + static constexpr FieldMetadata_ThreadTimeAbsoluteUs kThreadTimeAbsoluteUs{}; void set_thread_time_absolute_us(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_ThreadTimeAbsoluteUs::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -4718,14 +5059,7 @@ class TrackEvent : public ::protozero::Message { int64_t, TrackEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ThreadInstructionCountDelta kThreadInstructionCountDelta() { return {}; } + static constexpr FieldMetadata_ThreadInstructionCountDelta kThreadInstructionCountDelta{}; void set_thread_instruction_count_delta(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_ThreadInstructionCountDelta::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -4743,14 +5077,7 @@ class TrackEvent : public ::protozero::Message { int64_t, TrackEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ThreadInstructionCountAbsolute kThreadInstructionCountAbsolute() { return {}; } + static constexpr FieldMetadata_ThreadInstructionCountAbsolute kThreadInstructionCountAbsolute{}; void set_thread_instruction_count_absolute(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_ThreadInstructionCountAbsolute::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -4768,14 +5095,7 @@ class TrackEvent : public ::protozero::Message { TrackEvent_LegacyEvent, TrackEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_LegacyEvent kLegacyEvent() { return {}; } + static constexpr FieldMetadata_LegacyEvent kLegacyEvent{}; template T* set_legacy_event() { return BeginNestedMessage(6); } @@ -4844,16 +5164,24 @@ class TrackEvent_LegacyEvent : public ::protozero::Message { }; static constexpr const char* GetName() { return ".perfetto.protos.TrackEvent.LegacyEvent"; } + using FlowDirection = ::perfetto::protos::pbzero::TrackEvent_LegacyEvent_FlowDirection; + static inline const char* FlowDirection_Name(FlowDirection value) { + return ::perfetto::protos::pbzero::TrackEvent_LegacyEvent_FlowDirection_Name(value); + } + using InstantEventScope = ::perfetto::protos::pbzero::TrackEvent_LegacyEvent_InstantEventScope; - static const FlowDirection FLOW_UNSPECIFIED = TrackEvent_LegacyEvent_FlowDirection_FLOW_UNSPECIFIED; - static const FlowDirection FLOW_IN = TrackEvent_LegacyEvent_FlowDirection_FLOW_IN; - static const FlowDirection FLOW_OUT = TrackEvent_LegacyEvent_FlowDirection_FLOW_OUT; - static const FlowDirection FLOW_INOUT = TrackEvent_LegacyEvent_FlowDirection_FLOW_INOUT; - static const InstantEventScope SCOPE_UNSPECIFIED = TrackEvent_LegacyEvent_InstantEventScope_SCOPE_UNSPECIFIED; - static const InstantEventScope SCOPE_GLOBAL = TrackEvent_LegacyEvent_InstantEventScope_SCOPE_GLOBAL; - static const InstantEventScope SCOPE_PROCESS = TrackEvent_LegacyEvent_InstantEventScope_SCOPE_PROCESS; - static const InstantEventScope SCOPE_THREAD = TrackEvent_LegacyEvent_InstantEventScope_SCOPE_THREAD; + static inline const char* InstantEventScope_Name(InstantEventScope value) { + return ::perfetto::protos::pbzero::TrackEvent_LegacyEvent_InstantEventScope_Name(value); + } + static const FlowDirection FLOW_UNSPECIFIED = FlowDirection::FLOW_UNSPECIFIED; + static const FlowDirection FLOW_IN = FlowDirection::FLOW_IN; + static const FlowDirection FLOW_OUT = FlowDirection::FLOW_OUT; + static const FlowDirection FLOW_INOUT = FlowDirection::FLOW_INOUT; + static const InstantEventScope SCOPE_UNSPECIFIED = InstantEventScope::SCOPE_UNSPECIFIED; + static const InstantEventScope SCOPE_GLOBAL = InstantEventScope::SCOPE_GLOBAL; + static const InstantEventScope SCOPE_PROCESS = InstantEventScope::SCOPE_PROCESS; + static const InstantEventScope SCOPE_THREAD = InstantEventScope::SCOPE_THREAD; using FieldMetadata_NameIid = ::protozero::proto_utils::FieldMetadata< @@ -4863,14 +5191,7 @@ class TrackEvent_LegacyEvent : public ::protozero::Message { uint64_t, TrackEvent_LegacyEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_NameIid kNameIid() { return {}; } + static constexpr FieldMetadata_NameIid kNameIid{}; void set_name_iid(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_NameIid::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -4888,14 +5209,7 @@ class TrackEvent_LegacyEvent : public ::protozero::Message { int32_t, TrackEvent_LegacyEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Phase kPhase() { return {}; } + static constexpr FieldMetadata_Phase kPhase{}; void set_phase(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Phase::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -4913,14 +5227,7 @@ class TrackEvent_LegacyEvent : public ::protozero::Message { int64_t, TrackEvent_LegacyEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_DurationUs kDurationUs() { return {}; } + static constexpr FieldMetadata_DurationUs kDurationUs{}; void set_duration_us(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_DurationUs::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -4938,14 +5245,7 @@ class TrackEvent_LegacyEvent : public ::protozero::Message { int64_t, TrackEvent_LegacyEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ThreadDurationUs kThreadDurationUs() { return {}; } + static constexpr FieldMetadata_ThreadDurationUs kThreadDurationUs{}; void set_thread_duration_us(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_ThreadDurationUs::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -4963,14 +5263,7 @@ class TrackEvent_LegacyEvent : public ::protozero::Message { int64_t, TrackEvent_LegacyEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ThreadInstructionDelta kThreadInstructionDelta() { return {}; } + static constexpr FieldMetadata_ThreadInstructionDelta kThreadInstructionDelta{}; void set_thread_instruction_delta(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_ThreadInstructionDelta::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -4988,14 +5281,7 @@ class TrackEvent_LegacyEvent : public ::protozero::Message { uint64_t, TrackEvent_LegacyEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_UnscopedId kUnscopedId() { return {}; } + static constexpr FieldMetadata_UnscopedId kUnscopedId{}; void set_unscoped_id(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_UnscopedId::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -5013,14 +5299,7 @@ class TrackEvent_LegacyEvent : public ::protozero::Message { uint64_t, TrackEvent_LegacyEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_LocalId kLocalId() { return {}; } + static constexpr FieldMetadata_LocalId kLocalId{}; void set_local_id(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_LocalId::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -5038,14 +5317,7 @@ class TrackEvent_LegacyEvent : public ::protozero::Message { uint64_t, TrackEvent_LegacyEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_GlobalId kGlobalId() { return {}; } + static constexpr FieldMetadata_GlobalId kGlobalId{}; void set_global_id(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_GlobalId::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -5063,17 +5335,13 @@ class TrackEvent_LegacyEvent : public ::protozero::Message { std::string, TrackEvent_LegacyEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_IdScope kIdScope() { return {}; } + static constexpr FieldMetadata_IdScope kIdScope{}; void set_id_scope(const char* data, size_t size) { AppendBytes(FieldMetadata_IdScope::kFieldId, data, size); } + void set_id_scope(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_IdScope::kFieldId, chars.data, chars.size); + } void set_id_scope(std::string value) { static constexpr uint32_t field_id = FieldMetadata_IdScope::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -5091,14 +5359,7 @@ class TrackEvent_LegacyEvent : public ::protozero::Message { bool, TrackEvent_LegacyEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_UseAsyncTts kUseAsyncTts() { return {}; } + static constexpr FieldMetadata_UseAsyncTts kUseAsyncTts{}; void set_use_async_tts(bool value) { static constexpr uint32_t field_id = FieldMetadata_UseAsyncTts::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -5116,14 +5377,7 @@ class TrackEvent_LegacyEvent : public ::protozero::Message { uint64_t, TrackEvent_LegacyEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_BindId kBindId() { return {}; } + static constexpr FieldMetadata_BindId kBindId{}; void set_bind_id(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_BindId::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -5141,14 +5395,7 @@ class TrackEvent_LegacyEvent : public ::protozero::Message { bool, TrackEvent_LegacyEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_BindToEnclosing kBindToEnclosing() { return {}; } + static constexpr FieldMetadata_BindToEnclosing kBindToEnclosing{}; void set_bind_to_enclosing(bool value) { static constexpr uint32_t field_id = FieldMetadata_BindToEnclosing::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -5166,14 +5413,7 @@ class TrackEvent_LegacyEvent : public ::protozero::Message { ::perfetto::protos::pbzero::TrackEvent_LegacyEvent_FlowDirection, TrackEvent_LegacyEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_FlowDirection kFlowDirection() { return {}; } + static constexpr FieldMetadata_FlowDirection kFlowDirection{}; void set_flow_direction(::perfetto::protos::pbzero::TrackEvent_LegacyEvent_FlowDirection value) { static constexpr uint32_t field_id = FieldMetadata_FlowDirection::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -5191,14 +5431,7 @@ class TrackEvent_LegacyEvent : public ::protozero::Message { ::perfetto::protos::pbzero::TrackEvent_LegacyEvent_InstantEventScope, TrackEvent_LegacyEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_InstantEventScope kInstantEventScope() { return {}; } + static constexpr FieldMetadata_InstantEventScope kInstantEventScope{}; void set_instant_event_scope(::perfetto::protos::pbzero::TrackEvent_LegacyEvent_InstantEventScope value) { static constexpr uint32_t field_id = FieldMetadata_InstantEventScope::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -5216,14 +5449,7 @@ class TrackEvent_LegacyEvent : public ::protozero::Message { int32_t, TrackEvent_LegacyEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_PidOverride kPidOverride() { return {}; } + static constexpr FieldMetadata_PidOverride kPidOverride{}; void set_pid_override(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_PidOverride::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -5241,14 +5467,7 @@ class TrackEvent_LegacyEvent : public ::protozero::Message { int32_t, TrackEvent_LegacyEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_TidOverride kTidOverride() { return {}; } + static constexpr FieldMetadata_TidOverride kTidOverride{}; void set_tid_override(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_TidOverride::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -5700,6 +5919,7 @@ class TestConfig; class TestConfig_DummyFields; class InterceptorConfig; class ChromeConfig; +class SystemInfoConfig; enum DataSourceConfig_SessionInitiator : int; enum ChromeConfig_ClientPriority : int; } // namespace perfetto @@ -5729,6 +5949,7 @@ class PERFETTO_EXPORT_COMPONENT DataSourceConfig : public ::protozero::CppMessag kNameFieldNumber = 1, kTargetBufferFieldNumber = 2, kTraceDurationMsFieldNumber = 3, + kPreferSuspendClockForDurationFieldNumber = 122, kStopTimeoutMsFieldNumber = 7, kEnableExtraGuardrailsFieldNumber = 6, kSessionInitiatorFieldNumber = 8, @@ -5748,8 +5969,12 @@ class PERFETTO_EXPORT_COMPONENT DataSourceConfig : public ::protozero::CppMessag kVulkanMemoryConfigFieldNumber = 112, kTrackEventConfigFieldNumber = 113, kAndroidPolledStateConfigFieldNumber = 114, + kAndroidSystemPropertyConfigFieldNumber = 118, + kStatsdTracingConfigFieldNumber = 117, + kSystemInfoConfigFieldNumber = 119, kChromeConfigFieldNumber = 101, kInterceptorConfigFieldNumber = 115, + kNetworkPacketTraceConfigFieldNumber = 120, kLegacyConfigFieldNumber = 1000, kForTestingFieldNumber = 1001, }; @@ -5780,6 +6005,10 @@ class PERFETTO_EXPORT_COMPONENT DataSourceConfig : public ::protozero::CppMessag uint32_t trace_duration_ms() const { return trace_duration_ms_; } void set_trace_duration_ms(uint32_t value) { trace_duration_ms_ = value; _has_field_.set(3); } + bool has_prefer_suspend_clock_for_duration() const { return _has_field_[122]; } + bool prefer_suspend_clock_for_duration() const { return prefer_suspend_clock_for_duration_; } + void set_prefer_suspend_clock_for_duration(bool value) { prefer_suspend_clock_for_duration_ = value; _has_field_.set(122); } + bool has_stop_timeout_ms() const { return _has_field_[7]; } uint32_t stop_timeout_ms() const { return stop_timeout_ms_; } void set_stop_timeout_ms(uint32_t value) { stop_timeout_ms_ = value; _has_field_.set(7); } @@ -5841,6 +6070,16 @@ class PERFETTO_EXPORT_COMPONENT DataSourceConfig : public ::protozero::CppMessag const std::string& android_polled_state_config_raw() const { return android_polled_state_config_; } void set_android_polled_state_config_raw(const std::string& raw) { android_polled_state_config_ = raw; _has_field_.set(114); } + const std::string& android_system_property_config_raw() const { return android_system_property_config_; } + void set_android_system_property_config_raw(const std::string& raw) { android_system_property_config_ = raw; _has_field_.set(118); } + + const std::string& statsd_tracing_config_raw() const { return statsd_tracing_config_; } + void set_statsd_tracing_config_raw(const std::string& raw) { statsd_tracing_config_ = raw; _has_field_.set(117); } + + bool has_system_info_config() const { return _has_field_[119]; } + const SystemInfoConfig& system_info_config() const { return *system_info_config_; } + SystemInfoConfig* mutable_system_info_config() { _has_field_.set(119); return system_info_config_.get(); } + bool has_chrome_config() const { return _has_field_[101]; } const ChromeConfig& chrome_config() const { return *chrome_config_; } ChromeConfig* mutable_chrome_config() { _has_field_.set(101); return chrome_config_.get(); } @@ -5849,6 +6088,9 @@ class PERFETTO_EXPORT_COMPONENT DataSourceConfig : public ::protozero::CppMessag const InterceptorConfig& interceptor_config() const { return *interceptor_config_; } InterceptorConfig* mutable_interceptor_config() { _has_field_.set(115); return interceptor_config_.get(); } + const std::string& network_packet_trace_config_raw() const { return network_packet_trace_config_; } + void set_network_packet_trace_config_raw(const std::string& raw) { network_packet_trace_config_ = raw; _has_field_.set(120); } + bool has_legacy_config() const { return _has_field_[1000]; } const std::string& legacy_config() const { return legacy_config_; } void set_legacy_config(const std::string& value) { legacy_config_ = value; _has_field_.set(1000); } @@ -5861,6 +6103,7 @@ class PERFETTO_EXPORT_COMPONENT DataSourceConfig : public ::protozero::CppMessag std::string name_{}; uint32_t target_buffer_{}; uint32_t trace_duration_ms_{}; + bool prefer_suspend_clock_for_duration_{}; uint32_t stop_timeout_ms_{}; bool enable_extra_guardrails_{}; DataSourceConfig_SessionInitiator session_initiator_{}; @@ -5880,8 +6123,12 @@ class PERFETTO_EXPORT_COMPONENT DataSourceConfig : public ::protozero::CppMessag std::string vulkan_memory_config_; // [lazy=true] std::string track_event_config_; // [lazy=true] std::string android_polled_state_config_; // [lazy=true] + std::string android_system_property_config_; // [lazy=true] + std::string statsd_tracing_config_; // [lazy=true] + ::protozero::CopyablePtr system_info_config_; ::protozero::CopyablePtr chrome_config_; ::protozero::CopyablePtr interceptor_config_; + std::string network_packet_trace_config_; // [lazy=true] std::string legacy_config_{}; ::protozero::CopyablePtr for_testing_; @@ -6100,6 +6347,7 @@ class TestConfig; class TestConfig_DummyFields; class InterceptorConfig; class ChromeConfig; +class SystemInfoConfig; class TraceConfig_BufferConfig; enum TraceConfig_LockdownModeOperation : int; enum TraceConfig_CompressionType : int; @@ -6181,6 +6429,7 @@ class PERFETTO_EXPORT_COMPONENT TraceConfig : public ::protozero::CppMessageObj kDataSourcesFieldNumber = 2, kBuiltinDataSourcesFieldNumber = 20, kDurationMsFieldNumber = 3, + kPreferSuspendClockForDurationFieldNumber = 36, kEnableExtraGuardrailsFieldNumber = 4, kLockdownModeFieldNumber = 5, kProducersFieldNumber = 6, @@ -6245,6 +6494,10 @@ class PERFETTO_EXPORT_COMPONENT TraceConfig : public ::protozero::CppMessageObj uint32_t duration_ms() const { return duration_ms_; } void set_duration_ms(uint32_t value) { duration_ms_ = value; _has_field_.set(3); } + bool has_prefer_suspend_clock_for_duration() const { return _has_field_[36]; } + bool prefer_suspend_clock_for_duration() const { return prefer_suspend_clock_for_duration_; } + void set_prefer_suspend_clock_for_duration(bool value) { prefer_suspend_clock_for_duration_ = value; _has_field_.set(36); } + bool has_enable_extra_guardrails() const { return _has_field_[4]; } bool enable_extra_guardrails() const { return enable_extra_guardrails_; } void set_enable_extra_guardrails(bool value) { enable_extra_guardrails_ = value; _has_field_.set(4); } @@ -6367,6 +6620,7 @@ class PERFETTO_EXPORT_COMPONENT TraceConfig : public ::protozero::CppMessageObj std::vector data_sources_; ::protozero::CopyablePtr builtin_data_sources_; uint32_t duration_ms_{}; + bool prefer_suspend_clock_for_duration_{}; bool enable_extra_guardrails_{}; TraceConfig_LockdownModeOperation lockdown_mode_{}; std::vector producers_; @@ -6400,7 +6654,7 @@ class PERFETTO_EXPORT_COMPONENT TraceConfig : public ::protozero::CppMessageObj // with future versions of .proto files. std::string unknown_fields_; - std::bitset<36> _has_field_{}; + std::bitset<37> _has_field_{}; }; @@ -6747,6 +7001,7 @@ class PERFETTO_EXPORT_COMPONENT TraceConfig_GuardrailOverrides : public ::protoz public: enum FieldNumbers { kMaxUploadPerDayBytesFieldNumber = 1, + kMaxTracingBufferSizeKbFieldNumber = 2, }; TraceConfig_GuardrailOverrides(); @@ -6767,14 +7022,19 @@ class PERFETTO_EXPORT_COMPONENT TraceConfig_GuardrailOverrides : public ::protoz uint64_t max_upload_per_day_bytes() const { return max_upload_per_day_bytes_; } void set_max_upload_per_day_bytes(uint64_t value) { max_upload_per_day_bytes_ = value; _has_field_.set(1); } + bool has_max_tracing_buffer_size_kb() const { return _has_field_[2]; } + uint32_t max_tracing_buffer_size_kb() const { return max_tracing_buffer_size_kb_; } + void set_max_tracing_buffer_size_kb(uint32_t value) { max_tracing_buffer_size_kb_ = value; _has_field_.set(2); } + private: uint64_t max_upload_per_day_bytes_{}; + uint32_t max_tracing_buffer_size_kb_{}; // Allows to preserve unknown protobuf fields for compatibility // with future versions of .proto files. std::string unknown_fields_; - std::bitset<2> _has_field_{}; + std::bitset<3> _has_field_{}; }; @@ -6888,6 +7148,7 @@ class PERFETTO_EXPORT_COMPONENT TraceConfig_BuiltinDataSource : public ::protoze kPrimaryTraceClockFieldNumber = 5, kSnapshotIntervalMsFieldNumber = 6, kPreferSuspendClockForSnapshotFieldNumber = 7, + kDisableChunkUsageHistogramsFieldNumber = 8, }; TraceConfig_BuiltinDataSource(); @@ -6932,6 +7193,10 @@ class PERFETTO_EXPORT_COMPONENT TraceConfig_BuiltinDataSource : public ::protoze bool prefer_suspend_clock_for_snapshot() const { return prefer_suspend_clock_for_snapshot_; } void set_prefer_suspend_clock_for_snapshot(bool value) { prefer_suspend_clock_for_snapshot_ = value; _has_field_.set(7); } + bool has_disable_chunk_usage_histograms() const { return _has_field_[8]; } + bool disable_chunk_usage_histograms() const { return disable_chunk_usage_histograms_; } + void set_disable_chunk_usage_histograms(bool value) { disable_chunk_usage_histograms_ = value; _has_field_.set(8); } + private: bool disable_clock_snapshotting_{}; bool disable_trace_config_{}; @@ -6940,12 +7205,13 @@ class PERFETTO_EXPORT_COMPONENT TraceConfig_BuiltinDataSource : public ::protoze BuiltinClock primary_trace_clock_{}; uint32_t snapshot_interval_ms_{}; bool prefer_suspend_clock_for_snapshot_{}; + bool disable_chunk_usage_histograms_{}; // Allows to preserve unknown protobuf fields for compatibility // with future versions of .proto files. std::string unknown_fields_; - std::bitset<8> _has_field_{}; + std::bitset<9> _has_field_{}; }; @@ -7082,6 +7348,7 @@ class PERFETTO_EXPORT_COMPONENT TraceConfig_BufferConfig : public ::protozero::C #endif // INCLUDE_PERFETTO_TRACING_CORE_TRACE_CONFIG_H_ // gen_amalgamated begin header: include/perfetto/tracing/data_source.h +// gen_amalgamated begin header: include/perfetto/tracing/internal/data_source_type.h // gen_amalgamated begin header: include/perfetto/tracing/internal/tracing_muxer.h // gen_amalgamated begin header: include/perfetto/tracing/internal/tracing_tls.h // gen_amalgamated begin header: include/perfetto/tracing/platform.h @@ -7145,6 +7412,92 @@ inline PlatformProcessId GetProcessId() { } // namespace perfetto #endif // INCLUDE_PERFETTO_BASE_PROC_UTILS_H_ +// gen_amalgamated begin header: include/perfetto/base/thread_utils.h +/* + * Copyright (C) 2018 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef INCLUDE_PERFETTO_BASE_THREAD_UTILS_H_ +#define INCLUDE_PERFETTO_BASE_THREAD_UTILS_H_ + +#include + +// gen_amalgamated expanded: #include "perfetto/base/build_config.h" +// gen_amalgamated expanded: #include "perfetto/base/export.h" + +#if PERFETTO_BUILDFLAG(PERFETTO_OS_WIN) +extern "C" { +// Prototype extracted from the Windows SDK to avoid including windows.h. +__declspec(dllimport) unsigned long __stdcall GetCurrentThreadId(); +} +#elif PERFETTO_BUILDFLAG(PERFETTO_OS_FUCHSIA) +#include +#elif PERFETTO_BUILDFLAG(PERFETTO_OS_LINUX) || \ + PERFETTO_BUILDFLAG(PERFETTO_OS_ANDROID) +#include +#include +#include +#else +#include +#endif + +namespace perfetto { +namespace base { + +#if PERFETTO_BUILDFLAG(PERFETTO_OS_ANDROID) +using PlatformThreadId = pid_t; +inline PlatformThreadId GetThreadId() { + return gettid(); +} +#elif PERFETTO_BUILDFLAG(PERFETTO_OS_LINUX) +using PlatformThreadId = pid_t; +inline PlatformThreadId GetThreadId() { + return static_cast(syscall(__NR_gettid)); +} +#elif PERFETTO_BUILDFLAG(PERFETTO_OS_FUCHSIA) +using PlatformThreadId = zx_koid_t; +// Not inlined because the result is cached internally. +PERFETTO_EXPORT_COMPONENT PlatformThreadId GetThreadId(); +#elif PERFETTO_BUILDFLAG(PERFETTO_OS_APPLE) +using PlatformThreadId = uint64_t; +inline PlatformThreadId GetThreadId() { + uint64_t tid; + pthread_threadid_np(nullptr, &tid); + return tid; +} +#elif PERFETTO_BUILDFLAG(PERFETTO_OS_WIN) +using PlatformThreadId = uint64_t; +inline PlatformThreadId GetThreadId() { + return static_cast(GetCurrentThreadId()); +} +#elif PERFETTO_BUILDFLAG(PERFETTO_OS_NACL) +using PlatformThreadId = pid_t; +inline PlatformThreadId GetThreadId() { + return reinterpret_cast(pthread_self()); +} +#else // Default to pthreads in case no OS is set. +using PlatformThreadId = pthread_t; +inline PlatformThreadId GetThreadId() { + return pthread_self(); +} +#endif + +} // namespace base +} // namespace perfetto + +#endif // INCLUDE_PERFETTO_BASE_THREAD_UTILS_H_ // gen_amalgamated begin header: include/perfetto/tracing/tracing.h // gen_amalgamated begin header: include/perfetto/tracing/backend_type.h /* @@ -7238,9 +7591,10 @@ class ConsumerEndpoint; class Producer; class ProducerEndpoint; -class PERFETTO_EXPORT_COMPONENT TracingBackend { +// Responsible for connecting to the producer. +class PERFETTO_EXPORT_COMPONENT TracingProducerBackend { public: - virtual ~TracingBackend(); + virtual ~TracingProducerBackend(); // Connects a Producer instance and obtains a ProducerEndpoint, which is // essentially a 1:1 channel between one Producer and the Service. @@ -7263,10 +7617,21 @@ class PERFETTO_EXPORT_COMPONENT TracingBackend { // the client when calling Tracing::Initialize(). uint32_t shmem_size_hint_bytes = 0; uint32_t shmem_page_size_hint_bytes = 0; + + // If true, the backend should allocate a shared memory buffer and provide + // it to the service when connecting. + // It's used in startup tracing. + bool use_producer_provided_smb = false; }; virtual std::unique_ptr ConnectProducer( const ConnectProducerArgs&) = 0; +}; + +// Responsible for connecting to the consumer. +class PERFETTO_EXPORT_COMPONENT TracingConsumerBackend { + public: + virtual ~TracingConsumerBackend(); // As above, for the Consumer-side. struct ConnectConsumerArgs { @@ -7281,6 +7646,12 @@ class PERFETTO_EXPORT_COMPONENT TracingBackend { const ConnectConsumerArgs&) = 0; }; +class PERFETTO_EXPORT_COMPONENT TracingBackend : public TracingProducerBackend, + public TracingConsumerBackend { + public: + ~TracingBackend() override; +}; + } // namespace perfetto #endif // INCLUDE_PERFETTO_TRACING_TRACING_BACKEND_H_ @@ -7374,25 +7745,39 @@ class TaskRunner; class Producer; -// A built-in implementation of TracingBackend that connects to the system -// tracing daemon (traced) via a UNIX socket using the perfetto built-in -// proto-based IPC mechanism. Instantiated when the embedder calls -// Tracing::Initialize(kSystemBackend). It allows to get app-traces fused -// together with system traces, useful to correlate on the timeline system -// events (e.g. scheduling slices from the kernel) with in-app events. +// Built-in implementations of TracingProducerBackend and TracingConsumerBackend +// that connect to the system tracing daemon (traced) via a UNIX socket using +// the perfetto built-in proto-based IPC mechanism. Instantiated when the +// embedder calls Tracing::Initialize(kSystemBackend). They allow to get +// app-traces fused together with system traces, useful to correlate on the +// timeline system events (e.g. scheduling slices from the kernel) with in-app +// events. namespace internal { -class PERFETTO_EXPORT_COMPONENT SystemTracingBackend : public TracingBackend { - public: - static TracingBackend* GetInstance(); - // TracingBackend implementation. +// Producer backend +class PERFETTO_EXPORT_COMPONENT SystemProducerTracingBackend + : public TracingProducerBackend { + public: + static TracingProducerBackend* GetInstance(); + std::unique_ptr ConnectProducer( const ConnectProducerArgs&) override; + + private: + SystemProducerTracingBackend(); +}; + +// Consumer backend +class PERFETTO_EXPORT_COMPONENT SystemConsumerTracingBackend + : public TracingConsumerBackend { + public: + static TracingConsumerBackend* GetInstance(); + std::unique_ptr ConnectConsumer( const ConnectConsumerArgs&) override; private: - SystemTracingBackend(); + SystemConsumerTracingBackend(); }; } // namespace internal @@ -7475,6 +7860,8 @@ class PERFETTO_EXPORT_COMPONENT TracingPolicy { #include #include #include +#include +#include #include // gen_amalgamated expanded: #include "perfetto/base/compiler.h" @@ -7494,7 +7881,8 @@ class TracingMuxerImpl; class TracingBackend; class Platform; -class TracingSession; // Declared below. +class StartupTracingSession; // Declared below. +class TracingSession; // Declared below. struct TracingError { enum ErrorCode : uint32_t { @@ -7567,25 +7955,46 @@ struct TracingInitArgs { // callback instead of being logged directly. LogMessageCallback log_message_callback = nullptr; + // When this flag is set to false, it overrides + // `DataSource::kSupportsMultipleInstances` for all the data sources. + // As a result when a tracing session is already running and if we attempt to + // start another session, it will fail to start the data source which were + // already active. + bool supports_multiple_data_source_instances = true; + + // If this flag is set the default clock for taking timestamps is overridden + // with CLOCK_MONOTONIC (for use in Chrome). + bool use_monotonic_clock = false; + + // If this flag is set the default clock for taking timestamps is overridden + // with CLOCK_MONOTONIC_RAW on platforms that support it. + bool use_monotonic_raw_clock = false; + + // This flag can be set to false in order to avoid enabling the system + // consumer in Tracing::Initialize(), so that the linker can remove the unused + // consumer IPC implementation to reduce binary size. This setting only has an + // effect if kSystemBackend is specified in |backends|. When this option is + // false, Tracing::NewTrace() will instatiate the system backend only if + // explicitly specified as kSystemBackend: kUndefinedBackend will consider + // only already instantiated backends. + bool enable_system_consumer = true; + + // When true, sets disallow_merging_with_system_tracks in TrackDescriptor, + // making sure that Trace Processor doesn't merge track event and system + // event tracks for the same thread. + bool disallow_merging_with_system_tracks = false; + protected: friend class Tracing; friend class internal::TracingMuxerImpl; - // Used only by the DCHECK in tracing.cc, to check that the config is the - // same in case of re-initialization. - bool operator==(const TracingInitArgs& other) const { - return std::tie(backends, custom_backend, platform, shmem_size_hint_kb, - shmem_page_size_hint_kb, in_process_backend_factory_, - system_backend_factory_, dcheck_is_on_) == - std::tie(other.backends, other.custom_backend, other.platform, - other.shmem_size_hint_kb, other.shmem_page_size_hint_kb, - other.in_process_backend_factory_, - other.system_backend_factory_, other.dcheck_is_on_); - } - using BackendFactoryFunction = TracingBackend* (*)(); + using ProducerBackendFactoryFunction = TracingProducerBackend* (*)(); + using ConsumerBackendFactoryFunction = TracingConsumerBackend* (*)(); + BackendFactoryFunction in_process_backend_factory_ = nullptr; - BackendFactoryFunction system_backend_factory_ = nullptr; + ProducerBackendFactoryFunction system_producer_backend_factory_ = nullptr; + ConsumerBackendFactoryFunction system_consumer_backend_factory_ = nullptr; bool dcheck_is_on_ = PERFETTO_DCHECK_IS_ON(); }; @@ -7593,7 +8002,12 @@ struct TracingInitArgs { class PERFETTO_EXPORT_COMPONENT Tracing { public: // Initializes Perfetto with the given backends in the calling process and/or - // with a user-provided backend. No-op if called more than once. + // with a user-provided backend. It's possible to call this function more than + // once to initialize different backends. If a backend was already initialized + // the call will have no effect on it. All the members of `args` will be + // ignored in subsequent calls, except those require to initialize new + // backends (`backends`, `enable_system_consumer`, `shmem_size_hint_kb`, + // `shmem_page_size_hint_kb` and `shmem_batch_commits_duration_ms`). static inline void Initialize(const TracingInitArgs& args) PERFETTO_ALWAYS_INLINE { TracingInitArgs args_copy(args); @@ -7613,8 +8027,12 @@ class PERFETTO_EXPORT_COMPONENT Tracing { &internal::InProcessTracingBackend::GetInstance; } if (args.backends & kSystemBackend) { - args_copy.system_backend_factory_ = - &internal::SystemTracingBackend::GetInstance; + args_copy.system_producer_backend_factory_ = + &internal::SystemProducerTracingBackend::GetInstance; + if (args.enable_system_consumer) { + args_copy.system_consumer_backend_factory_ = + &internal::SystemConsumerTracingBackend::GetInstance; + } } InitializeInternal(args_copy); } @@ -7624,18 +8042,124 @@ class PERFETTO_EXPORT_COMPONENT Tracing { // Start a new tracing session using the given tracing backend. Use // |kUnspecifiedBackend| to select an available backend automatically. - // For the moment this can be used only when initializing tracing in - // kInProcess mode. For the system mode use the 'bin/perfetto' cmdline client. - static std::unique_ptr NewTrace( - BackendType = kUnspecifiedBackend); + static inline std::unique_ptr NewTrace( + BackendType backend = kUnspecifiedBackend) PERFETTO_ALWAYS_INLINE { + // This code is inlined to allow dead-code elimination for unused consumer + // implementation. The logic behind it is the following: + // Nothing other than the code below references the GetInstance() method + // below. From a linker-graph viewpoint, those GetInstance() pull in many + // other pieces of the codebase (ConsumerOnlySystemTracingBackend pulls + // ConsumerIPCClient). Due to the inline, the compiler can see through the + // code and realize that some branches are always not taken. When that + // happens, no reference to the backends' GetInstance() is emitted and that + // allows the linker GC to get rid of the entire set of dependencies. + TracingConsumerBackend* (*system_backend_factory)(); + system_backend_factory = nullptr; + // In case PERFETTO_IPC is disabled, a fake system backend is used, which + // always panics. NewTrace(kSystemBackend) should fail if PERFETTO_IPC is + // diabled, not panic. +#if PERFETTO_BUILDFLAG(PERFETTO_IPC) + if (backend & kSystemBackend) { + system_backend_factory = + &internal::SystemConsumerTracingBackend::GetInstance; + } +#endif + return NewTraceInternal(backend, system_backend_factory); + } + + // Shut down Perfetto, releasing any allocated OS resources (threads, files, + // sockets, etc.). Note that Perfetto cannot be reinitialized again in the + // same process[1]. Instead, this function is meant for shutting down all + // Perfetto-related code so that it can be safely unloaded, e.g., with + // dlclose(). + // + // It is only safe to call this function when all threads recording trace + // events have been terminated or otherwise guaranteed to not make any further + // calls into Perfetto. + // + // [1] Unless static data is also cleared through other means. + static void Shutdown(); // Uninitialize Perfetto. Only exposed for testing scenarios where it can be // guaranteed that no tracing sessions or other operations are happening when // this call is made. static void ResetForTesting(); + // Start a new startup tracing session in the current process. Startup tracing + // can be used in anticipation of a session that will be started by the + // specified backend in the near future. The data source configs in the + // supplied TraceConfig have to (mostly) match those in the config that will + // later be provided by the backend. + // Learn more about config matching at ComputeStartupConfigHash. + // + // Note that startup tracing requires that either: + // (a) the service backend already has an SMB set up, or + // (b) the service backend to support producer-provided SMBs if the backend + // is not yet connected or no SMB has been set up yet + // (See `use_producer_provided_smb`). If necessary, the + // client library will briefly disconnect and reconnect the backend to + // supply an SMB to the backend. If the service does not accept the SMB, + // startup tracing will be aborted, but the service may still start the + // corresponding tracing session later. + // + // Startup tracing is NOT supported with the in-process backend. For this + // backend, you can just start a regular tracing session and block until it is + // set up instead. + // + // The client library will start the data sources instances specified in the + // config with a placeholder target buffer. Once the backend starts a matching + // tracing session, the session will resume as normal. If no matching session + // is started after a timeout (or the backend doesn't accept the + // producer-provided SMB), the startup tracing session will be aborted + // and the data source instances stopped. + struct OnStartupTracingSetupCallbackArgs { + int num_data_sources_started; + }; + struct SetupStartupTracingOpts { + BackendType backend = kUnspecifiedBackend; + uint32_t timeout_ms = 10000; + + // If set, this callback is executed (on an internal Perfetto thread) when + // startup tracing was set up. + std::function on_setup; + + // If set, this callback is executed (on an internal Perfetto thread) if any + // data sources were aborted, e.g. due to exceeding the timeout or as a + // response to Abort(). + std::function on_aborted; + + // If set, this callback is executed (on an internal Perfetto thread) after + // all data sources were adopted by a tracing session initiated by the + // backend. + std::function on_adopted; + }; + + static std::unique_ptr SetupStartupTracing( + const TraceConfig& config, + SetupStartupTracingOpts); + + // Blocking version of above method, so callers can ensure that tracing is + // active before proceeding with app startup. Calls into + // DataSource::Trace() or trace macros right after this method are written + // into the startup session. + static std::unique_ptr SetupStartupTracingBlocking( + const TraceConfig& config, + SetupStartupTracingOpts); + + // Informs the tracing services to activate any of these triggers if any + // tracing session was waiting for them. + // + // Sends the trigger signal to all the initialized backends that are currently + // connected and that connect in the next `ttl_ms` milliseconds (but + // returns immediately anyway). + static void ActivateTriggers(const std::vector& triggers, + uint32_t ttl_ms); + private: static void InitializeInternal(const TracingInitArgs&); + static std::unique_ptr NewTraceInternal( + BackendType, + TracingConsumerBackend* (*system_backend_factory)()); Tracing() = delete; }; @@ -7805,6 +8329,23 @@ class PERFETTO_EXPORT_COMPONENT TracingSession { QueryServiceStateCallbackArgs QueryServiceStateBlocking(); }; +class PERFETTO_EXPORT_COMPONENT StartupTracingSession { + public: + // Note that destroying the StartupTracingSession object will not abort the + // startup session automatically. Call Abort() explicitly to do so. + virtual ~StartupTracingSession(); + + // Abort any active but still unbound data source instances that belong to + // this startup tracing session. Does not affect data source instances that + // were already bound to a service-controlled session. + virtual void Abort() = 0; + + // Same as above, but blocks the current thread until aborted. + // Note some of the internal (non observable from public APIs) cleanup might + // be done even after this method returns. + virtual void AbortBlocking() = 0; +}; + } // namespace perfetto #endif // INCLUDE_PERFETTO_TRACING_TRACING_H_ @@ -7837,6 +8378,7 @@ class PERFETTO_EXPORT_COMPONENT TracingSession { // gen_amalgamated expanded: #include "perfetto/base/export.h" // gen_amalgamated expanded: #include "perfetto/base/logging.h" // gen_amalgamated expanded: #include "perfetto/base/proc_utils.h" +// gen_amalgamated expanded: #include "perfetto/base/thread_utils.h" // gen_amalgamated expanded: #include "perfetto/tracing/tracing.h" namespace perfetto { @@ -7914,6 +8456,15 @@ class PERFETTO_EXPORT_COMPONENT Platform { // in-process mode. virtual std::string GetCurrentProcessName() = 0; + // Tear down any persistent platform state (e.g., TLS variables). The platform + // interface must not be used after calling this function. + virtual void Shutdown(); + + // Returns the thread ID provided by the OS by default. Chromium uses + // different thread IDs on some platforms, so it needs the ability to + // override this method. + virtual base::PlatformThreadId GetCurrentThreadId(); + private: static base::PlatformProcessId process_id_; }; @@ -8004,6 +8555,10 @@ class TracingTLS : public Platform::ThreadLocalObject { // handlers. See comment in TracingTLS::~TracingTLS(). bool is_in_trace_point = false; + // Used inside a trace point (only one trace point per thread can be active at + // any time) to cache the instances bitmap. + uint32_t cached_instances = 0; + // By default all data source instances have independent thread-local state // (see above). std::array data_sources_tls{}; @@ -8066,6 +8621,11 @@ class TracingSession; namespace internal { +struct DataSourceParams { + bool supports_multiple_instances; + bool requires_callbacks_under_lock; +}; + struct DataSourceStaticState; // This class acts as a bridge between the public API methods and the @@ -8093,6 +8653,7 @@ class PERFETTO_EXPORT_COMPONENT TracingMuxer { using DataSourceFactory = std::function()>; virtual bool RegisterDataSource(const DataSourceDescriptor&, DataSourceFactory, + DataSourceParams, DataSourceStaticState*) = 0; // Updates the DataSourceDescriptor for the DataSource. @@ -8119,6 +8680,19 @@ class PERFETTO_EXPORT_COMPONENT TracingMuxer { InterceptorBase::TLSFactory, InterceptorBase::TracePacketCallback) = 0; + // Informs the tracing services to activate any of these triggers if any + // tracing session was waiting for them. + // + // Sends the trigger signal to all the initialized backends that are currently + // connected and that connect in the next `ttl_ms` milliseconds (but returns + // immediately anyway). + virtual void ActivateTriggers(const std::vector&, + uint32_t ttl_ms) = 0; + + base::PlatformThreadId GetCurrentThreadId() { + return platform_->GetCurrentThreadId(); + } + protected: explicit TracingMuxer(Platform* platform) : platform_(platform) {} @@ -8133,6 +8707,323 @@ class PERFETTO_EXPORT_COMPONENT TracingMuxer { } // namespace perfetto #endif // INCLUDE_PERFETTO_TRACING_INTERNAL_TRACING_MUXER_H_ +#ifndef INCLUDE_PERFETTO_TRACING_INTERNAL_DATA_SOURCE_TYPE_H_ +#define INCLUDE_PERFETTO_TRACING_INTERNAL_DATA_SOURCE_TYPE_H_ + +// gen_amalgamated expanded: #include "perfetto/base/build_config.h" +// gen_amalgamated expanded: #include "perfetto/base/export.h" +// gen_amalgamated expanded: #include "perfetto/tracing/core/forward_decls.h" +// gen_amalgamated expanded: #include "perfetto/tracing/internal/data_source_internal.h" +// gen_amalgamated expanded: #include "perfetto/tracing/internal/tracing_muxer.h" + +namespace perfetto { +namespace internal { + +// Represents a data source type (not an instance). +// +// All the static state of a DataSource lives here (including +// DataSourceStaticState). +// +// The C shared library API wrapper cannot use DataSource, because it needs +// to create new data source types at runtime, so it uses this directly. +// +// The main reason why this intermediate class exist is to decouple the +// DataSourceStaticState from the specific DataSource. The C API cannot +// dynamically create template instances and it needs a way to decouple those at +// runtime. +class PERFETTO_EXPORT_COMPONENT DataSourceType { + public: + // Function pointer type used to create custom per instance thread local + // state. + using CreateCustomTlsFn = + DataSourceInstanceThreadLocalState::ObjectWithDeleter (*)( + DataSourceInstanceThreadLocalState* tls_inst, + uint32_t instance_index, + void* user_arg); + // Function pointer type used to create custom per instance thread local + // incremental state (which might be cleared periodically by the tracing + // service). + using CreateIncrementalStateFn = + DataSourceInstanceThreadLocalState::ObjectWithDeleter (*)( + DataSourceInstanceThreadLocalState* tls_inst, + uint32_t instance_index, + void* user_arg); + + // Registers the data source type with the central tracing muxer. + // * `descriptor` is the data source protobuf descriptor. + // * `factory` is a std::function used to create instances of the data source + // type. + // * `buffer_exhausted_policy` specifies what to do when the shared memory + // buffer runs out of chunks. + // * `create_custom_tls_fn` and `create_incremental_state_fn` are function + // pointers called to create custom state. They will receive `user_arg` as + // an extra param. + bool Register(const DataSourceDescriptor& descriptor, + TracingMuxer::DataSourceFactory factory, + internal::DataSourceParams params, + BufferExhaustedPolicy buffer_exhausted_policy, + CreateCustomTlsFn create_custom_tls_fn, + CreateIncrementalStateFn create_incremental_state_fn, + void* user_arg) { + buffer_exhausted_policy_ = buffer_exhausted_policy; + create_custom_tls_fn_ = create_custom_tls_fn; + create_incremental_state_fn_ = create_incremental_state_fn; + user_arg_ = user_arg; + auto* tracing_impl = TracingMuxer::Get(); + return tracing_impl->RegisterDataSource(descriptor, factory, params, + &state_); + } + + // Updates the data source type descriptor. + void UpdateDescriptor(const DataSourceDescriptor& descriptor) { + auto* tracing_impl = TracingMuxer::Get(); + tracing_impl->UpdateDataSourceDescriptor(descriptor, &state_); + } + + // The beginning of a trace point. + // + // `tls_state` must point to a thread local variable that caches a pointer to + // an internal per data source type thread local state. + // + // `instances` must point to a copy of the current active instances for the + // data source type. + // + // `DataSourceTraits` can be used to customize the thread local storage used + // for the data source type. + // + // `TracePointTraits` and `trace_point_data` are customization point for + // getting the active instances bitmap. + // + // If this returns false, the trace point must be skipped. + template + bool TracePrologue( + DataSourceThreadLocalState** tls_state, + uint32_t* instances, + typename TracePointTraits::TracePointData trace_point_data) { + // See tracing_muxer.h for the structure of the TLS. + if (PERFETTO_UNLIKELY(!*tls_state)) { + *tls_state = GetOrCreateDataSourceTLS(); + // If the TLS hasn't been obtained yet, it's possible that this thread + // hasn't observed the initialization of global state like the muxer yet. + // To ensure that the thread "sees" the effects of such initialization, + // we have to reload |instances| with an acquire fence, ensuring that any + // initialization performed before instances was updated is visible + // in this thread. + *instances &= TracePointTraits::GetActiveInstances(trace_point_data) + ->load(std::memory_order_acquire); + if (!*instances) + return false; + } + auto* tracing_impl = TracingMuxer::Get(); + + // Avoid re-entering the trace point recursively. + if (PERFETTO_UNLIKELY((*tls_state)->root_tls->is_in_trace_point)) + return false; + + (*tls_state)->root_tls->is_in_trace_point = true; + + // TracingTLS::generation is a global monotonic counter that is incremented + // every time a tracing session is stopped. We use that as a signal to force + // a slow-path garbage collection of all the trace writers for the current + // thread and to destroy the ones that belong to tracing sessions that have + // ended. This is to avoid having too many TraceWriter instances alive, each + // holding onto one chunk of the shared memory buffer. + // Rationale why memory_order_relaxed should be fine: + // - The TraceWriter object that we use is always constructed and destructed + // on the current thread. There is no risk of accessing a half-initialized + // TraceWriter (which would be really bad). + // - In the worst case, in the case of a race on the generation check, we + // might end up using a TraceWriter for the same data source that belongs + // to a stopped session. This is not really wrong, as we don't give any + // guarantee on the global atomicity of the stop. In the worst case the + // service will reject the data commit if this arrives too late. + + if (PERFETTO_UNLIKELY( + (*tls_state)->root_tls->generation != + tracing_impl->generation(std::memory_order_relaxed))) { + // Will update root_tls->generation. + tracing_impl->DestroyStoppedTraceWritersForCurrentThread(); + } + + return true; + } + + // Must be called at the ending of a trace point that was not skipped. + void TraceEpilogue(DataSourceThreadLocalState* tls_state) { + tls_state->root_tls->is_in_trace_point = false; + } + + struct InstancesIterator { + // A bitmap of the currenly active instances. + uint32_t cached_instances; + // The current instance index. + uint32_t i; + // The current instance. If this is `nullptr`, the iteration is over. + DataSourceInstanceThreadLocalState* instance; + }; + + // Returns an iterator to the active instances of this data source type. + // + // `cached_instances` is a copy of the bitmap of the active instances for this + // data source type (usually just a copy of ValidInstances(), but can be + // customized). + // + // `tls_state` is the thread local pointer obtained from TracePrologue. + // + // `TracePointTraits` and `trace_point_data` are customization point for + // getting the active instances bitmap. + template + InstancesIterator BeginIteration( + uint32_t cached_instances, + DataSourceThreadLocalState* tls_state, + typename TracePointTraits::TracePointData trace_point_data) + PERFETTO_ALWAYS_INLINE { + InstancesIterator it{}; + it.cached_instances = cached_instances; + FirstActiveInstance(&it, tls_state, trace_point_data); + return it; + } + + // Advances `*iterator` to point to the next active instance of this data + // source type. + // + // `tls_state` is the thread local pointer obtained from TracePrologue. + // + // `TracePointTraits` and `trace_point_data` are customization point for + // getting the active instances bitmap. + template + void NextIteration(InstancesIterator* iterator, + DataSourceThreadLocalState* tls_state, + typename TracePointTraits::TracePointData trace_point_data) + PERFETTO_ALWAYS_INLINE { + iterator->i++; + FirstActiveInstance(iterator, tls_state, + trace_point_data); + } + + void* GetIncrementalState( + internal::DataSourceInstanceThreadLocalState* tls_inst, + uint32_t instance_index) { + // Recreate incremental state data if it has been reset by the service. + if (tls_inst->incremental_state_generation != + static_state()->incremental_state_generation.load( + std::memory_order_relaxed)) { + tls_inst->incremental_state.reset(); + CreateIncrementalState(tls_inst, instance_index); + } + return tls_inst->incremental_state.get(); + } + + std::atomic* valid_instances() { return &state_.valid_instances; } + + DataSourceStaticState* static_state() { return &state_; } + + private: + void CreateIncrementalState( + internal::DataSourceInstanceThreadLocalState* tls_inst, + uint32_t instance_index) { + PERFETTO_DCHECK(create_incremental_state_fn_ != nullptr); + tls_inst->incremental_state = + create_incremental_state_fn_(tls_inst, instance_index, user_arg_); + tls_inst->incremental_state_generation = + static_state()->incremental_state_generation.load( + std::memory_order_relaxed); + } + + void PopulateTlsInst(DataSourceInstanceThreadLocalState* tls_inst, + DataSourceState* instance_state, + uint32_t instance_index); + + // Advances `*iterator` to the first active instance whose index is greater or + // equal than `iterator->i`. + template + void FirstActiveInstance( + InstancesIterator* iterator, + DataSourceThreadLocalState* tls_state, + typename TracePointTraits::TracePointData trace_point_data) { + iterator->instance = nullptr; + for (; iterator->i < kMaxDataSourceInstances; iterator->i++) { + DataSourceState* instance_state = + state_.TryGetCached(iterator->cached_instances, iterator->i); + if (!instance_state) + continue; + // Even if we passed the check above, the DataSourceInstance might be + // still destroyed concurrently while this code runs. The code below is + // designed to deal with such race, as follows: + // - We don't access the user-defined data source instance state. The only + // bits of state we use are |backend_id| and |buffer_id|. + // - Beyond those two integers, we access only the TraceWriter here. The + // TraceWriter is always safe because it lives on the TLS. + // - |instance_state| is backed by static storage, so the pointer is + // always valid, even after the data source instance is destroyed. + // - In the case of a race-on-destruction, we'll still see the latest + // backend_id and buffer_id and in the worst case keep trying writing + // into the tracing shared memory buffer after stopped. But this isn't + // really any worse than the case of the stop IPC being delayed by the + // kernel scheduler. The tracing service is robust against data commit + // attemps made after tracing is stopped. + // There is a theoretical race that would case the wrong behavior w.r.t + // writing data in the wrong buffer, but it's so rare that we ignore it: + // if the data source is stopped and started kMaxDataSourceInstances + // times (so that the same id is recycled) while we are in this function, + // we might end up reusing the old data source's backend_id and buffer_id + // for the new one, because we don't see the generation change past this + // point. But stopping and starting tracing (even once) takes so much + // handshaking to make this extremely unrealistic. + + auto& tls_inst = tls_state->per_instance[iterator->i]; + if (PERFETTO_UNLIKELY(!tls_inst.trace_writer)) { + // Here we need an acquire barrier, which matches the release-store made + // by TracingMuxerImpl::SetupDataSource(), to ensure that the backend_id + // and buffer_id are consistent. + iterator->cached_instances &= + TracePointTraits::GetActiveInstances(trace_point_data) + ->load(std::memory_order_acquire); + instance_state = + state_.TryGetCached(iterator->cached_instances, iterator->i); + if (!instance_state || !instance_state->trace_lambda_enabled.load( + std::memory_order_relaxed)) + continue; + PopulateTlsInst(&tls_inst, instance_state, iterator->i); + } + iterator->instance = &tls_inst; + break; + } + } + + // Note that the returned object is one per-thread per-data-source-type, NOT + // per data-source *instance*. + template + DataSourceThreadLocalState* GetOrCreateDataSourceTLS() { +#if PERFETTO_BUILDFLAG(PERFETTO_OS_IOS) + PERFETTO_FATAL("Data source TLS not supported on iOS, see b/158814068"); +#endif + auto* tracing_impl = TracingMuxer::Get(); + TracingTLS* root_tls = tracing_impl->GetOrCreateTracingTLS(); + DataSourceThreadLocalState* ds_tls = + DataSourceTraits::GetDataSourceTLS(&state_, root_tls); + // We keep re-initializing as the initialization is idempotent and not worth + // the code for extra checks. Also, ds_tls->static_state might point to + // another data source if ResetForTesting() has been used. + ds_tls->static_state = &state_; + assert(!ds_tls->root_tls || ds_tls->root_tls == root_tls); + ds_tls->root_tls = root_tls; + return ds_tls; + } + + DataSourceStaticState state_; + BufferExhaustedPolicy buffer_exhausted_policy_{}; + CreateCustomTlsFn create_custom_tls_fn_ = nullptr; + CreateIncrementalStateFn create_incremental_state_fn_ = nullptr; + // User defined pointer that carries extra content for the fn_ callbacks + // above. Only used in the C shared library. + void* user_arg_ = nullptr; +}; + +} // namespace internal +} // namespace perfetto + +#endif // INCLUDE_PERFETTO_TRACING_INTERNAL_DATA_SOURCE_TYPE_H_ // gen_amalgamated begin header: gen/protos/perfetto/trace/trace_packet.pbzero.h // Autogenerated by the ProtoZero compiler plugin. DO NOT EDIT. @@ -8157,6 +9048,7 @@ class AndroidCameraSessionStats; class AndroidEnergyEstimationBreakdown; class AndroidGameInterventionList; class AndroidLogPacket; +class AndroidSystemProperty; class BatteryCounters; class ChromeBenchmarkMetadata; class ChromeEventBundle; @@ -8164,6 +9056,7 @@ class ChromeMetadataPacket; class ClockSnapshot; class CpuInfo; class DeobfuscationMapping; +class EntityStateResidency; class ExtensionDescriptor; class FrameTimelineEvent; class FtraceEventBundle; @@ -8179,6 +9072,8 @@ class InodeFileMap; class InternedData; class MemoryTrackerSnapshot; class ModuleSymbols; +class NetworkPacketBundle; +class NetworkPacketEvent; class PackagesList; class PerfSample; class PerfettoMetatrace; @@ -8189,6 +9084,7 @@ class ProcessTree; class ProfilePacket; class ProfiledFrameSymbols; class SmapsPacket; +class StatsdAtom; class StreamingAllocation; class StreamingFree; class StreamingProfilePacket; @@ -8199,23 +9095,45 @@ class ThreadDescriptor; class TraceConfig; class TracePacketDefaults; class TraceStats; +class TraceUuid; class TracingServiceEvent; class TrackDescriptor; class TrackEvent; +class TrackEventRangeOfInterest; class TranslationTable; class Trigger; class UiState; class VulkanApiEvent; class VulkanMemoryEvent; -enum TracePacket_SequenceFlags : int32_t { - TracePacket_SequenceFlags_SEQ_UNSPECIFIED = 0, - TracePacket_SequenceFlags_SEQ_INCREMENTAL_STATE_CLEARED = 1, - TracePacket_SequenceFlags_SEQ_NEEDS_INCREMENTAL_STATE = 2, +namespace perfetto_pbzero_enum_TracePacket { +enum SequenceFlags : int32_t { + SEQ_UNSPECIFIED = 0, + SEQ_INCREMENTAL_STATE_CLEARED = 1, + SEQ_NEEDS_INCREMENTAL_STATE = 2, }; +} // namespace perfetto_pbzero_enum_TracePacket +using TracePacket_SequenceFlags = perfetto_pbzero_enum_TracePacket::SequenceFlags; -const TracePacket_SequenceFlags TracePacket_SequenceFlags_MIN = TracePacket_SequenceFlags_SEQ_UNSPECIFIED; -const TracePacket_SequenceFlags TracePacket_SequenceFlags_MAX = TracePacket_SequenceFlags_SEQ_NEEDS_INCREMENTAL_STATE; + +constexpr TracePacket_SequenceFlags TracePacket_SequenceFlags_MIN = TracePacket_SequenceFlags::SEQ_UNSPECIFIED; +constexpr TracePacket_SequenceFlags TracePacket_SequenceFlags_MAX = TracePacket_SequenceFlags::SEQ_NEEDS_INCREMENTAL_STATE; + + +PERFETTO_PROTOZERO_CONSTEXPR14_OR_INLINE +const char* TracePacket_SequenceFlags_Name(::perfetto::protos::pbzero::TracePacket_SequenceFlags value) { + switch (value) { + case ::perfetto::protos::pbzero::TracePacket_SequenceFlags::SEQ_UNSPECIFIED: + return "SEQ_UNSPECIFIED"; + + case ::perfetto::protos::pbzero::TracePacket_SequenceFlags::SEQ_INCREMENTAL_STATE_CLEARED: + return "SEQ_INCREMENTAL_STATE_CLEARED"; + + case ::perfetto::protos::pbzero::TracePacket_SequenceFlags::SEQ_NEEDS_INCREMENTAL_STATE: + return "SEQ_NEEDS_INCREMENTAL_STATE"; + } + return "PBZERO_UNKNOWN_ENUM_VALUE"; +} class TracePacket_Decoder : public ::protozero::TypedProtoDecoder { public: @@ -8240,6 +9158,8 @@ class TracePacket_Decoder : public ::protozero::TypedProtoDecoder().as_bytes(); } bool has_track_event() const { return at<11>().valid(); } ::protozero::ConstBytes track_event() const { return at<11>().as_bytes(); } + bool has_trace_uuid() const { return at<89>().valid(); } + ::protozero::ConstBytes trace_uuid() const { return at<89>().as_bytes(); } bool has_trace_config() const { return at<33>().valid(); } ::protozero::ConstBytes trace_config() const { return at<33>().as_bytes(); } bool has_ftrace_stats() const { return at<34>().valid(); } @@ -8314,6 +9234,12 @@ class TracePacket_Decoder : public ::protozero::TypedProtoDecoder().as_bytes(); } bool has_android_game_intervention_list() const { return at<83>().valid(); } ::protozero::ConstBytes android_game_intervention_list() const { return at<83>().as_bytes(); } + bool has_statsd_atom() const { return at<84>().valid(); } + ::protozero::ConstBytes statsd_atom() const { return at<84>().as_bytes(); } + bool has_android_system_property() const { return at<86>().valid(); } + ::protozero::ConstBytes android_system_property() const { return at<86>().as_bytes(); } + bool has_entity_state_residency() const { return at<91>().valid(); } + ::protozero::ConstBytes entity_state_residency() const { return at<91>().as_bytes(); } bool has_profiled_frame_symbols() const { return at<55>().valid(); } ::protozero::ConstBytes profiled_frame_symbols() const { return at<55>().as_bytes(); } bool has_module_symbols() const { return at<61>().valid(); } @@ -8334,6 +9260,12 @@ class TracePacket_Decoder : public ::protozero::TypedProtoDecoder().as_bytes(); } bool has_extension_descriptor() const { return at<72>().valid(); } ::protozero::ConstBytes extension_descriptor() const { return at<72>().as_bytes(); } + bool has_network_packet() const { return at<88>().valid(); } + ::protozero::ConstBytes network_packet() const { return at<88>().as_bytes(); } + bool has_network_packet_bundle() const { return at<92>().valid(); } + ::protozero::ConstBytes network_packet_bundle() const { return at<92>().as_bytes(); } + bool has_track_event_range_of_interest() const { return at<90>().valid(); } + ::protozero::ConstBytes track_event_range_of_interest() const { return at<90>().as_bytes(); } bool has_for_testing() const { return at<900>().valid(); } ::protozero::ConstBytes for_testing() const { return at<900>().as_bytes(); } bool has_trusted_uid() const { return at<3>().valid(); } @@ -8352,6 +9284,8 @@ class TracePacket_Decoder : public ::protozero::TypedProtoDecoder().as_bytes(); } bool has_previous_packet_dropped() const { return at<42>().valid(); } bool previous_packet_dropped() const { return at<42>().as_bool(); } + bool has_first_packet_on_sequence() const { return at<87>().valid(); } + bool first_packet_on_sequence() const { return at<87>().as_bool(); } }; class TracePacket : public ::protozero::Message { @@ -8367,6 +9301,7 @@ class TracePacket : public ::protozero::Message { kClockSnapshotFieldNumber = 6, kSysStatsFieldNumber = 7, kTrackEventFieldNumber = 11, + kTraceUuidFieldNumber = 89, kTraceConfigFieldNumber = 33, kFtraceStatsFieldNumber = 34, kTraceStatsFieldNumber = 35, @@ -8404,6 +9339,9 @@ class TracePacket : public ::protozero::Message { kAndroidCameraSessionStatsFieldNumber = 81, kTranslationTableFieldNumber = 82, kAndroidGameInterventionListFieldNumber = 83, + kStatsdAtomFieldNumber = 84, + kAndroidSystemPropertyFieldNumber = 86, + kEntityStateResidencyFieldNumber = 91, kProfiledFrameSymbolsFieldNumber = 55, kModuleSymbolsFieldNumber = 61, kDeobfuscationMappingFieldNumber = 64, @@ -8414,6 +9352,9 @@ class TracePacket : public ::protozero::Message { kSynchronizationMarkerFieldNumber = 36, kCompressedPacketsFieldNumber = 50, kExtensionDescriptorFieldNumber = 72, + kNetworkPacketFieldNumber = 88, + kNetworkPacketBundleFieldNumber = 92, + kTrackEventRangeOfInterestFieldNumber = 90, kForTestingFieldNumber = 900, kTrustedUidFieldNumber = 3, kTrustedPacketSequenceIdFieldNumber = 10, @@ -8423,13 +9364,18 @@ class TracePacket : public ::protozero::Message { kIncrementalStateClearedFieldNumber = 41, kTracePacketDefaultsFieldNumber = 59, kPreviousPacketDroppedFieldNumber = 42, + kFirstPacketOnSequenceFieldNumber = 87, }; static constexpr const char* GetName() { return ".perfetto.protos.TracePacket"; } + using SequenceFlags = ::perfetto::protos::pbzero::TracePacket_SequenceFlags; - static const SequenceFlags SEQ_UNSPECIFIED = TracePacket_SequenceFlags_SEQ_UNSPECIFIED; - static const SequenceFlags SEQ_INCREMENTAL_STATE_CLEARED = TracePacket_SequenceFlags_SEQ_INCREMENTAL_STATE_CLEARED; - static const SequenceFlags SEQ_NEEDS_INCREMENTAL_STATE = TracePacket_SequenceFlags_SEQ_NEEDS_INCREMENTAL_STATE; + static inline const char* SequenceFlags_Name(SequenceFlags value) { + return ::perfetto::protos::pbzero::TracePacket_SequenceFlags_Name(value); + } + static const SequenceFlags SEQ_UNSPECIFIED = SequenceFlags::SEQ_UNSPECIFIED; + static const SequenceFlags SEQ_INCREMENTAL_STATE_CLEARED = SequenceFlags::SEQ_INCREMENTAL_STATE_CLEARED; + static const SequenceFlags SEQ_NEEDS_INCREMENTAL_STATE = SequenceFlags::SEQ_NEEDS_INCREMENTAL_STATE; using FieldMetadata_Timestamp = ::protozero::proto_utils::FieldMetadata< @@ -8439,14 +9385,7 @@ class TracePacket : public ::protozero::Message { uint64_t, TracePacket>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Timestamp kTimestamp() { return {}; } + static constexpr FieldMetadata_Timestamp kTimestamp{}; void set_timestamp(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Timestamp::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -8464,14 +9403,7 @@ class TracePacket : public ::protozero::Message { uint32_t, TracePacket>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_TimestampClockId kTimestampClockId() { return {}; } + static constexpr FieldMetadata_TimestampClockId kTimestampClockId{}; void set_timestamp_clock_id(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_TimestampClockId::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -8489,14 +9421,7 @@ class TracePacket : public ::protozero::Message { ProcessTree, TracePacket>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ProcessTree kProcessTree() { return {}; } + static constexpr FieldMetadata_ProcessTree kProcessTree{}; template T* set_process_tree() { return BeginNestedMessage(2); } @@ -8510,14 +9435,7 @@ class TracePacket : public ::protozero::Message { ProcessStats, TracePacket>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ProcessStats kProcessStats() { return {}; } + static constexpr FieldMetadata_ProcessStats kProcessStats{}; template T* set_process_stats() { return BeginNestedMessage(9); } @@ -8531,14 +9449,7 @@ class TracePacket : public ::protozero::Message { InodeFileMap, TracePacket>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_InodeFileMap kInodeFileMap() { return {}; } + static constexpr FieldMetadata_InodeFileMap kInodeFileMap{}; template T* set_inode_file_map() { return BeginNestedMessage(4); } @@ -8552,14 +9463,7 @@ class TracePacket : public ::protozero::Message { ChromeEventBundle, TracePacket>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ChromeEvents kChromeEvents() { return {}; } + static constexpr FieldMetadata_ChromeEvents kChromeEvents{}; template T* set_chrome_events() { return BeginNestedMessage(5); } @@ -8573,14 +9477,7 @@ class TracePacket : public ::protozero::Message { ClockSnapshot, TracePacket>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ClockSnapshot kClockSnapshot() { return {}; } + static constexpr FieldMetadata_ClockSnapshot kClockSnapshot{}; template T* set_clock_snapshot() { return BeginNestedMessage(6); } @@ -8594,14 +9491,7 @@ class TracePacket : public ::protozero::Message { SysStats, TracePacket>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_SysStats kSysStats() { return {}; } + static constexpr FieldMetadata_SysStats kSysStats{}; template T* set_sys_stats() { return BeginNestedMessage(7); } @@ -8615,19 +9505,26 @@ class TracePacket : public ::protozero::Message { TrackEvent, TracePacket>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_TrackEvent kTrackEvent() { return {}; } + static constexpr FieldMetadata_TrackEvent kTrackEvent{}; template T* set_track_event() { return BeginNestedMessage(11); } + using FieldMetadata_TraceUuid = + ::protozero::proto_utils::FieldMetadata< + 89, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kMessage, + TraceUuid, + TracePacket>; + + static constexpr FieldMetadata_TraceUuid kTraceUuid{}; + template T* set_trace_uuid() { + return BeginNestedMessage(89); + } + + using FieldMetadata_TraceConfig = ::protozero::proto_utils::FieldMetadata< 33, @@ -8636,14 +9533,7 @@ class TracePacket : public ::protozero::Message { TraceConfig, TracePacket>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_TraceConfig kTraceConfig() { return {}; } + static constexpr FieldMetadata_TraceConfig kTraceConfig{}; template T* set_trace_config() { return BeginNestedMessage(33); } @@ -8657,14 +9547,7 @@ class TracePacket : public ::protozero::Message { FtraceStats, TracePacket>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_FtraceStats kFtraceStats() { return {}; } + static constexpr FieldMetadata_FtraceStats kFtraceStats{}; template T* set_ftrace_stats() { return BeginNestedMessage(34); } @@ -8678,14 +9561,7 @@ class TracePacket : public ::protozero::Message { TraceStats, TracePacket>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_TraceStats kTraceStats() { return {}; } + static constexpr FieldMetadata_TraceStats kTraceStats{}; template T* set_trace_stats() { return BeginNestedMessage(35); } @@ -8699,14 +9575,7 @@ class TracePacket : public ::protozero::Message { ProfilePacket, TracePacket>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ProfilePacket kProfilePacket() { return {}; } + static constexpr FieldMetadata_ProfilePacket kProfilePacket{}; template T* set_profile_packet() { return BeginNestedMessage(37); } @@ -8720,14 +9589,7 @@ class TracePacket : public ::protozero::Message { StreamingAllocation, TracePacket>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_StreamingAllocation kStreamingAllocation() { return {}; } + static constexpr FieldMetadata_StreamingAllocation kStreamingAllocation{}; template T* set_streaming_allocation() { return BeginNestedMessage(74); } @@ -8741,14 +9603,7 @@ class TracePacket : public ::protozero::Message { StreamingFree, TracePacket>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_StreamingFree kStreamingFree() { return {}; } + static constexpr FieldMetadata_StreamingFree kStreamingFree{}; template T* set_streaming_free() { return BeginNestedMessage(75); } @@ -8762,14 +9617,7 @@ class TracePacket : public ::protozero::Message { BatteryCounters, TracePacket>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Battery kBattery() { return {}; } + static constexpr FieldMetadata_Battery kBattery{}; template T* set_battery() { return BeginNestedMessage(38); } @@ -8783,14 +9631,7 @@ class TracePacket : public ::protozero::Message { PowerRails, TracePacket>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_PowerRails kPowerRails() { return {}; } + static constexpr FieldMetadata_PowerRails kPowerRails{}; template T* set_power_rails() { return BeginNestedMessage(40); } @@ -8804,14 +9645,7 @@ class TracePacket : public ::protozero::Message { AndroidLogPacket, TracePacket>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_AndroidLog kAndroidLog() { return {}; } + static constexpr FieldMetadata_AndroidLog kAndroidLog{}; template T* set_android_log() { return BeginNestedMessage(39); } @@ -8825,14 +9659,7 @@ class TracePacket : public ::protozero::Message { SystemInfo, TracePacket>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_SystemInfo kSystemInfo() { return {}; } + static constexpr FieldMetadata_SystemInfo kSystemInfo{}; template T* set_system_info() { return BeginNestedMessage(45); } @@ -8846,14 +9673,7 @@ class TracePacket : public ::protozero::Message { Trigger, TracePacket>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Trigger kTrigger() { return {}; } + static constexpr FieldMetadata_Trigger kTrigger{}; template T* set_trigger() { return BeginNestedMessage(46); } @@ -8867,14 +9687,7 @@ class TracePacket : public ::protozero::Message { PackagesList, TracePacket>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_PackagesList kPackagesList() { return {}; } + static constexpr FieldMetadata_PackagesList kPackagesList{}; template T* set_packages_list() { return BeginNestedMessage(47); } @@ -8888,14 +9701,7 @@ class TracePacket : public ::protozero::Message { ChromeBenchmarkMetadata, TracePacket>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ChromeBenchmarkMetadata kChromeBenchmarkMetadata() { return {}; } + static constexpr FieldMetadata_ChromeBenchmarkMetadata kChromeBenchmarkMetadata{}; template T* set_chrome_benchmark_metadata() { return BeginNestedMessage(48); } @@ -8909,14 +9715,7 @@ class TracePacket : public ::protozero::Message { PerfettoMetatrace, TracePacket>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_PerfettoMetatrace kPerfettoMetatrace() { return {}; } + static constexpr FieldMetadata_PerfettoMetatrace kPerfettoMetatrace{}; template T* set_perfetto_metatrace() { return BeginNestedMessage(49); } @@ -8930,14 +9729,7 @@ class TracePacket : public ::protozero::Message { ChromeMetadataPacket, TracePacket>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ChromeMetadata kChromeMetadata() { return {}; } + static constexpr FieldMetadata_ChromeMetadata kChromeMetadata{}; template T* set_chrome_metadata() { return BeginNestedMessage(51); } @@ -8951,14 +9743,7 @@ class TracePacket : public ::protozero::Message { GpuCounterEvent, TracePacket>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_GpuCounterEvent kGpuCounterEvent() { return {}; } + static constexpr FieldMetadata_GpuCounterEvent kGpuCounterEvent{}; template T* set_gpu_counter_event() { return BeginNestedMessage(52); } @@ -8972,14 +9757,7 @@ class TracePacket : public ::protozero::Message { GpuRenderStageEvent, TracePacket>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_GpuRenderStageEvent kGpuRenderStageEvent() { return {}; } + static constexpr FieldMetadata_GpuRenderStageEvent kGpuRenderStageEvent{}; template T* set_gpu_render_stage_event() { return BeginNestedMessage(53); } @@ -8993,14 +9771,7 @@ class TracePacket : public ::protozero::Message { StreamingProfilePacket, TracePacket>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_StreamingProfilePacket kStreamingProfilePacket() { return {}; } + static constexpr FieldMetadata_StreamingProfilePacket kStreamingProfilePacket{}; template T* set_streaming_profile_packet() { return BeginNestedMessage(54); } @@ -9014,14 +9785,7 @@ class TracePacket : public ::protozero::Message { HeapGraph, TracePacket>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_HeapGraph kHeapGraph() { return {}; } + static constexpr FieldMetadata_HeapGraph kHeapGraph{}; template T* set_heap_graph() { return BeginNestedMessage(56); } @@ -9035,14 +9799,7 @@ class TracePacket : public ::protozero::Message { GraphicsFrameEvent, TracePacket>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_GraphicsFrameEvent kGraphicsFrameEvent() { return {}; } + static constexpr FieldMetadata_GraphicsFrameEvent kGraphicsFrameEvent{}; template T* set_graphics_frame_event() { return BeginNestedMessage(57); } @@ -9056,14 +9813,7 @@ class TracePacket : public ::protozero::Message { VulkanMemoryEvent, TracePacket>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_VulkanMemoryEvent kVulkanMemoryEvent() { return {}; } + static constexpr FieldMetadata_VulkanMemoryEvent kVulkanMemoryEvent{}; template T* set_vulkan_memory_event() { return BeginNestedMessage(62); } @@ -9077,14 +9827,7 @@ class TracePacket : public ::protozero::Message { GpuLog, TracePacket>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_GpuLog kGpuLog() { return {}; } + static constexpr FieldMetadata_GpuLog kGpuLog{}; template T* set_gpu_log() { return BeginNestedMessage(63); } @@ -9098,14 +9841,7 @@ class TracePacket : public ::protozero::Message { VulkanApiEvent, TracePacket>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_VulkanApiEvent kVulkanApiEvent() { return {}; } + static constexpr FieldMetadata_VulkanApiEvent kVulkanApiEvent{}; template T* set_vulkan_api_event() { return BeginNestedMessage(65); } @@ -9119,14 +9855,7 @@ class TracePacket : public ::protozero::Message { PerfSample, TracePacket>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_PerfSample kPerfSample() { return {}; } + static constexpr FieldMetadata_PerfSample kPerfSample{}; template T* set_perf_sample() { return BeginNestedMessage(66); } @@ -9140,14 +9869,7 @@ class TracePacket : public ::protozero::Message { CpuInfo, TracePacket>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_CpuInfo kCpuInfo() { return {}; } + static constexpr FieldMetadata_CpuInfo kCpuInfo{}; template T* set_cpu_info() { return BeginNestedMessage(67); } @@ -9161,14 +9883,7 @@ class TracePacket : public ::protozero::Message { SmapsPacket, TracePacket>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_SmapsPacket kSmapsPacket() { return {}; } + static constexpr FieldMetadata_SmapsPacket kSmapsPacket{}; template T* set_smaps_packet() { return BeginNestedMessage(68); } @@ -9182,14 +9897,7 @@ class TracePacket : public ::protozero::Message { TracingServiceEvent, TracePacket>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ServiceEvent kServiceEvent() { return {}; } + static constexpr FieldMetadata_ServiceEvent kServiceEvent{}; template T* set_service_event() { return BeginNestedMessage(69); } @@ -9203,14 +9911,7 @@ class TracePacket : public ::protozero::Message { InitialDisplayState, TracePacket>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_InitialDisplayState kInitialDisplayState() { return {}; } + static constexpr FieldMetadata_InitialDisplayState kInitialDisplayState{}; template T* set_initial_display_state() { return BeginNestedMessage(70); } @@ -9224,14 +9925,7 @@ class TracePacket : public ::protozero::Message { GpuMemTotalEvent, TracePacket>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_GpuMemTotalEvent kGpuMemTotalEvent() { return {}; } + static constexpr FieldMetadata_GpuMemTotalEvent kGpuMemTotalEvent{}; template T* set_gpu_mem_total_event() { return BeginNestedMessage(71); } @@ -9245,14 +9939,7 @@ class TracePacket : public ::protozero::Message { MemoryTrackerSnapshot, TracePacket>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_MemoryTrackerSnapshot kMemoryTrackerSnapshot() { return {}; } + static constexpr FieldMetadata_MemoryTrackerSnapshot kMemoryTrackerSnapshot{}; template T* set_memory_tracker_snapshot() { return BeginNestedMessage(73); } @@ -9266,14 +9953,7 @@ class TracePacket : public ::protozero::Message { FrameTimelineEvent, TracePacket>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_FrameTimelineEvent kFrameTimelineEvent() { return {}; } + static constexpr FieldMetadata_FrameTimelineEvent kFrameTimelineEvent{}; template T* set_frame_timeline_event() { return BeginNestedMessage(76); } @@ -9287,14 +9967,7 @@ class TracePacket : public ::protozero::Message { AndroidEnergyEstimationBreakdown, TracePacket>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_AndroidEnergyEstimationBreakdown kAndroidEnergyEstimationBreakdown() { return {}; } + static constexpr FieldMetadata_AndroidEnergyEstimationBreakdown kAndroidEnergyEstimationBreakdown{}; template T* set_android_energy_estimation_breakdown() { return BeginNestedMessage(77); } @@ -9308,14 +9981,7 @@ class TracePacket : public ::protozero::Message { UiState, TracePacket>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_UiState kUiState() { return {}; } + static constexpr FieldMetadata_UiState kUiState{}; template T* set_ui_state() { return BeginNestedMessage(78); } @@ -9329,14 +9995,7 @@ class TracePacket : public ::protozero::Message { AndroidCameraFrameEvent, TracePacket>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_AndroidCameraFrameEvent kAndroidCameraFrameEvent() { return {}; } + static constexpr FieldMetadata_AndroidCameraFrameEvent kAndroidCameraFrameEvent{}; template T* set_android_camera_frame_event() { return BeginNestedMessage(80); } @@ -9350,14 +10009,7 @@ class TracePacket : public ::protozero::Message { AndroidCameraSessionStats, TracePacket>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_AndroidCameraSessionStats kAndroidCameraSessionStats() { return {}; } + static constexpr FieldMetadata_AndroidCameraSessionStats kAndroidCameraSessionStats{}; template T* set_android_camera_session_stats() { return BeginNestedMessage(81); } @@ -9371,14 +10023,7 @@ class TracePacket : public ::protozero::Message { TranslationTable, TracePacket>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_TranslationTable kTranslationTable() { return {}; } + static constexpr FieldMetadata_TranslationTable kTranslationTable{}; template T* set_translation_table() { return BeginNestedMessage(82); } @@ -9392,19 +10037,54 @@ class TracePacket : public ::protozero::Message { AndroidGameInterventionList, TracePacket>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_AndroidGameInterventionList kAndroidGameInterventionList() { return {}; } + static constexpr FieldMetadata_AndroidGameInterventionList kAndroidGameInterventionList{}; template T* set_android_game_intervention_list() { return BeginNestedMessage(83); } + using FieldMetadata_StatsdAtom = + ::protozero::proto_utils::FieldMetadata< + 84, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kMessage, + StatsdAtom, + TracePacket>; + + static constexpr FieldMetadata_StatsdAtom kStatsdAtom{}; + template T* set_statsd_atom() { + return BeginNestedMessage(84); + } + + + using FieldMetadata_AndroidSystemProperty = + ::protozero::proto_utils::FieldMetadata< + 86, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kMessage, + AndroidSystemProperty, + TracePacket>; + + static constexpr FieldMetadata_AndroidSystemProperty kAndroidSystemProperty{}; + template T* set_android_system_property() { + return BeginNestedMessage(86); + } + + + using FieldMetadata_EntityStateResidency = + ::protozero::proto_utils::FieldMetadata< + 91, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kMessage, + EntityStateResidency, + TracePacket>; + + static constexpr FieldMetadata_EntityStateResidency kEntityStateResidency{}; + template T* set_entity_state_residency() { + return BeginNestedMessage(91); + } + + using FieldMetadata_ProfiledFrameSymbols = ::protozero::proto_utils::FieldMetadata< 55, @@ -9413,14 +10093,7 @@ class TracePacket : public ::protozero::Message { ProfiledFrameSymbols, TracePacket>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ProfiledFrameSymbols kProfiledFrameSymbols() { return {}; } + static constexpr FieldMetadata_ProfiledFrameSymbols kProfiledFrameSymbols{}; template T* set_profiled_frame_symbols() { return BeginNestedMessage(55); } @@ -9434,14 +10107,7 @@ class TracePacket : public ::protozero::Message { ModuleSymbols, TracePacket>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ModuleSymbols kModuleSymbols() { return {}; } + static constexpr FieldMetadata_ModuleSymbols kModuleSymbols{}; template T* set_module_symbols() { return BeginNestedMessage(61); } @@ -9455,14 +10121,7 @@ class TracePacket : public ::protozero::Message { DeobfuscationMapping, TracePacket>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_DeobfuscationMapping kDeobfuscationMapping() { return {}; } + static constexpr FieldMetadata_DeobfuscationMapping kDeobfuscationMapping{}; template T* set_deobfuscation_mapping() { return BeginNestedMessage(64); } @@ -9476,14 +10135,7 @@ class TracePacket : public ::protozero::Message { TrackDescriptor, TracePacket>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_TrackDescriptor kTrackDescriptor() { return {}; } + static constexpr FieldMetadata_TrackDescriptor kTrackDescriptor{}; template T* set_track_descriptor() { return BeginNestedMessage(60); } @@ -9497,14 +10149,7 @@ class TracePacket : public ::protozero::Message { ProcessDescriptor, TracePacket>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ProcessDescriptor kProcessDescriptor() { return {}; } + static constexpr FieldMetadata_ProcessDescriptor kProcessDescriptor{}; template T* set_process_descriptor() { return BeginNestedMessage(43); } @@ -9518,14 +10163,7 @@ class TracePacket : public ::protozero::Message { ThreadDescriptor, TracePacket>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ThreadDescriptor kThreadDescriptor() { return {}; } + static constexpr FieldMetadata_ThreadDescriptor kThreadDescriptor{}; template T* set_thread_descriptor() { return BeginNestedMessage(44); } @@ -9539,14 +10177,7 @@ class TracePacket : public ::protozero::Message { FtraceEventBundle, TracePacket>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_FtraceEvents kFtraceEvents() { return {}; } + static constexpr FieldMetadata_FtraceEvents kFtraceEvents{}; template T* set_ftrace_events() { return BeginNestedMessage(1); } @@ -9560,17 +10191,13 @@ class TracePacket : public ::protozero::Message { std::string, TracePacket>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_SynchronizationMarker kSynchronizationMarker() { return {}; } + static constexpr FieldMetadata_SynchronizationMarker kSynchronizationMarker{}; void set_synchronization_marker(const uint8_t* data, size_t size) { AppendBytes(FieldMetadata_SynchronizationMarker::kFieldId, data, size); } + void set_synchronization_marker(::protozero::ConstBytes bytes) { + AppendBytes(FieldMetadata_SynchronizationMarker::kFieldId, bytes.data, bytes.size); + } void set_synchronization_marker(std::string value) { static constexpr uint32_t field_id = FieldMetadata_SynchronizationMarker::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -9588,17 +10215,13 @@ class TracePacket : public ::protozero::Message { std::string, TracePacket>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_CompressedPackets kCompressedPackets() { return {}; } + static constexpr FieldMetadata_CompressedPackets kCompressedPackets{}; void set_compressed_packets(const uint8_t* data, size_t size) { AppendBytes(FieldMetadata_CompressedPackets::kFieldId, data, size); } + void set_compressed_packets(::protozero::ConstBytes bytes) { + AppendBytes(FieldMetadata_CompressedPackets::kFieldId, bytes.data, bytes.size); + } void set_compressed_packets(std::string value) { static constexpr uint32_t field_id = FieldMetadata_CompressedPackets::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -9616,19 +10239,54 @@ class TracePacket : public ::protozero::Message { ExtensionDescriptor, TracePacket>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ExtensionDescriptor kExtensionDescriptor() { return {}; } + static constexpr FieldMetadata_ExtensionDescriptor kExtensionDescriptor{}; template T* set_extension_descriptor() { return BeginNestedMessage(72); } + using FieldMetadata_NetworkPacket = + ::protozero::proto_utils::FieldMetadata< + 88, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kMessage, + NetworkPacketEvent, + TracePacket>; + + static constexpr FieldMetadata_NetworkPacket kNetworkPacket{}; + template T* set_network_packet() { + return BeginNestedMessage(88); + } + + + using FieldMetadata_NetworkPacketBundle = + ::protozero::proto_utils::FieldMetadata< + 92, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kMessage, + NetworkPacketBundle, + TracePacket>; + + static constexpr FieldMetadata_NetworkPacketBundle kNetworkPacketBundle{}; + template T* set_network_packet_bundle() { + return BeginNestedMessage(92); + } + + + using FieldMetadata_TrackEventRangeOfInterest = + ::protozero::proto_utils::FieldMetadata< + 90, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kMessage, + TrackEventRangeOfInterest, + TracePacket>; + + static constexpr FieldMetadata_TrackEventRangeOfInterest kTrackEventRangeOfInterest{}; + template T* set_track_event_range_of_interest() { + return BeginNestedMessage(90); + } + + using FieldMetadata_ForTesting = ::protozero::proto_utils::FieldMetadata< 900, @@ -9637,14 +10295,7 @@ class TracePacket : public ::protozero::Message { TestEvent, TracePacket>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ForTesting kForTesting() { return {}; } + static constexpr FieldMetadata_ForTesting kForTesting{}; template T* set_for_testing() { return BeginNestedMessage(900); } @@ -9658,14 +10309,7 @@ class TracePacket : public ::protozero::Message { int32_t, TracePacket>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_TrustedUid kTrustedUid() { return {}; } + static constexpr FieldMetadata_TrustedUid kTrustedUid{}; void set_trusted_uid(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_TrustedUid::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -9683,14 +10327,7 @@ class TracePacket : public ::protozero::Message { uint32_t, TracePacket>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_TrustedPacketSequenceId kTrustedPacketSequenceId() { return {}; } + static constexpr FieldMetadata_TrustedPacketSequenceId kTrustedPacketSequenceId{}; void set_trusted_packet_sequence_id(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_TrustedPacketSequenceId::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -9708,14 +10345,7 @@ class TracePacket : public ::protozero::Message { int32_t, TracePacket>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_TrustedPid kTrustedPid() { return {}; } + static constexpr FieldMetadata_TrustedPid kTrustedPid{}; void set_trusted_pid(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_TrustedPid::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -9733,14 +10363,7 @@ class TracePacket : public ::protozero::Message { InternedData, TracePacket>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_InternedData kInternedData() { return {}; } + static constexpr FieldMetadata_InternedData kInternedData{}; template T* set_interned_data() { return BeginNestedMessage(12); } @@ -9754,14 +10377,7 @@ class TracePacket : public ::protozero::Message { uint32_t, TracePacket>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_SequenceFlags kSequenceFlags() { return {}; } + static constexpr FieldMetadata_SequenceFlags kSequenceFlags{}; void set_sequence_flags(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_SequenceFlags::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -9779,14 +10395,7 @@ class TracePacket : public ::protozero::Message { bool, TracePacket>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_IncrementalStateCleared kIncrementalStateCleared() { return {}; } + static constexpr FieldMetadata_IncrementalStateCleared kIncrementalStateCleared{}; void set_incremental_state_cleared(bool value) { static constexpr uint32_t field_id = FieldMetadata_IncrementalStateCleared::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -9804,14 +10413,7 @@ class TracePacket : public ::protozero::Message { TracePacketDefaults, TracePacket>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_TracePacketDefaults kTracePacketDefaults() { return {}; } + static constexpr FieldMetadata_TracePacketDefaults kTracePacketDefaults{}; template T* set_trace_packet_defaults() { return BeginNestedMessage(59); } @@ -9825,14 +10427,7 @@ class TracePacket : public ::protozero::Message { bool, TracePacket>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_PreviousPacketDropped kPreviousPacketDropped() { return {}; } + static constexpr FieldMetadata_PreviousPacketDropped kPreviousPacketDropped{}; void set_previous_packet_dropped(bool value) { static constexpr uint32_t field_id = FieldMetadata_PreviousPacketDropped::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -9841,6 +10436,24 @@ class TracePacket : public ::protozero::Message { ::protozero::proto_utils::ProtoSchemaType::kBool> ::Append(*this, field_id, value); } + + using FieldMetadata_FirstPacketOnSequence = + ::protozero::proto_utils::FieldMetadata< + 87, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kBool, + bool, + TracePacket>; + + static constexpr FieldMetadata_FirstPacketOnSequence kFirstPacketOnSequence{}; + void set_first_packet_on_sequence(bool value) { + static constexpr uint32_t field_id = FieldMetadata_FirstPacketOnSequence::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kBool> + ::Append(*this, field_id, value); + } }; } // Namespace. @@ -9880,28 +10493,36 @@ class TracePacket : public ::protozero::Message { #include #include -// gen_amalgamated expanded: #include "perfetto/base/build_config.h" -// gen_amalgamated expanded: #include "perfetto/base/compiler.h" -// gen_amalgamated expanded: #include "perfetto/base/export.h" -// gen_amalgamated expanded: #include "perfetto/protozero/message.h" // gen_amalgamated expanded: #include "perfetto/protozero/message_handle.h" // gen_amalgamated expanded: #include "perfetto/tracing/buffer_exhausted_policy.h" // gen_amalgamated expanded: #include "perfetto/tracing/core/forward_decls.h" // gen_amalgamated expanded: #include "perfetto/tracing/internal/basic_types.h" // gen_amalgamated expanded: #include "perfetto/tracing/internal/data_source_internal.h" +// gen_amalgamated expanded: #include "perfetto/tracing/internal/data_source_type.h" // gen_amalgamated expanded: #include "perfetto/tracing/internal/tracing_muxer.h" // gen_amalgamated expanded: #include "perfetto/tracing/locked_handle.h" // gen_amalgamated expanded: #include "perfetto/tracing/trace_writer_base.h" // gen_amalgamated expanded: #include "protos/perfetto/trace/trace_packet.pbzero.h" +// DEPRECATED: Instead of using this macro, prefer specifying symbol linkage +// attributes explicitly using the `_WITH_ATTRS` macro variants (e.g., +// PERFETTO_DECLARE_DATA_SOURCE_STATIC_MEMBERS_WITH_ATTRS). This avoids +// potential macro definition collisions between two libraries using Perfetto. +// // PERFETTO_COMPONENT_EXPORT is used to mark symbols in Perfetto's headers // (typically templates) that are defined by the user outside of Perfetto and // should be made visible outside the current module. (e.g., in Chrome's // component build). #if !defined(PERFETTO_COMPONENT_EXPORT) +#if PERFETTO_BUILDFLAG(PERFETTO_COMPILER_MSVC) +// Workaround for C4003: not enough arguments for function-like macro invocation +// 'PERFETTO_INTERNAL_DECLARE_TRACK_EVENT_DATA_SOURCE' +#define PERFETTO_COMPONENT_EXPORT __declspec() +#else #define PERFETTO_COMPONENT_EXPORT #endif +#endif namespace perfetto { namespace internal { @@ -9911,6 +10532,10 @@ template class TrackEventDataSource; } // namespace internal +namespace test { +class DataSourceInternalForTest; +} // namespace test + // Base class with the virtual methods to get start/stop notifications. // Embedders are supposed to derive the templated version below, not this one. class PERFETTO_EXPORT_COMPONENT DataSourceBase { @@ -9970,13 +10595,36 @@ class PERFETTO_EXPORT_COMPONENT DataSourceBase { uint32_t internal_instance_index = 0; }; virtual void OnStop(const StopArgs&); + + class ClearIncrementalStateArgs { + public: + // The index of this data source instance (0..kMaxDataSourceInstances - 1). + uint32_t internal_instance_index = 0; + }; + virtual void WillClearIncrementalState(const ClearIncrementalStateArgs&); + + class FlushArgs { + public: + virtual ~FlushArgs(); + + // HandleFlushAsynchronously() can be called to postpone acknowledging the + // flush request. This function returns a closure that must be invoked after + // the flush request has been processed. The returned closure can be called + // from any thread. + virtual std::function HandleFlushAsynchronously() const = 0; + + // The index of this data source instance (0..kMaxDataSourceInstances - 1). + uint32_t internal_instance_index = 0; + }; + // Called when the tracing service requests a Flush. Users can override this + // to tell other threads to flush their TraceContext for this data source + // (the library cannot execute code on all the threads on its own). + virtual void OnFlush(const FlushArgs&); }; struct DefaultDataSourceTraits { // |IncrementalStateType| can optionally be used store custom per-sequence - // incremental data (e.g., interning tables). It should have a Clear() method - // for when incremental state needs to be cleared. See - // TraceContext::GetIncrementalState(). + // incremental data (e.g., interning tables). using IncrementalStateType = void; // |TlsStateType| can optionally be used to store custom per-sequence // session data, which is not reset when incremental state is cleared @@ -9993,21 +10641,24 @@ struct DefaultDataSourceTraits { internal::DataSourceStaticState* static_state, internal::TracingTLS* root_tls) { auto* ds_tls = &root_tls->data_sources_tls[static_state->index]; - // The per-type TLS is either zero-initialized or must have been initialized - // for this specific data source type. - assert(!ds_tls->static_state || - ds_tls->static_state->index == static_state->index); + // ds_tls->static_state can be: + // * nullptr + // * equal to static_state + // * equal to the static state of a different data source, in tests (when + // ResetForTesting() has been used) + // In any case, there's no need to do anything, the caller will reinitialize + // static_state. return ds_tls; } }; // Templated base class meant to be derived by embedders to create a custom data -// source. DataSourceType must be the type of the derived class itself, e.g.: -// class MyDataSource : public DataSourceBase {...}. +// source. DerivedDataSource must be the type of the derived class itself, e.g.: +// class MyDataSource : public DataSource {...}. // // |DataSourceTraits| allows customizing the behavior of the data source. See // |DefaultDataSourceTraits|. -template class DataSource : public DataSourceBase { struct DefaultTracePointTraits; @@ -10019,6 +10670,20 @@ class DataSource : public DataSourceBase { constexpr static BufferExhaustedPolicy kBufferExhaustedPolicy = BufferExhaustedPolicy::kDrop; + // When this flag is false, we cannot have multiple instances of this data + // source. When a data source is already active and if we attempt + // to start another instance of that data source (via another tracing + // session), it will fail to start the second instance of data source. + static constexpr bool kSupportsMultipleInstances = true; + + // When this flag is true, DataSource callbacks (OnSetup, OnStart, etc.) are + // called under the lock (the same that is used in GetDataSourceLocked + // function). This is not recommended because it can lead to deadlocks, but + // it was the default behavior for a long time and some embedders rely on it + // to protect concurrent access to the DataSource members. So we keep the + // "true" value as the default. + static constexpr bool kRequiresCallbacksUnderLock = true; + // Argument passed to the lambda function passed to Trace() (below). class TraceContext { public: @@ -10033,6 +10698,21 @@ class DataSource : public DataSourceBase { Flush(); } + // Adds an empty trace packet to the trace to ensure that the service can + // safely read the last event from the trace buffer. + // See PERFETTO_INTERNAL_ADD_EMPTY_EVENT macros for context. + void AddEmptyTracePacket() { + // If nothing was written since the last empty packet, there's nothing to + // scrape, so adding more empty packets serves no purpose. + if (tls_inst_->trace_writer->written() == + tls_inst_->last_empty_packet_position) { + return; + } + tls_inst_->trace_writer->NewTracePacket(); + tls_inst_->last_empty_packet_position = + tls_inst_->trace_writer->written(); + } + TracePacketHandle NewTracePacket() { return tls_inst_->trace_writer->NewTracePacket(); } @@ -10067,13 +10747,14 @@ class DataSource : public DataSourceBase { // immediately before calling this. The caller is supposed to check for its // validity before using it. After checking, the handle is guaranteed to // remain valid until the handle goes out of scope. - LockedHandle GetDataSourceLocked() const { - auto* internal_state = static_state_.TryGet(instance_index_); + LockedHandle GetDataSourceLocked() const { + auto* internal_state = type_.static_state()->TryGet(instance_index_); if (!internal_state) - return LockedHandle(); - return LockedHandle( - &internal_state->lock, - static_cast(internal_state->data_source.get())); + return LockedHandle(); + std::unique_lock lock(internal_state->lock); + return LockedHandle( + std::move(lock), + static_cast(internal_state->data_source.get())); } // Post-condition: returned ptr will be non-null. @@ -10084,15 +10765,8 @@ class DataSource : public DataSourceBase { } typename DataSourceTraits::IncrementalStateType* GetIncrementalState() { - // Recreate incremental state data if it has been reset by the service. - if (tls_inst_->incremental_state_generation != - static_state_.incremental_state_generation.load( - std::memory_order_relaxed)) { - tls_inst_->incremental_state.reset(); - CreateIncrementalState(tls_inst_); - } - return reinterpret_cast( - tls_inst_->incremental_state.get()); + return static_cast( + type_.GetIncrementalState(tls_inst_, instance_index_)); } private: @@ -10135,7 +10809,8 @@ class DataSource : public DataSourceBase { {}) PERFETTO_ALWAYS_INLINE { // |instances| is a per-class bitmap that tells: // 1. If the data source is enabled at all. - // 2. The index of the slot within |static_state_| that holds the instance + // 2. The index of the slot within + // internal::DataSourceStaticState::instances that holds the instance // state. In turn this allows to map the data source to the tracing // session and buffers. // memory_order_relaxed is okay because: @@ -10162,110 +10837,27 @@ class DataSource : public DataSourceBase { // GetActiveInstances| to make it possible to use custom storage for // the data source enabled state. This is, for example, used by TrackEvent to // implement per-tracing category enabled states. - // - // TODO(primiano): all the stuff below should be outlined from the trace - // point. Or at least we should have some compile-time traits like - // kOptimizeBinarySize / kOptimizeTracingLatency. template static void TraceWithInstances( - uint32_t instances, + uint32_t cached_instances, Lambda tracing_fn, typename Traits::TracePointData trace_point_data = {}) { - PERFETTO_DCHECK(instances); - constexpr auto kMaxDataSourceInstances = internal::kMaxDataSourceInstances; + PERFETTO_DCHECK(cached_instances); - // See tracing_muxer.h for the structure of the TLS. - auto* tracing_impl = internal::TracingMuxer::Get(); - if (PERFETTO_UNLIKELY(!tls_state_)) - tls_state_ = GetOrCreateDataSourceTLS(&static_state_); - - // Avoid re-entering the trace point recursively. - if (PERFETTO_UNLIKELY(tls_state_->root_tls->is_in_trace_point)) + if (!type_.TracePrologue( + &tls_state_, &cached_instances, trace_point_data)) { return; - internal::ScopedReentrancyAnnotator scoped_annotator(*tls_state_->root_tls); - - // TracingTLS::generation is a global monotonic counter that is incremented - // every time a tracing session is stopped. We use that as a signal to force - // a slow-path garbage collection of all the trace writers for the current - // thread and to destroy the ones that belong to tracing sessions that have - // ended. This is to avoid having too many TraceWriter instances alive, each - // holding onto one chunk of the shared memory buffer. - // Rationale why memory_order_relaxed should be fine: - // - The TraceWriter object that we use is always constructed and destructed - // on the current thread. There is no risk of accessing a half-initialized - // TraceWriter (which would be really bad). - // - In the worst case, in the case of a race on the generation check, we - // might end up using a TraceWriter for the same data source that belongs - // to a stopped session. This is not really wrong, as we don't give any - // guarantee on the global atomicity of the stop. In the worst case the - // service will reject the data commit if this arrives too late. - - if (PERFETTO_UNLIKELY( - tls_state_->root_tls->generation != - tracing_impl->generation(std::memory_order_relaxed))) { - // Will update root_tls->generation. - tracing_impl->DestroyStoppedTraceWritersForCurrentThread(); } - for (uint32_t i = 0; i < kMaxDataSourceInstances; i++) { - internal::DataSourceState* instance_state = - static_state_.TryGetCached(instances, i); - if (!instance_state) - continue; - - // Even if we passed the check above, the DataSourceInstance might be - // still destroyed concurrently while this code runs. The code below is - // designed to deal with such race, as follows: - // - We don't access the user-defined data source instance state. The only - // bits of state we use are |backend_id| and |buffer_id|. - // - Beyond those two integers, we access only the TraceWriter here. The - // TraceWriter is always safe because it lives on the TLS. - // - |instance_state| is backed by static storage, so the pointer is - // always valid, even after the data source instance is destroyed. - // - In the case of a race-on-destruction, we'll still see the latest - // backend_id and buffer_id and in the worst case keep trying writing - // into the tracing shared memory buffer after stopped. But this isn't - // really any worse than the case of the stop IPC being delayed by the - // kernel scheduler. The tracing service is robust against data commit - // attemps made after tracing is stopped. - // There is a theoretical race that would case the wrong behavior w.r.t - // writing data in the wrong buffer, but it's so rare that we ignore it: - // if the data source is stopped and started kMaxDataSourceInstances - // times (so that the same id is recycled) while we are in this function, - // we might end up reusing the old data source's backend_id and buffer_id - // for the new one, because we don't see the generation change past this - // point. But stopping and starting tracing (even once) takes so much - // handshaking to make this extremely unrealistic. - - auto& tls_inst = tls_state_->per_instance[i]; - if (PERFETTO_UNLIKELY(!tls_inst.trace_writer)) { - // Here we need an acquire barrier, which matches the release-store made - // by TracingMuxerImpl::SetupDataSource(), to ensure that the backend_id - // and buffer_id are consistent. - instances = Traits::GetActiveInstances(trace_point_data) - ->load(std::memory_order_acquire); - instance_state = static_state_.TryGetCached(instances, i); - if (!instance_state || !instance_state->trace_lambda_enabled) - continue; - tls_inst.muxer_id_for_testing = instance_state->muxer_id_for_testing; - tls_inst.backend_id = instance_state->backend_id; - tls_inst.backend_connection_id = instance_state->backend_connection_id; - tls_inst.buffer_id = instance_state->buffer_id; - tls_inst.data_source_instance_id = - instance_state->data_source_instance_id; - tls_inst.is_intercepted = instance_state->interceptor_id != 0; - tls_inst.trace_writer = tracing_impl->CreateTraceWriter( - &static_state_, i, instance_state, - DataSourceType::kBufferExhaustedPolicy); - CreateIncrementalState(&tls_inst); - CreateDataSourceCustomTLS(TraceContext(&tls_inst, i)); - // Even in the case of out-of-IDs, SharedMemoryArbiterImpl returns a - // NullTraceWriter. The returned pointer should never be null. - assert(tls_inst.trace_writer); - } - - tracing_fn(TraceContext(&tls_inst, i)); + for (internal::DataSourceType::InstancesIterator it = + type_.BeginIteration(cached_instances, tls_state_, + trace_point_data); + it.instance; + type_.NextIteration(&it, tls_state_, trace_point_data)) { + tracing_fn(TraceContext(it.instance, it.i)); } + + type_.TraceEpilogue(tls_state_); } // Registers the data source on all tracing backends, including ones that @@ -10283,25 +10875,33 @@ class DataSource : public DataSourceBase { const Args&... constructor_args) { // Silences -Wunused-variable warning in case the trace method is not used // by the translation unit that declares the data source. - (void)static_state_; + (void)type_; (void)tls_state_; auto factory = [constructor_args...]() { return std::unique_ptr( - new DataSourceType(constructor_args...)); + new DerivedDataSource(constructor_args...)); }; - auto* tracing_impl = internal::TracingMuxer::Get(); - return tracing_impl->RegisterDataSource(descriptor, factory, - &static_state_); + internal::DataSourceParams params{ + DerivedDataSource::kSupportsMultipleInstances, + DerivedDataSource::kRequiresCallbacksUnderLock}; + return type_.Register( + descriptor, factory, params, DerivedDataSource::kBufferExhaustedPolicy, + GetCreateTlsFn( + static_cast(nullptr)), + GetCreateIncrementalStateFn( + static_cast( + nullptr)), + nullptr); } // Updates the data source descriptor. static void UpdateDescriptor(const DataSourceDescriptor& descriptor) { - auto* tracing_impl = internal::TracingMuxer::Get(); - tracing_impl->UpdateDataSourceDescriptor(descriptor, &static_state_); + type_.UpdateDescriptor(descriptor); } private: + friend ::perfetto::test::DataSourceInternalForTest; // Traits for customizing the behavior of a specific trace point. struct DefaultTracePointTraits { // By default, every call to DataSource::Trace() will record trace events @@ -10318,80 +10918,59 @@ class DataSource : public DataSourceBase { // implement per-category enabled states. struct TracePointData {}; static constexpr std::atomic* GetActiveInstances(TracePointData) { - return &static_state_.valid_instances; + return type_.valid_instances(); } }; - // Create the user provided incremental state in the given thread-local - // storage. Note: The second parameter here is used to specialize the case - // where there is no incremental state type. template - static void CreateIncrementalStateImpl( + static internal::DataSourceInstanceThreadLocalState::ObjectWithDeleter + CreateIncrementalState(internal::DataSourceInstanceThreadLocalState*, + uint32_t, + void*) { + return internal::DataSourceInstanceThreadLocalState::ObjectWithDeleter( + reinterpret_cast(new T()), + [](void* p) { delete reinterpret_cast(p); }); + } + + // The second parameter here is used to specialize the case where there is no + // incremental state type. + template + static internal::DataSourceType::CreateIncrementalStateFn + GetCreateIncrementalStateFn(const T*) { + return &CreateIncrementalState; + } + + static internal::DataSourceType::CreateIncrementalStateFn + GetCreateIncrementalStateFn(const void*) { + return nullptr; + } + + template + static internal::DataSourceInstanceThreadLocalState::ObjectWithDeleter + CreateDataSourceCustomTls( internal::DataSourceInstanceThreadLocalState* tls_inst, - const T*) { - PERFETTO_DCHECK(!tls_inst->incremental_state); - tls_inst->incremental_state_generation = - static_state_.incremental_state_generation.load( - std::memory_order_relaxed); - tls_inst->incremental_state = - internal::DataSourceInstanceThreadLocalState::ObjectWithDeleter( - reinterpret_cast(new T()), - [](void* p) { delete reinterpret_cast(p); }); + uint32_t instance_index, + void*) { + return internal::DataSourceInstanceThreadLocalState::ObjectWithDeleter( + reinterpret_cast(new T(TraceContext(tls_inst, instance_index))), + [](void* p) { delete reinterpret_cast(p); }); } - static void CreateIncrementalStateImpl( - internal::DataSourceInstanceThreadLocalState*, - const void*) {} - - static void CreateIncrementalState( - internal::DataSourceInstanceThreadLocalState* tls_inst) { - CreateIncrementalStateImpl( - tls_inst, - static_cast(nullptr)); - } - - // Create the user provided custom tls state in the given TraceContext's - // thread-local storage. Note: The second parameter here is used to - // specialize the case where there is no incremental state type. + // The second parameter here is used to specialize the case where there is no + // tls state type. template - static void CreateDataSourceCustomTLSImpl(const TraceContext& trace_context, - const T*) { - PERFETTO_DCHECK(!trace_context.tls_inst_->data_source_custom_tls); - trace_context.tls_inst_->data_source_custom_tls = - internal::DataSourceInstanceThreadLocalState::ObjectWithDeleter( - reinterpret_cast(new T(trace_context)), - [](void* p) { delete reinterpret_cast(p); }); + static internal::DataSourceType::CreateCustomTlsFn GetCreateTlsFn(const T*) { + return &CreateDataSourceCustomTls; } - static void CreateDataSourceCustomTLSImpl(const TraceContext&, const void*) {} - - static void CreateDataSourceCustomTLS(const TraceContext& trace_context) { - CreateDataSourceCustomTLSImpl( - trace_context, - static_cast(nullptr)); + static internal::DataSourceType::CreateCustomTlsFn GetCreateTlsFn( + const void*) { + return nullptr; } - // Note that the returned object is one per-thread per-data-source-type, NOT - // per data-source *instance*. - static internal::DataSourceThreadLocalState* GetOrCreateDataSourceTLS( - internal::DataSourceStaticState* static_state) { -#if PERFETTO_BUILDFLAG(PERFETTO_OS_IOS) - PERFETTO_FATAL("Data source TLS not supported on iOS, see b/158814068"); -#endif - auto* tracing_impl = internal::TracingMuxer::Get(); - internal::TracingTLS* root_tls = tracing_impl->GetOrCreateTracingTLS(); - internal::DataSourceThreadLocalState* ds_tls = - DataSourceTraits::GetDataSourceTLS(static_state, root_tls); - // We keep re-initializing as the initialization is idempotent and not worth - // the code for extra checks. - ds_tls->static_state = static_state; - assert(!ds_tls->root_tls || ds_tls->root_tls == root_tls); - ds_tls->root_tls = root_tls; - return ds_tls; - } - - // Static state. Accessed by the static Trace() method fastpaths. - static internal::DataSourceStaticState static_state_; + // The type of this data source. Accessed by the static Trace() method + // fastpaths. + static internal::DataSourceType type_; // This TLS object is a cached raw pointer and has deliberately no destructor. // The Platform implementation is supposed to create and manage the lifetime @@ -10405,7 +10984,7 @@ class DataSource : public DataSourceBase { // static template -internal::DataSourceStaticState DataSource::static_state_; +internal::DataSourceType DataSource::type_; // static template PERFETTO_THREAD_LOCAL internal::DataSourceThreadLocalState* @@ -10421,10 +11000,17 @@ PERFETTO_THREAD_LOCAL internal::DataSourceThreadLocalState* // This macro must be used once for each data source next to the data source's // declaration. -#define PERFETTO_DECLARE_DATA_SOURCE_STATIC_MEMBERS(...) \ - template <> \ - PERFETTO_COMPONENT_EXPORT perfetto::internal::DataSourceStaticState \ - perfetto::DataSource<__VA_ARGS__>::static_state_ +#define PERFETTO_DECLARE_DATA_SOURCE_STATIC_MEMBERS(...) \ + PERFETTO_DECLARE_DATA_SOURCE_STATIC_MEMBERS_WITH_ATTRS( \ + PERFETTO_COMPONENT_EXPORT, __VA_ARGS__) + +// Similar to `PERFETTO_DECLARE_DATA_SOURCE_STATIC_MEMBERS` but it also takes +// custom attributes, which are useful when DataSource is defined in a component +// where a component specific export macro is used. +#define PERFETTO_DECLARE_DATA_SOURCE_STATIC_MEMBERS_WITH_ATTRS(attrs, ...) \ + template <> \ + attrs perfetto::internal::DataSourceType \ + perfetto::DataSource<__VA_ARGS__>::type_ // This macro must be used once for each data source in one source file to // allocate static storage for the data source's static state. @@ -10433,202 +11019,20 @@ PERFETTO_THREAD_LOCAL internal::DataSourceThreadLocalState* // permissive- flag to enable standards-compliant mode. See // https://developercommunity.visualstudio.com/content/problem/319447/ // explicit-specialization-of-static-data-member-inco.html. -#define PERFETTO_DEFINE_DATA_SOURCE_STATIC_MEMBERS(...) \ - template <> \ - PERFETTO_COMPONENT_EXPORT perfetto::internal::DataSourceStaticState \ - perfetto::DataSource<__VA_ARGS__>::static_state_ {} +#define PERFETTO_DEFINE_DATA_SOURCE_STATIC_MEMBERS(...) \ + PERFETTO_DEFINE_DATA_SOURCE_STATIC_MEMBERS_WITH_ATTRS( \ + PERFETTO_COMPONENT_EXPORT, __VA_ARGS__) + +// Similar to `PERFETTO_DEFINE_DATA_SOURCE_STATIC_MEMBERS` but it also takes +// custom attributes, which are useful when DataSource is defined in a component +// where a component specific export macro is used. +#define PERFETTO_DEFINE_DATA_SOURCE_STATIC_MEMBERS_WITH_ATTRS(attrs, ...) \ + template <> \ + attrs perfetto::internal::DataSourceType \ + perfetto::DataSource<__VA_ARGS__>::type_ {} #endif // INCLUDE_PERFETTO_TRACING_DATA_SOURCE_H_ // gen_amalgamated begin header: include/perfetto/tracing/track_event.h -// gen_amalgamated begin header: include/perfetto/base/time.h -/* - * Copyright (C) 2018 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef INCLUDE_PERFETTO_BASE_TIME_H_ -#define INCLUDE_PERFETTO_BASE_TIME_H_ - -#include - -#include -#include - -// gen_amalgamated expanded: #include "perfetto/base/build_config.h" -// gen_amalgamated expanded: #include "perfetto/base/logging.h" - -#if PERFETTO_BUILDFLAG(PERFETTO_OS_APPLE) -#include -#include -#include -#include -#endif - -#if PERFETTO_BUILDFLAG(PERFETTO_OS_WASM) -#include -#endif - -namespace perfetto { -namespace base { - -using TimeSeconds = std::chrono::seconds; -using TimeMillis = std::chrono::milliseconds; -using TimeNanos = std::chrono::nanoseconds; - -inline TimeNanos FromPosixTimespec(const struct timespec& ts) { - return TimeNanos(ts.tv_sec * 1000000000LL + ts.tv_nsec); -} - -void SleepMicroseconds(unsigned interval_us); - -#if PERFETTO_BUILDFLAG(PERFETTO_OS_WIN) - -TimeNanos GetWallTimeNs(); -TimeNanos GetThreadCPUTimeNs(); - -// TODO: Clock that counts time during suspend is not implemented on Windows. -inline TimeNanos GetBootTimeNs() { - return GetWallTimeNs(); -} - -#elif PERFETTO_BUILDFLAG(PERFETTO_OS_APPLE) - -inline TimeNanos GetWallTimeNs() { - auto init_time_factor = []() -> uint64_t { - mach_timebase_info_data_t timebase_info; - mach_timebase_info(&timebase_info); - return timebase_info.numer / timebase_info.denom; - }; - - static uint64_t monotonic_timebase_factor = init_time_factor(); - return TimeNanos(mach_absolute_time() * monotonic_timebase_factor); -} - -// TODO: Clock that counts time during suspend is not implemented on Mac. -inline TimeNanos GetBootTimeNs() { - return GetWallTimeNs(); -} - -inline TimeNanos GetThreadCPUTimeNs() { - mach_port_t this_thread = mach_thread_self(); - mach_msg_type_number_t count = THREAD_BASIC_INFO_COUNT; - thread_basic_info_data_t info{}; - kern_return_t kr = - thread_info(this_thread, THREAD_BASIC_INFO, - reinterpret_cast(&info), &count); - mach_port_deallocate(mach_task_self(), this_thread); - - if (kr != KERN_SUCCESS) { - PERFETTO_DFATAL("Failed to get CPU time."); - return TimeNanos(0); - } - return TimeNanos(info.user_time.seconds * 1000000000LL + - info.user_time.microseconds * 1000LL + - info.system_time.seconds * 1000000000LL + - info.system_time.microseconds * 1000LL); -} - -#elif PERFETTO_BUILDFLAG(PERFETTO_OS_WASM) - -inline TimeNanos GetWallTimeNs() { - return TimeNanos(static_cast(emscripten_get_now()) * 1000000); -} - -inline TimeNanos GetThreadCPUTimeNs() { - return TimeNanos(0); -} - -// TODO: Clock that counts time during suspend is not implemented on WASM. -inline TimeNanos GetBootTimeNs() { - return GetWallTimeNs(); -} - -#elif PERFETTO_BUILDFLAG(PERFETTO_OS_NACL) - -// Tracing time doesn't need to work on NaCl since its going away shortly. We -// just need to compile on it. The only function NaCl could support is -// GetWallTimeNs(), but to prevent false hope we leave it unimplemented. - -inline TimeNanos GetWallTimeNs() { - return TimeNanos(0); -} - -inline TimeNanos GetThreadCPUTimeNs() { - return TimeNanos(0); -} - -inline TimeNanos GetBootTimeNs() { - return TimeNanos(0); -} - -#else // posix - -constexpr clockid_t kWallTimeClockSource = CLOCK_MONOTONIC; - -inline TimeNanos GetTimeInternalNs(clockid_t clk_id) { - struct timespec ts = {}; - PERFETTO_CHECK(clock_gettime(clk_id, &ts) == 0); - return FromPosixTimespec(ts); -} - -// Return ns from boot. Conversely to GetWallTimeNs, this clock counts also time -// during suspend (when supported). -inline TimeNanos GetBootTimeNs() { - // Determine if CLOCK_BOOTTIME is available on the first call. - static const clockid_t kBootTimeClockSource = [] { - struct timespec ts = {}; - int res = clock_gettime(CLOCK_BOOTTIME, &ts); - return res == 0 ? CLOCK_BOOTTIME : kWallTimeClockSource; - }(); - return GetTimeInternalNs(kBootTimeClockSource); -} - -inline TimeNanos GetWallTimeNs() { - return GetTimeInternalNs(kWallTimeClockSource); -} - -inline TimeNanos GetThreadCPUTimeNs() { - return GetTimeInternalNs(CLOCK_THREAD_CPUTIME_ID); -} -#endif - -inline TimeSeconds GetBootTimeS() { - return std::chrono::duration_cast(GetBootTimeNs()); -} - -inline TimeMillis GetWallTimeMs() { - return std::chrono::duration_cast(GetWallTimeNs()); -} - -inline TimeSeconds GetWallTimeS() { - return std::chrono::duration_cast(GetWallTimeNs()); -} - -inline struct timespec ToPosixTimespec(TimeMillis time) { - struct timespec ts {}; - const long time_s = static_cast(time.count() / 1000); - ts.tv_sec = time_s; - ts.tv_nsec = (static_cast(time.count()) - time_s * 1000L) * 1000000L; - return ts; -} - -std::string GetTimeFmt(const std::string& fmt); - -} // namespace base -} // namespace perfetto - -#endif // INCLUDE_PERFETTO_BASE_TIME_H_ // gen_amalgamated begin header: include/perfetto/tracing/internal/track_event_data_source.h // gen_amalgamated begin header: include/perfetto/base/template_util.h /* @@ -10833,7 +11237,7 @@ class FlatSet { #include -#include +#include #include // gen_amalgamated expanded: #include "perfetto/base/export.h" @@ -10868,8 +11272,8 @@ class PERFETTO_EXPORT_COMPONENT MessageArena { // Deletes the last message allocated. The |msg| argument is used only for // DCHECKs, it MUST be the pointer obtained by the last NewMessage() call. void DeleteLastMessage(Message* msg) { - PERFETTO_DCHECK(!blocks_.empty() && blocks_.back().entries > 0); - PERFETTO_DCHECK(&blocks_.back().storage[blocks_.back().entries - 1] == + PERFETTO_DCHECK(!blocks_.empty() && blocks_.front().entries > 0); + PERFETTO_DCHECK(&blocks_.front().storage[blocks_.front().entries - 1] == static_cast(msg)); DeleteLastMessageInternal(); } @@ -10881,7 +11285,7 @@ class PERFETTO_EXPORT_COMPONENT MessageArena { void Reset() { PERFETTO_DCHECK(!blocks_.empty()); blocks_.resize(1); - auto& block = blocks_.back(); + auto& block = blocks_.front(); block.entries = 0; PERFETTO_ASAN_POISON(block.storage, sizeof(block.storage)); } @@ -10901,7 +11305,7 @@ class PERFETTO_EXPORT_COMPONENT MessageArena { // blocks are used to hand out pointers and must not be moved. Hence why // std::list rather than std::vector. - std::list blocks_; + std::forward_list blocks_; }; } // namespace protozero @@ -11242,16 +11646,39 @@ namespace pbzero { class DebugAnnotation; class DebugAnnotation_NestedValue; -enum DebugAnnotation_NestedValue_NestedType : int32_t; +namespace perfetto_pbzero_enum_DebugAnnotation_NestedValue { +enum NestedType : int32_t; +} // namespace perfetto_pbzero_enum_DebugAnnotation_NestedValue +using DebugAnnotation_NestedValue_NestedType = perfetto_pbzero_enum_DebugAnnotation_NestedValue::NestedType; -enum DebugAnnotation_NestedValue_NestedType : int32_t { - DebugAnnotation_NestedValue_NestedType_UNSPECIFIED = 0, - DebugAnnotation_NestedValue_NestedType_DICT = 1, - DebugAnnotation_NestedValue_NestedType_ARRAY = 2, +namespace perfetto_pbzero_enum_DebugAnnotation_NestedValue { +enum NestedType : int32_t { + UNSPECIFIED = 0, + DICT = 1, + ARRAY = 2, }; +} // namespace perfetto_pbzero_enum_DebugAnnotation_NestedValue +using DebugAnnotation_NestedValue_NestedType = perfetto_pbzero_enum_DebugAnnotation_NestedValue::NestedType; -const DebugAnnotation_NestedValue_NestedType DebugAnnotation_NestedValue_NestedType_MIN = DebugAnnotation_NestedValue_NestedType_UNSPECIFIED; -const DebugAnnotation_NestedValue_NestedType DebugAnnotation_NestedValue_NestedType_MAX = DebugAnnotation_NestedValue_NestedType_ARRAY; + +constexpr DebugAnnotation_NestedValue_NestedType DebugAnnotation_NestedValue_NestedType_MIN = DebugAnnotation_NestedValue_NestedType::UNSPECIFIED; +constexpr DebugAnnotation_NestedValue_NestedType DebugAnnotation_NestedValue_NestedType_MAX = DebugAnnotation_NestedValue_NestedType::ARRAY; + + +PERFETTO_PROTOZERO_CONSTEXPR14_OR_INLINE +const char* DebugAnnotation_NestedValue_NestedType_Name(::perfetto::protos::pbzero::DebugAnnotation_NestedValue_NestedType value) { + switch (value) { + case ::perfetto::protos::pbzero::DebugAnnotation_NestedValue_NestedType::UNSPECIFIED: + return "UNSPECIFIED"; + + case ::perfetto::protos::pbzero::DebugAnnotation_NestedValue_NestedType::DICT: + return "DICT"; + + case ::perfetto::protos::pbzero::DebugAnnotation_NestedValue_NestedType::ARRAY: + return "ARRAY"; + } + return "PBZERO_UNKNOWN_ENUM_VALUE"; +} class DebugAnnotationValueTypeName_Decoder : public ::protozero::TypedProtoDecoder { public: @@ -11282,14 +11709,7 @@ class DebugAnnotationValueTypeName : public ::protozero::Message { uint64_t, DebugAnnotationValueTypeName>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Iid kIid() { return {}; } + static constexpr FieldMetadata_Iid kIid{}; void set_iid(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Iid::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -11307,17 +11727,13 @@ class DebugAnnotationValueTypeName : public ::protozero::Message { std::string, DebugAnnotationValueTypeName>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Name kName() { return {}; } + static constexpr FieldMetadata_Name kName{}; void set_name(const char* data, size_t size) { AppendBytes(FieldMetadata_Name::kFieldId, data, size); } + void set_name(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Name::kFieldId, chars.data, chars.size); + } void set_name(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Name::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -11357,14 +11773,7 @@ class DebugAnnotationName : public ::protozero::Message { uint64_t, DebugAnnotationName>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Iid kIid() { return {}; } + static constexpr FieldMetadata_Iid kIid{}; void set_iid(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Iid::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -11382,17 +11791,13 @@ class DebugAnnotationName : public ::protozero::Message { std::string, DebugAnnotationName>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Name kName() { return {}; } + static constexpr FieldMetadata_Name kName{}; void set_name(const char* data, size_t size) { AppendBytes(FieldMetadata_Name::kFieldId, data, size); } + void set_name(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Name::kFieldId, chars.data, chars.size); + } void set_name(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Name::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -11403,7 +11808,7 @@ class DebugAnnotationName : public ::protozero::Message { } }; -class DebugAnnotation_Decoder : public ::protozero::TypedProtoDecoder { +class DebugAnnotation_Decoder : public ::protozero::TypedProtoDecoder { public: DebugAnnotation_Decoder(const uint8_t* data, size_t len) : TypedProtoDecoder(data, len) {} explicit DebugAnnotation_Decoder(const std::string& raw) : TypedProtoDecoder(reinterpret_cast(raw.data()), raw.size()) {} @@ -11420,14 +11825,16 @@ class DebugAnnotation_Decoder : public ::protozero::TypedProtoDecoder().as_int64(); } bool has_double_value() const { return at<5>().valid(); } double double_value() const { return at<5>().as_double(); } - bool has_string_value() const { return at<6>().valid(); } - ::protozero::ConstChars string_value() const { return at<6>().as_string(); } bool has_pointer_value() const { return at<7>().valid(); } uint64_t pointer_value() const { return at<7>().as_uint64(); } bool has_nested_value() const { return at<8>().valid(); } ::protozero::ConstBytes nested_value() const { return at<8>().as_bytes(); } bool has_legacy_json_value() const { return at<9>().valid(); } ::protozero::ConstChars legacy_json_value() const { return at<9>().as_string(); } + bool has_string_value() const { return at<6>().valid(); } + ::protozero::ConstChars string_value() const { return at<6>().as_string(); } + bool has_string_value_iid() const { return at<17>().valid(); } + uint64_t string_value_iid() const { return at<17>().as_uint64(); } bool has_proto_type_name() const { return at<16>().valid(); } ::protozero::ConstChars proto_type_name() const { return at<16>().as_string(); } bool has_proto_type_name_iid() const { return at<13>().valid(); } @@ -11450,10 +11857,11 @@ class DebugAnnotation : public ::protozero::Message { kUintValueFieldNumber = 3, kIntValueFieldNumber = 4, kDoubleValueFieldNumber = 5, - kStringValueFieldNumber = 6, kPointerValueFieldNumber = 7, kNestedValueFieldNumber = 8, kLegacyJsonValueFieldNumber = 9, + kStringValueFieldNumber = 6, + kStringValueIidFieldNumber = 17, kProtoTypeNameFieldNumber = 16, kProtoTypeNameIidFieldNumber = 13, kProtoValueFieldNumber = 14, @@ -11472,14 +11880,7 @@ class DebugAnnotation : public ::protozero::Message { uint64_t, DebugAnnotation>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_NameIid kNameIid() { return {}; } + static constexpr FieldMetadata_NameIid kNameIid{}; void set_name_iid(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_NameIid::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -11497,17 +11898,13 @@ class DebugAnnotation : public ::protozero::Message { std::string, DebugAnnotation>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Name kName() { return {}; } + static constexpr FieldMetadata_Name kName{}; void set_name(const char* data, size_t size) { AppendBytes(FieldMetadata_Name::kFieldId, data, size); } + void set_name(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Name::kFieldId, chars.data, chars.size); + } void set_name(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Name::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -11525,14 +11922,7 @@ class DebugAnnotation : public ::protozero::Message { bool, DebugAnnotation>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_BoolValue kBoolValue() { return {}; } + static constexpr FieldMetadata_BoolValue kBoolValue{}; void set_bool_value(bool value) { static constexpr uint32_t field_id = FieldMetadata_BoolValue::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -11550,14 +11940,7 @@ class DebugAnnotation : public ::protozero::Message { uint64_t, DebugAnnotation>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_UintValue kUintValue() { return {}; } + static constexpr FieldMetadata_UintValue kUintValue{}; void set_uint_value(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_UintValue::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -11575,14 +11958,7 @@ class DebugAnnotation : public ::protozero::Message { int64_t, DebugAnnotation>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_IntValue kIntValue() { return {}; } + static constexpr FieldMetadata_IntValue kIntValue{}; void set_int_value(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_IntValue::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -11600,14 +11976,7 @@ class DebugAnnotation : public ::protozero::Message { double, DebugAnnotation>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_DoubleValue kDoubleValue() { return {}; } + static constexpr FieldMetadata_DoubleValue kDoubleValue{}; void set_double_value(double value) { static constexpr uint32_t field_id = FieldMetadata_DoubleValue::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -11617,34 +11986,6 @@ class DebugAnnotation : public ::protozero::Message { ::Append(*this, field_id, value); } - using FieldMetadata_StringValue = - ::protozero::proto_utils::FieldMetadata< - 6, - ::protozero::proto_utils::RepetitionType::kNotRepeated, - ::protozero::proto_utils::ProtoSchemaType::kString, - std::string, - DebugAnnotation>; - - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_StringValue kStringValue() { return {}; } - void set_string_value(const char* data, size_t size) { - AppendBytes(FieldMetadata_StringValue::kFieldId, data, size); - } - void set_string_value(std::string value) { - static constexpr uint32_t field_id = FieldMetadata_StringValue::kFieldId; - // Call the appropriate protozero::Message::Append(field_id, ...) - // method based on the type of the field. - ::protozero::internal::FieldWriter< - ::protozero::proto_utils::ProtoSchemaType::kString> - ::Append(*this, field_id, value); - } - using FieldMetadata_PointerValue = ::protozero::proto_utils::FieldMetadata< 7, @@ -11653,14 +11994,7 @@ class DebugAnnotation : public ::protozero::Message { uint64_t, DebugAnnotation>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_PointerValue kPointerValue() { return {}; } + static constexpr FieldMetadata_PointerValue kPointerValue{}; void set_pointer_value(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_PointerValue::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -11678,14 +12012,7 @@ class DebugAnnotation : public ::protozero::Message { DebugAnnotation_NestedValue, DebugAnnotation>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_NestedValue kNestedValue() { return {}; } + static constexpr FieldMetadata_NestedValue kNestedValue{}; template T* set_nested_value() { return BeginNestedMessage(8); } @@ -11699,17 +12026,13 @@ class DebugAnnotation : public ::protozero::Message { std::string, DebugAnnotation>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_LegacyJsonValue kLegacyJsonValue() { return {}; } + static constexpr FieldMetadata_LegacyJsonValue kLegacyJsonValue{}; void set_legacy_json_value(const char* data, size_t size) { AppendBytes(FieldMetadata_LegacyJsonValue::kFieldId, data, size); } + void set_legacy_json_value(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_LegacyJsonValue::kFieldId, chars.data, chars.size); + } void set_legacy_json_value(std::string value) { static constexpr uint32_t field_id = FieldMetadata_LegacyJsonValue::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -11719,6 +12042,48 @@ class DebugAnnotation : public ::protozero::Message { ::Append(*this, field_id, value); } + using FieldMetadata_StringValue = + ::protozero::proto_utils::FieldMetadata< + 6, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kString, + std::string, + DebugAnnotation>; + + static constexpr FieldMetadata_StringValue kStringValue{}; + void set_string_value(const char* data, size_t size) { + AppendBytes(FieldMetadata_StringValue::kFieldId, data, size); + } + void set_string_value(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_StringValue::kFieldId, chars.data, chars.size); + } + void set_string_value(std::string value) { + static constexpr uint32_t field_id = FieldMetadata_StringValue::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kString> + ::Append(*this, field_id, value); + } + + using FieldMetadata_StringValueIid = + ::protozero::proto_utils::FieldMetadata< + 17, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint64, + uint64_t, + DebugAnnotation>; + + static constexpr FieldMetadata_StringValueIid kStringValueIid{}; + void set_string_value_iid(uint64_t value) { + static constexpr uint32_t field_id = FieldMetadata_StringValueIid::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint64> + ::Append(*this, field_id, value); + } + using FieldMetadata_ProtoTypeName = ::protozero::proto_utils::FieldMetadata< 16, @@ -11727,17 +12092,13 @@ class DebugAnnotation : public ::protozero::Message { std::string, DebugAnnotation>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ProtoTypeName kProtoTypeName() { return {}; } + static constexpr FieldMetadata_ProtoTypeName kProtoTypeName{}; void set_proto_type_name(const char* data, size_t size) { AppendBytes(FieldMetadata_ProtoTypeName::kFieldId, data, size); } + void set_proto_type_name(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_ProtoTypeName::kFieldId, chars.data, chars.size); + } void set_proto_type_name(std::string value) { static constexpr uint32_t field_id = FieldMetadata_ProtoTypeName::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -11755,14 +12116,7 @@ class DebugAnnotation : public ::protozero::Message { uint64_t, DebugAnnotation>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ProtoTypeNameIid kProtoTypeNameIid() { return {}; } + static constexpr FieldMetadata_ProtoTypeNameIid kProtoTypeNameIid{}; void set_proto_type_name_iid(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_ProtoTypeNameIid::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -11780,17 +12134,13 @@ class DebugAnnotation : public ::protozero::Message { std::string, DebugAnnotation>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ProtoValue kProtoValue() { return {}; } + static constexpr FieldMetadata_ProtoValue kProtoValue{}; void set_proto_value(const uint8_t* data, size_t size) { AppendBytes(FieldMetadata_ProtoValue::kFieldId, data, size); } + void set_proto_value(::protozero::ConstBytes bytes) { + AppendBytes(FieldMetadata_ProtoValue::kFieldId, bytes.data, bytes.size); + } void set_proto_value(std::string value) { static constexpr uint32_t field_id = FieldMetadata_ProtoValue::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -11808,14 +12158,7 @@ class DebugAnnotation : public ::protozero::Message { DebugAnnotation, DebugAnnotation>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_DictEntries kDictEntries() { return {}; } + static constexpr FieldMetadata_DictEntries kDictEntries{}; template T* add_dict_entries() { return BeginNestedMessage(11); } @@ -11829,14 +12172,7 @@ class DebugAnnotation : public ::protozero::Message { DebugAnnotation, DebugAnnotation>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ArrayValues kArrayValues() { return {}; } + static constexpr FieldMetadata_ArrayValues kArrayValues{}; template T* add_array_values() { return BeginNestedMessage(12); } @@ -11881,10 +12217,14 @@ class DebugAnnotation_NestedValue : public ::protozero::Message { }; static constexpr const char* GetName() { return ".perfetto.protos.DebugAnnotation.NestedValue"; } + using NestedType = ::perfetto::protos::pbzero::DebugAnnotation_NestedValue_NestedType; - static const NestedType UNSPECIFIED = DebugAnnotation_NestedValue_NestedType_UNSPECIFIED; - static const NestedType DICT = DebugAnnotation_NestedValue_NestedType_DICT; - static const NestedType ARRAY = DebugAnnotation_NestedValue_NestedType_ARRAY; + static inline const char* NestedType_Name(NestedType value) { + return ::perfetto::protos::pbzero::DebugAnnotation_NestedValue_NestedType_Name(value); + } + static const NestedType UNSPECIFIED = NestedType::UNSPECIFIED; + static const NestedType DICT = NestedType::DICT; + static const NestedType ARRAY = NestedType::ARRAY; using FieldMetadata_NestedType = ::protozero::proto_utils::FieldMetadata< @@ -11894,14 +12234,7 @@ class DebugAnnotation_NestedValue : public ::protozero::Message { ::perfetto::protos::pbzero::DebugAnnotation_NestedValue_NestedType, DebugAnnotation_NestedValue>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_NestedType kNestedType() { return {}; } + static constexpr FieldMetadata_NestedType kNestedType{}; void set_nested_type(::perfetto::protos::pbzero::DebugAnnotation_NestedValue_NestedType value) { static constexpr uint32_t field_id = FieldMetadata_NestedType::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -11919,17 +12252,13 @@ class DebugAnnotation_NestedValue : public ::protozero::Message { std::string, DebugAnnotation_NestedValue>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_DictKeys kDictKeys() { return {}; } + static constexpr FieldMetadata_DictKeys kDictKeys{}; void add_dict_keys(const char* data, size_t size) { AppendBytes(FieldMetadata_DictKeys::kFieldId, data, size); } + void add_dict_keys(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_DictKeys::kFieldId, chars.data, chars.size); + } void add_dict_keys(std::string value) { static constexpr uint32_t field_id = FieldMetadata_DictKeys::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -11947,14 +12276,7 @@ class DebugAnnotation_NestedValue : public ::protozero::Message { DebugAnnotation_NestedValue, DebugAnnotation_NestedValue>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_DictValues kDictValues() { return {}; } + static constexpr FieldMetadata_DictValues kDictValues{}; template T* add_dict_values() { return BeginNestedMessage(3); } @@ -11968,14 +12290,7 @@ class DebugAnnotation_NestedValue : public ::protozero::Message { DebugAnnotation_NestedValue, DebugAnnotation_NestedValue>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ArrayValues kArrayValues() { return {}; } + static constexpr FieldMetadata_ArrayValues kArrayValues{}; template T* add_array_values() { return BeginNestedMessage(4); } @@ -11989,14 +12304,7 @@ class DebugAnnotation_NestedValue : public ::protozero::Message { int64_t, DebugAnnotation_NestedValue>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_IntValue kIntValue() { return {}; } + static constexpr FieldMetadata_IntValue kIntValue{}; void set_int_value(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_IntValue::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -12014,14 +12322,7 @@ class DebugAnnotation_NestedValue : public ::protozero::Message { double, DebugAnnotation_NestedValue>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_DoubleValue kDoubleValue() { return {}; } + static constexpr FieldMetadata_DoubleValue kDoubleValue{}; void set_double_value(double value) { static constexpr uint32_t field_id = FieldMetadata_DoubleValue::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -12039,14 +12340,7 @@ class DebugAnnotation_NestedValue : public ::protozero::Message { bool, DebugAnnotation_NestedValue>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_BoolValue kBoolValue() { return {}; } + static constexpr FieldMetadata_BoolValue kBoolValue{}; void set_bool_value(bool value) { static constexpr uint32_t field_id = FieldMetadata_BoolValue::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -12064,17 +12358,13 @@ class DebugAnnotation_NestedValue : public ::protozero::Message { std::string, DebugAnnotation_NestedValue>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_StringValue kStringValue() { return {}; } + static constexpr FieldMetadata_StringValue kStringValue{}; void set_string_value(const char* data, size_t size) { AppendBytes(FieldMetadata_StringValue::kFieldId, data, size); } + void set_string_value(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_StringValue::kFieldId, chars.data, chars.size); + } void set_string_value(std::string value) { static constexpr uint32_t field_id = FieldMetadata_StringValue::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -12259,6 +12549,7 @@ class CheckedScope { #define INCLUDE_PERFETTO_TRACING_STRING_HELPERS_H_ // gen_amalgamated expanded: #include "perfetto/base/export.h" +// gen_amalgamated expanded: #include "perfetto/base/logging.h" #include #include @@ -12287,7 +12578,10 @@ class PERFETTO_EXPORT_COMPONENT DynamicString { public: explicit DynamicString(const std::string& str) : value(str.data()), length(str.length()) {} - explicit DynamicString(const char* str) : value(str), length(strlen(str)) {} + explicit DynamicString(const char* str) : value(str) { + PERFETTO_DCHECK(str); + length = strlen(str); + } DynamicString(const char* str, size_t len) : value(str), length(len) {} const char* value; @@ -12381,7 +12675,7 @@ class EventContext; // about tracing). // // -// After definiting a conversion method, the object can be used directly as a +// After defining a conversion method, the object can be used directly as a // TRACE_EVENT argument: // // Foo foo; @@ -12492,9 +12786,9 @@ class PERFETTO_EXPORT_COMPONENT TracedValue { static TracedValue CreateFromProto(protos::pbzero::DebugAnnotation* proto, EventContext* event_context = nullptr); - inline explicit TracedValue(protos::pbzero::DebugAnnotation* annotation, - EventContext* event_context, - internal::CheckedScope* parent_scope) + inline TracedValue(protos::pbzero::DebugAnnotation* annotation, + EventContext* event_context, + internal::CheckedScope* parent_scope) : annotation_(annotation), event_context_(event_context), checked_scope_(parent_scope) {} @@ -12543,9 +12837,9 @@ class PERFETTO_EXPORT_COMPONENT TracedArray { private: friend class TracedValue; - inline explicit TracedArray(protos::pbzero::DebugAnnotation* annotation, - EventContext* event_context, - internal::CheckedScope* parent_scope) + inline TracedArray(protos::pbzero::DebugAnnotation* annotation, + EventContext* event_context, + internal::CheckedScope* parent_scope) : annotation_(annotation), event_context_(event_context), checked_scope_(parent_scope) {} @@ -12601,11 +12895,10 @@ class PERFETTO_EXPORT_COMPONENT TracedDictionary { // Create a |TracedDictionary| which will populate the given field of the // given |message|. template - inline explicit TracedDictionary( - MessageType* message, - protozero::proto_utils::internal::FieldMetadataHelper, - EventContext* event_context, - internal::CheckedScope* parent_scope) + inline TracedDictionary(MessageType* message, + FieldMetadata, + EventContext* event_context, + internal::CheckedScope* parent_scope) : message_(message), field_id_(FieldMetadata::kFieldId), event_context_(event_context), @@ -13017,93 +13310,6 @@ struct TraceFormatTraits { #endif // INCLUDE_PERFETTO_TRACING_TRACED_VALUE_H_ // gen_amalgamated begin header: include/perfetto/tracing/track.h -// gen_amalgamated begin header: include/perfetto/base/thread_utils.h -/* - * Copyright (C) 2018 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef INCLUDE_PERFETTO_BASE_THREAD_UTILS_H_ -#define INCLUDE_PERFETTO_BASE_THREAD_UTILS_H_ - -#include - -// gen_amalgamated expanded: #include "perfetto/base/build_config.h" - -#if PERFETTO_BUILDFLAG(PERFETTO_OS_WIN) -extern "C" { -// Prototype extracted from the Windows SDK to avoid including windows.h. -__declspec(dllimport) unsigned long __stdcall GetCurrentThreadId(); -} -#elif PERFETTO_BUILDFLAG(PERFETTO_OS_FUCHSIA) -#include -#include -#elif PERFETTO_BUILDFLAG(PERFETTO_OS_LINUX) || \ - PERFETTO_BUILDFLAG(PERFETTO_OS_ANDROID) -#include -#include -#include -#else -#include -#endif - -namespace perfetto { -namespace base { - -#if PERFETTO_BUILDFLAG(PERFETTO_OS_ANDROID) -using PlatformThreadId = pid_t; -inline PlatformThreadId GetThreadId() { - return gettid(); -} -#elif PERFETTO_BUILDFLAG(PERFETTO_OS_LINUX) -using PlatformThreadId = pid_t; -inline PlatformThreadId GetThreadId() { - return static_cast(syscall(__NR_gettid)); -} -#elif PERFETTO_BUILDFLAG(PERFETTO_OS_FUCHSIA) -using PlatformThreadId = zx_handle_t; -inline PlatformThreadId GetThreadId() { - return zx_thread_self(); -} -#elif PERFETTO_BUILDFLAG(PERFETTO_OS_APPLE) -using PlatformThreadId = uint64_t; -inline PlatformThreadId GetThreadId() { - uint64_t tid; - pthread_threadid_np(nullptr, &tid); - return tid; -} -#elif PERFETTO_BUILDFLAG(PERFETTO_OS_WIN) -using PlatformThreadId = uint64_t; -inline PlatformThreadId GetThreadId() { - return static_cast(GetCurrentThreadId()); -} -#elif PERFETTO_BUILDFLAG(PERFETTO_OS_NACL) -using PlatformThreadId = pid_t; -inline PlatformThreadId GetThreadId() { - return reinterpret_cast(pthread_self()); -} -#else // Default to pthreads in case no OS is set. -using PlatformThreadId = pthread_t; -inline PlatformThreadId GetThreadId() { - return pthread_self(); -} -#endif - -} // namespace base -} // namespace perfetto - -#endif // INCLUDE_PERFETTO_BASE_THREAD_UTILS_H_ // gen_amalgamated begin header: include/perfetto/tracing/internal/compile_time_hash.h /* * Copyright (C) 2021 The Android Open Source Project @@ -13316,27 +13522,76 @@ namespace perfetto { namespace protos { namespace pbzero { -enum CounterDescriptor_BuiltinCounterType : int32_t; -enum CounterDescriptor_Unit : int32_t; +namespace perfetto_pbzero_enum_CounterDescriptor { +enum BuiltinCounterType : int32_t; +} // namespace perfetto_pbzero_enum_CounterDescriptor +using CounterDescriptor_BuiltinCounterType = perfetto_pbzero_enum_CounterDescriptor::BuiltinCounterType; +namespace perfetto_pbzero_enum_CounterDescriptor { +enum Unit : int32_t; +} // namespace perfetto_pbzero_enum_CounterDescriptor +using CounterDescriptor_Unit = perfetto_pbzero_enum_CounterDescriptor::Unit; -enum CounterDescriptor_BuiltinCounterType : int32_t { - CounterDescriptor_BuiltinCounterType_COUNTER_UNSPECIFIED = 0, - CounterDescriptor_BuiltinCounterType_COUNTER_THREAD_TIME_NS = 1, - CounterDescriptor_BuiltinCounterType_COUNTER_THREAD_INSTRUCTION_COUNT = 2, +namespace perfetto_pbzero_enum_CounterDescriptor { +enum BuiltinCounterType : int32_t { + COUNTER_UNSPECIFIED = 0, + COUNTER_THREAD_TIME_NS = 1, + COUNTER_THREAD_INSTRUCTION_COUNT = 2, }; +} // namespace perfetto_pbzero_enum_CounterDescriptor +using CounterDescriptor_BuiltinCounterType = perfetto_pbzero_enum_CounterDescriptor::BuiltinCounterType; -const CounterDescriptor_BuiltinCounterType CounterDescriptor_BuiltinCounterType_MIN = CounterDescriptor_BuiltinCounterType_COUNTER_UNSPECIFIED; -const CounterDescriptor_BuiltinCounterType CounterDescriptor_BuiltinCounterType_MAX = CounterDescriptor_BuiltinCounterType_COUNTER_THREAD_INSTRUCTION_COUNT; -enum CounterDescriptor_Unit : int32_t { - CounterDescriptor_Unit_UNIT_UNSPECIFIED = 0, - CounterDescriptor_Unit_UNIT_TIME_NS = 1, - CounterDescriptor_Unit_UNIT_COUNT = 2, - CounterDescriptor_Unit_UNIT_SIZE_BYTES = 3, +constexpr CounterDescriptor_BuiltinCounterType CounterDescriptor_BuiltinCounterType_MIN = CounterDescriptor_BuiltinCounterType::COUNTER_UNSPECIFIED; +constexpr CounterDescriptor_BuiltinCounterType CounterDescriptor_BuiltinCounterType_MAX = CounterDescriptor_BuiltinCounterType::COUNTER_THREAD_INSTRUCTION_COUNT; + + +PERFETTO_PROTOZERO_CONSTEXPR14_OR_INLINE +const char* CounterDescriptor_BuiltinCounterType_Name(::perfetto::protos::pbzero::CounterDescriptor_BuiltinCounterType value) { + switch (value) { + case ::perfetto::protos::pbzero::CounterDescriptor_BuiltinCounterType::COUNTER_UNSPECIFIED: + return "COUNTER_UNSPECIFIED"; + + case ::perfetto::protos::pbzero::CounterDescriptor_BuiltinCounterType::COUNTER_THREAD_TIME_NS: + return "COUNTER_THREAD_TIME_NS"; + + case ::perfetto::protos::pbzero::CounterDescriptor_BuiltinCounterType::COUNTER_THREAD_INSTRUCTION_COUNT: + return "COUNTER_THREAD_INSTRUCTION_COUNT"; + } + return "PBZERO_UNKNOWN_ENUM_VALUE"; +} + +namespace perfetto_pbzero_enum_CounterDescriptor { +enum Unit : int32_t { + UNIT_UNSPECIFIED = 0, + UNIT_TIME_NS = 1, + UNIT_COUNT = 2, + UNIT_SIZE_BYTES = 3, }; +} // namespace perfetto_pbzero_enum_CounterDescriptor +using CounterDescriptor_Unit = perfetto_pbzero_enum_CounterDescriptor::Unit; -const CounterDescriptor_Unit CounterDescriptor_Unit_MIN = CounterDescriptor_Unit_UNIT_UNSPECIFIED; -const CounterDescriptor_Unit CounterDescriptor_Unit_MAX = CounterDescriptor_Unit_UNIT_SIZE_BYTES; + +constexpr CounterDescriptor_Unit CounterDescriptor_Unit_MIN = CounterDescriptor_Unit::UNIT_UNSPECIFIED; +constexpr CounterDescriptor_Unit CounterDescriptor_Unit_MAX = CounterDescriptor_Unit::UNIT_SIZE_BYTES; + + +PERFETTO_PROTOZERO_CONSTEXPR14_OR_INLINE +const char* CounterDescriptor_Unit_Name(::perfetto::protos::pbzero::CounterDescriptor_Unit value) { + switch (value) { + case ::perfetto::protos::pbzero::CounterDescriptor_Unit::UNIT_UNSPECIFIED: + return "UNIT_UNSPECIFIED"; + + case ::perfetto::protos::pbzero::CounterDescriptor_Unit::UNIT_TIME_NS: + return "UNIT_TIME_NS"; + + case ::perfetto::protos::pbzero::CounterDescriptor_Unit::UNIT_COUNT: + return "UNIT_COUNT"; + + case ::perfetto::protos::pbzero::CounterDescriptor_Unit::UNIT_SIZE_BYTES: + return "UNIT_SIZE_BYTES"; + } + return "PBZERO_UNKNOWN_ENUM_VALUE"; +} class CounterDescriptor_Decoder : public ::protozero::TypedProtoDecoder { public: @@ -13370,15 +13625,23 @@ class CounterDescriptor : public ::protozero::Message { }; static constexpr const char* GetName() { return ".perfetto.protos.CounterDescriptor"; } + using BuiltinCounterType = ::perfetto::protos::pbzero::CounterDescriptor_BuiltinCounterType; + static inline const char* BuiltinCounterType_Name(BuiltinCounterType value) { + return ::perfetto::protos::pbzero::CounterDescriptor_BuiltinCounterType_Name(value); + } + using Unit = ::perfetto::protos::pbzero::CounterDescriptor_Unit; - static const BuiltinCounterType COUNTER_UNSPECIFIED = CounterDescriptor_BuiltinCounterType_COUNTER_UNSPECIFIED; - static const BuiltinCounterType COUNTER_THREAD_TIME_NS = CounterDescriptor_BuiltinCounterType_COUNTER_THREAD_TIME_NS; - static const BuiltinCounterType COUNTER_THREAD_INSTRUCTION_COUNT = CounterDescriptor_BuiltinCounterType_COUNTER_THREAD_INSTRUCTION_COUNT; - static const Unit UNIT_UNSPECIFIED = CounterDescriptor_Unit_UNIT_UNSPECIFIED; - static const Unit UNIT_TIME_NS = CounterDescriptor_Unit_UNIT_TIME_NS; - static const Unit UNIT_COUNT = CounterDescriptor_Unit_UNIT_COUNT; - static const Unit UNIT_SIZE_BYTES = CounterDescriptor_Unit_UNIT_SIZE_BYTES; + static inline const char* Unit_Name(Unit value) { + return ::perfetto::protos::pbzero::CounterDescriptor_Unit_Name(value); + } + static const BuiltinCounterType COUNTER_UNSPECIFIED = BuiltinCounterType::COUNTER_UNSPECIFIED; + static const BuiltinCounterType COUNTER_THREAD_TIME_NS = BuiltinCounterType::COUNTER_THREAD_TIME_NS; + static const BuiltinCounterType COUNTER_THREAD_INSTRUCTION_COUNT = BuiltinCounterType::COUNTER_THREAD_INSTRUCTION_COUNT; + static const Unit UNIT_UNSPECIFIED = Unit::UNIT_UNSPECIFIED; + static const Unit UNIT_TIME_NS = Unit::UNIT_TIME_NS; + static const Unit UNIT_COUNT = Unit::UNIT_COUNT; + static const Unit UNIT_SIZE_BYTES = Unit::UNIT_SIZE_BYTES; using FieldMetadata_Type = ::protozero::proto_utils::FieldMetadata< @@ -13388,14 +13651,7 @@ class CounterDescriptor : public ::protozero::Message { ::perfetto::protos::pbzero::CounterDescriptor_BuiltinCounterType, CounterDescriptor>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Type kType() { return {}; } + static constexpr FieldMetadata_Type kType{}; void set_type(::perfetto::protos::pbzero::CounterDescriptor_BuiltinCounterType value) { static constexpr uint32_t field_id = FieldMetadata_Type::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -13413,17 +13669,13 @@ class CounterDescriptor : public ::protozero::Message { std::string, CounterDescriptor>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Categories kCategories() { return {}; } + static constexpr FieldMetadata_Categories kCategories{}; void add_categories(const char* data, size_t size) { AppendBytes(FieldMetadata_Categories::kFieldId, data, size); } + void add_categories(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Categories::kFieldId, chars.data, chars.size); + } void add_categories(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Categories::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -13441,14 +13693,7 @@ class CounterDescriptor : public ::protozero::Message { ::perfetto::protos::pbzero::CounterDescriptor_Unit, CounterDescriptor>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Unit kUnit() { return {}; } + static constexpr FieldMetadata_Unit kUnit{}; void set_unit(::perfetto::protos::pbzero::CounterDescriptor_Unit value) { static constexpr uint32_t field_id = FieldMetadata_Unit::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -13466,17 +13711,13 @@ class CounterDescriptor : public ::protozero::Message { std::string, CounterDescriptor>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_UnitName kUnitName() { return {}; } + static constexpr FieldMetadata_UnitName kUnitName{}; void set_unit_name(const char* data, size_t size) { AppendBytes(FieldMetadata_UnitName::kFieldId, data, size); } + void set_unit_name(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_UnitName::kFieldId, chars.data, chars.size); + } void set_unit_name(std::string value) { static constexpr uint32_t field_id = FieldMetadata_UnitName::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -13494,14 +13735,7 @@ class CounterDescriptor : public ::protozero::Message { int64_t, CounterDescriptor>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_UnitMultiplier kUnitMultiplier() { return {}; } + static constexpr FieldMetadata_UnitMultiplier kUnitMultiplier{}; void set_unit_multiplier(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_UnitMultiplier::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -13519,14 +13753,7 @@ class CounterDescriptor : public ::protozero::Message { bool, CounterDescriptor>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_IsIncremental kIsIncremental() { return {}; } + static constexpr FieldMetadata_IsIncremental kIsIncremental{}; void set_is_incremental(bool value) { static constexpr uint32_t field_id = FieldMetadata_IsIncremental::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -13594,6 +13821,7 @@ class PERFETTO_EXPORT_COMPONENT TrackDescriptor : public ::protozero::CppMessage kThreadFieldNumber = 4, kChromeThreadFieldNumber = 7, kCounterFieldNumber = 8, + kDisallowMergingWithSystemTracksFieldNumber = 9, }; TrackDescriptor(); @@ -13642,6 +13870,10 @@ class PERFETTO_EXPORT_COMPONENT TrackDescriptor : public ::protozero::CppMessage const CounterDescriptor& counter() const { return *counter_; } CounterDescriptor* mutable_counter() { _has_field_.set(8); return counter_.get(); } + bool has_disallow_merging_with_system_tracks() const { return _has_field_[9]; } + bool disallow_merging_with_system_tracks() const { return disallow_merging_with_system_tracks_; } + void set_disallow_merging_with_system_tracks(bool value) { disallow_merging_with_system_tracks_ = value; _has_field_.set(9); } + private: uint64_t uuid_{}; uint64_t parent_uuid_{}; @@ -13651,12 +13883,13 @@ class PERFETTO_EXPORT_COMPONENT TrackDescriptor : public ::protozero::CppMessage ::protozero::CopyablePtr thread_; ::protozero::CopyablePtr chrome_thread_; ::protozero::CopyablePtr counter_; + bool disallow_merging_with_system_tracks_{}; // Allows to preserve unknown protobuf fields for compatibility // with future versions of .proto files. std::string unknown_fields_; - std::bitset<9> _has_field_{}; + std::bitset<10> _has_field_{}; }; } // namespace perfetto @@ -13689,7 +13922,7 @@ class CounterDescriptor; class ProcessDescriptor; class ThreadDescriptor; -class TrackDescriptor_Decoder : public ::protozero::TypedProtoDecoder { +class TrackDescriptor_Decoder : public ::protozero::TypedProtoDecoder { public: TrackDescriptor_Decoder(const uint8_t* data, size_t len) : TypedProtoDecoder(data, len) {} explicit TrackDescriptor_Decoder(const std::string& raw) : TypedProtoDecoder(reinterpret_cast(raw.data()), raw.size()) {} @@ -13710,6 +13943,8 @@ class TrackDescriptor_Decoder : public ::protozero::TypedProtoDecoder().as_bytes(); } bool has_counter() const { return at<8>().valid(); } ::protozero::ConstBytes counter() const { return at<8>().as_bytes(); } + bool has_disallow_merging_with_system_tracks() const { return at<9>().valid(); } + bool disallow_merging_with_system_tracks() const { return at<9>().as_bool(); } }; class TrackDescriptor : public ::protozero::Message { @@ -13724,6 +13959,7 @@ class TrackDescriptor : public ::protozero::Message { kThreadFieldNumber = 4, kChromeThreadFieldNumber = 7, kCounterFieldNumber = 8, + kDisallowMergingWithSystemTracksFieldNumber = 9, }; static constexpr const char* GetName() { return ".perfetto.protos.TrackDescriptor"; } @@ -13736,14 +13972,7 @@ class TrackDescriptor : public ::protozero::Message { uint64_t, TrackDescriptor>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Uuid kUuid() { return {}; } + static constexpr FieldMetadata_Uuid kUuid{}; void set_uuid(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Uuid::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -13761,14 +13990,7 @@ class TrackDescriptor : public ::protozero::Message { uint64_t, TrackDescriptor>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ParentUuid kParentUuid() { return {}; } + static constexpr FieldMetadata_ParentUuid kParentUuid{}; void set_parent_uuid(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_ParentUuid::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -13786,17 +14008,13 @@ class TrackDescriptor : public ::protozero::Message { std::string, TrackDescriptor>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Name kName() { return {}; } + static constexpr FieldMetadata_Name kName{}; void set_name(const char* data, size_t size) { AppendBytes(FieldMetadata_Name::kFieldId, data, size); } + void set_name(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Name::kFieldId, chars.data, chars.size); + } void set_name(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Name::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -13814,14 +14032,7 @@ class TrackDescriptor : public ::protozero::Message { ProcessDescriptor, TrackDescriptor>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Process kProcess() { return {}; } + static constexpr FieldMetadata_Process kProcess{}; template T* set_process() { return BeginNestedMessage(3); } @@ -13835,14 +14046,7 @@ class TrackDescriptor : public ::protozero::Message { ChromeProcessDescriptor, TrackDescriptor>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ChromeProcess kChromeProcess() { return {}; } + static constexpr FieldMetadata_ChromeProcess kChromeProcess{}; template T* set_chrome_process() { return BeginNestedMessage(6); } @@ -13856,14 +14060,7 @@ class TrackDescriptor : public ::protozero::Message { ThreadDescriptor, TrackDescriptor>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Thread kThread() { return {}; } + static constexpr FieldMetadata_Thread kThread{}; template T* set_thread() { return BeginNestedMessage(4); } @@ -13877,14 +14074,7 @@ class TrackDescriptor : public ::protozero::Message { ChromeThreadDescriptor, TrackDescriptor>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ChromeThread kChromeThread() { return {}; } + static constexpr FieldMetadata_ChromeThread kChromeThread{}; template T* set_chrome_thread() { return BeginNestedMessage(7); } @@ -13898,18 +14088,29 @@ class TrackDescriptor : public ::protozero::Message { CounterDescriptor, TrackDescriptor>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Counter kCounter() { return {}; } + static constexpr FieldMetadata_Counter kCounter{}; template T* set_counter() { return BeginNestedMessage(8); } + + using FieldMetadata_DisallowMergingWithSystemTracks = + ::protozero::proto_utils::FieldMetadata< + 9, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kBool, + bool, + TrackDescriptor>; + + static constexpr FieldMetadata_DisallowMergingWithSystemTracks kDisallowMergingWithSystemTracks{}; + void set_disallow_merging_with_system_tracks(bool value) { + static constexpr uint32_t field_id = FieldMetadata_DisallowMergingWithSystemTracks::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kBool> + ::Append(*this, field_id, value); + } }; } // Namespace. @@ -13941,6 +14142,7 @@ class TrackDescriptor : public ::protozero::Message { // gen_amalgamated expanded: #include "perfetto/protozero/message_handle.h" // gen_amalgamated expanded: #include "perfetto/protozero/scattered_heap_buffer.h" // gen_amalgamated expanded: #include "perfetto/tracing/internal/compile_time_hash.h" +// gen_amalgamated expanded: #include "perfetto/tracing/internal/tracing_muxer.h" // gen_amalgamated expanded: #include "perfetto/tracing/platform.h" // gen_amalgamated expanded: #include "protos/perfetto/trace/trace_packet.pbzero.h" // gen_amalgamated expanded: #include "protos/perfetto/trace/track_event/counter_descriptor.gen.h" @@ -14090,28 +14292,30 @@ struct PERFETTO_EXPORT_COMPONENT ProcessTrack : public Track { struct PERFETTO_EXPORT_COMPONENT ThreadTrack : public Track { const base::PlatformProcessId pid; const base::PlatformThreadId tid; + bool disallow_merging_with_system_tracks = false; - static ThreadTrack Current() { return ThreadTrack(base::GetThreadId()); } + static ThreadTrack Current(); // Represents a thread in the current process. - static ThreadTrack ForThread(base::PlatformThreadId tid_) { - return ThreadTrack(tid_); - } + static ThreadTrack ForThread(base::PlatformThreadId tid_); void Serialize(protos::pbzero::TrackDescriptor*) const; protos::gen::TrackDescriptor Serialize() const; private: - explicit ThreadTrack(base::PlatformThreadId tid_) + explicit ThreadTrack(base::PlatformThreadId tid_, + bool disallow_merging_with_system_tracks_) : Track(MakeThreadTrack(tid_)), pid(ProcessTrack::Current().pid), - tid(tid_) {} + tid(tid_), + disallow_merging_with_system_tracks( + disallow_merging_with_system_tracks_) {} }; // A track for recording counter values with the TRACE_COUNTER macro. Counter // tracks can optionally be given units and other metadata. See // /protos/perfetto/trace/track_event/counter_descriptor.proto for details. -class CounterTrack : public Track { +class PERFETTO_EXPORT_COMPONENT CounterTrack : public Track { // A random value mixed into counter track uuids to avoid collisions with // other types of tracks. static constexpr uint64_t kCounterMagic = 0xb1a4a67d7970839eul; @@ -14341,8 +14545,39 @@ enum BuiltinClock : int32_t { BUILTIN_CLOCK_MAX_ID = 63, }; -const BuiltinClock BuiltinClock_MIN = BUILTIN_CLOCK_UNKNOWN; -const BuiltinClock BuiltinClock_MAX = BUILTIN_CLOCK_MAX_ID; +constexpr BuiltinClock BuiltinClock_MIN = BuiltinClock::BUILTIN_CLOCK_UNKNOWN; +constexpr BuiltinClock BuiltinClock_MAX = BuiltinClock::BUILTIN_CLOCK_MAX_ID; + + +PERFETTO_PROTOZERO_CONSTEXPR14_OR_INLINE +const char* BuiltinClock_Name(::perfetto::protos::pbzero::BuiltinClock value) { + switch (value) { + case ::perfetto::protos::pbzero::BuiltinClock::BUILTIN_CLOCK_UNKNOWN: + return "BUILTIN_CLOCK_UNKNOWN"; + + case ::perfetto::protos::pbzero::BuiltinClock::BUILTIN_CLOCK_REALTIME: + return "BUILTIN_CLOCK_REALTIME"; + + case ::perfetto::protos::pbzero::BuiltinClock::BUILTIN_CLOCK_REALTIME_COARSE: + return "BUILTIN_CLOCK_REALTIME_COARSE"; + + case ::perfetto::protos::pbzero::BuiltinClock::BUILTIN_CLOCK_MONOTONIC: + return "BUILTIN_CLOCK_MONOTONIC"; + + case ::perfetto::protos::pbzero::BuiltinClock::BUILTIN_CLOCK_MONOTONIC_COARSE: + return "BUILTIN_CLOCK_MONOTONIC_COARSE"; + + case ::perfetto::protos::pbzero::BuiltinClock::BUILTIN_CLOCK_MONOTONIC_RAW: + return "BUILTIN_CLOCK_MONOTONIC_RAW"; + + case ::perfetto::protos::pbzero::BuiltinClock::BUILTIN_CLOCK_BOOTTIME: + return "BUILTIN_CLOCK_BOOTTIME"; + + case ::perfetto::protos::pbzero::BuiltinClock::BUILTIN_CLOCK_MAX_ID: + return "BUILTIN_CLOCK_MAX_ID"; + } + return "PBZERO_UNKNOWN_ENUM_VALUE"; +} } // Namespace. } // Namespace. @@ -14379,11 +14614,12 @@ class InternedGraphicsContext; class InternedString; class LogMessageBody; class Mapping; +class NetworkPacketContext; class ProfiledFrameSymbols; class SourceLocation; class UnsymbolizedSourceLocation; -class InternedData_Decoder : public ::protozero::TypedProtoDecoder { +class InternedData_Decoder : public ::protozero::TypedProtoDecoder { public: InternedData_Decoder(const uint8_t* data, size_t len) : TypedProtoDecoder(data, len) {} explicit InternedData_Decoder(const std::string& raw) : TypedProtoDecoder(reinterpret_cast(raw.data()), raw.size()) {} @@ -14428,6 +14664,10 @@ class InternedData_Decoder : public ::protozero::TypedProtoDecoder gpu_specifications() const { return GetRepeated<::protozero::ConstBytes>(24); } bool has_kernel_symbols() const { return at<26>().valid(); } ::protozero::RepeatedFieldIterator<::protozero::ConstBytes> kernel_symbols() const { return GetRepeated<::protozero::ConstBytes>(26); } + bool has_debug_annotation_string_values() const { return at<29>().valid(); } + ::protozero::RepeatedFieldIterator<::protozero::ConstBytes> debug_annotation_string_values() const { return GetRepeated<::protozero::ConstBytes>(29); } + bool has_packet_context() const { return at<30>().valid(); } + ::protozero::RepeatedFieldIterator<::protozero::ConstBytes> packet_context() const { return GetRepeated<::protozero::ConstBytes>(30); } }; class InternedData : public ::protozero::Message { @@ -14454,6 +14694,8 @@ class InternedData : public ::protozero::Message { kGraphicsContextsFieldNumber = 23, kGpuSpecificationsFieldNumber = 24, kKernelSymbolsFieldNumber = 26, + kDebugAnnotationStringValuesFieldNumber = 29, + kPacketContextFieldNumber = 30, }; static constexpr const char* GetName() { return ".perfetto.protos.InternedData"; } @@ -14466,14 +14708,7 @@ class InternedData : public ::protozero::Message { EventCategory, InternedData>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_EventCategories kEventCategories() { return {}; } + static constexpr FieldMetadata_EventCategories kEventCategories{}; template T* add_event_categories() { return BeginNestedMessage(1); } @@ -14487,14 +14722,7 @@ class InternedData : public ::protozero::Message { EventName, InternedData>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_EventNames kEventNames() { return {}; } + static constexpr FieldMetadata_EventNames kEventNames{}; template T* add_event_names() { return BeginNestedMessage(2); } @@ -14508,14 +14736,7 @@ class InternedData : public ::protozero::Message { DebugAnnotationName, InternedData>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_DebugAnnotationNames kDebugAnnotationNames() { return {}; } + static constexpr FieldMetadata_DebugAnnotationNames kDebugAnnotationNames{}; template T* add_debug_annotation_names() { return BeginNestedMessage(3); } @@ -14529,14 +14750,7 @@ class InternedData : public ::protozero::Message { DebugAnnotationValueTypeName, InternedData>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_DebugAnnotationValueTypeNames kDebugAnnotationValueTypeNames() { return {}; } + static constexpr FieldMetadata_DebugAnnotationValueTypeNames kDebugAnnotationValueTypeNames{}; template T* add_debug_annotation_value_type_names() { return BeginNestedMessage(27); } @@ -14550,14 +14764,7 @@ class InternedData : public ::protozero::Message { SourceLocation, InternedData>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_SourceLocations kSourceLocations() { return {}; } + static constexpr FieldMetadata_SourceLocations kSourceLocations{}; template T* add_source_locations() { return BeginNestedMessage(4); } @@ -14571,14 +14778,7 @@ class InternedData : public ::protozero::Message { UnsymbolizedSourceLocation, InternedData>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_UnsymbolizedSourceLocations kUnsymbolizedSourceLocations() { return {}; } + static constexpr FieldMetadata_UnsymbolizedSourceLocations kUnsymbolizedSourceLocations{}; template T* add_unsymbolized_source_locations() { return BeginNestedMessage(28); } @@ -14592,14 +14792,7 @@ class InternedData : public ::protozero::Message { LogMessageBody, InternedData>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_LogMessageBody kLogMessageBody() { return {}; } + static constexpr FieldMetadata_LogMessageBody kLogMessageBody{}; template T* add_log_message_body() { return BeginNestedMessage(20); } @@ -14613,14 +14806,7 @@ class InternedData : public ::protozero::Message { HistogramName, InternedData>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_HistogramNames kHistogramNames() { return {}; } + static constexpr FieldMetadata_HistogramNames kHistogramNames{}; template T* add_histogram_names() { return BeginNestedMessage(25); } @@ -14634,14 +14820,7 @@ class InternedData : public ::protozero::Message { InternedString, InternedData>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_BuildIds kBuildIds() { return {}; } + static constexpr FieldMetadata_BuildIds kBuildIds{}; template T* add_build_ids() { return BeginNestedMessage(16); } @@ -14655,14 +14834,7 @@ class InternedData : public ::protozero::Message { InternedString, InternedData>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_MappingPaths kMappingPaths() { return {}; } + static constexpr FieldMetadata_MappingPaths kMappingPaths{}; template T* add_mapping_paths() { return BeginNestedMessage(17); } @@ -14676,14 +14848,7 @@ class InternedData : public ::protozero::Message { InternedString, InternedData>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_SourcePaths kSourcePaths() { return {}; } + static constexpr FieldMetadata_SourcePaths kSourcePaths{}; template T* add_source_paths() { return BeginNestedMessage(18); } @@ -14697,14 +14862,7 @@ class InternedData : public ::protozero::Message { InternedString, InternedData>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_FunctionNames kFunctionNames() { return {}; } + static constexpr FieldMetadata_FunctionNames kFunctionNames{}; template T* add_function_names() { return BeginNestedMessage(5); } @@ -14718,14 +14876,7 @@ class InternedData : public ::protozero::Message { ProfiledFrameSymbols, InternedData>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ProfiledFrameSymbols kProfiledFrameSymbols() { return {}; } + static constexpr FieldMetadata_ProfiledFrameSymbols kProfiledFrameSymbols{}; template T* add_profiled_frame_symbols() { return BeginNestedMessage(21); } @@ -14739,14 +14890,7 @@ class InternedData : public ::protozero::Message { Mapping, InternedData>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Mappings kMappings() { return {}; } + static constexpr FieldMetadata_Mappings kMappings{}; template T* add_mappings() { return BeginNestedMessage(19); } @@ -14760,14 +14904,7 @@ class InternedData : public ::protozero::Message { Frame, InternedData>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Frames kFrames() { return {}; } + static constexpr FieldMetadata_Frames kFrames{}; template T* add_frames() { return BeginNestedMessage(6); } @@ -14781,14 +14918,7 @@ class InternedData : public ::protozero::Message { Callstack, InternedData>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Callstacks kCallstacks() { return {}; } + static constexpr FieldMetadata_Callstacks kCallstacks{}; template T* add_callstacks() { return BeginNestedMessage(7); } @@ -14802,14 +14932,7 @@ class InternedData : public ::protozero::Message { InternedString, InternedData>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_VulkanMemoryKeys kVulkanMemoryKeys() { return {}; } + static constexpr FieldMetadata_VulkanMemoryKeys kVulkanMemoryKeys{}; template T* add_vulkan_memory_keys() { return BeginNestedMessage(22); } @@ -14823,14 +14946,7 @@ class InternedData : public ::protozero::Message { InternedGraphicsContext, InternedData>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_GraphicsContexts kGraphicsContexts() { return {}; } + static constexpr FieldMetadata_GraphicsContexts kGraphicsContexts{}; template T* add_graphics_contexts() { return BeginNestedMessage(23); } @@ -14844,14 +14960,7 @@ class InternedData : public ::protozero::Message { InternedGpuRenderStageSpecification, InternedData>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_GpuSpecifications kGpuSpecifications() { return {}; } + static constexpr FieldMetadata_GpuSpecifications kGpuSpecifications{}; template T* add_gpu_specifications() { return BeginNestedMessage(24); } @@ -14865,18 +14974,39 @@ class InternedData : public ::protozero::Message { InternedString, InternedData>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_KernelSymbols kKernelSymbols() { return {}; } + static constexpr FieldMetadata_KernelSymbols kKernelSymbols{}; template T* add_kernel_symbols() { return BeginNestedMessage(26); } + + using FieldMetadata_DebugAnnotationStringValues = + ::protozero::proto_utils::FieldMetadata< + 29, + ::protozero::proto_utils::RepetitionType::kRepeatedNotPacked, + ::protozero::proto_utils::ProtoSchemaType::kMessage, + InternedString, + InternedData>; + + static constexpr FieldMetadata_DebugAnnotationStringValues kDebugAnnotationStringValues{}; + template T* add_debug_annotation_string_values() { + return BeginNestedMessage(29); + } + + + using FieldMetadata_PacketContext = + ::protozero::proto_utils::FieldMetadata< + 30, + ::protozero::proto_utils::RepetitionType::kRepeatedNotPacked, + ::protozero::proto_utils::ProtoSchemaType::kMessage, + NetworkPacketContext, + InternedData>; + + static constexpr FieldMetadata_PacketContext kPacketContext{}; + template T* add_packet_context() { + return BeginNestedMessage(30); + } + }; } // Namespace. @@ -14963,6 +15093,9 @@ class PERFETTO_EXPORT_COMPONENT TrackEventSessionObserver { // Called when a track event tracing session is stopped. It is still possible // to emit track events from this callback. virtual void OnStop(const DataSourceBase::StopArgs&); + // Called when tracing muxer requests to clear incremental state. + virtual void WillClearIncrementalState( + const DataSourceBase::ClearIncrementalStateArgs&); }; namespace internal { @@ -15055,15 +15188,24 @@ class PERFETTO_EXPORT_COMPONENT TrackEventInternal { const TrackEventCategoryRegistry&, bool (*register_data_source)(const DataSourceDescriptor&)); - static bool AddSessionObserver(TrackEventSessionObserver*); - static void RemoveSessionObserver(TrackEventSessionObserver*); + static bool AddSessionObserver(const TrackEventCategoryRegistry&, + TrackEventSessionObserver*); + static void RemoveSessionObserver(const TrackEventCategoryRegistry&, + TrackEventSessionObserver*); static void EnableTracing(const TrackEventCategoryRegistry& registry, const protos::gen::TrackEventConfig& config, const DataSourceBase::SetupArgs&); - static void OnStart(const DataSourceBase::StartArgs&); + static void OnStart(const TrackEventCategoryRegistry&, + const DataSourceBase::StartArgs&); + static void OnStop(const TrackEventCategoryRegistry&, + const DataSourceBase::StopArgs&); static void DisableTracing(const TrackEventCategoryRegistry& registry, - const DataSourceBase::StopArgs&); + uint32_t internal_instance_index); + static void WillClearIncrementalState( + const TrackEventCategoryRegistry&, + const DataSourceBase::ClearIncrementalStateArgs&); + static bool IsCategoryEnabled(const TrackEventCategoryRegistry& registry, const protos::gen::TrackEventConfig& config, const Category& category); @@ -15098,14 +15240,15 @@ class PERFETTO_EXPORT_COMPONENT TrackEventInternal { // TODO(altimin): Remove this method once Chrome uses // EventContext::AddDebugAnnotation directly. - template + template static void AddDebugAnnotation(perfetto::EventContext* event_ctx, - const char* name, - T&& value) { - auto annotation = AddDebugAnnotation(event_ctx, name); + NameType&& name, + ValueType&& value) { + auto annotation = + AddDebugAnnotation(event_ctx, std::forward(name)); WriteIntoTracedValue( internal::CreateTracedValueFromProto(annotation, event_ctx), - std::forward(value)); + std::forward(value)); } // If the given track hasn't been seen by the trace writer yet, write a @@ -15142,14 +15285,17 @@ class PERFETTO_EXPORT_COMPONENT TrackEventInternal { static TraceTimestamp GetTraceTime(); - // Get the clock used by GetTimeNs(). - static constexpr protos::pbzero::BuiltinClock GetClockId() { -#if !PERFETTO_BUILDFLAG(PERFETTO_OS_APPLE) && \ - !PERFETTO_BUILDFLAG(PERFETTO_OS_WIN) - return protos::pbzero::BUILTIN_CLOCK_BOOTTIME; -#else - return protos::pbzero::BUILTIN_CLOCK_MONOTONIC; -#endif + static inline protos::pbzero::BuiltinClock GetClockId() { return clock_; } + static inline void SetClockId(protos::pbzero::BuiltinClock clock) { + clock_ = clock; + } + + static inline bool GetDisallowMergingWithSystemTracks() { + return disallow_merging_with_system_tracks_; + } + static inline void SetDisallowMergingWithSystemTracks( + bool disallow_merging_with_system_tracks) { + disallow_merging_with_system_tracks_ = disallow_merging_with_system_tracks; } static int GetSessionCount(); @@ -15170,11 +15316,19 @@ class PERFETTO_EXPORT_COMPONENT TrackEventInternal { TraceTimestamp, uint32_t seq_flags = protos::pbzero::TracePacket::SEQ_NEEDS_INCREMENTAL_STATE); + static protos::pbzero::DebugAnnotation* AddDebugAnnotation( perfetto::EventContext*, const char* name); + static protos::pbzero::DebugAnnotation* AddDebugAnnotation( + perfetto::EventContext*, + perfetto::DynamicString name); + static std::atomic session_count_; + + static protos::pbzero::BuiltinClock clock_; + static bool disallow_merging_with_system_tracks_; }; template @@ -15193,7 +15347,7 @@ TrackEventTlsState::TrackEventTlsState(const TraceContext& trace_context) { } if (disable_incremental_timestamps) { if (timestamp_unit_multiplier == 1) { - default_clock = TrackEventInternal::GetClockId(); + default_clock = static_cast(TrackEventInternal::GetClockId()); } else { default_clock = TrackEventIncrementalState::kClockIdAbsolute; } @@ -15311,7 +15465,7 @@ class TracedProto { // repeated and non-repeated complex fields are supported. template TracedProto WriteNestedMessage( - protozero::proto_utils::internal::FieldMetadataHelper) { + FieldMetadata) { static_assert(std::is_base_of::value, "Field should belong to the current message"); @@ -15330,8 +15484,7 @@ class TracedProto { // string), but requires the |field| to be non-repeateable (i.e. optional). // For repeatable fields, AppendValue or AppendFrom should be used. template - void Set(protozero::proto_utils::internal::FieldMetadataHelper, - ValueType&& value) { + void Set(FieldMetadata, ValueType&& value) { static_assert(std::is_base_of::value, "Field should belong to the current message"); @@ -15357,9 +15510,7 @@ class TracedProto { // current message. If the field is not repeated, Set() should be used // instead. template - void AppendValue( - protozero::proto_utils::internal::FieldMetadataHelper, - ValueType&& value) { + void AppendValue(FieldMetadata, ValueType&& value) { static_assert(std::is_base_of::value, "Field should belong to the current message"); @@ -15383,9 +15534,7 @@ class TracedProto { // current message. If the field is not repeated, Set() should be used // instead. template - void AppendFrom( - protozero::proto_utils::internal::FieldMetadataHelper, - ValueType&& value) { + void AppendFrom(FieldMetadata, ValueType&& value) { static_assert(std::is_base_of::value, "Field should belong to the current message"); @@ -15408,8 +15557,7 @@ class TracedProto { // above and make these methods private. template TracedProto WriteNestedMessage() { - return WriteNestedMessage( - protozero::proto_utils::internal::FieldMetadataHelper()); + return WriteNestedMessage(FieldMetadata()); } private: @@ -15610,10 +15758,9 @@ void WriteIntoTracedProto(TracedProto message, ValueType&& value) { } template -void WriteTracedProtoField( - TracedProto& message, - protozero::proto_utils::internal::FieldMetadataHelper, - ValueType&& value) { +void WriteTracedProtoField(TracedProto& message, + FieldMetadataType, + ValueType&& value) { static_assert( std::is_base_of::value, @@ -15683,8 +15830,11 @@ class PERFETTO_EXPORT_COMPONENT EventContext { // TODO(eseckler): Remove once Chromium has switched to client lib entirely. explicit EventContext( protos::pbzero::TrackEvent* event, - internal::TrackEventIncrementalState* incremental_state = nullptr) - : event_(event), incremental_state_(incremental_state) {} + internal::TrackEventIncrementalState* incremental_state = nullptr, + bool filter_debug_annotations = false) + : event_(event), + incremental_state_(incremental_state), + filter_debug_annotations_(filter_debug_annotations) {} ~EventContext(); @@ -15692,6 +15842,22 @@ class PERFETTO_EXPORT_COMPONENT EventContext { return incremental_state_; } + // Disclaimer: Experimental method, subject to change. + // Exposed publicly to emit some TrackEvent fields in Chromium only in local + // tracing. Long-term, we really shouldn't be (ab)using the + // filter_debug_annotation setting for this. + // + // TODO(kraskevich): Come up with a more precise name once we have more than + // one usecase. + bool ShouldFilterDebugAnnotations() const { + if (tls_state_) { + return tls_state_->filter_debug_annotations; + } + // In Chromium tls_state_ is nullptr, so we need to get this information + // from a separate field. + return filter_debug_annotations_; + } + // Get a TrackEvent message to write typed arguments to. // // event() is a template method to allow callers to specify a subclass of @@ -15723,11 +15889,11 @@ class PERFETTO_EXPORT_COMPONENT EventContext { // values directly to TRACE_EVENT (i.e. TRACE_EVENT(..., "arg", value, ...);) // but in rare cases (e.g. when an argument should be written conditionally) // EventContext::AddDebugAnnotation provides an explicit equivalent. - template - void AddDebugAnnotation(const char* name, T&& value) { + template + void AddDebugAnnotation(EventNameType&& name, T&& value) { if (tls_state_ && tls_state_->filter_debug_annotations) return; - auto annotation = AddDebugAnnotation(name); + auto annotation = AddDebugAnnotation(std::forward(name)); WriteIntoTracedValue(internal::CreateTracedValueFromProto(annotation, this), std::forward(value)); } @@ -15746,6 +15912,8 @@ class PERFETTO_EXPORT_COMPONENT EventContext { EventContext(const EventContext&) = delete; protos::pbzero::DebugAnnotation* AddDebugAnnotation(const char* name); + protos::pbzero::DebugAnnotation* AddDebugAnnotation( + ::perfetto::DynamicString name); TracePacketHandle trace_packet_; protos::pbzero::TrackEvent* event_; @@ -15754,11 +15922,474 @@ class PERFETTO_EXPORT_COMPONENT EventContext { // are certain that it cannot be nullptr. Once we switch to client library in // chrome, we can make that happen. const internal::TrackEventTlsState* tls_state_ = nullptr; + // TODO(kraskevich): Come up with a more precise name once we have more than + // one usecase. + // TODO(kraskevich): Remove once Chromium has fully switched to client lib. + const bool filter_debug_annotations_ = false; }; } // namespace perfetto #endif // INCLUDE_PERFETTO_TRACING_EVENT_CONTEXT_H_ +// gen_amalgamated begin header: include/perfetto/tracing/internal/track_event_legacy.h +/* + * Copyright (C) 2023 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef INCLUDE_PERFETTO_TRACING_INTERNAL_TRACK_EVENT_LEGACY_H_ +#define INCLUDE_PERFETTO_TRACING_INTERNAL_TRACK_EVENT_LEGACY_H_ + +// gen_amalgamated expanded: #include "perfetto/base/build_config.h" +// gen_amalgamated expanded: #include "perfetto/tracing/event_context.h" +// gen_amalgamated expanded: #include "perfetto/tracing/track.h" +// gen_amalgamated expanded: #include "protos/perfetto/trace/track_event/track_event.pbzero.h" + +#ifndef PERFETTO_ENABLE_LEGACY_TRACE_EVENTS +#define PERFETTO_ENABLE_LEGACY_TRACE_EVENTS 0 +#endif + +// ---------------------------------------------------------------------------- +// Constants. +// ---------------------------------------------------------------------------- + +namespace perfetto { +namespace legacy { + +enum TraceEventFlag { + kTraceEventFlagNone = 0, + kTraceEventFlagCopy = 1u << 0, + kTraceEventFlagHasId = 1u << 1, + kTraceEventFlagScopeOffset = 1u << 2, + kTraceEventFlagScopeExtra = 1u << 3, + kTraceEventFlagExplicitTimestamp = 1u << 4, + kTraceEventFlagAsyncTTS = 1u << 5, + kTraceEventFlagBindToEnclosing = 1u << 6, + kTraceEventFlagFlowIn = 1u << 7, + kTraceEventFlagFlowOut = 1u << 8, + kTraceEventFlagHasContextId = 1u << 9, + kTraceEventFlagHasProcessId = 1u << 10, + kTraceEventFlagHasLocalId = 1u << 11, + kTraceEventFlagHasGlobalId = 1u << 12, + // TODO(eseckler): Remove once we have native support for typed proto events + // in TRACE_EVENT macros. + kTraceEventFlagTypedProtoArgs = 1u << 15, + kTraceEventFlagJavaStringLiterals = 1u << 16, +}; + +enum PerfettoLegacyCurrentThreadId { kCurrentThreadId }; + +// The following user-provided adaptors are used to serialize user-defined +// thread id and time types into track events. For full compatibility, the user +// should also define the following macros appropriately: +// +// #define TRACE_TIME_TICKS_NOW() ... +// #define TRACE_TIME_NOW() ... + +// User-provided function to convert an abstract thread id into a thread track. +template +ThreadTrack ConvertThreadId(const T&); + +// Built-in implementation for events referring to the current thread. +template <> +ThreadTrack PERFETTO_EXPORT_COMPONENT +ConvertThreadId(const PerfettoLegacyCurrentThreadId&); + +} // namespace legacy +} // namespace perfetto + +#if PERFETTO_ENABLE_LEGACY_TRACE_EVENTS +// The following constants are defined in the global namespace, since they were +// originally implemented as macros. + +// Event phases. +static constexpr char TRACE_EVENT_PHASE_BEGIN = 'B'; +static constexpr char TRACE_EVENT_PHASE_END = 'E'; +static constexpr char TRACE_EVENT_PHASE_COMPLETE = 'X'; +static constexpr char TRACE_EVENT_PHASE_INSTANT = 'I'; +static constexpr char TRACE_EVENT_PHASE_ASYNC_BEGIN = 'S'; +static constexpr char TRACE_EVENT_PHASE_ASYNC_STEP_INTO = 'T'; +static constexpr char TRACE_EVENT_PHASE_ASYNC_STEP_PAST = 'p'; +static constexpr char TRACE_EVENT_PHASE_ASYNC_END = 'F'; +static constexpr char TRACE_EVENT_PHASE_NESTABLE_ASYNC_BEGIN = 'b'; +static constexpr char TRACE_EVENT_PHASE_NESTABLE_ASYNC_END = 'e'; +static constexpr char TRACE_EVENT_PHASE_NESTABLE_ASYNC_INSTANT = 'n'; +static constexpr char TRACE_EVENT_PHASE_FLOW_BEGIN = 's'; +static constexpr char TRACE_EVENT_PHASE_FLOW_STEP = 't'; +static constexpr char TRACE_EVENT_PHASE_FLOW_END = 'f'; +static constexpr char TRACE_EVENT_PHASE_METADATA = 'M'; +static constexpr char TRACE_EVENT_PHASE_COUNTER = 'C'; +static constexpr char TRACE_EVENT_PHASE_SAMPLE = 'P'; +static constexpr char TRACE_EVENT_PHASE_CREATE_OBJECT = 'N'; +static constexpr char TRACE_EVENT_PHASE_SNAPSHOT_OBJECT = 'O'; +static constexpr char TRACE_EVENT_PHASE_DELETE_OBJECT = 'D'; +static constexpr char TRACE_EVENT_PHASE_MEMORY_DUMP = 'v'; +static constexpr char TRACE_EVENT_PHASE_MARK = 'R'; +static constexpr char TRACE_EVENT_PHASE_CLOCK_SYNC = 'c'; + +// Flags for changing the behavior of TRACE_EVENT_API_ADD_TRACE_EVENT. +static constexpr uint32_t TRACE_EVENT_FLAG_NONE = + perfetto::legacy::kTraceEventFlagNone; +static constexpr uint32_t TRACE_EVENT_FLAG_COPY = + perfetto::legacy::kTraceEventFlagCopy; +static constexpr uint32_t TRACE_EVENT_FLAG_HAS_ID = + perfetto::legacy::kTraceEventFlagHasId; +static constexpr uint32_t TRACE_EVENT_FLAG_SCOPE_OFFSET = + perfetto::legacy::kTraceEventFlagScopeOffset; +static constexpr uint32_t TRACE_EVENT_FLAG_SCOPE_EXTRA = + perfetto::legacy::kTraceEventFlagScopeExtra; +static constexpr uint32_t TRACE_EVENT_FLAG_EXPLICIT_TIMESTAMP = + perfetto::legacy::kTraceEventFlagExplicitTimestamp; +static constexpr uint32_t TRACE_EVENT_FLAG_ASYNC_TTS = + perfetto::legacy::kTraceEventFlagAsyncTTS; +static constexpr uint32_t TRACE_EVENT_FLAG_BIND_TO_ENCLOSING = + perfetto::legacy::kTraceEventFlagBindToEnclosing; +static constexpr uint32_t TRACE_EVENT_FLAG_FLOW_IN = + perfetto::legacy::kTraceEventFlagFlowIn; +static constexpr uint32_t TRACE_EVENT_FLAG_FLOW_OUT = + perfetto::legacy::kTraceEventFlagFlowOut; +static constexpr uint32_t TRACE_EVENT_FLAG_HAS_CONTEXT_ID = + perfetto::legacy::kTraceEventFlagHasContextId; +static constexpr uint32_t TRACE_EVENT_FLAG_HAS_PROCESS_ID = + perfetto::legacy::kTraceEventFlagHasProcessId; +static constexpr uint32_t TRACE_EVENT_FLAG_HAS_LOCAL_ID = + perfetto::legacy::kTraceEventFlagHasLocalId; +static constexpr uint32_t TRACE_EVENT_FLAG_HAS_GLOBAL_ID = + perfetto::legacy::kTraceEventFlagHasGlobalId; +static constexpr uint32_t TRACE_EVENT_FLAG_TYPED_PROTO_ARGS = + perfetto::legacy::kTraceEventFlagTypedProtoArgs; +static constexpr uint32_t TRACE_EVENT_FLAG_JAVA_STRING_LITERALS = + perfetto::legacy::kTraceEventFlagJavaStringLiterals; + +static constexpr uint32_t TRACE_EVENT_FLAG_SCOPE_MASK = + TRACE_EVENT_FLAG_SCOPE_OFFSET | TRACE_EVENT_FLAG_SCOPE_EXTRA; + +// Type values for identifying types in the TraceValue union. +static constexpr uint8_t TRACE_VALUE_TYPE_BOOL = 1; +static constexpr uint8_t TRACE_VALUE_TYPE_UINT = 2; +static constexpr uint8_t TRACE_VALUE_TYPE_INT = 3; +static constexpr uint8_t TRACE_VALUE_TYPE_DOUBLE = 4; +static constexpr uint8_t TRACE_VALUE_TYPE_POINTER = 5; +static constexpr uint8_t TRACE_VALUE_TYPE_STRING = 6; +static constexpr uint8_t TRACE_VALUE_TYPE_COPY_STRING = 7; +static constexpr uint8_t TRACE_VALUE_TYPE_CONVERTABLE = 8; +static constexpr uint8_t TRACE_VALUE_TYPE_PROTO = 9; + +// Enum reflecting the scope of an INSTANT event. Must fit within +// TRACE_EVENT_FLAG_SCOPE_MASK. +static constexpr uint8_t TRACE_EVENT_SCOPE_GLOBAL = 0u << 2; +static constexpr uint8_t TRACE_EVENT_SCOPE_PROCESS = 1u << 2; +static constexpr uint8_t TRACE_EVENT_SCOPE_THREAD = 2u << 2; + +static constexpr char TRACE_EVENT_SCOPE_NAME_GLOBAL = 'g'; +static constexpr char TRACE_EVENT_SCOPE_NAME_PROCESS = 'p'; +static constexpr char TRACE_EVENT_SCOPE_NAME_THREAD = 't'; + +#define TRACE_EVENT_API_CURRENT_THREAD_ID ::perfetto::legacy::kCurrentThreadId + +#endif // PERFETTO_ENABLE_LEGACY_TRACE_EVENTS + +namespace perfetto { +namespace internal { + +// LegacyTraceId encapsulates an ID that can either be an integer or pointer. +class PERFETTO_EXPORT_COMPONENT LegacyTraceId { + public: + // Can be combined with WithScope. + class LocalId { + public: + explicit LocalId(const void* raw_id) + : raw_id_(static_cast(reinterpret_cast(raw_id))) {} + explicit LocalId(uint64_t raw_id) : raw_id_(raw_id) {} + uint64_t raw_id() const { return raw_id_; } + + private: + uint64_t raw_id_; + }; + + // Can be combined with WithScope. + class GlobalId { + public: + explicit GlobalId(uint64_t raw_id) : raw_id_(raw_id) {} + uint64_t raw_id() const { return raw_id_; } + + private: + uint64_t raw_id_; + }; + + class WithScope { + public: + WithScope(const char* scope, uint64_t raw_id) + : scope_(scope), raw_id_(raw_id) {} + WithScope(const char* scope, LocalId local_id) + : scope_(scope), raw_id_(local_id.raw_id()) { + id_flags_ = legacy::kTraceEventFlagHasLocalId; + } + WithScope(const char* scope, GlobalId global_id) + : scope_(scope), raw_id_(global_id.raw_id()) { + id_flags_ = legacy::kTraceEventFlagHasGlobalId; + } + WithScope(const char* scope, uint64_t prefix, uint64_t raw_id) + : scope_(scope), has_prefix_(true), prefix_(prefix), raw_id_(raw_id) {} + WithScope(const char* scope, uint64_t prefix, GlobalId global_id) + : scope_(scope), + has_prefix_(true), + prefix_(prefix), + raw_id_(global_id.raw_id()) { + id_flags_ = legacy::kTraceEventFlagHasGlobalId; + } + uint64_t raw_id() const { return raw_id_; } + const char* scope() const { return scope_; } + bool has_prefix() const { return has_prefix_; } + uint64_t prefix() const { return prefix_; } + uint32_t id_flags() const { return id_flags_; } + + private: + const char* scope_ = nullptr; + bool has_prefix_ = false; + uint64_t prefix_; + uint64_t raw_id_; + uint32_t id_flags_ = legacy::kTraceEventFlagHasId; + }; + + explicit LegacyTraceId(const void* raw_id) + : raw_id_(static_cast(reinterpret_cast(raw_id))) { + id_flags_ = legacy::kTraceEventFlagHasLocalId; + } + explicit LegacyTraceId(uint64_t raw_id) : raw_id_(raw_id) {} + explicit LegacyTraceId(uint32_t raw_id) : raw_id_(raw_id) {} + explicit LegacyTraceId(uint16_t raw_id) : raw_id_(raw_id) {} + explicit LegacyTraceId(uint8_t raw_id) : raw_id_(raw_id) {} + explicit LegacyTraceId(int64_t raw_id) + : raw_id_(static_cast(raw_id)) {} + explicit LegacyTraceId(int32_t raw_id) + : raw_id_(static_cast(raw_id)) {} + explicit LegacyTraceId(int16_t raw_id) + : raw_id_(static_cast(raw_id)) {} + explicit LegacyTraceId(int8_t raw_id) + : raw_id_(static_cast(raw_id)) {} +// Different platforms disagree on which integer types are same and which +// are different. E.g. on Mac size_t is considered a different type from +// uint64_t even though it has the same size and signedness. +// Below we add overloads for those types that are known to cause ambiguity. +#if PERFETTO_BUILDFLAG(PERFETTO_OS_APPLE) + explicit LegacyTraceId(size_t raw_id) : raw_id_(raw_id) {} + explicit LegacyTraceId(intptr_t raw_id) + : raw_id_(static_cast(raw_id)) {} +#elif PERFETTO_BUILDFLAG(PERFETTO_OS_WIN) + explicit LegacyTraceId(unsigned long raw_id) : raw_id_(raw_id) {} +#endif + explicit LegacyTraceId(LocalId raw_id) : raw_id_(raw_id.raw_id()) { + id_flags_ = legacy::kTraceEventFlagHasLocalId; + } + explicit LegacyTraceId(GlobalId raw_id) : raw_id_(raw_id.raw_id()) { + id_flags_ = legacy::kTraceEventFlagHasGlobalId; + } + explicit LegacyTraceId(WithScope scoped_id) + : scope_(scoped_id.scope()), + has_prefix_(scoped_id.has_prefix()), + prefix_(scoped_id.prefix()), + raw_id_(scoped_id.raw_id()), + id_flags_(scoped_id.id_flags()) {} + + uint64_t raw_id() const { return raw_id_; } + const char* scope() const { return scope_; } + bool has_prefix() const { return has_prefix_; } + uint64_t prefix() const { return prefix_; } + uint32_t id_flags() const { return id_flags_; } + + void Write(protos::pbzero::TrackEvent::LegacyEvent*, + uint32_t event_flags) const; + + private: + const char* scope_ = nullptr; + bool has_prefix_ = false; + uint64_t prefix_; + uint64_t raw_id_; + uint32_t id_flags_ = legacy::kTraceEventFlagHasId; +}; + +#if PERFETTO_ENABLE_LEGACY_TRACE_EVENTS +template +bool IsEqual(T x, T y) { + return x == y; +} + +template +bool IsEqual(T, U) { + return false; +} + +class PERFETTO_EXPORT_COMPONENT TrackEventLegacy { + public: + static constexpr protos::pbzero::TrackEvent::Type PhaseToType(char phase) { + // clang-format off + return (phase == TRACE_EVENT_PHASE_BEGIN) ? + protos::pbzero::TrackEvent::TYPE_SLICE_BEGIN : + (phase == TRACE_EVENT_PHASE_END) ? + protos::pbzero::TrackEvent::TYPE_SLICE_END : + (phase == TRACE_EVENT_PHASE_INSTANT) ? + protos::pbzero::TrackEvent::TYPE_INSTANT : + protos::pbzero::TrackEvent::TYPE_UNSPECIFIED; + // clang-format on + } + + // Reduce binary size overhead by outlining most of the code for writing a + // legacy trace event. + template + static void WriteLegacyEvent(EventContext ctx, + char phase, + uint32_t flags, + Args&&... args) PERFETTO_NO_INLINE { + PERFETTO_DCHECK(!(flags & TRACE_EVENT_FLAG_HAS_PROCESS_ID)); + AddDebugAnnotations(&ctx, std::forward(args)...); + if (NeedLegacyFlags(phase, flags)) { + auto legacy_event = ctx.event()->set_legacy_event(); + SetLegacyFlags(legacy_event, phase, flags); + } + } + + template + static void WriteLegacyEventWithIdAndTid(EventContext ctx, + char phase, + uint32_t flags, + const LegacyTraceId& id, + const ThreadIdType& thread_id, + Args&&... args) PERFETTO_NO_INLINE { + // + // Overrides to consider: + // + // 1. If we have an id, we need to write {unscoped,local,global}_id and/or + // bind_id. + // 2. If we have a thread id, we need to write track_uuid() or + // {pid,tid}_override if the id represents another process. The + // conversion from |thread_id| happens in embedder code since the type is + // embedder-specified. + // 3. If we have a timestamp, we need to write a different timestamp in the + // trace packet itself and make sure TrackEvent won't write one + // internally. This is already done at the call site. + // + PERFETTO_DCHECK(PhaseToType(phase) == + protos::pbzero::TrackEvent::TYPE_UNSPECIFIED || + !(flags & TRACE_EVENT_FLAG_HAS_PROCESS_ID)); + flags |= id.id_flags(); + AddDebugAnnotations(&ctx, std::forward(args)...); + if (NeedLegacyFlags(phase, flags)) { + auto legacy_event = ctx.event()->set_legacy_event(); + SetLegacyFlags(legacy_event, phase, flags); + if (id.id_flags()) + id.Write(legacy_event, flags); + if (flags & TRACE_EVENT_FLAG_HAS_PROCESS_ID) { + // The thread identifier actually represents a process id. Let's set an + // override for it. + int32_t pid_override = + static_cast(legacy::ConvertThreadId(thread_id).tid); + legacy_event->set_pid_override(pid_override); + legacy_event->set_tid_override(-1); + } else { + // Only synchronous phases are supported for other threads. These phases + // are supported in TrackEvent types and receive a track_uuid + // association via TrackEventDataSource::TraceForCategoryImpl(). + PERFETTO_DCHECK(PhaseToType(phase) != + protos::pbzero::TrackEvent::TYPE_UNSPECIFIED || + IsEqual(thread_id, TRACE_EVENT_API_CURRENT_THREAD_ID) || + legacy::ConvertThreadId(thread_id).tid == + ThreadTrack::Current().tid); + } + } + } + + // No arguments. + static void AddDebugAnnotations(EventContext*) {} + + // N number of debug arguments. + template + static void AddDebugAnnotations(EventContext* ctx, + ArgNameType&& arg_name, + ArgType&& arg_value, + OtherArgs&&... more_args) { + TrackEventInternal::AddDebugAnnotation(ctx, + std::forward(arg_name), + std::forward(arg_value)); + AddDebugAnnotations(ctx, std::forward(more_args)...); + } + + private: + static bool NeedLegacyFlags(char phase, uint32_t flags) { + if (PhaseToType(phase) == protos::pbzero::TrackEvent::TYPE_UNSPECIFIED) + return true; + // TODO(skyostil): Implement/deprecate: + // - TRACE_EVENT_FLAG_EXPLICIT_TIMESTAMP + // - TRACE_EVENT_FLAG_HAS_CONTEXT_ID + // - TRACE_EVENT_FLAG_TYPED_PROTO_ARGS + // - TRACE_EVENT_FLAG_JAVA_STRING_LITERALS + return flags & + (TRACE_EVENT_FLAG_HAS_ID | TRACE_EVENT_FLAG_HAS_LOCAL_ID | + TRACE_EVENT_FLAG_HAS_GLOBAL_ID | TRACE_EVENT_FLAG_ASYNC_TTS | + TRACE_EVENT_FLAG_BIND_TO_ENCLOSING | TRACE_EVENT_FLAG_FLOW_IN | + TRACE_EVENT_FLAG_FLOW_OUT | TRACE_EVENT_FLAG_HAS_PROCESS_ID); + } + + static void SetLegacyFlags( + protos::pbzero::TrackEvent::LegacyEvent* legacy_event, + char phase, + uint32_t flags) { + if (PhaseToType(phase) == protos::pbzero::TrackEvent::TYPE_UNSPECIFIED) + legacy_event->set_phase(phase); + if (flags & TRACE_EVENT_FLAG_ASYNC_TTS) + legacy_event->set_use_async_tts(true); + if (flags & TRACE_EVENT_FLAG_BIND_TO_ENCLOSING) + legacy_event->set_bind_to_enclosing(true); + + const auto kFlowIn = TRACE_EVENT_FLAG_FLOW_IN; + const auto kFlowOut = TRACE_EVENT_FLAG_FLOW_OUT; + const auto kFlowInOut = kFlowIn | kFlowOut; + if ((flags & kFlowInOut) == kFlowInOut) { + legacy_event->set_flow_direction( + protos::pbzero::TrackEvent::LegacyEvent::FLOW_INOUT); + } else if (flags & kFlowIn) { + legacy_event->set_flow_direction( + protos::pbzero::TrackEvent::LegacyEvent::FLOW_IN); + } else if (flags & kFlowOut) { + legacy_event->set_flow_direction( + protos::pbzero::TrackEvent::LegacyEvent::FLOW_OUT); + } + } +}; +#endif // PERFETTO_ENABLE_LEGACY_TRACE_EVENTS + +// Legacy macros allow argument values to be nullptr and convert them to the +// "NULL" string. The following function helps mimic this behavior: it forwards +// all types of arguments apart from a nullptr string as is, and in case of a +// nullptr returns "NULL". +template +inline T PossiblyNull(T&& value) { + return std::forward(value); +} + +inline const char* PossiblyNull(const char* name) { + return name ? name : "NULL"; +} + +inline const char* PossiblyNull(char* name) { + return name ? name : "NULL"; +} + +} // namespace internal +} // namespace perfetto + +#endif // INCLUDE_PERFETTO_TRACING_INTERNAL_TRACK_EVENT_LEGACY_H_ // gen_amalgamated begin header: include/perfetto/tracing/internal/write_track_event_args.h // gen_amalgamated begin header: include/perfetto/tracing/track_event_args.h /* @@ -15932,6 +16563,24 @@ static constexpr bool IsValidTraceLambdaTakingReference() { return IsValidTraceLambdaTakingReferenceImpl(nullptr); } +template +static constexpr bool IsFieldMetadataTypeImpl( + typename std::enable_if< + std::is_base_of::value>::type* = nullptr) { + return true; +} + +template +static constexpr bool IsFieldMetadataTypeImpl(...) { + return false; +} + +template +static constexpr bool IsFieldMetadataType() { + return IsFieldMetadataTypeImpl(nullptr); +} + } // namespace // Write an old-style lambda taking an EventContext (without a reference) @@ -15940,8 +16589,9 @@ static constexpr bool IsValidTraceLambdaTakingReference() { template ()>::type> -PERFETTO_ALWAYS_INLINE void WriteTrackEventArgs(EventContext event_ctx, - ArgumentFunction arg_function) { +PERFETTO_ALWAYS_INLINE void WriteTrackEventArgs( + EventContext event_ctx, + const ArgumentFunction& arg_function) { arg_function(std::move(event_ctx)); } @@ -15953,21 +16603,24 @@ PERFETTO_ALWAYS_INLINE void WriteTrackEventArgs(EventContext event_ctx, ArgValue&& arg_value, Args&&... args); -template -PERFETTO_ALWAYS_INLINE void WriteTrackEventArgs( - EventContext event_ctx, - protozero::proto_utils::internal::FieldMetadataHelper - field_name, - ArgValue&& arg_value, - Args&&... args); +template ()>::type> +PERFETTO_ALWAYS_INLINE void WriteTrackEventArgs(EventContext event_ctx, + FieldMetadataType field_name, + ArgValue&& arg_value, + Args&&... args); template ()>::type> -PERFETTO_ALWAYS_INLINE void WriteTrackEventArgs(EventContext event_ctx, - ArgumentFunction arg_function, - Args&&... args) { +PERFETTO_ALWAYS_INLINE void WriteTrackEventArgs( + EventContext event_ctx, + const ArgumentFunction& arg_function, + Args&&... args) { // |arg_function| will capture EventContext by reference, so std::move isn't // needed. arg_function(event_ctx); @@ -15976,13 +16629,14 @@ PERFETTO_ALWAYS_INLINE void WriteTrackEventArgs(EventContext event_ctx, } // Write one typed message and recursively write the rest of the arguments. -template -PERFETTO_ALWAYS_INLINE void WriteTrackEventArgs( - EventContext event_ctx, - protozero::proto_utils::internal::FieldMetadataHelper - field_name, - ArgValue&& arg_value, - Args&&... args) { +template +PERFETTO_ALWAYS_INLINE void WriteTrackEventArgs(EventContext event_ctx, + FieldMetadataType field_name, + ArgValue&& arg_value, + Args&&... args) { static_assert(std::is_base_of::value, ""); @@ -16008,6 +16662,16 @@ PERFETTO_ALWAYS_INLINE void WriteTrackEventArgs(EventContext event_ctx, WriteTrackEventArgs(std::move(event_ctx), std::forward(args)...); } +// Write one debug annotation and recursively write the rest of the arguments. +template +PERFETTO_ALWAYS_INLINE void WriteTrackEventArgs(EventContext event_ctx, + DynamicString arg_name, + ArgValue&& arg_value, + Args&&... args) { + event_ctx.AddDebugAnnotation(arg_name, std::forward(arg_value)); + WriteTrackEventArgs(std::move(event_ctx), std::forward(args)...); +} + } // namespace internal } // namespace perfetto @@ -16481,6 +17145,7 @@ class PERFETTO_EXPORT_COMPONENT TrackEventConfig : public ::protozero::CppMessag // gen_amalgamated expanded: #include "perfetto/tracing/data_source.h" // gen_amalgamated expanded: #include "perfetto/tracing/event_context.h" // gen_amalgamated expanded: #include "perfetto/tracing/internal/track_event_internal.h" +// gen_amalgamated expanded: #include "perfetto/tracing/internal/track_event_legacy.h" // gen_amalgamated expanded: #include "perfetto/tracing/internal/write_track_event_args.h" // gen_amalgamated expanded: #include "perfetto/tracing/track.h" // gen_amalgamated expanded: #include "perfetto/tracing/track_event_category_registry.h" @@ -16492,6 +17157,28 @@ class PERFETTO_EXPORT_COMPONENT TrackEventConfig : public ::protozero::CppMessag namespace perfetto { +namespace { + +class StopArgsImpl : public DataSourceBase::StopArgs { + public: + // HandleAsynchronously() can optionally be called to defer the tracing + // session stop and write track events just before stopping. This function + // returns a closure that must be invoked after the last track events have + // been emitted. The caller also needs to explicitly call + // TrackEvent::Flush() because no other implicit flushes will happen after + // the stop signal. + // See the comment in include/perfetto/tracing/data_source.h for more info. + std::function HandleStopAsynchronously() const override { + auto closure = std::move(async_stop_closure); + async_stop_closure = std::function(); + return closure; + } + + mutable std::function async_stop_closure; +}; + +} // namespace + // A function for converting an abstract timestamp into a // perfetto::TraceTimestamp struct. By specialising this template and defining // static ConvertTimestampToTraceTimeNs function in it the user can register @@ -16579,6 +17266,22 @@ inline void ValidateEventNameType() { } // namespace +inline ::perfetto::DynamicString DecayEventNameType( + ::perfetto::DynamicString name) { + return name; +} + +inline ::perfetto::StaticString DecayEventNameType( + ::perfetto::StaticString name) { + return name; +} + +// Convert all static strings of different length to StaticString to avoid +// unnecessary template instantiations. +inline ::perfetto::StaticString DecayEventNameType(const char* name) { + return ::perfetto::StaticString{name}; +} + // Traits for dynamic categories. template struct CategoryTraits { @@ -16629,22 +17332,25 @@ struct TrackEventDataSourceTraits : public perfetto::DefaultDataSourceTraits { // A generic track event data source which is instantiated once per track event // category namespace. -template +template class TrackEventDataSource - : public DataSource { - using Base = DataSource; + : public DataSource { + using Base = DataSource; public: + static constexpr bool kRequiresCallbacksUnderLock = false; + // Add or remove a session observer for this track event data source. The // observer will be notified about started and stopped tracing sessions. // Returns |true| if the observer was successfully added (i.e., the maximum // number of observers wasn't exceeded). static bool AddSessionObserver(TrackEventSessionObserver* observer) { - return TrackEventInternal::AddSessionObserver(observer); + return TrackEventInternal::AddSessionObserver(*Registry, observer); } static void RemoveSessionObserver(TrackEventSessionObserver* observer) { - TrackEventInternal::RemoveSessionObserver(observer); + TrackEventInternal::RemoveSessionObserver(*Registry, observer); } // DataSource implementation. @@ -16656,11 +17362,31 @@ class TrackEventDataSource } void OnStart(const DataSourceBase::StartArgs& args) override { - TrackEventInternal::OnStart(args); + TrackEventInternal::OnStart(*Registry, args); } void OnStop(const DataSourceBase::StopArgs& args) override { - TrackEventInternal::DisableTracing(*Registry, args); + auto outer_stop_closure = args.HandleStopAsynchronously(); + StopArgsImpl inner_stop_args{}; + uint32_t internal_instance_index = args.internal_instance_index; + inner_stop_args.internal_instance_index = internal_instance_index; + inner_stop_args.async_stop_closure = [internal_instance_index, + outer_stop_closure] { + TrackEventInternal::DisableTracing(*Registry, internal_instance_index); + outer_stop_closure(); + }; + + TrackEventInternal::OnStop(*Registry, inner_stop_args); + + // If inner_stop_args.HandleStopAsynchronously() hasn't been called, + // run the async closure here. + if (inner_stop_args.async_stop_closure) + std::move(inner_stop_args.async_stop_closure)(); + } + + void WillClearIncrementalState( + const DataSourceBase::ClearIncrementalStateArgs& args) override { + TrackEventInternal::WillClearIncrementalState(*Registry, args); } static void Flush() { @@ -16686,7 +17412,7 @@ class TrackEventDataSource const DynamicCategory& dynamic_category) { bool enabled = false; Base::template Trace([&](typename Base::TraceContext ctx) { - enabled = IsDynamicCategoryEnabled(&ctx, dynamic_category); + enabled = enabled || IsDynamicCategoryEnabled(&ctx, dynamic_category); }); return enabled; } @@ -16844,6 +17570,135 @@ class TrackEventDataSource }); } +// Additional trace points used in legacy macros. +// It's possible to implement legacy macros using a common TraceForCategory, +// by supplying a lambda that sets all necessary legacy fields. But this +// results in a binary size bloat because every trace point generates its own +// template instantiation with its own lambda. ICF can't eliminate those as +// each lambda captures different variables and so the code is not completely +// identical. +// What we do instead is define additional TraceForCategoryLegacy templates +// that take legacy arguments directly. Their instantiations can have the same +// binary code for at least some macro invocations and so can be successfully +// folded by the linker. +#if PERFETTO_ENABLE_LEGACY_TRACE_EVENTS + template ::value>::type> + static void TraceForCategoryLegacy( + uint32_t instances, + const CategoryType& category, + const EventNameType& event_name, + perfetto::protos::pbzero::TrackEvent::Type type, + TrackType&& track, + char phase, + uint32_t flags, + Arguments&&... args) PERFETTO_NO_INLINE { + TraceForCategoryImpl(instances, category, event_name, type, track, + TrackEventInternal::GetTraceTime(), + [&](perfetto::EventContext ctx) + PERFETTO_NO_THREAD_SAFETY_ANALYSIS { + using ::perfetto::internal::TrackEventLegacy; + TrackEventLegacy::WriteLegacyEvent( + std::move(ctx), phase, flags, args...); + }); + } + + template ::value>::type, + typename TimestampTypeCheck = typename std::enable_if< + IsValidTimestamp()>::type> + static void TraceForCategoryLegacy( + uint32_t instances, + const CategoryType& category, + const EventNameType& event_name, + perfetto::protos::pbzero::TrackEvent::Type type, + TrackType&& track, + char phase, + uint32_t flags, + TimestampType&& timestamp, + Arguments&&... args) PERFETTO_NO_INLINE { + TraceForCategoryImpl( + instances, category, event_name, type, track, timestamp, + [&](perfetto::EventContext ctx) PERFETTO_NO_THREAD_SAFETY_ANALYSIS { + using ::perfetto::internal::TrackEventLegacy; + TrackEventLegacy::WriteLegacyEvent(std::move(ctx), phase, flags, + args...); + }); + } + + template ::value>::type> + static void TraceForCategoryLegacyWithId( + uint32_t instances, + const CategoryType& category, + const EventNameType& event_name, + perfetto::protos::pbzero::TrackEvent::Type type, + TrackType&& track, + char phase, + uint32_t flags, + ThreadIdType thread_id, + LegacyIdType legacy_id, + Arguments&&... args) PERFETTO_NO_INLINE { + TraceForCategoryImpl( + instances, category, event_name, type, track, + TrackEventInternal::GetTraceTime(), + [&](perfetto::EventContext ctx) PERFETTO_NO_THREAD_SAFETY_ANALYSIS { + using ::perfetto::internal::TrackEventLegacy; + ::perfetto::internal::LegacyTraceId trace_id{legacy_id}; + TrackEventLegacy::WriteLegacyEventWithIdAndTid( + std::move(ctx), phase, flags, trace_id, thread_id, args...); + }); + } + + template ::value>::type, + typename TimestampTypeCheck = typename std::enable_if< + IsValidTimestamp()>::type> + static void TraceForCategoryLegacyWithId( + uint32_t instances, + const CategoryType& category, + const EventNameType& event_name, + perfetto::protos::pbzero::TrackEvent::Type type, + TrackType&& track, + char phase, + uint32_t flags, + ThreadIdType thread_id, + LegacyIdType legacy_id, + TimestampType&& timestamp, + Arguments&&... args) PERFETTO_NO_INLINE { + TraceForCategoryImpl( + instances, category, event_name, type, track, timestamp, + [&](perfetto::EventContext ctx) PERFETTO_NO_THREAD_SAFETY_ANALYSIS { + using ::perfetto::internal::TrackEventLegacy; + ::perfetto::internal::LegacyTraceId trace_id{legacy_id}; + TrackEventLegacy::WriteLegacyEventWithIdAndTid( + std::move(ctx), phase, flags, trace_id, thread_id, args...); + }); + } +#endif // PERFETTO_ENABLE_LEGACY_TRACE_EVENTS + // Initialize the track event library. Should be called before tracing is // enabled. static bool Register() { @@ -16920,6 +17775,86 @@ class TrackEventDataSource } }; + template ()>::type, + typename TrackTypeCheck = + typename std::enable_if()>::type> + static perfetto::EventContext WriteTrackEvent( + typename Base::TraceContext& ctx, + const CategoryType& category, + const EventNameType& event_name, + perfetto::protos::pbzero::TrackEvent::Type type, + const TrackType& track, + const TimestampType& timestamp) PERFETTO_NO_INLINE { + using CatTraits = CategoryTraits; + const Category* static_category = + CatTraits::GetStaticCategory(Registry, category); + + const TrackEventTlsState& tls_state = *ctx.GetCustomTlsState(); + TraceTimestamp trace_timestamp = ::perfetto::TraceTimestampTraits< + TimestampType>::ConvertTimestampToTraceTimeNs(timestamp); + + TraceWriterBase* trace_writer = ctx.tls_inst_->trace_writer.get(); + // Make sure incremental state is valid. + TrackEventIncrementalState* incr_state = ctx.GetIncrementalState(); + TrackEventInternal::ResetIncrementalStateIfRequired( + trace_writer, incr_state, tls_state, trace_timestamp); + + // Write the track descriptor before any event on the track. + if (track) { + TrackEventInternal::WriteTrackDescriptorIfNeeded( + track, trace_writer, incr_state, tls_state, trace_timestamp); + } + + // Write the event itself. + bool on_current_thread_track = + (&track == &TrackEventInternal::kDefaultTrack); + auto event_ctx = TrackEventInternal::WriteEvent( + trace_writer, incr_state, tls_state, static_category, type, + trace_timestamp, on_current_thread_track); + // event name should be emitted with `TRACE_EVENT_BEGIN` macros + // but not with `TRACE_EVENT_END`. + if (type != protos::pbzero::TrackEvent::TYPE_SLICE_END) { + TrackEventInternal::WriteEventName(event_name, event_ctx, tls_state); + } + // Write dynamic categories (except for events that don't require + // categories). For counter events, the counter name (and optional + // category) is stored as part of the track descriptor instead being + // recorded with individual events. + if (CatTraits::kIsDynamic && + type != protos::pbzero::TrackEvent::TYPE_SLICE_END && + type != protos::pbzero::TrackEvent::TYPE_COUNTER) { + DynamicCategory dynamic_category = + CatTraits::GetDynamicCategory(category); + Category cat = Category::FromDynamicCategory(dynamic_category); + cat.ForEachGroupMember([&](const char* member_name, size_t name_size) { + event_ctx.event()->add_categories(member_name, name_size); + return true; + }); + } + if (type == protos::pbzero::TrackEvent::TYPE_UNSPECIFIED) { + // Explicitly clear the track, so that the event is not associated + // with the default track, but instead uses the legacy mechanism + // based on the phase and pid/tid override. + event_ctx.event()->set_track_uuid(0); + } else if (!on_current_thread_track) { + // We emit these events using TrackDescriptors, and we cannot emit + // events on behalf of other processes using the TrackDescriptor + // format. Chrome is the only user of events with explicit process + // ids and currently only Chrome emits PHASE_MEMORY_DUMP events + // with an explicit process id, so we should be fine here. + // TODO(mohitms): Get rid of events with explicit process ids + // entirely. + event_ctx.event()->set_track_uuid(track.uuid); + } + + return event_ctx; + } + template ; - const Category* static_category = - CatTraits::GetStaticCategory(Registry, category); TraceWithInstances( instances, category, [&](typename Base::TraceContext ctx) { // If this category is dynamic, first check whether it's enabled. @@ -16949,56 +17882,10 @@ class TrackEventDataSource return; } - const TrackEventTlsState& tls_state = *ctx.GetCustomTlsState(); - TraceTimestamp trace_timestamp = ::perfetto::TraceTimestampTraits< - TimestampType>::ConvertTimestampToTraceTimeNs(timestamp); - - TraceWriterBase* trace_writer = ctx.tls_inst_->trace_writer.get(); - // Make sure incremental state is valid. - TrackEventIncrementalState* incr_state = ctx.GetIncrementalState(); - TrackEventInternal::ResetIncrementalStateIfRequired( - trace_writer, incr_state, tls_state, trace_timestamp); - - // Write the track descriptor before any event on the track. - if (track) { - TrackEventInternal::WriteTrackDescriptorIfNeeded( - track, trace_writer, incr_state, tls_state, trace_timestamp); - } - - // Write the event itself. - { - bool on_current_thread_track = - (&track == &TrackEventInternal::kDefaultTrack); - auto event_ctx = TrackEventInternal::WriteEvent( - trace_writer, incr_state, tls_state, static_category, type, - trace_timestamp, on_current_thread_track); - // event name should be emitted with `TRACE_EVENT_BEGIN` macros - // but not with `TRACE_EVENT_END`. - if (type != protos::pbzero::TrackEvent::TYPE_SLICE_END) { - TrackEventInternal::WriteEventName(event_name, event_ctx, - tls_state); - } - // Write dynamic categories (except for events that don't require - // categories). For counter events, the counter name (and optional - // category) is stored as part of the track descriptor instead being - // recorded with individual events. - if (CatTraits::kIsDynamic && - type != protos::pbzero::TrackEvent::TYPE_SLICE_END && - type != protos::pbzero::TrackEvent::TYPE_COUNTER) { - DynamicCategory dynamic_category = - CatTraits::GetDynamicCategory(category); - Category cat = Category::FromDynamicCategory(dynamic_category); - cat.ForEachGroupMember( - [&](const char* member_name, size_t name_size) { - event_ctx.event()->add_categories(member_name, name_size); - return true; - }); - } - if (!on_current_thread_track) - event_ctx.event()->set_track_uuid(track.uuid); - WriteTrackEventArgs(std::move(event_ctx), - std::forward(args)...); - } // event_ctx + auto event_ctx = WriteTrackEvent(ctx, category, event_name, type, + track, timestamp); + WriteTrackEventArgs(std::move(event_ctx), + std::forward(args)...); }); } @@ -17103,14 +17990,13 @@ class TrackEventDataSource // byte 0 byte 1 // (inst0, inst1, ..., inst7), (inst0, inst1, ..., inst7) // -#define PERFETTO_INTERNAL_DECLARE_CATEGORIES(...) \ +#define PERFETTO_INTERNAL_DECLARE_CATEGORIES(attrs, ...) \ namespace internal { \ constexpr ::perfetto::Category kCategories[] = {__VA_ARGS__}; \ constexpr size_t kCategoryCount = \ sizeof(kCategories) / sizeof(kCategories[0]); \ /* The per-instance enable/disable state per category */ \ - PERFETTO_COMPONENT_EXPORT extern std::atomic \ - g_category_state_storage[kCategoryCount]; \ + attrs extern std::atomic g_category_state_storage[kCategoryCount]; \ /* The category registry which mediates access to the above structures. */ \ /* The registry is used for two purposes: */ \ /**/ \ @@ -17131,32 +18017,29 @@ class TrackEventDataSource /* TODO(skyostil): Unify these using a C++17 inline constexpr variable. */ \ constexpr ::perfetto::internal::TrackEventCategoryRegistry \ kConstExprCategoryRegistry(kCategoryCount, &kCategories[0], nullptr); \ - PERFETTO_COMPONENT_EXPORT extern const ::perfetto::internal:: \ - TrackEventCategoryRegistry kCategoryRegistry; \ + attrs extern const ::perfetto::internal::TrackEventCategoryRegistry \ + kCategoryRegistry; \ static_assert(kConstExprCategoryRegistry.ValidateCategories(), \ "Invalid category names found"); \ } // namespace internal // In a .cc file, declares storage for each category's runtime state. -#define PERFETTO_INTERNAL_CATEGORY_STORAGE() \ - namespace internal { \ - PERFETTO_COMPONENT_EXPORT std::atomic \ - g_category_state_storage[kCategoryCount]; \ - PERFETTO_EXPORT_COMPONENT const ::perfetto::internal:: \ - TrackEventCategoryRegistry kCategoryRegistry( \ - kCategoryCount, \ - &kCategories[0], \ - &g_category_state_storage[0]); \ +#define PERFETTO_INTERNAL_CATEGORY_STORAGE(attrs) \ + namespace internal { \ + attrs std::atomic g_category_state_storage[kCategoryCount]; \ + attrs const ::perfetto::internal::TrackEventCategoryRegistry \ + kCategoryRegistry(kCategoryCount, \ + &kCategories[0], \ + &g_category_state_storage[0]); \ } // namespace internal // Defines the TrackEvent data source for the current track event namespace. // `virtual ~TrackEvent` is added to avoid `-Wweak-vtables` warning. // Learn more : aosp/2019906 -#define PERFETTO_INTERNAL_DECLARE_TRACK_EVENT_DATA_SOURCE() \ - struct PERFETTO_COMPONENT_EXPORT TrackEvent \ - : public ::perfetto::internal::TrackEventDataSource< \ - TrackEvent, &internal::kCategoryRegistry> { \ - virtual ~TrackEvent(); \ +#define PERFETTO_INTERNAL_DECLARE_TRACK_EVENT_DATA_SOURCE(attrs) \ + struct attrs TrackEvent : public ::perfetto::internal::TrackEventDataSource< \ + TrackEvent, &internal::kCategoryRegistry> { \ + virtual ~TrackEvent(); \ } #define PERFETTO_INTERNAL_DEFINE_TRACK_EVENT_DATA_SOURCE() \ @@ -17166,9 +18049,9 @@ class TrackEventDataSource // index into the current category registry. A build error will be generated if // the category hasn't been registered or added to the list of allowed dynamic // categories. See PERFETTO_DEFINE_CATEGORIES. -#define PERFETTO_GET_CATEGORY_INDEX(category) \ - ::PERFETTO_TRACK_EVENT_NAMESPACE::internal::kConstExprCategoryRegistry.Find( \ - category, \ +#define PERFETTO_GET_CATEGORY_INDEX(category) \ + PERFETTO_TRACK_EVENT_NAMESPACE::internal::kConstExprCategoryRegistry.Find( \ + category, \ ::PERFETTO_TRACK_EVENT_NAMESPACE::internal::IsDynamicCategory(category)) // Generate a unique variable name with a given prefix. @@ -17178,26 +18061,26 @@ class TrackEventDataSource // Efficiently determines whether tracing is enabled for the given category, and // if so, emits one trace event with the given arguments. -#define PERFETTO_INTERNAL_TRACK_EVENT(category, name, ...) \ +#define PERFETTO_INTERNAL_TRACK_EVENT_WITH_METHOD(method, category, name, ...) \ do { \ - perfetto::internal::ValidateEventNameType(); \ - namespace tns = ::PERFETTO_TRACK_EVENT_NAMESPACE; \ + ::perfetto::internal::ValidateEventNameType(); \ + namespace tns = PERFETTO_TRACK_EVENT_NAMESPACE; \ /* Compute the category index outside the lambda to work around a */ \ /* GCC 7 bug */ \ - static constexpr auto PERFETTO_UID( \ + constexpr auto PERFETTO_UID( \ kCatIndex_ADD_TO_PERFETTO_DEFINE_CATEGORIES_IF_FAILS_) = \ PERFETTO_GET_CATEGORY_INDEX(category); \ - if (tns::internal::IsDynamicCategory(category)) { \ + if (::PERFETTO_TRACK_EVENT_NAMESPACE::internal::IsDynamicCategory( \ + category)) { \ tns::TrackEvent::CallIfEnabled( \ [&](uint32_t instances) PERFETTO_NO_THREAD_SAFETY_ANALYSIS { \ - tns::TrackEvent::TraceForCategory(instances, category, name, \ - ##__VA_ARGS__); \ + tns::TrackEvent::method(instances, category, name, ##__VA_ARGS__); \ }); \ } else { \ tns::TrackEvent::CallIfCategoryEnabled( \ PERFETTO_UID(kCatIndex_ADD_TO_PERFETTO_DEFINE_CATEGORIES_IF_FAILS_), \ [&](uint32_t instances) PERFETTO_NO_THREAD_SAFETY_ANALYSIS { \ - tns::TrackEvent::TraceForCategory( \ + tns::TrackEvent::method( \ instances, \ PERFETTO_UID( \ kCatIndex_ADD_TO_PERFETTO_DEFINE_CATEGORIES_IF_FAILS_), \ @@ -17206,7 +18089,29 @@ class TrackEventDataSource } \ } while (false) -#define PERFETTO_INTERNAL_SCOPED_TRACK_EVENT(category, name, ...) \ +#define PERFETTO_INTERNAL_TRACK_EVENT(...) \ + PERFETTO_INTERNAL_TRACK_EVENT_WITH_METHOD(TraceForCategory, ##__VA_ARGS__) + +#if PERFETTO_ENABLE_LEGACY_TRACE_EVENTS +#define PERFETTO_INTERNAL_LEGACY_TRACK_EVENT(...) \ + PERFETTO_INTERNAL_TRACK_EVENT_WITH_METHOD(TraceForCategoryLegacy, \ + ##__VA_ARGS__) + +#define PERFETTO_INTERNAL_LEGACY_TRACK_EVENT_WITH_ID(...) \ + PERFETTO_INTERNAL_TRACK_EVENT_WITH_METHOD(TraceForCategoryLegacyWithId, \ + ##__VA_ARGS__) +#endif // PERFETTO_ENABLE_LEGACY_TRACE_EVENTS + +// C++17 doesn't like a move constructor being defined for the EventFinalizer +// class but C++11 and MSVC doesn't compile without it being defined so support +// both. +#if !PERFETTO_BUILDFLAG(PERFETTO_COMPILER_MSVC) +#define PERFETTO_INTERNAL_EVENT_FINALIZER_KEYWORD delete +#else +#define PERFETTO_INTERNAL_EVENT_FINALIZER_KEYWORD default +#endif + +#define PERFETTO_INTERNAL_SCOPED_EVENT_FINALIZER(category) \ struct PERFETTO_UID(ScopedEvent) { \ struct EventFinalizer { \ /* The parameter is an implementation detail. It allows the */ \ @@ -17222,22 +18127,64 @@ class TrackEventDataSource EventFinalizer(const EventFinalizer&) = delete; \ inline EventFinalizer& operator=(const EventFinalizer&) = delete; \ \ - EventFinalizer(EventFinalizer&&) = default; \ + EventFinalizer(EventFinalizer&&) = \ + PERFETTO_INTERNAL_EVENT_FINALIZER_KEYWORD; \ EventFinalizer& operator=(EventFinalizer&&) = delete; \ } finalizer; \ - } PERFETTO_UID(scoped_event) { \ - [&]() { \ - TRACE_EVENT_BEGIN(category, name, ##__VA_ARGS__); \ - return 0; \ - }() \ } -#define PERFETTO_INTERNAL_CATEGORY_ENABLED(category) \ - (::PERFETTO_TRACK_EVENT_NAMESPACE::internal::IsDynamicCategory(category) \ - ? ::PERFETTO_TRACK_EVENT_NAMESPACE::TrackEvent:: \ - IsDynamicCategoryEnabled(::perfetto::DynamicCategory(category)) \ - : ::PERFETTO_TRACK_EVENT_NAMESPACE::TrackEvent::IsCategoryEnabled( \ +#define PERFETTO_INTERNAL_SCOPED_TRACK_EVENT(category, name, ...) \ + PERFETTO_INTERNAL_SCOPED_EVENT_FINALIZER(category) \ + PERFETTO_UID(scoped_event) { \ + [&]() { \ + TRACE_EVENT_BEGIN(category, name, ##__VA_ARGS__); \ + return 0; \ + }() \ + } + +#if PERFETTO_ENABLE_LEGACY_TRACE_EVENTS +// Required for TRACE_EVENT_WITH_FLOW legacy macros, which pass the bind_id as +// id. +#define PERFETTO_INTERNAL_SCOPED_LEGACY_TRACK_EVENT_WITH_ID( \ + category, name, track, flags, thread_id, id, ...) \ + PERFETTO_INTERNAL_SCOPED_EVENT_FINALIZER(category) \ + PERFETTO_UID(scoped_event) { \ + [&]() { \ + PERFETTO_INTERNAL_LEGACY_TRACK_EVENT_WITH_ID( \ + category, name, \ + ::perfetto::protos::pbzero::TrackEvent::TYPE_SLICE_BEGIN, track, \ + 'B', flags, thread_id, id, ##__VA_ARGS__); \ + return 0; \ + }() \ + } +#endif // PERFETTO_ENABLE_LEGACY_TRACE_EVENTS + +#if PERFETTO_BUILDFLAG(PERFETTO_COMPILER_GCC) +// On GCC versions <9 there's a bug that prevents using captured constant +// variables in constexpr evaluation inside a lambda: +// https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82643 +// TODO(khokhlov): Remove this fallback after Perfetto moves to a more recent +// GCC version. +#define PERFETTO_INTERNAL_CATEGORY_ENABLED(category) \ + (::PERFETTO_TRACK_EVENT_NAMESPACE::internal::IsDynamicCategory(category) \ + ? PERFETTO_TRACK_EVENT_NAMESPACE::TrackEvent::IsDynamicCategoryEnabled( \ + ::perfetto::DynamicCategory(category)) \ + : PERFETTO_TRACK_EVENT_NAMESPACE::TrackEvent::IsCategoryEnabled( \ PERFETTO_GET_CATEGORY_INDEX(category))) +#else // !PERFETTO_BUILDFLAG(PERFETTO_COMPILER_GCC) +#define PERFETTO_INTERNAL_CATEGORY_ENABLED(category) \ + [&]() -> bool { \ + using PERFETTO_TRACK_EVENT_NAMESPACE::TrackEvent; \ + using ::PERFETTO_TRACK_EVENT_NAMESPACE::internal::IsDynamicCategory; \ + constexpr auto PERFETTO_UID(index) = \ + PERFETTO_GET_CATEGORY_INDEX(category); \ + constexpr auto PERFETTO_UID(dynamic) = IsDynamicCategory(category); \ + return PERFETTO_UID(dynamic) \ + ? TrackEvent::IsDynamicCategoryEnabled( \ + ::perfetto::DynamicCategory(category)) \ + : TrackEvent::IsCategoryEnabled(PERFETTO_UID(index)); \ + }() +#endif // !PERFETTO_BUILDFLAG(PERFETTO_COMPILER_GCC) // Emits an empty trace packet into the trace to ensure that the service can // safely read the last event from the trace buffer. This can be used to @@ -17249,12 +18196,12 @@ class TrackEventDataSource // read the last trace packet from an incomplete SMB chunk (crbug.com/1021571 // and b/162206162) when scraping the SMB. Adding an empty trace packet ensures // that all prior events can be scraped by the service. -#define PERFETTO_INTERNAL_ADD_EMPTY_EVENT() \ - do { \ - ::PERFETTO_TRACK_EVENT_NAMESPACE::TrackEvent::Trace( \ - [](::PERFETTO_TRACK_EVENT_NAMESPACE::TrackEvent::TraceContext ctx) { \ - ctx.NewTracePacket(); \ - }); \ +#define PERFETTO_INTERNAL_ADD_EMPTY_EVENT() \ + do { \ + PERFETTO_TRACK_EVENT_NAMESPACE::TrackEvent::Trace( \ + [](PERFETTO_TRACK_EVENT_NAMESPACE::TrackEvent::TraceContext ctx) { \ + ctx.AddEmptyTracePacket(); \ + }); \ } while (false) #endif // INCLUDE_PERFETTO_TRACING_INTERNAL_TRACK_EVENT_MACROS_H_ @@ -17277,7 +18224,6 @@ class TrackEventDataSource #ifndef INCLUDE_PERFETTO_TRACING_TRACK_EVENT_H_ #define INCLUDE_PERFETTO_TRACING_TRACK_EVENT_H_ -// gen_amalgamated expanded: #include "perfetto/base/time.h" // gen_amalgamated expanded: #include "perfetto/tracing/internal/track_event_data_source.h" // gen_amalgamated expanded: #include "perfetto/tracing/internal/track_event_internal.h" // gen_amalgamated expanded: #include "perfetto/tracing/internal/track_event_macros.h" @@ -17376,6 +18322,9 @@ class TrackEventDataSource // '----------------------------------' // +// DEPRECATED: Please use PERFETTO_DEFINE_CATEGORIES_IN_NAMESPACE to implement +// multiple track event category sets in one program. +// // Each compilation unit can be in exactly one track event namespace, // allowing the overall program to use multiple track event data sources and // category lists if necessary. Use this macro to select the namespace for the @@ -17384,8 +18333,9 @@ class TrackEventDataSource // If the program uses multiple track event namespaces, category & track event // registration (see quickstart above) needs to happen for both namespaces // separately. + #ifndef PERFETTO_TRACK_EVENT_NAMESPACE -#define PERFETTO_TRACK_EVENT_NAMESPACE perfetto +#define PERFETTO_TRACK_EVENT_NAMESPACE perfetto_track_event #endif // Deprecated; see perfetto::Category(). @@ -17430,28 +18380,85 @@ constexpr bool IsDynamicCategory(const ::perfetto::DynamicCategory&) { PERFETTO_INTERNAL_SWALLOW_SEMICOLON() // Register the set of available categories by passing a list of categories to -// this macro: PERFETTO_CATEGORY(cat1), PERFETTO_CATEGORY(cat2), ... -#define PERFETTO_DEFINE_CATEGORIES(...) \ - namespace PERFETTO_TRACK_EVENT_NAMESPACE { \ - /* The list of category names */ \ - PERFETTO_INTERNAL_DECLARE_CATEGORIES(__VA_ARGS__) \ - /* The track event data source for this set of categories */ \ - PERFETTO_INTERNAL_DECLARE_TRACK_EVENT_DATA_SOURCE(); \ - } /* namespace PERFETTO_TRACK_EVENT_NAMESPACE */ \ - PERFETTO_DECLARE_DATA_SOURCE_STATIC_MEMBERS( \ - PERFETTO_TRACK_EVENT_NAMESPACE::TrackEvent, \ - perfetto::internal::TrackEventDataSourceTraits) +// this macro: perfetto::Category("cat1"), perfetto::Category("cat2"), ... +// `ns` is the name of the namespace in which the categories should be declared. +// `attrs` are linkage attributes for the underlying data source. See +// PERFETTO_DECLARE_DATA_SOURCE_STATIC_MEMBERS_WITH_ATTRS. +// +// Implementation note: the extra namespace (PERFETTO_TRACK_EVENT_NAMESPACE) is +// kept here only for backward compatibility. +#define PERFETTO_DEFINE_CATEGORIES_IN_NAMESPACE_WITH_ATTRS(ns, attrs, ...) \ + namespace ns { \ + namespace PERFETTO_TRACK_EVENT_NAMESPACE { \ + /* The list of category names */ \ + PERFETTO_INTERNAL_DECLARE_CATEGORIES(attrs, __VA_ARGS__) \ + /* The track event data source for this set of categories */ \ + PERFETTO_INTERNAL_DECLARE_TRACK_EVENT_DATA_SOURCE(attrs); \ + } /* namespace PERFETTO_TRACK_EVENT_NAMESPACE */ \ + using PERFETTO_TRACK_EVENT_NAMESPACE::TrackEvent; \ + } /* namespace ns */ \ + PERFETTO_DECLARE_DATA_SOURCE_STATIC_MEMBERS_WITH_ATTRS( \ + attrs, ns::PERFETTO_TRACK_EVENT_NAMESPACE::TrackEvent, \ + ::perfetto::internal::TrackEventDataSourceTraits) + +// Register the set of available categories by passing a list of categories to +// this macro: perfetto::Category("cat1"), perfetto::Category("cat2"), ... +// `ns` is the name of the namespace in which the categories should be declared. +#define PERFETTO_DEFINE_CATEGORIES_IN_NAMESPACE(ns, ...) \ + PERFETTO_DEFINE_CATEGORIES_IN_NAMESPACE_WITH_ATTRS( \ + ns, PERFETTO_COMPONENT_EXPORT, __VA_ARGS__) + +// Make categories in a given namespace the default ones used by track events +// for the current translation unit. Can only be used *once* in a given global +// or namespace scope. +#define PERFETTO_USE_CATEGORIES_FROM_NAMESPACE(ns) \ + namespace PERFETTO_TRACK_EVENT_NAMESPACE { \ + using ::ns::PERFETTO_TRACK_EVENT_NAMESPACE::TrackEvent; \ + namespace internal { \ + using ::ns::PERFETTO_TRACK_EVENT_NAMESPACE::internal::kCategoryRegistry; \ + using ::ns::PERFETTO_TRACK_EVENT_NAMESPACE::internal:: \ + kConstExprCategoryRegistry; \ + } /* namespace internal */ \ + } /* namespace PERFETTO_TRACK_EVENT_NAMESPACE */ \ + PERFETTO_INTERNAL_SWALLOW_SEMICOLON() + +// Make categories in a given namespace the default ones used by track events +// for the current block scope. Can only be used in a function or block scope. +#define PERFETTO_USE_CATEGORIES_FROM_NAMESPACE_SCOPED(ns) \ + namespace PERFETTO_TRACK_EVENT_NAMESPACE = ns::PERFETTO_TRACK_EVENT_NAMESPACE + +// Register categories in the default (global) namespace. Warning: only one set +// of global categories can be defined in a single program. Create namespaced +// categories with PERFETTO_DEFINE_CATEGORIES_IN_NAMESPACE to work around this +// limitation. +#define PERFETTO_DEFINE_CATEGORIES(...) \ + PERFETTO_DEFINE_CATEGORIES_IN_NAMESPACE(perfetto, __VA_ARGS__); \ + PERFETTO_USE_CATEGORIES_FROM_NAMESPACE(perfetto) + +// Allocate storage for each category by using this macro once per track event +// namespace. `ns` is the name of the namespace in which the categories should +// be declared and `attrs` specify linkage attributes for the data source. +#define PERFETTO_TRACK_EVENT_STATIC_STORAGE_IN_NAMESPACE_WITH_ATTRS(ns, attrs) \ + namespace ns { \ + namespace PERFETTO_TRACK_EVENT_NAMESPACE { \ + PERFETTO_INTERNAL_CATEGORY_STORAGE(attrs) \ + PERFETTO_INTERNAL_DEFINE_TRACK_EVENT_DATA_SOURCE() \ + } /* namespace PERFETTO_TRACK_EVENT_NAMESPACE */ \ + } /* namespace ns */ \ + PERFETTO_DEFINE_DATA_SOURCE_STATIC_MEMBERS_WITH_ATTRS( \ + attrs, ns::PERFETTO_TRACK_EVENT_NAMESPACE::TrackEvent, \ + ::perfetto::internal::TrackEventDataSourceTraits) // Allocate storage for each category by using this macro once per track event // namespace. -#define PERFETTO_TRACK_EVENT_STATIC_STORAGE() \ - namespace PERFETTO_TRACK_EVENT_NAMESPACE { \ - PERFETTO_INTERNAL_CATEGORY_STORAGE() \ - PERFETTO_INTERNAL_DEFINE_TRACK_EVENT_DATA_SOURCE() \ - } /* namespace PERFETTO_TRACK_EVENT_NAMESPACE */ \ - PERFETTO_DEFINE_DATA_SOURCE_STATIC_MEMBERS( \ - PERFETTO_TRACK_EVENT_NAMESPACE::TrackEvent, \ - perfetto::internal::TrackEventDataSourceTraits) +#define PERFETTO_TRACK_EVENT_STATIC_STORAGE_IN_NAMESPACE(ns) \ + PERFETTO_TRACK_EVENT_STATIC_STORAGE_IN_NAMESPACE_WITH_ATTRS( \ + ns, PERFETTO_COMPONENT_EXPORT) + +// Allocate storage for each category by using this macro once per track event +// namespace. +#define PERFETTO_TRACK_EVENT_STATIC_STORAGE() \ + PERFETTO_TRACK_EVENT_STATIC_STORAGE_IN_NAMESPACE(perfetto) // Ignore GCC warning about a missing argument for a variadic macro parameter. #if defined(__GNUC__) || defined(__clang__) @@ -17551,9 +18558,9 @@ constexpr bool IsDynamicCategory(const ::perfetto::DynamicCategory&) { // TRACE_EVENT("category", "Name", perfetto::Track(1234), // "arg", value, "arg2", value2); // -#define TRACE_EVENT_BEGIN(category, name, ...) \ - PERFETTO_INTERNAL_TRACK_EVENT( \ - category, name, \ +#define TRACE_EVENT_BEGIN(category, name, ...) \ + PERFETTO_INTERNAL_TRACK_EVENT( \ + category, ::perfetto::internal::DecayEventNameType(name), \ ::perfetto::protos::pbzero::TrackEvent::TYPE_SLICE_BEGIN, ##__VA_ARGS__) // End a slice under |category|. @@ -17564,13 +18571,14 @@ constexpr bool IsDynamicCategory(const ::perfetto::DynamicCategory&) { // Begin a slice which gets automatically closed when going out of scope. #define TRACE_EVENT(category, name, ...) \ - PERFETTO_INTERNAL_SCOPED_TRACK_EVENT(category, name, ##__VA_ARGS__) + PERFETTO_INTERNAL_SCOPED_TRACK_EVENT( \ + category, ::perfetto::internal::DecayEventNameType(name), ##__VA_ARGS__) // Emit a slice which has zero duration. -#define TRACE_EVENT_INSTANT(category, name, ...) \ - PERFETTO_INTERNAL_TRACK_EVENT( \ - category, name, ::perfetto::protos::pbzero::TrackEvent::TYPE_INSTANT, \ - ##__VA_ARGS__) +#define TRACE_EVENT_INSTANT(category, name, ...) \ + PERFETTO_INTERNAL_TRACK_EVENT( \ + category, ::perfetto::internal::DecayEventNameType(name), \ + ::perfetto::protos::pbzero::TrackEvent::TYPE_INSTANT, ##__VA_ARGS__) // Efficiently determine if the given static or dynamic trace category or // category group is enabled for tracing. @@ -17820,7 +18828,9 @@ class TrackEventInternedDataIndex return iid; } - private: + protected: + // Some use cases require a custom Get implemention, so they need access to + // GetOrCreateIndexForField + the returned index. static InternedDataType* GetOrCreateIndexForField( internal::TrackEventIncrementalState* incremental_state) { // Fast path: look for matching field number. @@ -17918,132 +18928,6 @@ class TrackEventInternedDataIndex #pragma GCC system_header #endif -// ---------------------------------------------------------------------------- -// Constants. -// ---------------------------------------------------------------------------- - -namespace perfetto { -namespace legacy { - -enum TraceEventFlag { - kTraceEventFlagNone = 0, - kTraceEventFlagCopy = 1u << 0, - kTraceEventFlagHasId = 1u << 1, - kTraceEventFlagScopeOffset = 1u << 2, - kTraceEventFlagScopeExtra = 1u << 3, - kTraceEventFlagExplicitTimestamp = 1u << 4, - kTraceEventFlagAsyncTTS = 1u << 5, - kTraceEventFlagBindToEnclosing = 1u << 6, - kTraceEventFlagFlowIn = 1u << 7, - kTraceEventFlagFlowOut = 1u << 8, - kTraceEventFlagHasContextId = 1u << 9, - kTraceEventFlagHasProcessId = 1u << 10, - kTraceEventFlagHasLocalId = 1u << 11, - kTraceEventFlagHasGlobalId = 1u << 12, - // TODO(eseckler): Remove once we have native support for typed proto events - // in TRACE_EVENT macros. - kTraceEventFlagTypedProtoArgs = 1u << 15, - kTraceEventFlagJavaStringLiterals = 1u << 16, -}; - -enum PerfettoLegacyCurrentThreadId { kCurrentThreadId }; - -} // namespace legacy -} // namespace perfetto - -#if PERFETTO_ENABLE_LEGACY_TRACE_EVENTS -// The following constants are defined in the global namespace, since they were -// originally implemented as macros. - -// Event phases. -static constexpr char TRACE_EVENT_PHASE_BEGIN = 'B'; -static constexpr char TRACE_EVENT_PHASE_END = 'E'; -static constexpr char TRACE_EVENT_PHASE_COMPLETE = 'X'; -static constexpr char TRACE_EVENT_PHASE_INSTANT = 'I'; -static constexpr char TRACE_EVENT_PHASE_ASYNC_BEGIN = 'S'; -static constexpr char TRACE_EVENT_PHASE_ASYNC_STEP_INTO = 'T'; -static constexpr char TRACE_EVENT_PHASE_ASYNC_STEP_PAST = 'p'; -static constexpr char TRACE_EVENT_PHASE_ASYNC_END = 'F'; -static constexpr char TRACE_EVENT_PHASE_NESTABLE_ASYNC_BEGIN = 'b'; -static constexpr char TRACE_EVENT_PHASE_NESTABLE_ASYNC_END = 'e'; -static constexpr char TRACE_EVENT_PHASE_NESTABLE_ASYNC_INSTANT = 'n'; -static constexpr char TRACE_EVENT_PHASE_FLOW_BEGIN = 's'; -static constexpr char TRACE_EVENT_PHASE_FLOW_STEP = 't'; -static constexpr char TRACE_EVENT_PHASE_FLOW_END = 'f'; -static constexpr char TRACE_EVENT_PHASE_METADATA = 'M'; -static constexpr char TRACE_EVENT_PHASE_COUNTER = 'C'; -static constexpr char TRACE_EVENT_PHASE_SAMPLE = 'P'; -static constexpr char TRACE_EVENT_PHASE_CREATE_OBJECT = 'N'; -static constexpr char TRACE_EVENT_PHASE_SNAPSHOT_OBJECT = 'O'; -static constexpr char TRACE_EVENT_PHASE_DELETE_OBJECT = 'D'; -static constexpr char TRACE_EVENT_PHASE_MEMORY_DUMP = 'v'; -static constexpr char TRACE_EVENT_PHASE_MARK = 'R'; -static constexpr char TRACE_EVENT_PHASE_CLOCK_SYNC = 'c'; -static constexpr char TRACE_EVENT_PHASE_ENTER_CONTEXT = '('; -static constexpr char TRACE_EVENT_PHASE_LEAVE_CONTEXT = ')'; - -// Flags for changing the behavior of TRACE_EVENT_API_ADD_TRACE_EVENT. -static constexpr uint32_t TRACE_EVENT_FLAG_NONE = - perfetto::legacy::kTraceEventFlagNone; -static constexpr uint32_t TRACE_EVENT_FLAG_COPY = - perfetto::legacy::kTraceEventFlagCopy; -static constexpr uint32_t TRACE_EVENT_FLAG_HAS_ID = - perfetto::legacy::kTraceEventFlagHasId; -static constexpr uint32_t TRACE_EVENT_FLAG_SCOPE_OFFSET = - perfetto::legacy::kTraceEventFlagScopeOffset; -static constexpr uint32_t TRACE_EVENT_FLAG_SCOPE_EXTRA = - perfetto::legacy::kTraceEventFlagScopeExtra; -static constexpr uint32_t TRACE_EVENT_FLAG_EXPLICIT_TIMESTAMP = - perfetto::legacy::kTraceEventFlagExplicitTimestamp; -static constexpr uint32_t TRACE_EVENT_FLAG_ASYNC_TTS = - perfetto::legacy::kTraceEventFlagAsyncTTS; -static constexpr uint32_t TRACE_EVENT_FLAG_BIND_TO_ENCLOSING = - perfetto::legacy::kTraceEventFlagBindToEnclosing; -static constexpr uint32_t TRACE_EVENT_FLAG_FLOW_IN = - perfetto::legacy::kTraceEventFlagFlowIn; -static constexpr uint32_t TRACE_EVENT_FLAG_FLOW_OUT = - perfetto::legacy::kTraceEventFlagFlowOut; -static constexpr uint32_t TRACE_EVENT_FLAG_HAS_CONTEXT_ID = - perfetto::legacy::kTraceEventFlagHasContextId; -static constexpr uint32_t TRACE_EVENT_FLAG_HAS_PROCESS_ID = - perfetto::legacy::kTraceEventFlagHasProcessId; -static constexpr uint32_t TRACE_EVENT_FLAG_HAS_LOCAL_ID = - perfetto::legacy::kTraceEventFlagHasLocalId; -static constexpr uint32_t TRACE_EVENT_FLAG_HAS_GLOBAL_ID = - perfetto::legacy::kTraceEventFlagHasGlobalId; -static constexpr uint32_t TRACE_EVENT_FLAG_TYPED_PROTO_ARGS = - perfetto::legacy::kTraceEventFlagTypedProtoArgs; -static constexpr uint32_t TRACE_EVENT_FLAG_JAVA_STRING_LITERALS = - perfetto::legacy::kTraceEventFlagJavaStringLiterals; - -static constexpr uint32_t TRACE_EVENT_FLAG_SCOPE_MASK = - TRACE_EVENT_FLAG_SCOPE_OFFSET | TRACE_EVENT_FLAG_SCOPE_EXTRA; - -// Type values for identifying types in the TraceValue union. -static constexpr uint8_t TRACE_VALUE_TYPE_BOOL = 1; -static constexpr uint8_t TRACE_VALUE_TYPE_UINT = 2; -static constexpr uint8_t TRACE_VALUE_TYPE_INT = 3; -static constexpr uint8_t TRACE_VALUE_TYPE_DOUBLE = 4; -static constexpr uint8_t TRACE_VALUE_TYPE_POINTER = 5; -static constexpr uint8_t TRACE_VALUE_TYPE_STRING = 6; -static constexpr uint8_t TRACE_VALUE_TYPE_COPY_STRING = 7; -static constexpr uint8_t TRACE_VALUE_TYPE_CONVERTABLE = 8; -static constexpr uint8_t TRACE_VALUE_TYPE_PROTO = 9; - -// Enum reflecting the scope of an INSTANT event. Must fit within -// TRACE_EVENT_FLAG_SCOPE_MASK. -static constexpr uint8_t TRACE_EVENT_SCOPE_GLOBAL = 0u << 2; -static constexpr uint8_t TRACE_EVENT_SCOPE_PROCESS = 1u << 2; -static constexpr uint8_t TRACE_EVENT_SCOPE_THREAD = 2u << 2; - -static constexpr char TRACE_EVENT_SCOPE_NAME_GLOBAL = 'g'; -static constexpr char TRACE_EVENT_SCOPE_NAME_PROCESS = 'p'; -static constexpr char TRACE_EVENT_SCOPE_NAME_THREAD = 't'; - -#define TRACE_EVENT_API_CURRENT_THREAD_ID ::perfetto::legacy::kCurrentThreadId - -#endif // PERFETTO_ENABLE_LEGACY_TRACE_EVENTS - // ---------------------------------------------------------------------------- // Internal legacy trace point implementation. // ---------------------------------------------------------------------------- @@ -18068,283 +18952,33 @@ ThreadTrack PERFETTO_EXPORT_COMPONENT ConvertThreadId(const PerfettoLegacyCurrentThreadId&); } // namespace legacy - -namespace internal { - -// LegacyTraceId encapsulates an ID that can either be an integer or pointer. -class PERFETTO_EXPORT_COMPONENT LegacyTraceId { - public: - // Can be combined with WithScope. - class LocalId { - public: - explicit LocalId(const void* raw_id) - : raw_id_(static_cast(reinterpret_cast(raw_id))) {} - explicit LocalId(uint64_t raw_id) : raw_id_(raw_id) {} - uint64_t raw_id() const { return raw_id_; } - - private: - uint64_t raw_id_; - }; - - // Can be combined with WithScope. - class GlobalId { - public: - explicit GlobalId(uint64_t raw_id) : raw_id_(raw_id) {} - uint64_t raw_id() const { return raw_id_; } - - private: - uint64_t raw_id_; - }; - - class WithScope { - public: - WithScope(const char* scope, uint64_t raw_id) - : scope_(scope), raw_id_(raw_id) {} - WithScope(const char* scope, LocalId local_id) - : scope_(scope), raw_id_(local_id.raw_id()) { - id_flags_ = legacy::kTraceEventFlagHasLocalId; - } - WithScope(const char* scope, GlobalId global_id) - : scope_(scope), raw_id_(global_id.raw_id()) { - id_flags_ = legacy::kTraceEventFlagHasGlobalId; - } - WithScope(const char* scope, uint64_t prefix, uint64_t raw_id) - : scope_(scope), has_prefix_(true), prefix_(prefix), raw_id_(raw_id) {} - WithScope(const char* scope, uint64_t prefix, GlobalId global_id) - : scope_(scope), - has_prefix_(true), - prefix_(prefix), - raw_id_(global_id.raw_id()) { - id_flags_ = legacy::kTraceEventFlagHasGlobalId; - } - uint64_t raw_id() const { return raw_id_; } - const char* scope() const { return scope_; } - bool has_prefix() const { return has_prefix_; } - uint64_t prefix() const { return prefix_; } - uint32_t id_flags() const { return id_flags_; } - - private: - const char* scope_ = nullptr; - bool has_prefix_ = false; - uint64_t prefix_; - uint64_t raw_id_; - uint32_t id_flags_ = legacy::kTraceEventFlagHasId; - }; - - explicit LegacyTraceId(const void* raw_id) - : raw_id_(static_cast(reinterpret_cast(raw_id))) { - id_flags_ = legacy::kTraceEventFlagHasLocalId; - } - explicit LegacyTraceId(uint64_t raw_id) : raw_id_(raw_id) {} - explicit LegacyTraceId(uint32_t raw_id) : raw_id_(raw_id) {} - explicit LegacyTraceId(uint16_t raw_id) : raw_id_(raw_id) {} - explicit LegacyTraceId(uint8_t raw_id) : raw_id_(raw_id) {} - explicit LegacyTraceId(int64_t raw_id) - : raw_id_(static_cast(raw_id)) {} - explicit LegacyTraceId(int32_t raw_id) - : raw_id_(static_cast(raw_id)) {} - explicit LegacyTraceId(int16_t raw_id) - : raw_id_(static_cast(raw_id)) {} - explicit LegacyTraceId(int8_t raw_id) - : raw_id_(static_cast(raw_id)) {} - explicit LegacyTraceId(LocalId raw_id) : raw_id_(raw_id.raw_id()) { - id_flags_ = legacy::kTraceEventFlagHasLocalId; - } - explicit LegacyTraceId(GlobalId raw_id) : raw_id_(raw_id.raw_id()) { - id_flags_ = legacy::kTraceEventFlagHasGlobalId; - } - explicit LegacyTraceId(WithScope scoped_id) - : scope_(scoped_id.scope()), - has_prefix_(scoped_id.has_prefix()), - prefix_(scoped_id.prefix()), - raw_id_(scoped_id.raw_id()), - id_flags_(scoped_id.id_flags()) {} - - uint64_t raw_id() const { return raw_id_; } - const char* scope() const { return scope_; } - bool has_prefix() const { return has_prefix_; } - uint64_t prefix() const { return prefix_; } - uint32_t id_flags() const { return id_flags_; } - - void Write(protos::pbzero::TrackEvent::LegacyEvent*, - uint32_t event_flags) const; - - private: - const char* scope_ = nullptr; - bool has_prefix_ = false; - uint64_t prefix_; - uint64_t raw_id_; - uint32_t id_flags_ = legacy::kTraceEventFlagHasId; -}; - -} // namespace internal } // namespace perfetto #if PERFETTO_ENABLE_LEGACY_TRACE_EVENTS -namespace perfetto { -namespace internal { - -class PERFETTO_EXPORT_COMPONENT TrackEventLegacy { - public: - static constexpr protos::pbzero::TrackEvent::Type PhaseToType(char phase) { - // clang-format off - return (phase == TRACE_EVENT_PHASE_BEGIN) ? - protos::pbzero::TrackEvent::TYPE_SLICE_BEGIN : - (phase == TRACE_EVENT_PHASE_END) ? - protos::pbzero::TrackEvent::TYPE_SLICE_END : - (phase == TRACE_EVENT_PHASE_INSTANT) ? - protos::pbzero::TrackEvent::TYPE_INSTANT : - protos::pbzero::TrackEvent::TYPE_UNSPECIFIED; - // clang-format on - } - - // Reduce binary size overhead by outlining most of the code for writing a - // legacy trace event. - template - static void WriteLegacyEvent(EventContext ctx, - char phase, - uint32_t flags, - Args&&... args) PERFETTO_NO_INLINE { - AddDebugAnnotations(&ctx, std::forward(args)...); - if (NeedLegacyFlags(phase, flags)) { - auto legacy_event = ctx.event()->set_legacy_event(); - SetLegacyFlags(legacy_event, phase, flags); - } - } - - template - static void WriteLegacyEventWithIdAndTid(EventContext ctx, - char phase, - uint32_t flags, - const LegacyTraceId& id, - const ThreadIdType& thread_id, - Args&&... args) PERFETTO_NO_INLINE { - // - // Overrides to consider: - // - // 1. If we have an id, we need to write {unscoped,local,global}_id and/or - // bind_id. - // 2. If we have a thread id, we need to write track_uuid() or - // {pid,tid}_override if the id represents another process. The - // conversion from |thread_id| happens in embedder code since the type is - // embedder-specified. - // 3. If we have a timestamp, we need to write a different timestamp in the - // trace packet itself and make sure TrackEvent won't write one - // internally. This is already done at the call site. - // - flags |= id.id_flags(); - AddDebugAnnotations(&ctx, std::forward(args)...); - if (NeedLegacyFlags(phase, flags)) { - auto legacy_event = ctx.event()->set_legacy_event(); - SetLegacyFlags(legacy_event, phase, flags); - if (id.id_flags()) - id.Write(legacy_event, flags); - if (flags & TRACE_EVENT_FLAG_HAS_PROCESS_ID) { - // The thread identifier actually represents a process id. Let's set an - // override for it. - int32_t pid_override = - static_cast(legacy::ConvertThreadId(thread_id).tid); - legacy_event->set_pid_override(pid_override); - legacy_event->set_tid_override(-1); - } - } - } - - // No arguments. - static void AddDebugAnnotations(EventContext*) {} - - // One argument. - template - static void AddDebugAnnotations(EventContext* ctx, - const char* arg_name, - ArgType&& arg_value) { - TrackEventInternal::AddDebugAnnotation(ctx, arg_name, arg_value); - } - - // Two arguments. - template - static void AddDebugAnnotations(EventContext* ctx, - const char* arg_name, - ArgType&& arg_value, - const char* arg_name2, - ArgType2&& arg_value2) { - TrackEventInternal::AddDebugAnnotation(ctx, arg_name, arg_value); - TrackEventInternal::AddDebugAnnotation(ctx, arg_name2, arg_value2); - } - - private: - static bool NeedLegacyFlags(char phase, uint32_t flags) { - if (PhaseToType(phase) == protos::pbzero::TrackEvent::TYPE_UNSPECIFIED) - return true; - // TODO(skyostil): Implement/deprecate: - // - TRACE_EVENT_FLAG_EXPLICIT_TIMESTAMP - // - TRACE_EVENT_FLAG_HAS_CONTEXT_ID - // - TRACE_EVENT_FLAG_TYPED_PROTO_ARGS - // - TRACE_EVENT_FLAG_JAVA_STRING_LITERALS - return flags & - (TRACE_EVENT_FLAG_HAS_ID | TRACE_EVENT_FLAG_HAS_LOCAL_ID | - TRACE_EVENT_FLAG_HAS_GLOBAL_ID | TRACE_EVENT_FLAG_ASYNC_TTS | - TRACE_EVENT_FLAG_BIND_TO_ENCLOSING | TRACE_EVENT_FLAG_FLOW_IN | - TRACE_EVENT_FLAG_FLOW_OUT | TRACE_EVENT_FLAG_HAS_PROCESS_ID); - } - - static void SetLegacyFlags( - protos::pbzero::TrackEvent::LegacyEvent* legacy_event, - char phase, - uint32_t flags) { - if (PhaseToType(phase) == protos::pbzero::TrackEvent::TYPE_UNSPECIFIED) - legacy_event->set_phase(phase); - if (flags & TRACE_EVENT_FLAG_ASYNC_TTS) - legacy_event->set_use_async_tts(true); - if (flags & TRACE_EVENT_FLAG_BIND_TO_ENCLOSING) - legacy_event->set_bind_to_enclosing(true); - - const auto kFlowIn = TRACE_EVENT_FLAG_FLOW_IN; - const auto kFlowOut = TRACE_EVENT_FLAG_FLOW_OUT; - const auto kFlowInOut = kFlowIn | kFlowOut; - if ((flags & kFlowInOut) == kFlowInOut) { - legacy_event->set_flow_direction( - protos::pbzero::TrackEvent::LegacyEvent::FLOW_INOUT); - } else if (flags & kFlowIn) { - legacy_event->set_flow_direction( - protos::pbzero::TrackEvent::LegacyEvent::FLOW_IN); - } else if (flags & kFlowOut) { - legacy_event->set_flow_direction( - protos::pbzero::TrackEvent::LegacyEvent::FLOW_OUT); - } - } -}; - -inline ::perfetto::DynamicString GetEventNameTypeForLegacyEvents( - ::perfetto::DynamicString name) { - return name; -} - -inline ::perfetto::StaticString GetEventNameTypeForLegacyEvents( - ::perfetto::StaticString name) { - return name; -} - -// In legacy macro, `const char*` is considered static by default, unless it's -// wrapped in `TRACE_STR_COPY`. -inline ::perfetto::StaticString GetEventNameTypeForLegacyEvents( - const char* name) { - return ::perfetto::StaticString{name}; -} - -} // namespace internal -} // namespace perfetto - // Implementations for the INTERNAL_* adapter macros used by the trace points // below. #define PERFETTO_INTERNAL_LEGACY_EVENT_ON_TRACK(phase, category, name, track, \ ...) \ PERFETTO_INTERNAL_TRACK_EVENT( \ - category, ::perfetto::internal::GetEventNameTypeForLegacyEvents(name), \ + category, ::perfetto::internal::DecayEventNameType(name), \ ::perfetto::internal::TrackEventLegacy::PhaseToType(phase), track, \ ##__VA_ARGS__); +#define PERFETTO_INTERNAL_LEGACY_EVENT_WITH_FLAGS_ON_TRACK( \ + phase, category, name, track, flags, ...) \ + PERFETTO_INTERNAL_LEGACY_TRACK_EVENT( \ + category, ::perfetto::internal::DecayEventNameType(name), \ + ::perfetto::internal::TrackEventLegacy::PhaseToType(phase), track, \ + phase, flags, ##__VA_ARGS__); + +#define PERFETTO_INTERNAL_LEGACY_EVENT_WITH_ID_ON_TRACK( \ + phase, category, name, track, flags, thread_id, id, ...) \ + PERFETTO_INTERNAL_LEGACY_TRACK_EVENT_WITH_ID( \ + category, ::perfetto::internal::DecayEventNameType(name), \ + ::perfetto::internal::TrackEventLegacy::PhaseToType(phase), track, \ + phase, flags, thread_id, id, ##__VA_ARGS__); + // The main entrypoint for writing unscoped legacy events. This macro // determines the right track to write the event on based on |flags| and // |thread_id|. @@ -18352,20 +18986,21 @@ inline ::perfetto::StaticString GetEventNameTypeForLegacyEvents( thread_id, ...) \ [&]() { \ using ::perfetto::internal::TrackEventInternal; \ + PERFETTO_DCHECK(!(flags & TRACE_EVENT_FLAG_COPY)); \ /* First check the scope for instant events. */ \ if ((phase) == TRACE_EVENT_PHASE_INSTANT) { \ /* Note: Avoids the need to set LegacyEvent::instant_event_scope. */ \ auto scope = (flags)&TRACE_EVENT_FLAG_SCOPE_MASK; \ switch (scope) { \ case TRACE_EVENT_SCOPE_GLOBAL: \ - PERFETTO_INTERNAL_LEGACY_EVENT_ON_TRACK( \ - phase, category, name, ::perfetto::Track::Global(0), \ + PERFETTO_INTERNAL_LEGACY_EVENT_WITH_FLAGS_ON_TRACK( \ + phase, category, name, ::perfetto::Track::Global(0), flags, \ ##__VA_ARGS__); \ return; \ case TRACE_EVENT_SCOPE_PROCESS: \ - PERFETTO_INTERNAL_LEGACY_EVENT_ON_TRACK( \ + PERFETTO_INTERNAL_LEGACY_EVENT_WITH_FLAGS_ON_TRACK( \ phase, category, name, ::perfetto::ProcessTrack::Current(), \ - ##__VA_ARGS__); \ + flags, ##__VA_ARGS__); \ return; \ default: \ case TRACE_EVENT_SCOPE_THREAD: \ @@ -18380,84 +19015,94 @@ inline ::perfetto::StaticString GetEventNameTypeForLegacyEvents( decltype(thread_id), \ ::perfetto::legacy::PerfettoLegacyCurrentThreadId>::value || \ ((flags)&TRACE_EVENT_FLAG_HAS_PROCESS_ID)) { \ - PERFETTO_INTERNAL_LEGACY_EVENT_ON_TRACK( \ - phase, category, name, TrackEventInternal::kDefaultTrack, \ + PERFETTO_INTERNAL_LEGACY_EVENT_WITH_FLAGS_ON_TRACK( \ + phase, category, name, TrackEventInternal::kDefaultTrack, flags, \ ##__VA_ARGS__); \ } else { \ - PERFETTO_INTERNAL_LEGACY_EVENT_ON_TRACK( \ + PERFETTO_INTERNAL_LEGACY_EVENT_WITH_FLAGS_ON_TRACK( \ phase, category, name, \ - ::perfetto::legacy::ConvertThreadId(thread_id), ##__VA_ARGS__); \ + ::perfetto::legacy::ConvertThreadId(thread_id), flags, \ + ##__VA_ARGS__); \ } \ }() -#define INTERNAL_TRACE_EVENT_ADD(phase, category, name, flags, ...) \ - PERFETTO_INTERNAL_LEGACY_EVENT( \ - phase, category, name, flags, ::perfetto::legacy::kCurrentThreadId, \ - [&](perfetto::EventContext ctx) PERFETTO_NO_THREAD_SAFETY_ANALYSIS { \ - using ::perfetto::internal::TrackEventLegacy; \ - TrackEventLegacy::WriteLegacyEvent(std::move(ctx), phase, flags, \ - ##__VA_ARGS__); \ - }) +#define PERFETTO_INTERNAL_LEGACY_EVENT_WITH_ID(phase, category, name, flags, \ + thread_id, id, ...) \ + [&]() { \ + using ::perfetto::internal::TrackEventInternal; \ + PERFETTO_DCHECK(!(flags & TRACE_EVENT_FLAG_COPY)); \ + /* First check the scope for instant events. */ \ + if ((phase) == TRACE_EVENT_PHASE_INSTANT) { \ + /* Note: Avoids the need to set LegacyEvent::instant_event_scope. */ \ + auto scope = (flags)&TRACE_EVENT_FLAG_SCOPE_MASK; \ + switch (scope) { \ + case TRACE_EVENT_SCOPE_GLOBAL: \ + PERFETTO_INTERNAL_LEGACY_EVENT_WITH_ID_ON_TRACK( \ + phase, category, name, ::perfetto::Track::Global(0), flags, \ + thread_id, id, ##__VA_ARGS__); \ + return; \ + case TRACE_EVENT_SCOPE_PROCESS: \ + PERFETTO_INTERNAL_LEGACY_EVENT_WITH_ID_ON_TRACK( \ + phase, category, name, ::perfetto::ProcessTrack::Current(), \ + flags, thread_id, id, ##__VA_ARGS__); \ + return; \ + default: \ + case TRACE_EVENT_SCOPE_THREAD: \ + /* Fallthrough. */ \ + break; \ + } \ + } \ + /* If an event targets the current thread or another process, write \ + * it on the current thread's track. The process override case is \ + * handled through |pid_override| in WriteLegacyEvent. */ \ + if (std::is_same< \ + decltype(thread_id), \ + ::perfetto::legacy::PerfettoLegacyCurrentThreadId>::value || \ + ((flags)&TRACE_EVENT_FLAG_HAS_PROCESS_ID)) { \ + PERFETTO_INTERNAL_LEGACY_EVENT_WITH_ID_ON_TRACK( \ + phase, category, name, TrackEventInternal::kDefaultTrack, flags, \ + thread_id, id, ##__VA_ARGS__); \ + } else { \ + PERFETTO_INTERNAL_LEGACY_EVENT_WITH_ID_ON_TRACK( \ + phase, category, name, \ + ::perfetto::legacy::ConvertThreadId(thread_id), flags, thread_id, \ + id, ##__VA_ARGS__); \ + } \ + }() -// PERFETTO_INTERNAL_SCOPED_TRACK_EVENT does not require GetStaticString, as it -// uses TRACE_EVENT_BEGIN/END internally, which already have this call. -#define INTERNAL_TRACE_EVENT_ADD_SCOPED(category, name, ...) \ - PERFETTO_INTERNAL_SCOPED_TRACK_EVENT( \ - category, ::perfetto::internal::GetEventNameTypeForLegacyEvents(name), \ - [&](perfetto::EventContext ctx) PERFETTO_NO_THREAD_SAFETY_ANALYSIS { \ - using ::perfetto::internal::TrackEventLegacy; \ - TrackEventLegacy::AddDebugAnnotations(&ctx, ##__VA_ARGS__); \ - }) +#define INTERNAL_TRACE_EVENT_ADD(phase, category, name, flags, ...) \ + PERFETTO_INTERNAL_LEGACY_EVENT( \ + phase, category, ::perfetto::internal::DecayEventNameType(name), flags, \ + ::perfetto::legacy::kCurrentThreadId, ##__VA_ARGS__) -// PERFETTO_INTERNAL_SCOPED_TRACK_EVENT does not require GetStaticString, as it -// uses TRACE_EVENT_BEGIN/END internally, which already have this call. -#define INTERNAL_TRACE_EVENT_ADD_SCOPED_WITH_FLOW(category, name, bind_id, \ - flags, ...) \ - PERFETTO_INTERNAL_SCOPED_TRACK_EVENT( \ - category, ::perfetto::internal::GetEventNameTypeForLegacyEvents(name), \ - [&](perfetto::EventContext ctx) PERFETTO_NO_THREAD_SAFETY_ANALYSIS { \ - using ::perfetto::internal::TrackEventLegacy; \ - ::perfetto::internal::LegacyTraceId PERFETTO_UID(trace_id){bind_id}; \ - TrackEventLegacy::WriteLegacyEventWithIdAndTid( \ - std::move(ctx), TRACE_EVENT_PHASE_BEGIN, flags, \ - PERFETTO_UID(trace_id), TRACE_EVENT_API_CURRENT_THREAD_ID, \ - ##__VA_ARGS__); \ - }) +#define INTERNAL_TRACE_EVENT_ADD_SCOPED(category, name, ...) \ + PERFETTO_INTERNAL_SCOPED_TRACK_EVENT( \ + category, ::perfetto::internal::DecayEventNameType(name), ##__VA_ARGS__) -#define INTERNAL_TRACE_EVENT_ADD_WITH_TIMESTAMP(phase, category, name, \ - timestamp, flags, ...) \ - PERFETTO_INTERNAL_LEGACY_EVENT( \ - phase, category, name, flags, ::perfetto::legacy::kCurrentThreadId, \ - timestamp, \ - [&](perfetto::EventContext ctx) PERFETTO_NO_THREAD_SAFETY_ANALYSIS { \ - using ::perfetto::internal::TrackEventLegacy; \ - TrackEventLegacy::WriteLegacyEvent(std::move(ctx), phase, flags, \ - ##__VA_ARGS__); \ - }) +#define INTERNAL_TRACE_EVENT_ADD_SCOPED_WITH_FLOW(category, name, bind_id, \ + flags, ...) \ + PERFETTO_INTERNAL_SCOPED_LEGACY_TRACK_EVENT_WITH_ID( \ + category, ::perfetto::internal::DecayEventNameType(name), \ + ::perfetto::internal::TrackEventInternal::kDefaultTrack, flags, \ + TRACE_EVENT_API_CURRENT_THREAD_ID, bind_id, ##__VA_ARGS__) -#define INTERNAL_TRACE_EVENT_ADD_WITH_ID_TID_AND_TIMESTAMP( \ - phase, category, name, id, thread_id, timestamp, flags, ...) \ - PERFETTO_INTERNAL_LEGACY_EVENT( \ - phase, category, name, flags, thread_id, timestamp, \ - [&](perfetto::EventContext ctx) PERFETTO_NO_THREAD_SAFETY_ANALYSIS { \ - using ::perfetto::internal::TrackEventLegacy; \ - ::perfetto::internal::LegacyTraceId PERFETTO_UID(trace_id){id}; \ - TrackEventLegacy::WriteLegacyEventWithIdAndTid( \ - std::move(ctx), phase, flags, PERFETTO_UID(trace_id), thread_id, \ - ##__VA_ARGS__); \ - }) +#define INTERNAL_TRACE_EVENT_ADD_WITH_TIMESTAMP(phase, category, name, \ + timestamp, flags, ...) \ + PERFETTO_INTERNAL_LEGACY_EVENT( \ + phase, category, ::perfetto::internal::DecayEventNameType(name), flags, \ + ::perfetto::legacy::kCurrentThreadId, timestamp, ##__VA_ARGS__) -#define INTERNAL_TRACE_EVENT_ADD_WITH_ID(phase, category, name, id, flags, \ - ...) \ - PERFETTO_INTERNAL_LEGACY_EVENT( \ - phase, category, name, flags, ::perfetto::legacy::kCurrentThreadId, \ - [&](perfetto::EventContext ctx) PERFETTO_NO_THREAD_SAFETY_ANALYSIS { \ - using ::perfetto::internal::TrackEventLegacy; \ - ::perfetto::internal::LegacyTraceId PERFETTO_UID(trace_id){id}; \ - TrackEventLegacy::WriteLegacyEventWithIdAndTid( \ - std::move(ctx), phase, flags, PERFETTO_UID(trace_id), \ - TRACE_EVENT_API_CURRENT_THREAD_ID, ##__VA_ARGS__); \ - }) +#define INTERNAL_TRACE_EVENT_ADD_WITH_ID_TID_AND_TIMESTAMP( \ + phase, category, name, id, thread_id, timestamp, flags, ...) \ + PERFETTO_INTERNAL_LEGACY_EVENT_WITH_ID( \ + phase, category, ::perfetto::internal::DecayEventNameType(name), flags, \ + thread_id, id, timestamp, ##__VA_ARGS__) + +#define INTERNAL_TRACE_EVENT_ADD_WITH_ID(phase, category, name, id, flags, \ + ...) \ + PERFETTO_INTERNAL_LEGACY_EVENT_WITH_ID( \ + phase, category, ::perfetto::internal::DecayEventNameType(name), flags, \ + ::perfetto::legacy::kCurrentThreadId, id, ##__VA_ARGS__) #define INTERNAL_TRACE_EVENT_METADATA_ADD(category, name, ...) \ INTERNAL_TRACE_EVENT_ADD(TRACE_EVENT_PHASE_METADATA, category, name, \ @@ -18476,20 +19121,26 @@ inline ::perfetto::StaticString GetEventNameTypeForLegacyEvents( INTERNAL_TRACE_EVENT_ADD_SCOPED_WITH_FLOW(category_group, name, bind_id, \ flow_flags) #define TRACE_EVENT1(category_group, name, arg1_name, arg1_val) \ - INTERNAL_TRACE_EVENT_ADD_SCOPED(category_group, name, arg1_name, arg1_val) -#define TRACE_EVENT_WITH_FLOW1(category_group, name, bind_id, flow_flags, \ - arg1_name, arg1_val) \ - INTERNAL_TRACE_EVENT_ADD_SCOPED_WITH_FLOW(category_group, name, bind_id, \ - flow_flags, arg1_name, arg1_val) -#define TRACE_EVENT2(category_group, name, arg1_name, arg1_val, arg2_name, \ - arg2_val) \ - INTERNAL_TRACE_EVENT_ADD_SCOPED(category_group, name, arg1_name, arg1_val, \ - arg2_name, arg2_val) -#define TRACE_EVENT_WITH_FLOW2(category_group, name, bind_id, flow_flags, \ - arg1_name, arg1_val, arg2_name, arg2_val) \ - INTERNAL_TRACE_EVENT_ADD_SCOPED_WITH_FLOW(category_group, name, bind_id, \ - flow_flags, arg1_name, arg1_val, \ - arg2_name, arg2_val) + INTERNAL_TRACE_EVENT_ADD_SCOPED( \ + category_group, name, arg1_name, \ + ::perfetto::internal::PossiblyNull(arg1_val)) +#define TRACE_EVENT_WITH_FLOW1(category_group, name, bind_id, flow_flags, \ + arg1_name, arg1_val) \ + INTERNAL_TRACE_EVENT_ADD_SCOPED_WITH_FLOW( \ + category_group, name, bind_id, flow_flags, arg1_name, \ + ::perfetto::internal::PossiblyNull(arg1_val)) +#define TRACE_EVENT2(category_group, name, arg1_name, arg1_val, arg2_name, \ + arg2_val) \ + INTERNAL_TRACE_EVENT_ADD_SCOPED( \ + category_group, name, arg1_name, \ + ::perfetto::internal::PossiblyNull(arg1_val), arg2_name, \ + ::perfetto::internal::PossiblyNull(arg2_val)) +#define TRACE_EVENT_WITH_FLOW2(category_group, name, bind_id, flow_flags, \ + arg1_name, arg1_val, arg2_name, arg2_val) \ + INTERNAL_TRACE_EVENT_ADD_SCOPED_WITH_FLOW( \ + category_group, name, bind_id, flow_flags, arg1_name, \ + ::perfetto::internal::PossiblyNull(arg1_val), arg2_name, \ + ::perfetto::internal::PossiblyNull(arg2_val)) // Instant events. #define TRACE_EVENT_INSTANT0(category_group, name, scope) \ @@ -18497,31 +19148,40 @@ inline ::perfetto::StaticString GetEventNameTypeForLegacyEvents( TRACE_EVENT_FLAG_NONE | scope) #define TRACE_EVENT_INSTANT1(category_group, name, scope, arg1_name, arg1_val) \ INTERNAL_TRACE_EVENT_ADD(TRACE_EVENT_PHASE_INSTANT, category_group, name, \ - TRACE_EVENT_FLAG_NONE | scope, arg1_name, arg1_val) + TRACE_EVENT_FLAG_NONE | scope, arg1_name, \ + ::perfetto::internal::PossiblyNull(arg1_val)) #define TRACE_EVENT_INSTANT2(category_group, name, scope, arg1_name, arg1_val, \ arg2_name, arg2_val) \ INTERNAL_TRACE_EVENT_ADD(TRACE_EVENT_PHASE_INSTANT, category_group, name, \ - TRACE_EVENT_FLAG_NONE | scope, arg1_name, arg1_val, \ - arg2_name, arg2_val) -#define TRACE_EVENT_COPY_INSTANT0(category_group, name, scope) \ - INTERNAL_TRACE_EVENT_ADD(TRACE_EVENT_PHASE_INSTANT, category_group, name, \ - TRACE_EVENT_FLAG_COPY | scope) -#define TRACE_EVENT_COPY_INSTANT1(category_group, name, scope, arg1_name, \ - arg1_val) \ - INTERNAL_TRACE_EVENT_ADD(TRACE_EVENT_PHASE_INSTANT, category_group, name, \ - TRACE_EVENT_FLAG_COPY | scope, arg1_name, arg1_val) -#define TRACE_EVENT_COPY_INSTANT2(category_group, name, scope, arg1_name, \ - arg1_val, arg2_name, arg2_val) \ - INTERNAL_TRACE_EVENT_ADD(TRACE_EVENT_PHASE_INSTANT, category_group, name, \ - TRACE_EVENT_FLAG_COPY | scope, arg1_name, arg1_val, \ - arg2_name, arg2_val) + TRACE_EVENT_FLAG_NONE | scope, arg1_name, \ + ::perfetto::internal::PossiblyNull(arg1_val), \ + arg2_name, \ + ::perfetto::internal::PossiblyNull(arg2_val)) +#define TRACE_EVENT_COPY_INSTANT0(category_group, name, scope) \ + INTERNAL_TRACE_EVENT_ADD(TRACE_EVENT_PHASE_INSTANT, category_group, \ + ::perfetto::DynamicString{name}, scope) +#define TRACE_EVENT_COPY_INSTANT1(category_group, name, scope, arg1_name, \ + arg1_val) \ + INTERNAL_TRACE_EVENT_ADD(TRACE_EVENT_PHASE_INSTANT, category_group, \ + ::perfetto::DynamicString{name}, scope, \ + ::perfetto::DynamicString{arg1_name}, \ + ::perfetto::internal::PossiblyNull(arg1_val)) +#define TRACE_EVENT_COPY_INSTANT2(category_group, name, scope, arg1_name, \ + arg1_val, arg2_name, arg2_val) \ + INTERNAL_TRACE_EVENT_ADD(TRACE_EVENT_PHASE_INSTANT, category_group, \ + ::perfetto::DynamicString{name}, scope, \ + ::perfetto::DynamicString{arg1_name}, \ + ::perfetto::internal::PossiblyNull(arg1_val), \ + ::perfetto::DynamicString{arg2_name}, \ + ::perfetto::internal::PossiblyNull(arg2_val)) #define TRACE_EVENT_INSTANT_WITH_FLAGS0(category_group, name, scope_and_flags) \ INTERNAL_TRACE_EVENT_ADD(TRACE_EVENT_PHASE_INSTANT, category_group, name, \ scope_and_flags) #define TRACE_EVENT_INSTANT_WITH_FLAGS1(category_group, name, scope_and_flags, \ arg1_name, arg1_val) \ INTERNAL_TRACE_EVENT_ADD(TRACE_EVENT_PHASE_INSTANT, category_group, name, \ - scope_and_flags, arg1_name, arg1_val) + scope_and_flags, arg1_name, \ + ::perfetto::internal::PossiblyNull(arg1_val)) // Instant events with explicit timestamps. #define TRACE_EVENT_INSTANT_WITH_TIMESTAMP0(category_group, name, scope, \ @@ -18534,7 +19194,8 @@ inline ::perfetto::StaticString GetEventNameTypeForLegacyEvents( timestamp, arg_name, arg_val) \ INTERNAL_TRACE_EVENT_ADD_WITH_TIMESTAMP( \ TRACE_EVENT_PHASE_INSTANT, category_group, name, timestamp, \ - TRACE_EVENT_FLAG_NONE | scope, arg_name, arg_val) + TRACE_EVENT_FLAG_NONE | scope, arg_name, \ + ::perfetto::internal::PossiblyNull(arg_val)) // Begin events. #define TRACE_EVENT_BEGIN0(category_group, name) \ @@ -18542,23 +19203,30 @@ inline ::perfetto::StaticString GetEventNameTypeForLegacyEvents( TRACE_EVENT_FLAG_NONE) #define TRACE_EVENT_BEGIN1(category_group, name, arg1_name, arg1_val) \ INTERNAL_TRACE_EVENT_ADD(TRACE_EVENT_PHASE_BEGIN, category_group, name, \ - TRACE_EVENT_FLAG_NONE, arg1_name, arg1_val) -#define TRACE_EVENT_BEGIN2(category_group, name, arg1_name, arg1_val, \ - arg2_name, arg2_val) \ - INTERNAL_TRACE_EVENT_ADD(TRACE_EVENT_PHASE_BEGIN, category_group, name, \ - TRACE_EVENT_FLAG_NONE, arg1_name, arg1_val, \ - arg2_name, arg2_val) + TRACE_EVENT_FLAG_NONE, arg1_name, \ + ::perfetto::internal::PossiblyNull(arg1_val)) +#define TRACE_EVENT_BEGIN2(category_group, name, arg1_name, arg1_val, \ + arg2_name, arg2_val) \ + INTERNAL_TRACE_EVENT_ADD( \ + TRACE_EVENT_PHASE_BEGIN, category_group, name, TRACE_EVENT_FLAG_NONE, \ + arg1_name, ::perfetto::internal::PossiblyNull(arg1_val), arg2_name, \ + ::perfetto::internal::PossiblyNull(arg2_val)) #define TRACE_EVENT_BEGIN_WITH_FLAGS0(category_group, name, flags) \ INTERNAL_TRACE_EVENT_ADD(TRACE_EVENT_PHASE_BEGIN, category_group, name, flags) #define TRACE_EVENT_BEGIN_WITH_FLAGS1(category_group, name, flags, arg1_name, \ arg1_val) \ INTERNAL_TRACE_EVENT_ADD(TRACE_EVENT_PHASE_BEGIN, category_group, name, \ - flags, arg1_name, arg1_val) + flags, arg1_name, \ + ::perfetto::internal::PossiblyNull(arg1_val)) #define TRACE_EVENT_COPY_BEGIN2(category_group, name, arg1_name, arg1_val, \ arg2_name, arg2_val) \ - INTERNAL_TRACE_EVENT_ADD(TRACE_EVENT_PHASE_BEGIN, category_group, name, \ - TRACE_EVENT_FLAG_COPY, arg1_name, arg1_val, \ - arg2_name, arg2_val) + INTERNAL_TRACE_EVENT_ADD(TRACE_EVENT_PHASE_BEGIN, category_group, \ + ::perfetto::DynamicString{name}, \ + TRACE_EVENT_FLAG_NONE, \ + ::perfetto::DynamicString{arg1_name}, \ + ::perfetto::internal::PossiblyNull(arg1_val), \ + ::perfetto::DynamicString{arg2_name}, \ + ::perfetto::internal::PossiblyNull(arg2_val)) // Begin events with explicit timestamps. #define TRACE_EVENT_BEGIN_WITH_ID_TID_AND_TIMESTAMP0(category_group, name, id, \ @@ -18566,23 +19234,29 @@ inline ::perfetto::StaticString GetEventNameTypeForLegacyEvents( INTERNAL_TRACE_EVENT_ADD_WITH_ID_TID_AND_TIMESTAMP( \ TRACE_EVENT_PHASE_ASYNC_BEGIN, category_group, name, id, thread_id, \ timestamp, TRACE_EVENT_FLAG_NONE) -#define TRACE_EVENT_COPY_BEGIN_WITH_ID_TID_AND_TIMESTAMP0( \ - category_group, name, id, thread_id, timestamp) \ - INTERNAL_TRACE_EVENT_ADD_WITH_ID_TID_AND_TIMESTAMP( \ - TRACE_EVENT_PHASE_ASYNC_BEGIN, category_group, name, id, thread_id, \ - timestamp, TRACE_EVENT_FLAG_COPY) -#define TRACE_EVENT_COPY_BEGIN_WITH_ID_TID_AND_TIMESTAMP1( \ - category_group, name, id, thread_id, timestamp, arg1_name, arg1_val) \ - INTERNAL_TRACE_EVENT_ADD_WITH_ID_TID_AND_TIMESTAMP( \ - TRACE_EVENT_PHASE_ASYNC_BEGIN, category_group, name, id, thread_id, \ - timestamp, TRACE_EVENT_FLAG_COPY, arg1_name, arg1_val) -#define TRACE_EVENT_COPY_BEGIN_WITH_ID_TID_AND_TIMESTAMP2( \ - category_group, name, id, thread_id, timestamp, arg1_name, arg1_val, \ - arg2_name, arg2_val) \ - INTERNAL_TRACE_EVENT_ADD_WITH_ID_TID_AND_TIMESTAMP( \ - TRACE_EVENT_PHASE_ASYNC_BEGIN, category_group, name, id, thread_id, \ - timestamp, TRACE_EVENT_FLAG_COPY, arg1_name, arg1_val, arg2_name, \ - arg2_val) +#define TRACE_EVENT_COPY_BEGIN_WITH_ID_TID_AND_TIMESTAMP0( \ + category_group, name, id, thread_id, timestamp) \ + INTERNAL_TRACE_EVENT_ADD_WITH_ID_TID_AND_TIMESTAMP( \ + TRACE_EVENT_PHASE_ASYNC_BEGIN, category_group, \ + ::perfetto::DynamicString{name}, id, thread_id, timestamp, \ + TRACE_EVENT_FLAG_NONE) +#define TRACE_EVENT_COPY_BEGIN_WITH_ID_TID_AND_TIMESTAMP1( \ + category_group, name, id, thread_id, timestamp, arg1_name, arg1_val) \ + INTERNAL_TRACE_EVENT_ADD_WITH_ID_TID_AND_TIMESTAMP( \ + TRACE_EVENT_PHASE_ASYNC_BEGIN, category_group, \ + ::perfetto::DynamicString{name}, id, thread_id, timestamp, \ + TRACE_EVENT_FLAG_NONE, ::perfetto::DynamicString{arg1_name}, \ + ::perfetto::internal::PossiblyNull(arg1_val)) +#define TRACE_EVENT_COPY_BEGIN_WITH_ID_TID_AND_TIMESTAMP2( \ + category_group, name, id, thread_id, timestamp, arg1_name, arg1_val, \ + arg2_name, arg2_val) \ + INTERNAL_TRACE_EVENT_ADD_WITH_ID_TID_AND_TIMESTAMP( \ + TRACE_EVENT_PHASE_ASYNC_BEGIN, category_group, \ + ::perfetto::DynamicString{name}, id, thread_id, timestamp, \ + TRACE_EVENT_FLAG_NONE, ::perfetto::DynamicString{arg1_name}, \ + ::perfetto::internal::PossiblyNull(arg1_val), \ + ::perfetto::DynamicString{arg2_name}, \ + ::perfetto::internal::PossiblyNull(arg2_val)) // End events. #define TRACE_EVENT_END0(category_group, name) \ @@ -18590,23 +19264,29 @@ inline ::perfetto::StaticString GetEventNameTypeForLegacyEvents( TRACE_EVENT_FLAG_NONE) #define TRACE_EVENT_END1(category_group, name, arg1_name, arg1_val) \ INTERNAL_TRACE_EVENT_ADD(TRACE_EVENT_PHASE_END, category_group, name, \ - TRACE_EVENT_FLAG_NONE, arg1_name, arg1_val) + TRACE_EVENT_FLAG_NONE, arg1_name, \ + ::perfetto::internal::PossiblyNull(arg1_val)) #define TRACE_EVENT_END2(category_group, name, arg1_name, arg1_val, arg2_name, \ arg2_val) \ - INTERNAL_TRACE_EVENT_ADD(TRACE_EVENT_PHASE_END, category_group, name, \ - TRACE_EVENT_FLAG_NONE, arg1_name, arg1_val, \ - arg2_name, arg2_val) + INTERNAL_TRACE_EVENT_ADD( \ + TRACE_EVENT_PHASE_END, category_group, name, TRACE_EVENT_FLAG_NONE, \ + arg1_name, ::perfetto::internal::PossiblyNull(arg1_val), arg2_name, \ + ::perfetto::internal::PossiblyNull(arg2_val)) #define TRACE_EVENT_END_WITH_FLAGS0(category_group, name, flags) \ INTERNAL_TRACE_EVENT_ADD(TRACE_EVENT_PHASE_END, category_group, name, flags) #define TRACE_EVENT_END_WITH_FLAGS1(category_group, name, flags, arg1_name, \ arg1_val) \ INTERNAL_TRACE_EVENT_ADD(TRACE_EVENT_PHASE_END, category_group, name, flags, \ - arg1_name, arg1_val) -#define TRACE_EVENT_COPY_END2(category_group, name, arg1_name, arg1_val, \ - arg2_name, arg2_val) \ - INTERNAL_TRACE_EVENT_ADD(TRACE_EVENT_PHASE_END, category_group, name, \ - TRACE_EVENT_FLAG_COPY, arg1_name, arg1_val, \ - arg2_name, arg2_val) + arg1_name, \ + ::perfetto::internal::PossiblyNull(arg1_val)) +#define TRACE_EVENT_COPY_END2(category_group, name, arg1_name, arg1_val, \ + arg2_name, arg2_val) \ + INTERNAL_TRACE_EVENT_ADD( \ + TRACE_EVENT_PHASE_END, category_group, ::perfetto::DynamicString{name}, \ + TRACE_EVENT_FLAG_NONE, ::perfetto::DynamicString{arg1_name}, \ + ::perfetto::internal::PossiblyNull(arg1_val), \ + ::perfetto::DynamicString{arg2_name}, \ + ::perfetto::internal::PossiblyNull(arg2_val)) // Mark events. #define TRACE_EVENT_MARK_WITH_TIMESTAMP0(category_group, name, timestamp) \ @@ -18618,26 +19298,32 @@ inline ::perfetto::StaticString GetEventNameTypeForLegacyEvents( arg1_name, arg1_val) \ INTERNAL_TRACE_EVENT_ADD_WITH_TIMESTAMP( \ TRACE_EVENT_PHASE_MARK, category_group, name, timestamp, \ - TRACE_EVENT_FLAG_NONE, arg1_name, arg1_val) + TRACE_EVENT_FLAG_NONE, arg1_name, \ + ::perfetto::internal::PossiblyNull(arg1_val)) #define TRACE_EVENT_MARK_WITH_TIMESTAMP2( \ category_group, name, timestamp, arg1_name, arg1_val, arg2_name, arg2_val) \ INTERNAL_TRACE_EVENT_ADD_WITH_TIMESTAMP( \ TRACE_EVENT_PHASE_MARK, category_group, name, timestamp, \ - TRACE_EVENT_FLAG_NONE, arg1_name, arg1_val, arg2_name, arg2_val) + TRACE_EVENT_FLAG_NONE, arg1_name, \ + ::perfetto::internal::PossiblyNull(arg1_val), arg2_name, \ + ::perfetto::internal::PossiblyNull(arg2_val)) -#define TRACE_EVENT_COPY_MARK(category_group, name) \ - INTERNAL_TRACE_EVENT_ADD(TRACE_EVENT_PHASE_MARK, category_group, name, \ - TRACE_EVENT_FLAG_COPY) +#define TRACE_EVENT_COPY_MARK(category_group, name) \ + INTERNAL_TRACE_EVENT_ADD(TRACE_EVENT_PHASE_MARK, category_group, \ + ::perfetto::DynamicString{name}, \ + TRACE_EVENT_FLAG_NONE) -#define TRACE_EVENT_COPY_MARK1(category_group, name, arg1_name, arg1_val) \ - INTERNAL_TRACE_EVENT_ADD(TRACE_EVENT_PHASE_MARK, category_group, name, \ - TRACE_EVENT_FLAG_COPY, arg1_name, arg1_val) +#define TRACE_EVENT_COPY_MARK1(category_group, name, arg1_name, arg1_val) \ + INTERNAL_TRACE_EVENT_ADD( \ + TRACE_EVENT_PHASE_MARK, category_group, ::perfetto::DynamicString{name}, \ + TRACE_EVENT_FLAG_NONE, ::perfetto::DynamicString{arg1_name}, \ + ::perfetto::internal::PossiblyNull(arg1_val)) -#define TRACE_EVENT_COPY_MARK_WITH_TIMESTAMP(category_group, name, timestamp) \ - INTERNAL_TRACE_EVENT_ADD_WITH_TIMESTAMP(TRACE_EVENT_PHASE_MARK, \ - category_group, name, timestamp, \ - TRACE_EVENT_FLAG_COPY) +#define TRACE_EVENT_COPY_MARK_WITH_TIMESTAMP(category_group, name, timestamp) \ + INTERNAL_TRACE_EVENT_ADD_WITH_TIMESTAMP( \ + TRACE_EVENT_PHASE_MARK, category_group, ::perfetto::DynamicString{name}, \ + timestamp, TRACE_EVENT_FLAG_NONE) // End events with explicit thread and timestamp. #define TRACE_EVENT_END_WITH_ID_TID_AND_TIMESTAMP0(category_group, name, id, \ @@ -18645,23 +19331,29 @@ inline ::perfetto::StaticString GetEventNameTypeForLegacyEvents( INTERNAL_TRACE_EVENT_ADD_WITH_ID_TID_AND_TIMESTAMP( \ TRACE_EVENT_PHASE_ASYNC_END, category_group, name, id, thread_id, \ timestamp, TRACE_EVENT_FLAG_NONE) -#define TRACE_EVENT_COPY_END_WITH_ID_TID_AND_TIMESTAMP0( \ - category_group, name, id, thread_id, timestamp) \ - INTERNAL_TRACE_EVENT_ADD_WITH_ID_TID_AND_TIMESTAMP( \ - TRACE_EVENT_PHASE_ASYNC_END, category_group, name, id, thread_id, \ - timestamp, TRACE_EVENT_FLAG_COPY) +#define TRACE_EVENT_COPY_END_WITH_ID_TID_AND_TIMESTAMP0( \ + category_group, name, id, thread_id, timestamp) \ + INTERNAL_TRACE_EVENT_ADD_WITH_ID_TID_AND_TIMESTAMP( \ + TRACE_EVENT_PHASE_ASYNC_END, category_group, \ + ::perfetto::DynamicString{name}, id, thread_id, timestamp, \ + TRACE_EVENT_FLAG_NONE) #define TRACE_EVENT_COPY_END_WITH_ID_TID_AND_TIMESTAMP1( \ category_group, name, id, thread_id, timestamp, arg1_name, arg1_val) \ INTERNAL_TRACE_EVENT_ADD_WITH_ID_TID_AND_TIMESTAMP( \ - TRACE_EVENT_PHASE_ASYNC_END, category_group, name, id, thread_id, \ - timestamp, TRACE_EVENT_FLAG_COPY, arg1_name, arg1_val) + TRACE_EVENT_PHASE_ASYNC_END, category_group, \ + ::perfetto::DynamicString{name}, id, thread_id, timestamp, \ + TRACE_EVENT_FLAG_NONE, ::perfetto::DynamicString{arg1_name}, \ + ::perfetto::internal::PossiblyNull(arg1_val)) #define TRACE_EVENT_COPY_END_WITH_ID_TID_AND_TIMESTAMP2( \ category_group, name, id, thread_id, timestamp, arg1_name, arg1_val, \ arg2_name, arg2_val) \ INTERNAL_TRACE_EVENT_ADD_WITH_ID_TID_AND_TIMESTAMP( \ - TRACE_EVENT_PHASE_ASYNC_END, category_group, name, id, thread_id, \ - timestamp, TRACE_EVENT_FLAG_COPY, arg1_name, arg1_val, arg2_name, \ - arg2_val) + TRACE_EVENT_PHASE_ASYNC_END, category_group, \ + ::perfetto::DynamicString{name}, id, thread_id, timestamp, \ + TRACE_EVENT_FLAG_NONE, ::perfetto::DynamicString{arg1_name}, \ + ::perfetto::internal::PossiblyNull(arg1_val), \ + ::perfetto::DynamicString{arg2_name}, \ + ::perfetto::internal::PossiblyNull(arg2_val)) // Counters. #define TRACE_COUNTER1(category_group, name, value) \ @@ -18671,9 +19363,10 @@ inline ::perfetto::StaticString GetEventNameTypeForLegacyEvents( #define TRACE_COUNTER_WITH_FLAG1(category_group, name, flag, value) \ INTERNAL_TRACE_EVENT_ADD(TRACE_EVENT_PHASE_COUNTER, category_group, name, \ flag, "value", static_cast(value)) -#define TRACE_COPY_COUNTER1(category_group, name, value) \ - INTERNAL_TRACE_EVENT_ADD(TRACE_EVENT_PHASE_COUNTER, category_group, name, \ - TRACE_EVENT_FLAG_COPY, "value", \ +#define TRACE_COPY_COUNTER1(category_group, name, value) \ + INTERNAL_TRACE_EVENT_ADD(TRACE_EVENT_PHASE_COUNTER, category_group, \ + ::perfetto::DynamicString{name}, \ + TRACE_EVENT_FLAG_NONE, "value", \ static_cast(value)) #define TRACE_COUNTER2(category_group, name, value1_name, value1_val, \ value2_name, value2_val) \ @@ -18681,12 +19374,12 @@ inline ::perfetto::StaticString GetEventNameTypeForLegacyEvents( TRACE_EVENT_FLAG_NONE, value1_name, \ static_cast(value1_val), value2_name, \ static_cast(value2_val)) -#define TRACE_COPY_COUNTER2(category_group, name, value1_name, value1_val, \ - value2_name, value2_val) \ - INTERNAL_TRACE_EVENT_ADD(TRACE_EVENT_PHASE_COUNTER, category_group, name, \ - TRACE_EVENT_FLAG_COPY, value1_name, \ - static_cast(value1_val), value2_name, \ - static_cast(value2_val)) +#define TRACE_COPY_COUNTER2(category_group, name, value1_name, value1_val, \ + value2_name, value2_val) \ + INTERNAL_TRACE_EVENT_ADD( \ + TRACE_EVENT_PHASE_COUNTER, category_group, \ + ::perfetto::DynamicString{name}, TRACE_EVENT_FLAG_NONE, value1_name, \ + static_cast(value1_val), value2_name, static_cast(value2_val)) // Counters with explicit timestamps. #define TRACE_COUNTER_WITH_TIMESTAMP1(category_group, name, timestamp, value) \ @@ -18709,7 +19402,8 @@ inline ::perfetto::StaticString GetEventNameTypeForLegacyEvents( static_cast(value)) #define TRACE_COPY_COUNTER_ID1(category_group, name, id, value) \ INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_COUNTER, category_group, \ - name, id, TRACE_EVENT_FLAG_COPY, "value", \ + ::perfetto::DynamicString{name}, id, \ + TRACE_EVENT_FLAG_NONE, "value", \ static_cast(value)) #define TRACE_COUNTER_ID2(category_group, name, id, value1_name, value1_val, \ value2_name, value2_val) \ @@ -18717,12 +19411,12 @@ inline ::perfetto::StaticString GetEventNameTypeForLegacyEvents( name, id, TRACE_EVENT_FLAG_NONE, \ value1_name, static_cast(value1_val), \ value2_name, static_cast(value2_val)) -#define TRACE_COPY_COUNTER_ID2(category_group, name, id, value1_name, \ - value1_val, value2_name, value2_val) \ - INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_COUNTER, category_group, \ - name, id, TRACE_EVENT_FLAG_COPY, \ - value1_name, static_cast(value1_val), \ - value2_name, static_cast(value2_val)) +#define TRACE_COPY_COUNTER_ID2(category_group, name, id, value1_name, \ + value1_val, value2_name, value2_val) \ + INTERNAL_TRACE_EVENT_ADD_WITH_ID( \ + TRACE_EVENT_PHASE_COUNTER, category_group, \ + ::perfetto::DynamicString{name}, id, TRACE_EVENT_FLAG_NONE, value1_name, \ + static_cast(value1_val), value2_name, static_cast(value2_val)) // Sampling profiler events. #define TRACE_EVENT_SAMPLE_WITH_ID1(category_group, name, id, arg1_name, \ @@ -18738,28 +19432,37 @@ inline ::perfetto::StaticString GetEventNameTypeForLegacyEvents( TRACE_EVENT_FLAG_NONE) #define TRACE_EVENT_ASYNC_BEGIN1(category_group, name, id, arg1_name, \ arg1_val) \ - INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_ASYNC_BEGIN, \ - category_group, name, id, \ - TRACE_EVENT_FLAG_NONE, arg1_name, arg1_val) + INTERNAL_TRACE_EVENT_ADD_WITH_ID( \ + TRACE_EVENT_PHASE_ASYNC_BEGIN, category_group, name, id, \ + TRACE_EVENT_FLAG_NONE, arg1_name, \ + ::perfetto::internal::PossiblyNull(arg1_val)) #define TRACE_EVENT_ASYNC_BEGIN2(category_group, name, id, arg1_name, \ arg1_val, arg2_name, arg2_val) \ INTERNAL_TRACE_EVENT_ADD_WITH_ID( \ TRACE_EVENT_PHASE_ASYNC_BEGIN, category_group, name, id, \ - TRACE_EVENT_FLAG_NONE, arg1_name, arg1_val, arg2_name, arg2_val) -#define TRACE_EVENT_COPY_ASYNC_BEGIN0(category_group, name, id) \ - INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_ASYNC_BEGIN, \ - category_group, name, id, \ - TRACE_EVENT_FLAG_COPY) + TRACE_EVENT_FLAG_NONE, arg1_name, \ + ::perfetto::internal::PossiblyNull(arg1_val), arg2_name, \ + ::perfetto::internal::PossiblyNull(arg2_val)) +#define TRACE_EVENT_COPY_ASYNC_BEGIN0(category_group, name, id) \ + INTERNAL_TRACE_EVENT_ADD_WITH_ID( \ + TRACE_EVENT_PHASE_ASYNC_BEGIN, category_group, \ + ::perfetto::DynamicString{name}, id, TRACE_EVENT_FLAG_NONE) #define TRACE_EVENT_COPY_ASYNC_BEGIN1(category_group, name, id, arg1_name, \ arg1_val) \ - INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_ASYNC_BEGIN, \ - category_group, name, id, \ - TRACE_EVENT_FLAG_COPY, arg1_name, arg1_val) + INTERNAL_TRACE_EVENT_ADD_WITH_ID( \ + TRACE_EVENT_PHASE_ASYNC_BEGIN, category_group, \ + ::perfetto::DynamicString{name}, id, TRACE_EVENT_FLAG_NONE, \ + ::perfetto::DynamicString{arg1_name}, \ + ::perfetto::internal::PossiblyNull(arg1_val)) #define TRACE_EVENT_COPY_ASYNC_BEGIN2(category_group, name, id, arg1_name, \ arg1_val, arg2_name, arg2_val) \ INTERNAL_TRACE_EVENT_ADD_WITH_ID( \ - TRACE_EVENT_PHASE_ASYNC_BEGIN, category_group, name, id, \ - TRACE_EVENT_FLAG_COPY, arg1_name, arg1_val, arg2_name, arg2_val) + TRACE_EVENT_PHASE_ASYNC_BEGIN, category_group, \ + ::perfetto::DynamicString{name}, id, TRACE_EVENT_FLAG_NONE, \ + ::perfetto::DynamicString{arg1_name}, \ + ::perfetto::internal::PossiblyNull(arg1_val), \ + ::perfetto::DynamicString{arg2_name}, \ + ::perfetto::internal::PossiblyNull(arg2_val)) #define TRACE_EVENT_ASYNC_BEGIN_WITH_FLAGS0(category_group, name, id, flags) \ INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_ASYNC_BEGIN, \ category_group, name, id, flags) @@ -18775,7 +19478,7 @@ inline ::perfetto::StaticString GetEventNameTypeForLegacyEvents( INTERNAL_TRACE_EVENT_ADD_WITH_ID_TID_AND_TIMESTAMP( \ TRACE_EVENT_PHASE_ASYNC_BEGIN, category_group, name, id, \ TRACE_EVENT_API_CURRENT_THREAD_ID, timestamp, TRACE_EVENT_FLAG_NONE, \ - arg1_name, arg1_val) + arg1_name, ::perfetto::internal::PossiblyNull(arg1_val)) #define TRACE_EVENT_NESTABLE_ASYNC_BEGIN_WITH_TIMESTAMP_AND_FLAGS0( \ category_group, name, id, timestamp, flags) \ INTERNAL_TRACE_EVENT_ADD_WITH_ID_TID_AND_TIMESTAMP( \ @@ -18792,12 +19495,14 @@ inline ::perfetto::StaticString GetEventNameTypeForLegacyEvents( INTERNAL_TRACE_EVENT_ADD_WITH_ID_TID_AND_TIMESTAMP( \ TRACE_EVENT_PHASE_ASYNC_BEGIN, category_group, name, id, \ TRACE_EVENT_API_CURRENT_THREAD_ID, timestamp, TRACE_EVENT_FLAG_NONE, \ - arg1_name, arg1_val, arg2_name, arg2_val) + arg1_name, ::perfetto::internal::PossiblyNull(arg1_val), arg2_name, \ + ::perfetto::internal::PossiblyNull(arg2_val)) #define TRACE_EVENT_COPY_ASYNC_BEGIN_WITH_TIMESTAMP0(category_group, name, id, \ timestamp) \ INTERNAL_TRACE_EVENT_ADD_WITH_ID_TID_AND_TIMESTAMP( \ - TRACE_EVENT_PHASE_ASYNC_BEGIN, category_group, name, id, \ - TRACE_EVENT_API_CURRENT_THREAD_ID, timestamp, TRACE_EVENT_FLAG_COPY) + TRACE_EVENT_PHASE_ASYNC_BEGIN, category_group, \ + ::perfetto::DynamicString{name}, id, TRACE_EVENT_API_CURRENT_THREAD_ID, \ + timestamp, TRACE_EVENT_FLAG_NONE) #define TRACE_EVENT_ASYNC_BEGIN_WITH_TIMESTAMP_AND_FLAGS0( \ category_group, name, id, timestamp, flags) \ INTERNAL_TRACE_EVENT_ADD_WITH_ID_TID_AND_TIMESTAMP( \ @@ -18813,7 +19518,8 @@ inline ::perfetto::StaticString GetEventNameTypeForLegacyEvents( arg1_name, arg1_val) \ INTERNAL_TRACE_EVENT_ADD_WITH_ID( \ TRACE_EVENT_PHASE_ASYNC_STEP_INTO, category_group, name, id, \ - TRACE_EVENT_FLAG_NONE, "step", step, arg1_name, arg1_val) + TRACE_EVENT_FLAG_NONE, "step", step, arg1_name, \ + ::perfetto::internal::PossiblyNull(arg1_val)) // Legacy async step into events with timestamps. #define TRACE_EVENT_ASYNC_STEP_INTO_WITH_TIMESTAMP0(category_group, name, id, \ @@ -18832,7 +19538,8 @@ inline ::perfetto::StaticString GetEventNameTypeForLegacyEvents( arg1_name, arg1_val) \ INTERNAL_TRACE_EVENT_ADD_WITH_ID( \ TRACE_EVENT_PHASE_ASYNC_STEP_PAST, category_group, name, id, \ - TRACE_EVENT_FLAG_NONE, "step", step, arg1_name, arg1_val) + TRACE_EVENT_FLAG_NONE, "step", step, arg1_name, \ + ::perfetto::internal::PossiblyNull(arg1_val)) // Legacy async end events. #define TRACE_EVENT_ASYNC_END0(category_group, name, id) \ @@ -18840,28 +19547,37 @@ inline ::perfetto::StaticString GetEventNameTypeForLegacyEvents( category_group, name, id, \ TRACE_EVENT_FLAG_NONE) #define TRACE_EVENT_ASYNC_END1(category_group, name, id, arg1_name, arg1_val) \ - INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_ASYNC_END, \ - category_group, name, id, \ - TRACE_EVENT_FLAG_NONE, arg1_name, arg1_val) + INTERNAL_TRACE_EVENT_ADD_WITH_ID( \ + TRACE_EVENT_PHASE_ASYNC_END, category_group, name, id, \ + TRACE_EVENT_FLAG_NONE, arg1_name, \ + ::perfetto::internal::PossiblyNull(arg1_val)) #define TRACE_EVENT_ASYNC_END2(category_group, name, id, arg1_name, arg1_val, \ arg2_name, arg2_val) \ INTERNAL_TRACE_EVENT_ADD_WITH_ID( \ TRACE_EVENT_PHASE_ASYNC_END, category_group, name, id, \ - TRACE_EVENT_FLAG_NONE, arg1_name, arg1_val, arg2_name, arg2_val) -#define TRACE_EVENT_COPY_ASYNC_END0(category_group, name, id) \ - INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_ASYNC_END, \ - category_group, name, id, \ - TRACE_EVENT_FLAG_COPY) + TRACE_EVENT_FLAG_NONE, arg1_name, \ + ::perfetto::internal::PossiblyNull(arg1_val), arg2_name, \ + ::perfetto::internal::PossiblyNull(arg2_val)) +#define TRACE_EVENT_COPY_ASYNC_END0(category_group, name, id) \ + INTERNAL_TRACE_EVENT_ADD_WITH_ID( \ + TRACE_EVENT_PHASE_ASYNC_END, category_group, \ + ::perfetto::DynamicString{name}, id, TRACE_EVENT_FLAG_NONE) #define TRACE_EVENT_COPY_ASYNC_END1(category_group, name, id, arg1_name, \ arg1_val) \ - INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_ASYNC_END, \ - category_group, name, id, \ - TRACE_EVENT_FLAG_COPY, arg1_name, arg1_val) + INTERNAL_TRACE_EVENT_ADD_WITH_ID( \ + TRACE_EVENT_PHASE_ASYNC_END, category_group, \ + ::perfetto::DynamicString{name}, id, TRACE_EVENT_FLAG_NONE, \ + ::perfetto::DynamicString{arg1_name}, \ + ::perfetto::internal::PossiblyNull(arg1_val)) #define TRACE_EVENT_COPY_ASYNC_END2(category_group, name, id, arg1_name, \ arg1_val, arg2_name, arg2_val) \ INTERNAL_TRACE_EVENT_ADD_WITH_ID( \ - TRACE_EVENT_PHASE_ASYNC_END, category_group, name, id, \ - TRACE_EVENT_FLAG_COPY, arg1_name, arg1_val, arg2_name, arg2_val) + TRACE_EVENT_PHASE_ASYNC_END, category_group, \ + ::perfetto::DynamicString{name}, id, TRACE_EVENT_FLAG_NONE, \ + ::perfetto::DynamicString{arg1_name}, \ + ::perfetto::internal::PossiblyNull(arg1_val), \ + ::perfetto::DynamicString{arg2_name}, \ + ::perfetto::internal::PossiblyNull(arg2_val)) #define TRACE_EVENT_ASYNC_END_WITH_FLAGS0(category_group, name, id, flags) \ INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_ASYNC_END, \ category_group, name, id, flags) @@ -18877,19 +19593,21 @@ inline ::perfetto::StaticString GetEventNameTypeForLegacyEvents( INTERNAL_TRACE_EVENT_ADD_WITH_ID_TID_AND_TIMESTAMP( \ TRACE_EVENT_PHASE_ASYNC_END, category_group, name, id, \ TRACE_EVENT_API_CURRENT_THREAD_ID, timestamp, TRACE_EVENT_FLAG_NONE, \ - arg1_name, arg1_val) + arg1_name, ::perfetto::internal::PossiblyNull(arg1_val)) #define TRACE_EVENT_ASYNC_END_WITH_TIMESTAMP2(category_group, name, id, \ timestamp, arg1_name, arg1_val, \ arg2_name, arg2_val) \ INTERNAL_TRACE_EVENT_ADD_WITH_ID_TID_AND_TIMESTAMP( \ TRACE_EVENT_PHASE_ASYNC_END, category_group, name, id, \ TRACE_EVENT_API_CURRENT_THREAD_ID, timestamp, TRACE_EVENT_FLAG_NONE, \ - arg1_name, arg1_val, arg2_name, arg2_val) -#define TRACE_EVENT_COPY_ASYNC_END_WITH_TIMESTAMP0(category_group, name, id, \ - timestamp) \ - INTERNAL_TRACE_EVENT_ADD_WITH_ID_TID_AND_TIMESTAMP( \ - TRACE_EVENT_PHASE_ASYNC_END, category_group, name, id, \ - TRACE_EVENT_API_CURRENT_THREAD_ID, timestamp, TRACE_EVENT_FLAG_COPY) + arg1_name, ::perfetto::internal::PossiblyNull(arg1_val), arg2_name, \ + ::perfetto::internal::PossiblyNull(arg2_val)) +#define TRACE_EVENT_COPY_ASYNC_END_WITH_TIMESTAMP0(category_group, name, id, \ + timestamp) \ + INTERNAL_TRACE_EVENT_ADD_WITH_ID_TID_AND_TIMESTAMP( \ + TRACE_EVENT_PHASE_ASYNC_END, category_group, \ + ::perfetto::DynamicString{name}, id, TRACE_EVENT_API_CURRENT_THREAD_ID, \ + timestamp, TRACE_EVENT_FLAG_NONE) #define TRACE_EVENT_ASYNC_END_WITH_TIMESTAMP_AND_FLAGS0(category_group, name, \ id, timestamp, flags) \ INTERNAL_TRACE_EVENT_ADD_WITH_ID_TID_AND_TIMESTAMP( \ @@ -18903,14 +19621,17 @@ inline ::perfetto::StaticString GetEventNameTypeForLegacyEvents( TRACE_EVENT_FLAG_NONE) #define TRACE_EVENT_NESTABLE_ASYNC_BEGIN1(category_group, name, id, arg1_name, \ arg1_val) \ - INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_NESTABLE_ASYNC_BEGIN, \ - category_group, name, id, \ - TRACE_EVENT_FLAG_NONE, arg1_name, arg1_val) + INTERNAL_TRACE_EVENT_ADD_WITH_ID( \ + TRACE_EVENT_PHASE_NESTABLE_ASYNC_BEGIN, category_group, name, id, \ + TRACE_EVENT_FLAG_NONE, arg1_name, \ + ::perfetto::internal::PossiblyNull(arg1_val)) #define TRACE_EVENT_NESTABLE_ASYNC_BEGIN2(category_group, name, id, arg1_name, \ arg1_val, arg2_name, arg2_val) \ INTERNAL_TRACE_EVENT_ADD_WITH_ID( \ TRACE_EVENT_PHASE_NESTABLE_ASYNC_BEGIN, category_group, name, id, \ - TRACE_EVENT_FLAG_NONE, arg1_name, arg1_val, arg2_name, arg2_val) + TRACE_EVENT_FLAG_NONE, arg1_name, \ + ::perfetto::internal::PossiblyNull(arg1_val), arg2_name, \ + ::perfetto::internal::PossiblyNull(arg2_val)) #define TRACE_EVENT_NESTABLE_ASYNC_BEGIN_WITH_FLAGS0(category_group, name, id, \ flags) \ INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_NESTABLE_ASYNC_BEGIN, \ @@ -18920,7 +19641,7 @@ inline ::perfetto::StaticString GetEventNameTypeForLegacyEvents( INTERNAL_TRACE_EVENT_ADD_WITH_ID_TID_AND_TIMESTAMP( \ TRACE_EVENT_PHASE_NESTABLE_ASYNC_BEGIN, category_group, name, id, \ TRACE_EVENT_API_CURRENT_THREAD_ID, timestamp, TRACE_EVENT_FLAG_NONE, \ - arg1_name, arg1_val) + arg1_name, ::perfetto::internal::PossiblyNull(arg1_val)) // Async end events. #define TRACE_EVENT_NESTABLE_ASYNC_END0(category_group, name, id) \ @@ -18929,14 +19650,17 @@ inline ::perfetto::StaticString GetEventNameTypeForLegacyEvents( TRACE_EVENT_FLAG_NONE) #define TRACE_EVENT_NESTABLE_ASYNC_END1(category_group, name, id, arg1_name, \ arg1_val) \ - INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_NESTABLE_ASYNC_END, \ - category_group, name, id, \ - TRACE_EVENT_FLAG_NONE, arg1_name, arg1_val) + INTERNAL_TRACE_EVENT_ADD_WITH_ID( \ + TRACE_EVENT_PHASE_NESTABLE_ASYNC_END, category_group, name, id, \ + TRACE_EVENT_FLAG_NONE, arg1_name, \ + ::perfetto::internal::PossiblyNull(arg1_val)) #define TRACE_EVENT_NESTABLE_ASYNC_END2(category_group, name, id, arg1_name, \ arg1_val, arg2_name, arg2_val) \ INTERNAL_TRACE_EVENT_ADD_WITH_ID( \ TRACE_EVENT_PHASE_NESTABLE_ASYNC_END, category_group, name, id, \ - TRACE_EVENT_FLAG_NONE, arg1_name, arg1_val, arg2_name, arg2_val) + TRACE_EVENT_FLAG_NONE, arg1_name, \ + ::perfetto::internal::PossiblyNull(arg1_val), arg2_name, \ + ::perfetto::internal::PossiblyNull(arg2_val)) #define TRACE_EVENT_NESTABLE_ASYNC_END_WITH_FLAGS0(category_group, name, id, \ flags) \ INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_NESTABLE_ASYNC_END, \ @@ -18947,28 +19671,37 @@ inline ::perfetto::StaticString GetEventNameTypeForLegacyEvents( INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_NESTABLE_ASYNC_INSTANT, \ category_group, name, id, \ TRACE_EVENT_FLAG_NONE) -#define TRACE_EVENT_NESTABLE_ASYNC_INSTANT1(category_group, name, id, \ - arg1_name, arg1_val) \ - INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_NESTABLE_ASYNC_INSTANT, \ - category_group, name, id, \ - TRACE_EVENT_FLAG_NONE, arg1_name, arg1_val) +#define TRACE_EVENT_NESTABLE_ASYNC_INSTANT1(category_group, name, id, \ + arg1_name, arg1_val) \ + INTERNAL_TRACE_EVENT_ADD_WITH_ID( \ + TRACE_EVENT_PHASE_NESTABLE_ASYNC_INSTANT, category_group, name, id, \ + TRACE_EVENT_FLAG_NONE, arg1_name, \ + ::perfetto::internal::PossiblyNull(arg1_val)) #define TRACE_EVENT_NESTABLE_ASYNC_INSTANT2( \ category_group, name, id, arg1_name, arg1_val, arg2_name, arg2_val) \ INTERNAL_TRACE_EVENT_ADD_WITH_ID( \ TRACE_EVENT_PHASE_NESTABLE_ASYNC_INSTANT, category_group, name, id, \ - TRACE_EVENT_FLAG_NONE, arg1_name, arg1_val, arg2_name, arg2_val) -#define TRACE_EVENT_COPY_NESTABLE_ASYNC_BEGIN_WITH_TTS2( \ - category_group, name, id, arg1_name, arg1_val, arg2_name, arg2_val) \ - INTERNAL_TRACE_EVENT_ADD_WITH_ID( \ - TRACE_EVENT_PHASE_NESTABLE_ASYNC_BEGIN, category_group, name, id, \ - TRACE_EVENT_FLAG_ASYNC_TTS | TRACE_EVENT_FLAG_COPY, arg1_name, arg1_val, \ - arg2_name, arg2_val) -#define TRACE_EVENT_COPY_NESTABLE_ASYNC_END_WITH_TTS2( \ - category_group, name, id, arg1_name, arg1_val, arg2_name, arg2_val) \ - INTERNAL_TRACE_EVENT_ADD_WITH_ID( \ - TRACE_EVENT_PHASE_NESTABLE_ASYNC_END, category_group, name, id, \ - TRACE_EVENT_FLAG_ASYNC_TTS | TRACE_EVENT_FLAG_COPY, arg1_name, arg1_val, \ - arg2_name, arg2_val) + TRACE_EVENT_FLAG_NONE, arg1_name, \ + ::perfetto::internal::PossiblyNull(arg1_val), arg2_name, \ + ::perfetto::internal::PossiblyNull(arg2_val)) +#define TRACE_EVENT_COPY_NESTABLE_ASYNC_BEGIN_WITH_TTS2( \ + category_group, name, id, arg1_name, arg1_val, arg2_name, arg2_val) \ + INTERNAL_TRACE_EVENT_ADD_WITH_ID( \ + TRACE_EVENT_PHASE_NESTABLE_ASYNC_BEGIN, category_group, \ + ::perfetto::DynamicString{name}, id, TRACE_EVENT_FLAG_ASYNC_TTS, \ + ::perfetto::DynamicString{arg1_name}, \ + ::perfetto::internal::PossiblyNull(arg1_val), \ + ::perfetto::DynamicString{arg2_name}, \ + ::perfetto::internal::PossiblyNull(arg2_val)) +#define TRACE_EVENT_COPY_NESTABLE_ASYNC_END_WITH_TTS2( \ + category_group, name, id, arg1_name, arg1_val, arg2_name, arg2_val) \ + INTERNAL_TRACE_EVENT_ADD_WITH_ID( \ + TRACE_EVENT_PHASE_NESTABLE_ASYNC_END, category_group, \ + ::perfetto::DynamicString{name}, id, TRACE_EVENT_FLAG_ASYNC_TTS, \ + ::perfetto::DynamicString{arg1_name}, \ + ::perfetto::internal::PossiblyNull(arg1_val), \ + ::perfetto::DynamicString{arg2_name}, \ + ::perfetto::internal::PossiblyNull(arg2_val)) // Async events with explicit timestamps. #define TRACE_EVENT_NESTABLE_ASYNC_BEGIN_WITH_TIMESTAMP0(category_group, name, \ @@ -18986,14 +19719,15 @@ inline ::perfetto::StaticString GetEventNameTypeForLegacyEvents( INTERNAL_TRACE_EVENT_ADD_WITH_ID_TID_AND_TIMESTAMP( \ TRACE_EVENT_PHASE_NESTABLE_ASYNC_END, category_group, name, id, \ TRACE_EVENT_API_CURRENT_THREAD_ID, timestamp, TRACE_EVENT_FLAG_NONE, \ - arg1_name, arg1_val) + arg1_name, ::perfetto::internal::PossiblyNull(arg1_val)) #define TRACE_EVENT_NESTABLE_ASYNC_END_WITH_TIMESTAMP2( \ category_group, name, id, timestamp, arg1_name, arg1_val, arg2_name, \ arg2_val) \ INTERNAL_TRACE_EVENT_ADD_WITH_ID_TID_AND_TIMESTAMP( \ TRACE_EVENT_PHASE_NESTABLE_ASYNC_END, category_group, name, id, \ TRACE_EVENT_API_CURRENT_THREAD_ID, timestamp, TRACE_EVENT_FLAG_NONE, \ - arg1_name, arg1_val, arg2_name, arg2_val) + arg1_name, ::perfetto::internal::PossiblyNull(arg1_val), arg2_name, \ + ::perfetto::internal::PossiblyNull(arg2_val)) #define TRACE_EVENT_NESTABLE_ASYNC_END_WITH_TIMESTAMP_AND_FLAGS0( \ category_group, name, id, timestamp, flags) \ INTERNAL_TRACE_EVENT_ADD_WITH_ID_TID_AND_TIMESTAMP( \ @@ -19004,51 +19738,65 @@ inline ::perfetto::StaticString GetEventNameTypeForLegacyEvents( INTERNAL_TRACE_EVENT_ADD_WITH_ID_TID_AND_TIMESTAMP( \ TRACE_EVENT_PHASE_NESTABLE_ASYNC_INSTANT, category_group, name, id, \ TRACE_EVENT_API_CURRENT_THREAD_ID, timestamp, TRACE_EVENT_FLAG_NONE) -#define TRACE_EVENT_COPY_NESTABLE_ASYNC_BEGIN0(category_group, name, id) \ - INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_NESTABLE_ASYNC_BEGIN, \ - category_group, name, id, \ - TRACE_EVENT_FLAG_COPY) -#define TRACE_EVENT_COPY_NESTABLE_ASYNC_BEGIN1(category_group, name, id, \ - arg1_name, arg1_val) \ - INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_NESTABLE_ASYNC_BEGIN, \ - category_group, name, id, \ - TRACE_EVENT_FLAG_COPY, arg1_name, arg1_val) +#define TRACE_EVENT_COPY_NESTABLE_ASYNC_BEGIN0(category_group, name, id) \ + INTERNAL_TRACE_EVENT_ADD_WITH_ID( \ + TRACE_EVENT_PHASE_NESTABLE_ASYNC_BEGIN, category_group, \ + ::perfetto::DynamicString{name}, id, TRACE_EVENT_FLAG_NONE) +#define TRACE_EVENT_COPY_NESTABLE_ASYNC_BEGIN1(category_group, name, id, \ + arg1_name, arg1_val) \ + INTERNAL_TRACE_EVENT_ADD_WITH_ID( \ + TRACE_EVENT_PHASE_NESTABLE_ASYNC_BEGIN, category_group, \ + ::perfetto::DynamicString{name}, id, TRACE_EVENT_FLAG_NONE, \ + ::perfetto::DynamicString{arg1_name}, \ + ::perfetto::internal::PossiblyNull(arg1_val)) #define TRACE_EVENT_COPY_NESTABLE_ASYNC_BEGIN2( \ category_group, name, id, arg1_name, arg1_val, arg2_name, arg2_val) \ INTERNAL_TRACE_EVENT_ADD_WITH_ID( \ - TRACE_EVENT_PHASE_NESTABLE_ASYNC_BEGIN, category_group, name, id, \ - TRACE_EVENT_FLAG_COPY, arg1_name, arg1_val, arg2_name, arg2_val) -#define TRACE_EVENT_COPY_NESTABLE_ASYNC_END0(category_group, name, id) \ - INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_NESTABLE_ASYNC_END, \ - category_group, name, id, \ - TRACE_EVENT_FLAG_COPY) -#define TRACE_EVENT_COPY_NESTABLE_ASYNC_BEGIN_WITH_TIMESTAMP0( \ - category_group, name, id, timestamp) \ - INTERNAL_TRACE_EVENT_ADD_WITH_ID_TID_AND_TIMESTAMP( \ - TRACE_EVENT_PHASE_NESTABLE_ASYNC_BEGIN, category_group, name, id, \ - TRACE_EVENT_API_CURRENT_THREAD_ID, timestamp, TRACE_EVENT_FLAG_COPY) -#define TRACE_EVENT_COPY_NESTABLE_ASYNC_BEGIN_WITH_TIMESTAMP1( \ - category_group, name, id, timestamp, arg1_name, arg1_val) \ - INTERNAL_TRACE_EVENT_ADD_WITH_ID_TID_AND_TIMESTAMP( \ - TRACE_EVENT_PHASE_NESTABLE_ASYNC_BEGIN, category_group, name, id, \ - TRACE_EVENT_API_CURRENT_THREAD_ID, timestamp, TRACE_EVENT_FLAG_COPY, \ - arg1_name, arg1_val) -#define TRACE_EVENT_COPY_NESTABLE_ASYNC_END_WITH_TIMESTAMP0( \ - category_group, name, id, timestamp) \ - INTERNAL_TRACE_EVENT_ADD_WITH_ID_TID_AND_TIMESTAMP( \ - TRACE_EVENT_PHASE_NESTABLE_ASYNC_END, category_group, name, id, \ - TRACE_EVENT_API_CURRENT_THREAD_ID, timestamp, TRACE_EVENT_FLAG_COPY) -#define TRACE_EVENT_NESTABLE_ASYNC_END_WITH_TIMESTAMP2( \ + TRACE_EVENT_PHASE_NESTABLE_ASYNC_BEGIN, category_group, \ + ::perfetto::DynamicString{name}, id, TRACE_EVENT_FLAG_NONE, \ + ::perfetto::DynamicString{arg1_name}, \ + ::perfetto::internal::PossiblyNull(arg1_val), \ + ::perfetto::DynamicString{arg2_name}, \ + ::perfetto::internal::PossiblyNull(arg2_val)) +#define TRACE_EVENT_COPY_NESTABLE_ASYNC_END0(category_group, name, id) \ + INTERNAL_TRACE_EVENT_ADD_WITH_ID( \ + TRACE_EVENT_PHASE_NESTABLE_ASYNC_END, category_group, \ + ::perfetto::DynamicString{name}, id, TRACE_EVENT_FLAG_NONE) +#define TRACE_EVENT_COPY_NESTABLE_ASYNC_BEGIN_WITH_TIMESTAMP0( \ + category_group, name, id, timestamp) \ + INTERNAL_TRACE_EVENT_ADD_WITH_ID_TID_AND_TIMESTAMP( \ + TRACE_EVENT_PHASE_NESTABLE_ASYNC_BEGIN, category_group, \ + ::perfetto::DynamicString{name}, id, TRACE_EVENT_API_CURRENT_THREAD_ID, \ + timestamp, TRACE_EVENT_FLAG_NONE) +#define TRACE_EVENT_COPY_NESTABLE_ASYNC_BEGIN_WITH_TIMESTAMP1( \ + category_group, name, id, timestamp, arg1_name, arg1_val) \ + INTERNAL_TRACE_EVENT_ADD_WITH_ID_TID_AND_TIMESTAMP( \ + TRACE_EVENT_PHASE_NESTABLE_ASYNC_BEGIN, category_group, \ + ::perfetto::DynamicString{name}, id, TRACE_EVENT_API_CURRENT_THREAD_ID, \ + timestamp, TRACE_EVENT_FLAG_NONE, ::perfetto::DynamicString{arg1_name}, \ + ::perfetto::internal::PossiblyNull(arg1_val)) +#define TRACE_EVENT_COPY_NESTABLE_ASYNC_END_WITH_TIMESTAMP0( \ + category_group, name, id, timestamp) \ + INTERNAL_TRACE_EVENT_ADD_WITH_ID_TID_AND_TIMESTAMP( \ + TRACE_EVENT_PHASE_NESTABLE_ASYNC_END, category_group, \ + ::perfetto::DynamicString{name}, id, TRACE_EVENT_API_CURRENT_THREAD_ID, \ + timestamp, TRACE_EVENT_FLAG_NONE) +#define TRACE_EVENT_COPY_NESTABLE_ASYNC_END_WITH_TIMESTAMP2( \ category_group, name, id, timestamp, arg1_name, arg1_val, arg2_name, \ arg2_val) \ INTERNAL_TRACE_EVENT_ADD_WITH_ID_TID_AND_TIMESTAMP( \ TRACE_EVENT_PHASE_NESTABLE_ASYNC_END, category_group, name, id, \ TRACE_EVENT_API_CURRENT_THREAD_ID, timestamp, TRACE_EVENT_FLAG_NONE, \ - arg1_name, arg1_val, arg2_name, arg2_val) + ::perfetto::DynamicString{arg1_name}, \ + ::perfetto::internal::PossiblyNull(arg1_val), \ + ::perfetto::DynamicString{arg2_name}, \ + ::perfetto::internal::PossiblyNull(arg2_val)) // Metadata events. #define TRACE_EVENT_METADATA1(category_group, name, arg1_name, arg1_val) \ - INTERNAL_TRACE_EVENT_METADATA_ADD(category_group, name, arg1_name, arg1_val) + INTERNAL_TRACE_EVENT_METADATA_ADD( \ + category_group, name, arg1_name, \ + ::perfetto::internal::PossiblyNull(arg1_val)) // Clock sync events. #define TRACE_EVENT_CLOCK_SYNC_RECEIVER(sync_id) \ @@ -19084,16 +19832,6 @@ inline ::perfetto::StaticString GetEventNameTypeForLegacyEvents( category_group, name, id, \ TRACE_EVENT_FLAG_NONE) -// Context events. -#define TRACE_EVENT_ENTER_CONTEXT(category_group, name, context) \ - INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_ENTER_CONTEXT, \ - category_group, name, context, \ - TRACE_EVENT_FLAG_NONE) -#define TRACE_EVENT_LEAVE_CONTEXT(category_group, name, context) \ - INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_LEAVE_CONTEXT, \ - category_group, name, context, \ - TRACE_EVENT_FLAG_NONE) - // TODO(skyostil): Implement binary-efficient trace events. #define TRACE_EVENT_BINARY_EFFICIENT0 TRACE_EVENT0 #define TRACE_EVENT_BINARY_EFFICIENT1 TRACE_EVENT1 @@ -19111,7 +19849,7 @@ inline ::perfetto::StaticString GetEventNameTypeForLegacyEvents( static int PERFETTO_UID(prev) = -1; \ int PERFETTO_UID(curr) = \ ::perfetto::internal::TrackEventInternal::GetSessionCount(); \ - if (::PERFETTO_TRACK_EVENT_NAMESPACE::TrackEvent::IsEnabled() && \ + if (PERFETTO_TRACK_EVENT_NAMESPACE::TrackEvent::IsEnabled() && \ (PERFETTO_UID(prev) != PERFETTO_UID(curr))) { \ *(ret) = true; \ PERFETTO_UID(prev) = PERFETTO_UID(curr); \ @@ -19128,7 +19866,8 @@ inline ::perfetto::StaticString GetEventNameTypeForLegacyEvents( // involvement from the embedder. APIs such as TRACE_EVENT_API_ADD_TRACE_EVENT // are still up to the embedder to define. -#define TRACE_STR_COPY(str) (::perfetto::DynamicString{str}) +#define TRACE_STR_COPY(str) \ + ::perfetto::DynamicString { ::perfetto::internal::PossiblyNull(str) } #define TRACE_ID_WITH_SCOPE(scope, ...) \ ::perfetto::internal::LegacyTraceId::WithScope(scope, ##__VA_ARGS__) @@ -19146,29 +19885,29 @@ inline ::perfetto::StaticString GetEventNameTypeForLegacyEvents( // non-zero indicates at least one tracing session for this category is active. // Note that callers should not make any assumptions at what each bit represents // in the status byte. Does not support dynamic categories. -#define TRACE_EVENT_API_GET_CATEGORY_GROUP_ENABLED(category) \ - reinterpret_cast( \ - [&] { \ - static_assert( \ - !std::is_same<::perfetto::DynamicCategory, \ - decltype(category)>::value, \ - "Enabled flag pointers are not supported for dynamic trace " \ - "categories."); \ - }, \ - PERFETTO_TRACK_EVENT_NAMESPACE::internal::kCategoryRegistry \ - .GetCategoryState( \ - ::PERFETTO_TRACK_EVENT_NAMESPACE::internal::kCategoryRegistry \ +#define TRACE_EVENT_API_GET_CATEGORY_GROUP_ENABLED(category) \ + reinterpret_cast( \ + [&] { \ + static_assert( \ + !std::is_same<::perfetto::DynamicCategory, \ + decltype(category)>::value, \ + "Enabled flag pointers are not supported for dynamic trace " \ + "categories."); \ + }, \ + PERFETTO_TRACK_EVENT_NAMESPACE::internal::kCategoryRegistry \ + .GetCategoryState( \ + PERFETTO_TRACK_EVENT_NAMESPACE::internal::kCategoryRegistry \ .Find(category, /*is_dynamic=*/false))) // Given a pointer returned by TRACE_EVENT_API_GET_CATEGORY_GROUP_ENABLED, // yields a pointer to the name of the corresponding category group. -#define TRACE_EVENT_API_GET_CATEGORY_GROUP_NAME(category_enabled_ptr) \ - ::PERFETTO_TRACK_EVENT_NAMESPACE::internal::kCategoryRegistry \ - .GetCategory( \ - category_enabled_ptr - \ - reinterpret_cast( \ - ::PERFETTO_TRACK_EVENT_NAMESPACE::internal::kCategoryRegistry \ - .GetCategoryState(0u))) \ +#define TRACE_EVENT_API_GET_CATEGORY_GROUP_NAME(category_enabled_ptr) \ + PERFETTO_TRACK_EVENT_NAMESPACE::internal::kCategoryRegistry \ + .GetCategory( \ + category_enabled_ptr - \ + reinterpret_cast( \ + PERFETTO_TRACK_EVENT_NAMESPACE::internal::kCategoryRegistry \ + .GetCategoryState(0u))) \ ->name #endif // PERFETTO_ENABLE_LEGACY_TRACE_EVENTS @@ -19199,6 +19938,7 @@ inline ::perfetto::StaticString GetEventNameTypeForLegacyEvents( // The only exception to this should be large projects where build time is a // concern (e.g. chromium), which migh prefer sticking to strict IWYU. +// gen_amalgamated expanded: #include "perfetto/base/time.h" // gen_amalgamated expanded: #include "perfetto/tracing/buffer_exhausted_policy.h" // gen_amalgamated expanded: #include "perfetto/tracing/console_interceptor.h" // gen_amalgamated expanded: #include "perfetto/tracing/core/data_source_config.h" @@ -19816,6 +20556,7 @@ class EnumValueDescriptorProto; class EnumDescriptorProto; class OneofDescriptorProto; class FieldDescriptorProto; +class FieldOptions; class DescriptorProto; class DescriptorProto_ReservedRange; class FileDescriptorProto; @@ -20059,6 +20800,7 @@ class PERFETTO_EXPORT_COMPONENT FieldDescriptorProto : public ::protozero::CppMe kTypeNameFieldNumber = 6, kExtendeeFieldNumber = 2, kDefaultValueFieldNumber = 7, + kOptionsFieldNumber = 8, kOneofIndexFieldNumber = 9, }; @@ -20104,6 +20846,10 @@ class PERFETTO_EXPORT_COMPONENT FieldDescriptorProto : public ::protozero::CppMe const std::string& default_value() const { return default_value_; } void set_default_value(const std::string& value) { default_value_ = value; _has_field_.set(7); } + bool has_options() const { return _has_field_[8]; } + const FieldOptions& options() const { return *options_; } + FieldOptions* mutable_options() { _has_field_.set(8); return options_.get(); } + bool has_oneof_index() const { return _has_field_[9]; } int32_t oneof_index() const { return oneof_index_; } void set_oneof_index(int32_t value) { oneof_index_ = value; _has_field_.set(9); } @@ -20116,6 +20862,7 @@ class PERFETTO_EXPORT_COMPONENT FieldDescriptorProto : public ::protozero::CppMe std::string type_name_{}; std::string extendee_{}; std::string default_value_{}; + ::protozero::CopyablePtr options_; int32_t oneof_index_{}; // Allows to preserve unknown protobuf fields for compatibility @@ -20126,6 +20873,41 @@ class PERFETTO_EXPORT_COMPONENT FieldDescriptorProto : public ::protozero::CppMe }; +class PERFETTO_EXPORT_COMPONENT FieldOptions : public ::protozero::CppMessageObj { + public: + enum FieldNumbers { + kPackedFieldNumber = 2, + }; + + FieldOptions(); + ~FieldOptions() override; + FieldOptions(FieldOptions&&) noexcept; + FieldOptions& operator=(FieldOptions&&); + FieldOptions(const FieldOptions&); + FieldOptions& operator=(const FieldOptions&); + bool operator==(const FieldOptions&) const; + bool operator!=(const FieldOptions& other) const { return !(*this == other); } + + bool ParseFromArray(const void*, size_t) override; + std::string SerializeAsString() const override; + std::vector SerializeAsArray() const override; + void Serialize(::protozero::Message*) const; + + bool has_packed() const { return _has_field_[2]; } + bool packed() const { return packed_; } + void set_packed(bool value) { packed_ = value; _has_field_.set(2); } + + private: + bool packed_{}; + + // Allows to preserve unknown protobuf fields for compatibility + // with future versions of .proto files. + std::string unknown_fields_; + + std::bitset<3> _has_field_{}; +}; + + class PERFETTO_EXPORT_COMPONENT DescriptorProto : public ::protozero::CppMessageObj { public: using ReservedRange = DescriptorProto_ReservedRange; @@ -21613,6 +22395,7 @@ namespace protos { namespace gen { class TraceStats; class TraceStats_FilterStats; +class TraceStats_WriterStats; class TraceStats_BufferStats; enum TraceStats_FinalFlushOutcome : int; } // namespace perfetto @@ -21635,6 +22418,7 @@ enum TraceStats_FinalFlushOutcome : int { class PERFETTO_EXPORT_COMPONENT TraceStats : public ::protozero::CppMessageObj { public: using BufferStats = TraceStats_BufferStats; + using WriterStats = TraceStats_WriterStats; using FilterStats = TraceStats_FilterStats; using FinalFlushOutcome = TraceStats_FinalFlushOutcome; static constexpr auto FINAL_FLUSH_UNSPECIFIED = TraceStats_FinalFlushOutcome_FINAL_FLUSH_UNSPECIFIED; @@ -21644,6 +22428,8 @@ class PERFETTO_EXPORT_COMPONENT TraceStats : public ::protozero::CppMessageObj { static constexpr auto FinalFlushOutcome_MAX = TraceStats_FinalFlushOutcome_FINAL_FLUSH_FAILED; enum FieldNumbers { kBufferStatsFieldNumber = 1, + kChunkPayloadHistogramDefFieldNumber = 17, + kWriterStatsFieldNumber = 18, kProducersConnectedFieldNumber = 2, kProducersSeenFieldNumber = 3, kDataSourcesRegisteredFieldNumber = 4, @@ -21680,6 +22466,19 @@ class PERFETTO_EXPORT_COMPONENT TraceStats : public ::protozero::CppMessageObj { void clear_buffer_stats(); TraceStats_BufferStats* add_buffer_stats(); + const std::vector& chunk_payload_histogram_def() const { return chunk_payload_histogram_def_; } + std::vector* mutable_chunk_payload_histogram_def() { return &chunk_payload_histogram_def_; } + int chunk_payload_histogram_def_size() const { return static_cast(chunk_payload_histogram_def_.size()); } + void clear_chunk_payload_histogram_def() { chunk_payload_histogram_def_.clear(); } + void add_chunk_payload_histogram_def(int64_t value) { chunk_payload_histogram_def_.emplace_back(value); } + int64_t* add_chunk_payload_histogram_def() { chunk_payload_histogram_def_.emplace_back(); return &chunk_payload_histogram_def_.back(); } + + const std::vector& writer_stats() const { return writer_stats_; } + std::vector* mutable_writer_stats() { return &writer_stats_; } + int writer_stats_size() const; + void clear_writer_stats(); + TraceStats_WriterStats* add_writer_stats(); + bool has_producers_connected() const { return _has_field_[2]; } uint32_t producers_connected() const { return producers_connected_; } void set_producers_connected(uint32_t value) { producers_connected_ = value; _has_field_.set(2); } @@ -21738,6 +22537,8 @@ class PERFETTO_EXPORT_COMPONENT TraceStats : public ::protozero::CppMessageObj { private: std::vector buffer_stats_; + std::vector chunk_payload_histogram_def_; + std::vector writer_stats_; uint32_t producers_connected_{}; uint64_t producers_seen_{}; uint32_t data_sources_registered_{}; @@ -21757,7 +22558,7 @@ class PERFETTO_EXPORT_COMPONENT TraceStats : public ::protozero::CppMessageObj { // with future versions of .proto files. std::string unknown_fields_; - std::bitset<16> _has_field_{}; + std::bitset<19> _has_field_{}; }; @@ -21814,6 +22615,59 @@ class PERFETTO_EXPORT_COMPONENT TraceStats_FilterStats : public ::protozero::Cpp }; +class PERFETTO_EXPORT_COMPONENT TraceStats_WriterStats : public ::protozero::CppMessageObj { + public: + enum FieldNumbers { + kSequenceIdFieldNumber = 1, + kChunkPayloadHistogramCountsFieldNumber = 2, + kChunkPayloadHistogramSumFieldNumber = 3, + }; + + TraceStats_WriterStats(); + ~TraceStats_WriterStats() override; + TraceStats_WriterStats(TraceStats_WriterStats&&) noexcept; + TraceStats_WriterStats& operator=(TraceStats_WriterStats&&); + TraceStats_WriterStats(const TraceStats_WriterStats&); + TraceStats_WriterStats& operator=(const TraceStats_WriterStats&); + bool operator==(const TraceStats_WriterStats&) const; + bool operator!=(const TraceStats_WriterStats& other) const { return !(*this == other); } + + bool ParseFromArray(const void*, size_t) override; + std::string SerializeAsString() const override; + std::vector SerializeAsArray() const override; + void Serialize(::protozero::Message*) const; + + bool has_sequence_id() const { return _has_field_[1]; } + uint64_t sequence_id() const { return sequence_id_; } + void set_sequence_id(uint64_t value) { sequence_id_ = value; _has_field_.set(1); } + + const std::vector& chunk_payload_histogram_counts() const { return chunk_payload_histogram_counts_; } + std::vector* mutable_chunk_payload_histogram_counts() { return &chunk_payload_histogram_counts_; } + int chunk_payload_histogram_counts_size() const { return static_cast(chunk_payload_histogram_counts_.size()); } + void clear_chunk_payload_histogram_counts() { chunk_payload_histogram_counts_.clear(); } + void add_chunk_payload_histogram_counts(uint64_t value) { chunk_payload_histogram_counts_.emplace_back(value); } + uint64_t* add_chunk_payload_histogram_counts() { chunk_payload_histogram_counts_.emplace_back(); return &chunk_payload_histogram_counts_.back(); } + + const std::vector& chunk_payload_histogram_sum() const { return chunk_payload_histogram_sum_; } + std::vector* mutable_chunk_payload_histogram_sum() { return &chunk_payload_histogram_sum_; } + int chunk_payload_histogram_sum_size() const { return static_cast(chunk_payload_histogram_sum_.size()); } + void clear_chunk_payload_histogram_sum() { chunk_payload_histogram_sum_.clear(); } + void add_chunk_payload_histogram_sum(int64_t value) { chunk_payload_histogram_sum_.emplace_back(value); } + int64_t* add_chunk_payload_histogram_sum() { chunk_payload_histogram_sum_.emplace_back(); return &chunk_payload_histogram_sum_.back(); } + + private: + uint64_t sequence_id_{}; + std::vector chunk_payload_histogram_counts_; + std::vector chunk_payload_histogram_sum_; + + // Allows to preserve unknown protobuf fields for compatibility + // with future versions of .proto files. + std::string unknown_fields_; + + std::bitset<4> _has_field_{}; +}; + + class PERFETTO_EXPORT_COMPONENT TraceStats_BufferStats : public ::protozero::CppMessageObj { public: enum FieldNumbers { @@ -22516,14 +23370,7 @@ class AndroidEnergyConsumerDescriptor : public ::protozero::Message { AndroidEnergyConsumer, AndroidEnergyConsumerDescriptor>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_EnergyConsumers kEnergyConsumers() { return {}; } + static constexpr FieldMetadata_EnergyConsumers kEnergyConsumers{}; template T* add_energy_consumers() { return BeginNestedMessage(1); } @@ -22565,14 +23412,7 @@ class AndroidEnergyConsumer : public ::protozero::Message { int32_t, AndroidEnergyConsumer>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_EnergyConsumerId kEnergyConsumerId() { return {}; } + static constexpr FieldMetadata_EnergyConsumerId kEnergyConsumerId{}; void set_energy_consumer_id(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_EnergyConsumerId::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -22590,14 +23430,7 @@ class AndroidEnergyConsumer : public ::protozero::Message { int32_t, AndroidEnergyConsumer>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ordinal kOrdinal() { return {}; } + static constexpr FieldMetadata_Ordinal kOrdinal{}; void set_ordinal(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Ordinal::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -22615,17 +23448,13 @@ class AndroidEnergyConsumer : public ::protozero::Message { std::string, AndroidEnergyConsumer>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Type kType() { return {}; } + static constexpr FieldMetadata_Type kType{}; void set_type(const char* data, size_t size) { AppendBytes(FieldMetadata_Type::kFieldId, data, size); } + void set_type(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Type::kFieldId, chars.data, chars.size); + } void set_type(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Type::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -22643,17 +23472,13 @@ class AndroidEnergyConsumer : public ::protozero::Message { std::string, AndroidEnergyConsumer>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Name kName() { return {}; } + static constexpr FieldMetadata_Name kName{}; void set_name(const char* data, size_t size) { AppendBytes(FieldMetadata_Name::kFieldId, data, size); } + void set_name(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Name::kFieldId, chars.data, chars.size); + } void set_name(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Name::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -22699,8 +23524,39 @@ enum AndroidLogId : int32_t { LID_KERNEL = 7, }; -const AndroidLogId AndroidLogId_MIN = LID_DEFAULT; -const AndroidLogId AndroidLogId_MAX = LID_KERNEL; +constexpr AndroidLogId AndroidLogId_MIN = AndroidLogId::LID_DEFAULT; +constexpr AndroidLogId AndroidLogId_MAX = AndroidLogId::LID_KERNEL; + + +PERFETTO_PROTOZERO_CONSTEXPR14_OR_INLINE +const char* AndroidLogId_Name(::perfetto::protos::pbzero::AndroidLogId value) { + switch (value) { + case ::perfetto::protos::pbzero::AndroidLogId::LID_DEFAULT: + return "LID_DEFAULT"; + + case ::perfetto::protos::pbzero::AndroidLogId::LID_RADIO: + return "LID_RADIO"; + + case ::perfetto::protos::pbzero::AndroidLogId::LID_EVENTS: + return "LID_EVENTS"; + + case ::perfetto::protos::pbzero::AndroidLogId::LID_SYSTEM: + return "LID_SYSTEM"; + + case ::perfetto::protos::pbzero::AndroidLogId::LID_CRASH: + return "LID_CRASH"; + + case ::perfetto::protos::pbzero::AndroidLogId::LID_STATS: + return "LID_STATS"; + + case ::perfetto::protos::pbzero::AndroidLogId::LID_SECURITY: + return "LID_SECURITY"; + + case ::perfetto::protos::pbzero::AndroidLogId::LID_KERNEL: + return "LID_KERNEL"; + } + return "PBZERO_UNKNOWN_ENUM_VALUE"; +} enum AndroidLogPriority : int32_t { PRIO_UNSPECIFIED = 0, @@ -22713,8 +23569,39 @@ enum AndroidLogPriority : int32_t { PRIO_FATAL = 7, }; -const AndroidLogPriority AndroidLogPriority_MIN = PRIO_UNSPECIFIED; -const AndroidLogPriority AndroidLogPriority_MAX = PRIO_FATAL; +constexpr AndroidLogPriority AndroidLogPriority_MIN = AndroidLogPriority::PRIO_UNSPECIFIED; +constexpr AndroidLogPriority AndroidLogPriority_MAX = AndroidLogPriority::PRIO_FATAL; + + +PERFETTO_PROTOZERO_CONSTEXPR14_OR_INLINE +const char* AndroidLogPriority_Name(::perfetto::protos::pbzero::AndroidLogPriority value) { + switch (value) { + case ::perfetto::protos::pbzero::AndroidLogPriority::PRIO_UNSPECIFIED: + return "PRIO_UNSPECIFIED"; + + case ::perfetto::protos::pbzero::AndroidLogPriority::PRIO_UNUSED: + return "PRIO_UNUSED"; + + case ::perfetto::protos::pbzero::AndroidLogPriority::PRIO_VERBOSE: + return "PRIO_VERBOSE"; + + case ::perfetto::protos::pbzero::AndroidLogPriority::PRIO_DEBUG: + return "PRIO_DEBUG"; + + case ::perfetto::protos::pbzero::AndroidLogPriority::PRIO_INFO: + return "PRIO_INFO"; + + case ::perfetto::protos::pbzero::AndroidLogPriority::PRIO_WARN: + return "PRIO_WARN"; + + case ::perfetto::protos::pbzero::AndroidLogPriority::PRIO_ERROR: + return "PRIO_ERROR"; + + case ::perfetto::protos::pbzero::AndroidLogPriority::PRIO_FATAL: + return "PRIO_FATAL"; + } + return "PBZERO_UNKNOWN_ENUM_VALUE"; +} } // Namespace. } // Namespace. @@ -22751,8 +23638,39 @@ enum BuiltinClock : int32_t { BUILTIN_CLOCK_MAX_ID = 63, }; -const BuiltinClock BuiltinClock_MIN = BUILTIN_CLOCK_UNKNOWN; -const BuiltinClock BuiltinClock_MAX = BUILTIN_CLOCK_MAX_ID; +constexpr BuiltinClock BuiltinClock_MIN = BuiltinClock::BUILTIN_CLOCK_UNKNOWN; +constexpr BuiltinClock BuiltinClock_MAX = BuiltinClock::BUILTIN_CLOCK_MAX_ID; + + +PERFETTO_PROTOZERO_CONSTEXPR14_OR_INLINE +const char* BuiltinClock_Name(::perfetto::protos::pbzero::BuiltinClock value) { + switch (value) { + case ::perfetto::protos::pbzero::BuiltinClock::BUILTIN_CLOCK_UNKNOWN: + return "BUILTIN_CLOCK_UNKNOWN"; + + case ::perfetto::protos::pbzero::BuiltinClock::BUILTIN_CLOCK_REALTIME: + return "BUILTIN_CLOCK_REALTIME"; + + case ::perfetto::protos::pbzero::BuiltinClock::BUILTIN_CLOCK_REALTIME_COARSE: + return "BUILTIN_CLOCK_REALTIME_COARSE"; + + case ::perfetto::protos::pbzero::BuiltinClock::BUILTIN_CLOCK_MONOTONIC: + return "BUILTIN_CLOCK_MONOTONIC"; + + case ::perfetto::protos::pbzero::BuiltinClock::BUILTIN_CLOCK_MONOTONIC_COARSE: + return "BUILTIN_CLOCK_MONOTONIC_COARSE"; + + case ::perfetto::protos::pbzero::BuiltinClock::BUILTIN_CLOCK_MONOTONIC_RAW: + return "BUILTIN_CLOCK_MONOTONIC_RAW"; + + case ::perfetto::protos::pbzero::BuiltinClock::BUILTIN_CLOCK_BOOTTIME: + return "BUILTIN_CLOCK_BOOTTIME"; + + case ::perfetto::protos::pbzero::BuiltinClock::BUILTIN_CLOCK_MAX_ID: + return "BUILTIN_CLOCK_MAX_ID"; + } + return "PBZERO_UNKNOWN_ENUM_VALUE"; +} } // Namespace. } // Namespace. @@ -22815,14 +23733,7 @@ class CommitDataRequest : public ::protozero::Message { CommitDataRequest_ChunksToMove, CommitDataRequest>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ChunksToMove kChunksToMove() { return {}; } + static constexpr FieldMetadata_ChunksToMove kChunksToMove{}; template T* add_chunks_to_move() { return BeginNestedMessage(1); } @@ -22836,14 +23747,7 @@ class CommitDataRequest : public ::protozero::Message { CommitDataRequest_ChunkToPatch, CommitDataRequest>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ChunksToPatch kChunksToPatch() { return {}; } + static constexpr FieldMetadata_ChunksToPatch kChunksToPatch{}; template T* add_chunks_to_patch() { return BeginNestedMessage(2); } @@ -22857,14 +23761,7 @@ class CommitDataRequest : public ::protozero::Message { uint64_t, CommitDataRequest>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_FlushRequestId kFlushRequestId() { return {}; } + static constexpr FieldMetadata_FlushRequestId kFlushRequestId{}; void set_flush_request_id(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_FlushRequestId::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -22914,14 +23811,7 @@ class CommitDataRequest_ChunkToPatch : public ::protozero::Message { uint32_t, CommitDataRequest_ChunkToPatch>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_TargetBuffer kTargetBuffer() { return {}; } + static constexpr FieldMetadata_TargetBuffer kTargetBuffer{}; void set_target_buffer(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_TargetBuffer::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -22939,14 +23829,7 @@ class CommitDataRequest_ChunkToPatch : public ::protozero::Message { uint32_t, CommitDataRequest_ChunkToPatch>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_WriterId kWriterId() { return {}; } + static constexpr FieldMetadata_WriterId kWriterId{}; void set_writer_id(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_WriterId::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -22964,14 +23847,7 @@ class CommitDataRequest_ChunkToPatch : public ::protozero::Message { uint32_t, CommitDataRequest_ChunkToPatch>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ChunkId kChunkId() { return {}; } + static constexpr FieldMetadata_ChunkId kChunkId{}; void set_chunk_id(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_ChunkId::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -22989,14 +23865,7 @@ class CommitDataRequest_ChunkToPatch : public ::protozero::Message { CommitDataRequest_ChunkToPatch_Patch, CommitDataRequest_ChunkToPatch>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Patches kPatches() { return {}; } + static constexpr FieldMetadata_Patches kPatches{}; template T* add_patches() { return BeginNestedMessage(4); } @@ -23010,14 +23879,7 @@ class CommitDataRequest_ChunkToPatch : public ::protozero::Message { bool, CommitDataRequest_ChunkToPatch>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_HasMorePatches kHasMorePatches() { return {}; } + static constexpr FieldMetadata_HasMorePatches kHasMorePatches{}; void set_has_more_patches(bool value) { static constexpr uint32_t field_id = FieldMetadata_HasMorePatches::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -23057,14 +23919,7 @@ class CommitDataRequest_ChunkToPatch_Patch : public ::protozero::Message { uint32_t, CommitDataRequest_ChunkToPatch_Patch>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Offset kOffset() { return {}; } + static constexpr FieldMetadata_Offset kOffset{}; void set_offset(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Offset::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -23082,17 +23937,13 @@ class CommitDataRequest_ChunkToPatch_Patch : public ::protozero::Message { std::string, CommitDataRequest_ChunkToPatch_Patch>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Data kData() { return {}; } + static constexpr FieldMetadata_Data kData{}; void set_data(const uint8_t* data, size_t size) { AppendBytes(FieldMetadata_Data::kFieldId, data, size); } + void set_data(::protozero::ConstBytes bytes) { + AppendBytes(FieldMetadata_Data::kFieldId, bytes.data, bytes.size); + } void set_data(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Data::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -23135,14 +23986,7 @@ class CommitDataRequest_ChunksToMove : public ::protozero::Message { uint32_t, CommitDataRequest_ChunksToMove>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Page kPage() { return {}; } + static constexpr FieldMetadata_Page kPage{}; void set_page(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Page::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -23160,14 +24004,7 @@ class CommitDataRequest_ChunksToMove : public ::protozero::Message { uint32_t, CommitDataRequest_ChunksToMove>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Chunk kChunk() { return {}; } + static constexpr FieldMetadata_Chunk kChunk{}; void set_chunk(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Chunk::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -23185,14 +24022,7 @@ class CommitDataRequest_ChunksToMove : public ::protozero::Message { uint32_t, CommitDataRequest_ChunksToMove>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_TargetBuffer kTargetBuffer() { return {}; } + static constexpr FieldMetadata_TargetBuffer kTargetBuffer{}; void set_target_buffer(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_TargetBuffer::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -23277,17 +24107,13 @@ class DataSourceDescriptor : public ::protozero::Message { std::string, DataSourceDescriptor>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Name kName() { return {}; } + static constexpr FieldMetadata_Name kName{}; void set_name(const char* data, size_t size) { AppendBytes(FieldMetadata_Name::kFieldId, data, size); } + void set_name(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Name::kFieldId, chars.data, chars.size); + } void set_name(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Name::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -23305,14 +24131,7 @@ class DataSourceDescriptor : public ::protozero::Message { uint64_t, DataSourceDescriptor>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Id kId() { return {}; } + static constexpr FieldMetadata_Id kId{}; void set_id(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Id::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -23330,14 +24149,7 @@ class DataSourceDescriptor : public ::protozero::Message { bool, DataSourceDescriptor>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_WillNotifyOnStop kWillNotifyOnStop() { return {}; } + static constexpr FieldMetadata_WillNotifyOnStop kWillNotifyOnStop{}; void set_will_notify_on_stop(bool value) { static constexpr uint32_t field_id = FieldMetadata_WillNotifyOnStop::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -23355,14 +24167,7 @@ class DataSourceDescriptor : public ::protozero::Message { bool, DataSourceDescriptor>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_WillNotifyOnStart kWillNotifyOnStart() { return {}; } + static constexpr FieldMetadata_WillNotifyOnStart kWillNotifyOnStart{}; void set_will_notify_on_start(bool value) { static constexpr uint32_t field_id = FieldMetadata_WillNotifyOnStart::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -23380,14 +24185,7 @@ class DataSourceDescriptor : public ::protozero::Message { bool, DataSourceDescriptor>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_HandlesIncrementalStateClear kHandlesIncrementalStateClear() { return {}; } + static constexpr FieldMetadata_HandlesIncrementalStateClear kHandlesIncrementalStateClear{}; void set_handles_incremental_state_clear(bool value) { static constexpr uint32_t field_id = FieldMetadata_HandlesIncrementalStateClear::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -23405,14 +24203,7 @@ class DataSourceDescriptor : public ::protozero::Message { GpuCounterDescriptor, DataSourceDescriptor>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_GpuCounterDescriptor kGpuCounterDescriptor() { return {}; } + static constexpr FieldMetadata_GpuCounterDescriptor kGpuCounterDescriptor{}; template T* set_gpu_counter_descriptor() { return BeginNestedMessage(5); } @@ -23430,14 +24221,7 @@ class DataSourceDescriptor : public ::protozero::Message { TrackEventDescriptor, DataSourceDescriptor>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_TrackEventDescriptor kTrackEventDescriptor() { return {}; } + static constexpr FieldMetadata_TrackEventDescriptor kTrackEventDescriptor{}; template T* set_track_event_descriptor() { return BeginNestedMessage(6); } @@ -23455,14 +24239,7 @@ class DataSourceDescriptor : public ::protozero::Message { FtraceDescriptor, DataSourceDescriptor>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_FtraceDescriptor kFtraceDescriptor() { return {}; } + static constexpr FieldMetadata_FtraceDescriptor kFtraceDescriptor{}; template T* set_ftrace_descriptor() { return BeginNestedMessage(8); } @@ -23501,44 +24278,136 @@ class DescriptorProto_ReservedRange; class EnumDescriptorProto; class EnumValueDescriptorProto; class FieldDescriptorProto; +class FieldOptions; class FileDescriptorProto; class OneofDescriptorProto; class OneofOptions; -enum FieldDescriptorProto_Label : int32_t; -enum FieldDescriptorProto_Type : int32_t; +namespace perfetto_pbzero_enum_FieldDescriptorProto { +enum Label : int32_t; +} // namespace perfetto_pbzero_enum_FieldDescriptorProto +using FieldDescriptorProto_Label = perfetto_pbzero_enum_FieldDescriptorProto::Label; +namespace perfetto_pbzero_enum_FieldDescriptorProto { +enum Type : int32_t; +} // namespace perfetto_pbzero_enum_FieldDescriptorProto +using FieldDescriptorProto_Type = perfetto_pbzero_enum_FieldDescriptorProto::Type; -enum FieldDescriptorProto_Type : int32_t { - FieldDescriptorProto_Type_TYPE_DOUBLE = 1, - FieldDescriptorProto_Type_TYPE_FLOAT = 2, - FieldDescriptorProto_Type_TYPE_INT64 = 3, - FieldDescriptorProto_Type_TYPE_UINT64 = 4, - FieldDescriptorProto_Type_TYPE_INT32 = 5, - FieldDescriptorProto_Type_TYPE_FIXED64 = 6, - FieldDescriptorProto_Type_TYPE_FIXED32 = 7, - FieldDescriptorProto_Type_TYPE_BOOL = 8, - FieldDescriptorProto_Type_TYPE_STRING = 9, - FieldDescriptorProto_Type_TYPE_GROUP = 10, - FieldDescriptorProto_Type_TYPE_MESSAGE = 11, - FieldDescriptorProto_Type_TYPE_BYTES = 12, - FieldDescriptorProto_Type_TYPE_UINT32 = 13, - FieldDescriptorProto_Type_TYPE_ENUM = 14, - FieldDescriptorProto_Type_TYPE_SFIXED32 = 15, - FieldDescriptorProto_Type_TYPE_SFIXED64 = 16, - FieldDescriptorProto_Type_TYPE_SINT32 = 17, - FieldDescriptorProto_Type_TYPE_SINT64 = 18, +namespace perfetto_pbzero_enum_FieldDescriptorProto { +enum Type : int32_t { + TYPE_DOUBLE = 1, + TYPE_FLOAT = 2, + TYPE_INT64 = 3, + TYPE_UINT64 = 4, + TYPE_INT32 = 5, + TYPE_FIXED64 = 6, + TYPE_FIXED32 = 7, + TYPE_BOOL = 8, + TYPE_STRING = 9, + TYPE_GROUP = 10, + TYPE_MESSAGE = 11, + TYPE_BYTES = 12, + TYPE_UINT32 = 13, + TYPE_ENUM = 14, + TYPE_SFIXED32 = 15, + TYPE_SFIXED64 = 16, + TYPE_SINT32 = 17, + TYPE_SINT64 = 18, }; +} // namespace perfetto_pbzero_enum_FieldDescriptorProto +using FieldDescriptorProto_Type = perfetto_pbzero_enum_FieldDescriptorProto::Type; -const FieldDescriptorProto_Type FieldDescriptorProto_Type_MIN = FieldDescriptorProto_Type_TYPE_DOUBLE; -const FieldDescriptorProto_Type FieldDescriptorProto_Type_MAX = FieldDescriptorProto_Type_TYPE_SINT64; -enum FieldDescriptorProto_Label : int32_t { - FieldDescriptorProto_Label_LABEL_OPTIONAL = 1, - FieldDescriptorProto_Label_LABEL_REQUIRED = 2, - FieldDescriptorProto_Label_LABEL_REPEATED = 3, +constexpr FieldDescriptorProto_Type FieldDescriptorProto_Type_MIN = FieldDescriptorProto_Type::TYPE_DOUBLE; +constexpr FieldDescriptorProto_Type FieldDescriptorProto_Type_MAX = FieldDescriptorProto_Type::TYPE_SINT64; + + +PERFETTO_PROTOZERO_CONSTEXPR14_OR_INLINE +const char* FieldDescriptorProto_Type_Name(::perfetto::protos::pbzero::FieldDescriptorProto_Type value) { + switch (value) { + case ::perfetto::protos::pbzero::FieldDescriptorProto_Type::TYPE_DOUBLE: + return "TYPE_DOUBLE"; + + case ::perfetto::protos::pbzero::FieldDescriptorProto_Type::TYPE_FLOAT: + return "TYPE_FLOAT"; + + case ::perfetto::protos::pbzero::FieldDescriptorProto_Type::TYPE_INT64: + return "TYPE_INT64"; + + case ::perfetto::protos::pbzero::FieldDescriptorProto_Type::TYPE_UINT64: + return "TYPE_UINT64"; + + case ::perfetto::protos::pbzero::FieldDescriptorProto_Type::TYPE_INT32: + return "TYPE_INT32"; + + case ::perfetto::protos::pbzero::FieldDescriptorProto_Type::TYPE_FIXED64: + return "TYPE_FIXED64"; + + case ::perfetto::protos::pbzero::FieldDescriptorProto_Type::TYPE_FIXED32: + return "TYPE_FIXED32"; + + case ::perfetto::protos::pbzero::FieldDescriptorProto_Type::TYPE_BOOL: + return "TYPE_BOOL"; + + case ::perfetto::protos::pbzero::FieldDescriptorProto_Type::TYPE_STRING: + return "TYPE_STRING"; + + case ::perfetto::protos::pbzero::FieldDescriptorProto_Type::TYPE_GROUP: + return "TYPE_GROUP"; + + case ::perfetto::protos::pbzero::FieldDescriptorProto_Type::TYPE_MESSAGE: + return "TYPE_MESSAGE"; + + case ::perfetto::protos::pbzero::FieldDescriptorProto_Type::TYPE_BYTES: + return "TYPE_BYTES"; + + case ::perfetto::protos::pbzero::FieldDescriptorProto_Type::TYPE_UINT32: + return "TYPE_UINT32"; + + case ::perfetto::protos::pbzero::FieldDescriptorProto_Type::TYPE_ENUM: + return "TYPE_ENUM"; + + case ::perfetto::protos::pbzero::FieldDescriptorProto_Type::TYPE_SFIXED32: + return "TYPE_SFIXED32"; + + case ::perfetto::protos::pbzero::FieldDescriptorProto_Type::TYPE_SFIXED64: + return "TYPE_SFIXED64"; + + case ::perfetto::protos::pbzero::FieldDescriptorProto_Type::TYPE_SINT32: + return "TYPE_SINT32"; + + case ::perfetto::protos::pbzero::FieldDescriptorProto_Type::TYPE_SINT64: + return "TYPE_SINT64"; + } + return "PBZERO_UNKNOWN_ENUM_VALUE"; +} + +namespace perfetto_pbzero_enum_FieldDescriptorProto { +enum Label : int32_t { + LABEL_OPTIONAL = 1, + LABEL_REQUIRED = 2, + LABEL_REPEATED = 3, }; +} // namespace perfetto_pbzero_enum_FieldDescriptorProto +using FieldDescriptorProto_Label = perfetto_pbzero_enum_FieldDescriptorProto::Label; -const FieldDescriptorProto_Label FieldDescriptorProto_Label_MIN = FieldDescriptorProto_Label_LABEL_OPTIONAL; -const FieldDescriptorProto_Label FieldDescriptorProto_Label_MAX = FieldDescriptorProto_Label_LABEL_REPEATED; + +constexpr FieldDescriptorProto_Label FieldDescriptorProto_Label_MIN = FieldDescriptorProto_Label::LABEL_OPTIONAL; +constexpr FieldDescriptorProto_Label FieldDescriptorProto_Label_MAX = FieldDescriptorProto_Label::LABEL_REPEATED; + + +PERFETTO_PROTOZERO_CONSTEXPR14_OR_INLINE +const char* FieldDescriptorProto_Label_Name(::perfetto::protos::pbzero::FieldDescriptorProto_Label value) { + switch (value) { + case ::perfetto::protos::pbzero::FieldDescriptorProto_Label::LABEL_OPTIONAL: + return "LABEL_OPTIONAL"; + + case ::perfetto::protos::pbzero::FieldDescriptorProto_Label::LABEL_REQUIRED: + return "LABEL_REQUIRED"; + + case ::perfetto::protos::pbzero::FieldDescriptorProto_Label::LABEL_REPEATED: + return "LABEL_REPEATED"; + } + return "PBZERO_UNKNOWN_ENUM_VALUE"; +} class OneofOptions_Decoder : public ::protozero::TypedProtoDecoder { public: @@ -23583,17 +24452,13 @@ class EnumValueDescriptorProto : public ::protozero::Message { std::string, EnumValueDescriptorProto>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Name kName() { return {}; } + static constexpr FieldMetadata_Name kName{}; void set_name(const char* data, size_t size) { AppendBytes(FieldMetadata_Name::kFieldId, data, size); } + void set_name(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Name::kFieldId, chars.data, chars.size); + } void set_name(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Name::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -23611,14 +24476,7 @@ class EnumValueDescriptorProto : public ::protozero::Message { int32_t, EnumValueDescriptorProto>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Number kNumber() { return {}; } + static constexpr FieldMetadata_Number kNumber{}; void set_number(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Number::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -23661,17 +24519,13 @@ class EnumDescriptorProto : public ::protozero::Message { std::string, EnumDescriptorProto>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Name kName() { return {}; } + static constexpr FieldMetadata_Name kName{}; void set_name(const char* data, size_t size) { AppendBytes(FieldMetadata_Name::kFieldId, data, size); } + void set_name(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Name::kFieldId, chars.data, chars.size); + } void set_name(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Name::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -23689,14 +24543,7 @@ class EnumDescriptorProto : public ::protozero::Message { EnumValueDescriptorProto, EnumDescriptorProto>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Value kValue() { return {}; } + static constexpr FieldMetadata_Value kValue{}; template T* add_value() { return BeginNestedMessage(2); } @@ -23710,17 +24557,13 @@ class EnumDescriptorProto : public ::protozero::Message { std::string, EnumDescriptorProto>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ReservedName kReservedName() { return {}; } + static constexpr FieldMetadata_ReservedName kReservedName{}; void add_reserved_name(const char* data, size_t size) { AppendBytes(FieldMetadata_ReservedName::kFieldId, data, size); } + void add_reserved_name(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_ReservedName::kFieldId, chars.data, chars.size); + } void add_reserved_name(std::string value) { static constexpr uint32_t field_id = FieldMetadata_ReservedName::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -23760,17 +24603,13 @@ class OneofDescriptorProto : public ::protozero::Message { std::string, OneofDescriptorProto>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Name kName() { return {}; } + static constexpr FieldMetadata_Name kName{}; void set_name(const char* data, size_t size) { AppendBytes(FieldMetadata_Name::kFieldId, data, size); } + void set_name(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Name::kFieldId, chars.data, chars.size); + } void set_name(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Name::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -23788,14 +24627,7 @@ class OneofDescriptorProto : public ::protozero::Message { OneofOptions, OneofDescriptorProto>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Options kOptions() { return {}; } + static constexpr FieldMetadata_Options kOptions{}; template T* set_options() { return BeginNestedMessage(2); } @@ -23821,6 +24653,8 @@ class FieldDescriptorProto_Decoder : public ::protozero::TypedProtoDecoder().as_string(); } bool has_default_value() const { return at<7>().valid(); } ::protozero::ConstChars default_value() const { return at<7>().as_string(); } + bool has_options() const { return at<8>().valid(); } + ::protozero::ConstBytes options() const { return at<8>().as_bytes(); } bool has_oneof_index() const { return at<9>().valid(); } int32_t oneof_index() const { return at<9>().as_int32(); } }; @@ -23836,33 +24670,42 @@ class FieldDescriptorProto : public ::protozero::Message { kTypeNameFieldNumber = 6, kExtendeeFieldNumber = 2, kDefaultValueFieldNumber = 7, + kOptionsFieldNumber = 8, kOneofIndexFieldNumber = 9, }; static constexpr const char* GetName() { return ".perfetto.protos.FieldDescriptorProto"; } + using Type = ::perfetto::protos::pbzero::FieldDescriptorProto_Type; + static inline const char* Type_Name(Type value) { + return ::perfetto::protos::pbzero::FieldDescriptorProto_Type_Name(value); + } + using Label = ::perfetto::protos::pbzero::FieldDescriptorProto_Label; - static const Type TYPE_DOUBLE = FieldDescriptorProto_Type_TYPE_DOUBLE; - static const Type TYPE_FLOAT = FieldDescriptorProto_Type_TYPE_FLOAT; - static const Type TYPE_INT64 = FieldDescriptorProto_Type_TYPE_INT64; - static const Type TYPE_UINT64 = FieldDescriptorProto_Type_TYPE_UINT64; - static const Type TYPE_INT32 = FieldDescriptorProto_Type_TYPE_INT32; - static const Type TYPE_FIXED64 = FieldDescriptorProto_Type_TYPE_FIXED64; - static const Type TYPE_FIXED32 = FieldDescriptorProto_Type_TYPE_FIXED32; - static const Type TYPE_BOOL = FieldDescriptorProto_Type_TYPE_BOOL; - static const Type TYPE_STRING = FieldDescriptorProto_Type_TYPE_STRING; - static const Type TYPE_GROUP = FieldDescriptorProto_Type_TYPE_GROUP; - static const Type TYPE_MESSAGE = FieldDescriptorProto_Type_TYPE_MESSAGE; - static const Type TYPE_BYTES = FieldDescriptorProto_Type_TYPE_BYTES; - static const Type TYPE_UINT32 = FieldDescriptorProto_Type_TYPE_UINT32; - static const Type TYPE_ENUM = FieldDescriptorProto_Type_TYPE_ENUM; - static const Type TYPE_SFIXED32 = FieldDescriptorProto_Type_TYPE_SFIXED32; - static const Type TYPE_SFIXED64 = FieldDescriptorProto_Type_TYPE_SFIXED64; - static const Type TYPE_SINT32 = FieldDescriptorProto_Type_TYPE_SINT32; - static const Type TYPE_SINT64 = FieldDescriptorProto_Type_TYPE_SINT64; - static const Label LABEL_OPTIONAL = FieldDescriptorProto_Label_LABEL_OPTIONAL; - static const Label LABEL_REQUIRED = FieldDescriptorProto_Label_LABEL_REQUIRED; - static const Label LABEL_REPEATED = FieldDescriptorProto_Label_LABEL_REPEATED; + static inline const char* Label_Name(Label value) { + return ::perfetto::protos::pbzero::FieldDescriptorProto_Label_Name(value); + } + static const Type TYPE_DOUBLE = Type::TYPE_DOUBLE; + static const Type TYPE_FLOAT = Type::TYPE_FLOAT; + static const Type TYPE_INT64 = Type::TYPE_INT64; + static const Type TYPE_UINT64 = Type::TYPE_UINT64; + static const Type TYPE_INT32 = Type::TYPE_INT32; + static const Type TYPE_FIXED64 = Type::TYPE_FIXED64; + static const Type TYPE_FIXED32 = Type::TYPE_FIXED32; + static const Type TYPE_BOOL = Type::TYPE_BOOL; + static const Type TYPE_STRING = Type::TYPE_STRING; + static const Type TYPE_GROUP = Type::TYPE_GROUP; + static const Type TYPE_MESSAGE = Type::TYPE_MESSAGE; + static const Type TYPE_BYTES = Type::TYPE_BYTES; + static const Type TYPE_UINT32 = Type::TYPE_UINT32; + static const Type TYPE_ENUM = Type::TYPE_ENUM; + static const Type TYPE_SFIXED32 = Type::TYPE_SFIXED32; + static const Type TYPE_SFIXED64 = Type::TYPE_SFIXED64; + static const Type TYPE_SINT32 = Type::TYPE_SINT32; + static const Type TYPE_SINT64 = Type::TYPE_SINT64; + static const Label LABEL_OPTIONAL = Label::LABEL_OPTIONAL; + static const Label LABEL_REQUIRED = Label::LABEL_REQUIRED; + static const Label LABEL_REPEATED = Label::LABEL_REPEATED; using FieldMetadata_Name = ::protozero::proto_utils::FieldMetadata< @@ -23872,17 +24715,13 @@ class FieldDescriptorProto : public ::protozero::Message { std::string, FieldDescriptorProto>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Name kName() { return {}; } + static constexpr FieldMetadata_Name kName{}; void set_name(const char* data, size_t size) { AppendBytes(FieldMetadata_Name::kFieldId, data, size); } + void set_name(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Name::kFieldId, chars.data, chars.size); + } void set_name(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Name::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -23900,14 +24739,7 @@ class FieldDescriptorProto : public ::protozero::Message { int32_t, FieldDescriptorProto>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Number kNumber() { return {}; } + static constexpr FieldMetadata_Number kNumber{}; void set_number(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Number::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -23925,14 +24757,7 @@ class FieldDescriptorProto : public ::protozero::Message { ::perfetto::protos::pbzero::FieldDescriptorProto_Label, FieldDescriptorProto>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Label kLabel() { return {}; } + static constexpr FieldMetadata_Label kLabel{}; void set_label(::perfetto::protos::pbzero::FieldDescriptorProto_Label value) { static constexpr uint32_t field_id = FieldMetadata_Label::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -23950,14 +24775,7 @@ class FieldDescriptorProto : public ::protozero::Message { ::perfetto::protos::pbzero::FieldDescriptorProto_Type, FieldDescriptorProto>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Type kType() { return {}; } + static constexpr FieldMetadata_Type kType{}; void set_type(::perfetto::protos::pbzero::FieldDescriptorProto_Type value) { static constexpr uint32_t field_id = FieldMetadata_Type::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -23975,17 +24793,13 @@ class FieldDescriptorProto : public ::protozero::Message { std::string, FieldDescriptorProto>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_TypeName kTypeName() { return {}; } + static constexpr FieldMetadata_TypeName kTypeName{}; void set_type_name(const char* data, size_t size) { AppendBytes(FieldMetadata_TypeName::kFieldId, data, size); } + void set_type_name(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_TypeName::kFieldId, chars.data, chars.size); + } void set_type_name(std::string value) { static constexpr uint32_t field_id = FieldMetadata_TypeName::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -24003,17 +24817,13 @@ class FieldDescriptorProto : public ::protozero::Message { std::string, FieldDescriptorProto>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Extendee kExtendee() { return {}; } + static constexpr FieldMetadata_Extendee kExtendee{}; void set_extendee(const char* data, size_t size) { AppendBytes(FieldMetadata_Extendee::kFieldId, data, size); } + void set_extendee(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Extendee::kFieldId, chars.data, chars.size); + } void set_extendee(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Extendee::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -24031,17 +24841,13 @@ class FieldDescriptorProto : public ::protozero::Message { std::string, FieldDescriptorProto>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_DefaultValue kDefaultValue() { return {}; } + static constexpr FieldMetadata_DefaultValue kDefaultValue{}; void set_default_value(const char* data, size_t size) { AppendBytes(FieldMetadata_DefaultValue::kFieldId, data, size); } + void set_default_value(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_DefaultValue::kFieldId, chars.data, chars.size); + } void set_default_value(std::string value) { static constexpr uint32_t field_id = FieldMetadata_DefaultValue::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -24051,6 +24857,20 @@ class FieldDescriptorProto : public ::protozero::Message { ::Append(*this, field_id, value); } + using FieldMetadata_Options = + ::protozero::proto_utils::FieldMetadata< + 8, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kMessage, + FieldOptions, + FieldDescriptorProto>; + + static constexpr FieldMetadata_Options kOptions{}; + template T* set_options() { + return BeginNestedMessage(8); + } + + using FieldMetadata_OneofIndex = ::protozero::proto_utils::FieldMetadata< 9, @@ -24059,14 +24879,7 @@ class FieldDescriptorProto : public ::protozero::Message { int32_t, FieldDescriptorProto>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_OneofIndex kOneofIndex() { return {}; } + static constexpr FieldMetadata_OneofIndex kOneofIndex{}; void set_oneof_index(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_OneofIndex::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -24077,6 +24890,43 @@ class FieldDescriptorProto : public ::protozero::Message { } }; +class FieldOptions_Decoder : public ::protozero::TypedProtoDecoder { + public: + FieldOptions_Decoder(const uint8_t* data, size_t len) : TypedProtoDecoder(data, len) {} + explicit FieldOptions_Decoder(const std::string& raw) : TypedProtoDecoder(reinterpret_cast(raw.data()), raw.size()) {} + explicit FieldOptions_Decoder(const ::protozero::ConstBytes& raw) : TypedProtoDecoder(raw.data, raw.size) {} + bool has_packed() const { return at<2>().valid(); } + bool packed() const { return at<2>().as_bool(); } +}; + +class FieldOptions : public ::protozero::Message { + public: + using Decoder = FieldOptions_Decoder; + enum : int32_t { + kPackedFieldNumber = 2, + }; + static constexpr const char* GetName() { return ".perfetto.protos.FieldOptions"; } + + + using FieldMetadata_Packed = + ::protozero::proto_utils::FieldMetadata< + 2, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kBool, + bool, + FieldOptions>; + + static constexpr FieldMetadata_Packed kPacked{}; + void set_packed(bool value) { + static constexpr uint32_t field_id = FieldMetadata_Packed::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kBool> + ::Append(*this, field_id, value); + } +}; + class DescriptorProto_Decoder : public ::protozero::TypedProtoDecoder { public: DescriptorProto_Decoder(const uint8_t* data, size_t len) : TypedProtoDecoder(data, len) {} @@ -24125,17 +24975,13 @@ class DescriptorProto : public ::protozero::Message { std::string, DescriptorProto>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Name kName() { return {}; } + static constexpr FieldMetadata_Name kName{}; void set_name(const char* data, size_t size) { AppendBytes(FieldMetadata_Name::kFieldId, data, size); } + void set_name(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Name::kFieldId, chars.data, chars.size); + } void set_name(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Name::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -24153,14 +24999,7 @@ class DescriptorProto : public ::protozero::Message { FieldDescriptorProto, DescriptorProto>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Field kField() { return {}; } + static constexpr FieldMetadata_Field kField{}; template T* add_field() { return BeginNestedMessage(2); } @@ -24174,14 +25013,7 @@ class DescriptorProto : public ::protozero::Message { FieldDescriptorProto, DescriptorProto>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Extension kExtension() { return {}; } + static constexpr FieldMetadata_Extension kExtension{}; template T* add_extension() { return BeginNestedMessage(6); } @@ -24195,14 +25027,7 @@ class DescriptorProto : public ::protozero::Message { DescriptorProto, DescriptorProto>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_NestedType kNestedType() { return {}; } + static constexpr FieldMetadata_NestedType kNestedType{}; template T* add_nested_type() { return BeginNestedMessage(3); } @@ -24216,14 +25041,7 @@ class DescriptorProto : public ::protozero::Message { EnumDescriptorProto, DescriptorProto>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_EnumType kEnumType() { return {}; } + static constexpr FieldMetadata_EnumType kEnumType{}; template T* add_enum_type() { return BeginNestedMessage(4); } @@ -24237,14 +25055,7 @@ class DescriptorProto : public ::protozero::Message { OneofDescriptorProto, DescriptorProto>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_OneofDecl kOneofDecl() { return {}; } + static constexpr FieldMetadata_OneofDecl kOneofDecl{}; template T* add_oneof_decl() { return BeginNestedMessage(8); } @@ -24258,14 +25069,7 @@ class DescriptorProto : public ::protozero::Message { DescriptorProto_ReservedRange, DescriptorProto>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ReservedRange kReservedRange() { return {}; } + static constexpr FieldMetadata_ReservedRange kReservedRange{}; template T* add_reserved_range() { return BeginNestedMessage(9); } @@ -24279,17 +25083,13 @@ class DescriptorProto : public ::protozero::Message { std::string, DescriptorProto>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ReservedName kReservedName() { return {}; } + static constexpr FieldMetadata_ReservedName kReservedName{}; void add_reserved_name(const char* data, size_t size) { AppendBytes(FieldMetadata_ReservedName::kFieldId, data, size); } + void add_reserved_name(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_ReservedName::kFieldId, chars.data, chars.size); + } void add_reserved_name(std::string value) { static constexpr uint32_t field_id = FieldMetadata_ReservedName::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -24329,14 +25129,7 @@ class DescriptorProto_ReservedRange : public ::protozero::Message { int32_t, DescriptorProto_ReservedRange>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Start kStart() { return {}; } + static constexpr FieldMetadata_Start kStart{}; void set_start(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Start::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -24354,14 +25147,7 @@ class DescriptorProto_ReservedRange : public ::protozero::Message { int32_t, DescriptorProto_ReservedRange>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_End kEnd() { return {}; } + static constexpr FieldMetadata_End kEnd{}; void set_end(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_End::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -24419,17 +25205,13 @@ class FileDescriptorProto : public ::protozero::Message { std::string, FileDescriptorProto>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Name kName() { return {}; } + static constexpr FieldMetadata_Name kName{}; void set_name(const char* data, size_t size) { AppendBytes(FieldMetadata_Name::kFieldId, data, size); } + void set_name(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Name::kFieldId, chars.data, chars.size); + } void set_name(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Name::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -24447,17 +25229,13 @@ class FileDescriptorProto : public ::protozero::Message { std::string, FileDescriptorProto>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Package kPackage() { return {}; } + static constexpr FieldMetadata_Package kPackage{}; void set_package(const char* data, size_t size) { AppendBytes(FieldMetadata_Package::kFieldId, data, size); } + void set_package(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Package::kFieldId, chars.data, chars.size); + } void set_package(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Package::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -24475,17 +25253,13 @@ class FileDescriptorProto : public ::protozero::Message { std::string, FileDescriptorProto>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Dependency kDependency() { return {}; } + static constexpr FieldMetadata_Dependency kDependency{}; void add_dependency(const char* data, size_t size) { AppendBytes(FieldMetadata_Dependency::kFieldId, data, size); } + void add_dependency(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Dependency::kFieldId, chars.data, chars.size); + } void add_dependency(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Dependency::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -24503,14 +25277,7 @@ class FileDescriptorProto : public ::protozero::Message { int32_t, FileDescriptorProto>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_PublicDependency kPublicDependency() { return {}; } + static constexpr FieldMetadata_PublicDependency kPublicDependency{}; void add_public_dependency(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_PublicDependency::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -24528,14 +25295,7 @@ class FileDescriptorProto : public ::protozero::Message { int32_t, FileDescriptorProto>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_WeakDependency kWeakDependency() { return {}; } + static constexpr FieldMetadata_WeakDependency kWeakDependency{}; void add_weak_dependency(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_WeakDependency::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -24553,14 +25313,7 @@ class FileDescriptorProto : public ::protozero::Message { DescriptorProto, FileDescriptorProto>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_MessageType kMessageType() { return {}; } + static constexpr FieldMetadata_MessageType kMessageType{}; template T* add_message_type() { return BeginNestedMessage(4); } @@ -24574,14 +25327,7 @@ class FileDescriptorProto : public ::protozero::Message { EnumDescriptorProto, FileDescriptorProto>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_EnumType kEnumType() { return {}; } + static constexpr FieldMetadata_EnumType kEnumType{}; template T* add_enum_type() { return BeginNestedMessage(5); } @@ -24595,14 +25341,7 @@ class FileDescriptorProto : public ::protozero::Message { FieldDescriptorProto, FileDescriptorProto>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Extension kExtension() { return {}; } + static constexpr FieldMetadata_Extension kExtension{}; template T* add_extension() { return BeginNestedMessage(7); } @@ -24635,14 +25374,7 @@ class FileDescriptorSet : public ::protozero::Message { FileDescriptorProto, FileDescriptorSet>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_File kFile() { return {}; } + static constexpr FieldMetadata_File kFile{}; template T* add_file() { return BeginNestedMessage(1); } @@ -24701,14 +25433,7 @@ class FtraceDescriptor : public ::protozero::Message { FtraceDescriptor_AtraceCategory, FtraceDescriptor>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_AtraceCategories kAtraceCategories() { return {}; } + static constexpr FieldMetadata_AtraceCategories kAtraceCategories{}; template T* add_atrace_categories() { return BeginNestedMessage(1); } @@ -24744,17 +25469,13 @@ class FtraceDescriptor_AtraceCategory : public ::protozero::Message { std::string, FtraceDescriptor_AtraceCategory>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Name kName() { return {}; } + static constexpr FieldMetadata_Name kName{}; void set_name(const char* data, size_t size) { AppendBytes(FieldMetadata_Name::kFieldId, data, size); } + void set_name(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Name::kFieldId, chars.data, chars.size); + } void set_name(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Name::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -24772,17 +25493,13 @@ class FtraceDescriptor_AtraceCategory : public ::protozero::Message { std::string, FtraceDescriptor_AtraceCategory>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Description kDescription() { return {}; } + static constexpr FieldMetadata_Description kDescription{}; void set_description(const char* data, size_t size) { AppendBytes(FieldMetadata_Description::kFieldId, data, size); } + void set_description(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Description::kFieldId, chars.data, chars.size); + } void set_description(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Description::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -24818,68 +25535,240 @@ namespace pbzero { class GpuCounterDescriptor_GpuCounterBlock; class GpuCounterDescriptor_GpuCounterSpec; -enum GpuCounterDescriptor_GpuCounterGroup : int32_t; -enum GpuCounterDescriptor_MeasureUnit : int32_t; +namespace perfetto_pbzero_enum_GpuCounterDescriptor { +enum GpuCounterGroup : int32_t; +} // namespace perfetto_pbzero_enum_GpuCounterDescriptor +using GpuCounterDescriptor_GpuCounterGroup = perfetto_pbzero_enum_GpuCounterDescriptor::GpuCounterGroup; +namespace perfetto_pbzero_enum_GpuCounterDescriptor { +enum MeasureUnit : int32_t; +} // namespace perfetto_pbzero_enum_GpuCounterDescriptor +using GpuCounterDescriptor_MeasureUnit = perfetto_pbzero_enum_GpuCounterDescriptor::MeasureUnit; -enum GpuCounterDescriptor_GpuCounterGroup : int32_t { - GpuCounterDescriptor_GpuCounterGroup_UNCLASSIFIED = 0, - GpuCounterDescriptor_GpuCounterGroup_SYSTEM = 1, - GpuCounterDescriptor_GpuCounterGroup_VERTICES = 2, - GpuCounterDescriptor_GpuCounterGroup_FRAGMENTS = 3, - GpuCounterDescriptor_GpuCounterGroup_PRIMITIVES = 4, - GpuCounterDescriptor_GpuCounterGroup_MEMORY = 5, - GpuCounterDescriptor_GpuCounterGroup_COMPUTE = 6, +namespace perfetto_pbzero_enum_GpuCounterDescriptor { +enum GpuCounterGroup : int32_t { + UNCLASSIFIED = 0, + SYSTEM = 1, + VERTICES = 2, + FRAGMENTS = 3, + PRIMITIVES = 4, + MEMORY = 5, + COMPUTE = 6, }; +} // namespace perfetto_pbzero_enum_GpuCounterDescriptor +using GpuCounterDescriptor_GpuCounterGroup = perfetto_pbzero_enum_GpuCounterDescriptor::GpuCounterGroup; -const GpuCounterDescriptor_GpuCounterGroup GpuCounterDescriptor_GpuCounterGroup_MIN = GpuCounterDescriptor_GpuCounterGroup_UNCLASSIFIED; -const GpuCounterDescriptor_GpuCounterGroup GpuCounterDescriptor_GpuCounterGroup_MAX = GpuCounterDescriptor_GpuCounterGroup_COMPUTE; -enum GpuCounterDescriptor_MeasureUnit : int32_t { - GpuCounterDescriptor_MeasureUnit_NONE = 0, - GpuCounterDescriptor_MeasureUnit_BIT = 1, - GpuCounterDescriptor_MeasureUnit_KILOBIT = 2, - GpuCounterDescriptor_MeasureUnit_MEGABIT = 3, - GpuCounterDescriptor_MeasureUnit_GIGABIT = 4, - GpuCounterDescriptor_MeasureUnit_TERABIT = 5, - GpuCounterDescriptor_MeasureUnit_PETABIT = 6, - GpuCounterDescriptor_MeasureUnit_BYTE = 7, - GpuCounterDescriptor_MeasureUnit_KILOBYTE = 8, - GpuCounterDescriptor_MeasureUnit_MEGABYTE = 9, - GpuCounterDescriptor_MeasureUnit_GIGABYTE = 10, - GpuCounterDescriptor_MeasureUnit_TERABYTE = 11, - GpuCounterDescriptor_MeasureUnit_PETABYTE = 12, - GpuCounterDescriptor_MeasureUnit_HERTZ = 13, - GpuCounterDescriptor_MeasureUnit_KILOHERTZ = 14, - GpuCounterDescriptor_MeasureUnit_MEGAHERTZ = 15, - GpuCounterDescriptor_MeasureUnit_GIGAHERTZ = 16, - GpuCounterDescriptor_MeasureUnit_TERAHERTZ = 17, - GpuCounterDescriptor_MeasureUnit_PETAHERTZ = 18, - GpuCounterDescriptor_MeasureUnit_NANOSECOND = 19, - GpuCounterDescriptor_MeasureUnit_MICROSECOND = 20, - GpuCounterDescriptor_MeasureUnit_MILLISECOND = 21, - GpuCounterDescriptor_MeasureUnit_SECOND = 22, - GpuCounterDescriptor_MeasureUnit_MINUTE = 23, - GpuCounterDescriptor_MeasureUnit_HOUR = 24, - GpuCounterDescriptor_MeasureUnit_VERTEX = 25, - GpuCounterDescriptor_MeasureUnit_PIXEL = 26, - GpuCounterDescriptor_MeasureUnit_TRIANGLE = 27, - GpuCounterDescriptor_MeasureUnit_PRIMITIVE = 38, - GpuCounterDescriptor_MeasureUnit_FRAGMENT = 39, - GpuCounterDescriptor_MeasureUnit_MILLIWATT = 28, - GpuCounterDescriptor_MeasureUnit_WATT = 29, - GpuCounterDescriptor_MeasureUnit_KILOWATT = 30, - GpuCounterDescriptor_MeasureUnit_JOULE = 31, - GpuCounterDescriptor_MeasureUnit_VOLT = 32, - GpuCounterDescriptor_MeasureUnit_AMPERE = 33, - GpuCounterDescriptor_MeasureUnit_CELSIUS = 34, - GpuCounterDescriptor_MeasureUnit_FAHRENHEIT = 35, - GpuCounterDescriptor_MeasureUnit_KELVIN = 36, - GpuCounterDescriptor_MeasureUnit_PERCENT = 37, - GpuCounterDescriptor_MeasureUnit_INSTRUCTION = 40, +constexpr GpuCounterDescriptor_GpuCounterGroup GpuCounterDescriptor_GpuCounterGroup_MIN = GpuCounterDescriptor_GpuCounterGroup::UNCLASSIFIED; +constexpr GpuCounterDescriptor_GpuCounterGroup GpuCounterDescriptor_GpuCounterGroup_MAX = GpuCounterDescriptor_GpuCounterGroup::COMPUTE; + + +PERFETTO_PROTOZERO_CONSTEXPR14_OR_INLINE +const char* GpuCounterDescriptor_GpuCounterGroup_Name(::perfetto::protos::pbzero::GpuCounterDescriptor_GpuCounterGroup value) { + switch (value) { + case ::perfetto::protos::pbzero::GpuCounterDescriptor_GpuCounterGroup::UNCLASSIFIED: + return "UNCLASSIFIED"; + + case ::perfetto::protos::pbzero::GpuCounterDescriptor_GpuCounterGroup::SYSTEM: + return "SYSTEM"; + + case ::perfetto::protos::pbzero::GpuCounterDescriptor_GpuCounterGroup::VERTICES: + return "VERTICES"; + + case ::perfetto::protos::pbzero::GpuCounterDescriptor_GpuCounterGroup::FRAGMENTS: + return "FRAGMENTS"; + + case ::perfetto::protos::pbzero::GpuCounterDescriptor_GpuCounterGroup::PRIMITIVES: + return "PRIMITIVES"; + + case ::perfetto::protos::pbzero::GpuCounterDescriptor_GpuCounterGroup::MEMORY: + return "MEMORY"; + + case ::perfetto::protos::pbzero::GpuCounterDescriptor_GpuCounterGroup::COMPUTE: + return "COMPUTE"; + } + return "PBZERO_UNKNOWN_ENUM_VALUE"; +} + +namespace perfetto_pbzero_enum_GpuCounterDescriptor { +enum MeasureUnit : int32_t { + NONE = 0, + BIT = 1, + KILOBIT = 2, + MEGABIT = 3, + GIGABIT = 4, + TERABIT = 5, + PETABIT = 6, + BYTE = 7, + KILOBYTE = 8, + MEGABYTE = 9, + GIGABYTE = 10, + TERABYTE = 11, + PETABYTE = 12, + HERTZ = 13, + KILOHERTZ = 14, + MEGAHERTZ = 15, + GIGAHERTZ = 16, + TERAHERTZ = 17, + PETAHERTZ = 18, + NANOSECOND = 19, + MICROSECOND = 20, + MILLISECOND = 21, + SECOND = 22, + MINUTE = 23, + HOUR = 24, + VERTEX = 25, + PIXEL = 26, + TRIANGLE = 27, + PRIMITIVE = 38, + FRAGMENT = 39, + MILLIWATT = 28, + WATT = 29, + KILOWATT = 30, + JOULE = 31, + VOLT = 32, + AMPERE = 33, + CELSIUS = 34, + FAHRENHEIT = 35, + KELVIN = 36, + PERCENT = 37, + INSTRUCTION = 40, }; +} // namespace perfetto_pbzero_enum_GpuCounterDescriptor +using GpuCounterDescriptor_MeasureUnit = perfetto_pbzero_enum_GpuCounterDescriptor::MeasureUnit; -const GpuCounterDescriptor_MeasureUnit GpuCounterDescriptor_MeasureUnit_MIN = GpuCounterDescriptor_MeasureUnit_NONE; -const GpuCounterDescriptor_MeasureUnit GpuCounterDescriptor_MeasureUnit_MAX = GpuCounterDescriptor_MeasureUnit_INSTRUCTION; + +constexpr GpuCounterDescriptor_MeasureUnit GpuCounterDescriptor_MeasureUnit_MIN = GpuCounterDescriptor_MeasureUnit::NONE; +constexpr GpuCounterDescriptor_MeasureUnit GpuCounterDescriptor_MeasureUnit_MAX = GpuCounterDescriptor_MeasureUnit::INSTRUCTION; + + +PERFETTO_PROTOZERO_CONSTEXPR14_OR_INLINE +const char* GpuCounterDescriptor_MeasureUnit_Name(::perfetto::protos::pbzero::GpuCounterDescriptor_MeasureUnit value) { + switch (value) { + case ::perfetto::protos::pbzero::GpuCounterDescriptor_MeasureUnit::NONE: + return "NONE"; + + case ::perfetto::protos::pbzero::GpuCounterDescriptor_MeasureUnit::BIT: + return "BIT"; + + case ::perfetto::protos::pbzero::GpuCounterDescriptor_MeasureUnit::KILOBIT: + return "KILOBIT"; + + case ::perfetto::protos::pbzero::GpuCounterDescriptor_MeasureUnit::MEGABIT: + return "MEGABIT"; + + case ::perfetto::protos::pbzero::GpuCounterDescriptor_MeasureUnit::GIGABIT: + return "GIGABIT"; + + case ::perfetto::protos::pbzero::GpuCounterDescriptor_MeasureUnit::TERABIT: + return "TERABIT"; + + case ::perfetto::protos::pbzero::GpuCounterDescriptor_MeasureUnit::PETABIT: + return "PETABIT"; + + case ::perfetto::protos::pbzero::GpuCounterDescriptor_MeasureUnit::BYTE: + return "BYTE"; + + case ::perfetto::protos::pbzero::GpuCounterDescriptor_MeasureUnit::KILOBYTE: + return "KILOBYTE"; + + case ::perfetto::protos::pbzero::GpuCounterDescriptor_MeasureUnit::MEGABYTE: + return "MEGABYTE"; + + case ::perfetto::protos::pbzero::GpuCounterDescriptor_MeasureUnit::GIGABYTE: + return "GIGABYTE"; + + case ::perfetto::protos::pbzero::GpuCounterDescriptor_MeasureUnit::TERABYTE: + return "TERABYTE"; + + case ::perfetto::protos::pbzero::GpuCounterDescriptor_MeasureUnit::PETABYTE: + return "PETABYTE"; + + case ::perfetto::protos::pbzero::GpuCounterDescriptor_MeasureUnit::HERTZ: + return "HERTZ"; + + case ::perfetto::protos::pbzero::GpuCounterDescriptor_MeasureUnit::KILOHERTZ: + return "KILOHERTZ"; + + case ::perfetto::protos::pbzero::GpuCounterDescriptor_MeasureUnit::MEGAHERTZ: + return "MEGAHERTZ"; + + case ::perfetto::protos::pbzero::GpuCounterDescriptor_MeasureUnit::GIGAHERTZ: + return "GIGAHERTZ"; + + case ::perfetto::protos::pbzero::GpuCounterDescriptor_MeasureUnit::TERAHERTZ: + return "TERAHERTZ"; + + case ::perfetto::protos::pbzero::GpuCounterDescriptor_MeasureUnit::PETAHERTZ: + return "PETAHERTZ"; + + case ::perfetto::protos::pbzero::GpuCounterDescriptor_MeasureUnit::NANOSECOND: + return "NANOSECOND"; + + case ::perfetto::protos::pbzero::GpuCounterDescriptor_MeasureUnit::MICROSECOND: + return "MICROSECOND"; + + case ::perfetto::protos::pbzero::GpuCounterDescriptor_MeasureUnit::MILLISECOND: + return "MILLISECOND"; + + case ::perfetto::protos::pbzero::GpuCounterDescriptor_MeasureUnit::SECOND: + return "SECOND"; + + case ::perfetto::protos::pbzero::GpuCounterDescriptor_MeasureUnit::MINUTE: + return "MINUTE"; + + case ::perfetto::protos::pbzero::GpuCounterDescriptor_MeasureUnit::HOUR: + return "HOUR"; + + case ::perfetto::protos::pbzero::GpuCounterDescriptor_MeasureUnit::VERTEX: + return "VERTEX"; + + case ::perfetto::protos::pbzero::GpuCounterDescriptor_MeasureUnit::PIXEL: + return "PIXEL"; + + case ::perfetto::protos::pbzero::GpuCounterDescriptor_MeasureUnit::TRIANGLE: + return "TRIANGLE"; + + case ::perfetto::protos::pbzero::GpuCounterDescriptor_MeasureUnit::PRIMITIVE: + return "PRIMITIVE"; + + case ::perfetto::protos::pbzero::GpuCounterDescriptor_MeasureUnit::FRAGMENT: + return "FRAGMENT"; + + case ::perfetto::protos::pbzero::GpuCounterDescriptor_MeasureUnit::MILLIWATT: + return "MILLIWATT"; + + case ::perfetto::protos::pbzero::GpuCounterDescriptor_MeasureUnit::WATT: + return "WATT"; + + case ::perfetto::protos::pbzero::GpuCounterDescriptor_MeasureUnit::KILOWATT: + return "KILOWATT"; + + case ::perfetto::protos::pbzero::GpuCounterDescriptor_MeasureUnit::JOULE: + return "JOULE"; + + case ::perfetto::protos::pbzero::GpuCounterDescriptor_MeasureUnit::VOLT: + return "VOLT"; + + case ::perfetto::protos::pbzero::GpuCounterDescriptor_MeasureUnit::AMPERE: + return "AMPERE"; + + case ::perfetto::protos::pbzero::GpuCounterDescriptor_MeasureUnit::CELSIUS: + return "CELSIUS"; + + case ::perfetto::protos::pbzero::GpuCounterDescriptor_MeasureUnit::FAHRENHEIT: + return "FAHRENHEIT"; + + case ::perfetto::protos::pbzero::GpuCounterDescriptor_MeasureUnit::KELVIN: + return "KELVIN"; + + case ::perfetto::protos::pbzero::GpuCounterDescriptor_MeasureUnit::PERCENT: + return "PERCENT"; + + case ::perfetto::protos::pbzero::GpuCounterDescriptor_MeasureUnit::INSTRUCTION: + return "INSTRUCTION"; + } + return "PBZERO_UNKNOWN_ENUM_VALUE"; +} class GpuCounterDescriptor_Decoder : public ::protozero::TypedProtoDecoder { public: @@ -24912,56 +25801,64 @@ class GpuCounterDescriptor : public ::protozero::Message { using GpuCounterSpec = ::perfetto::protos::pbzero::GpuCounterDescriptor_GpuCounterSpec; using GpuCounterBlock = ::perfetto::protos::pbzero::GpuCounterDescriptor_GpuCounterBlock; + using GpuCounterGroup = ::perfetto::protos::pbzero::GpuCounterDescriptor_GpuCounterGroup; + static inline const char* GpuCounterGroup_Name(GpuCounterGroup value) { + return ::perfetto::protos::pbzero::GpuCounterDescriptor_GpuCounterGroup_Name(value); + } + using MeasureUnit = ::perfetto::protos::pbzero::GpuCounterDescriptor_MeasureUnit; - static const GpuCounterGroup UNCLASSIFIED = GpuCounterDescriptor_GpuCounterGroup_UNCLASSIFIED; - static const GpuCounterGroup SYSTEM = GpuCounterDescriptor_GpuCounterGroup_SYSTEM; - static const GpuCounterGroup VERTICES = GpuCounterDescriptor_GpuCounterGroup_VERTICES; - static const GpuCounterGroup FRAGMENTS = GpuCounterDescriptor_GpuCounterGroup_FRAGMENTS; - static const GpuCounterGroup PRIMITIVES = GpuCounterDescriptor_GpuCounterGroup_PRIMITIVES; - static const GpuCounterGroup MEMORY = GpuCounterDescriptor_GpuCounterGroup_MEMORY; - static const GpuCounterGroup COMPUTE = GpuCounterDescriptor_GpuCounterGroup_COMPUTE; - static const MeasureUnit NONE = GpuCounterDescriptor_MeasureUnit_NONE; - static const MeasureUnit BIT = GpuCounterDescriptor_MeasureUnit_BIT; - static const MeasureUnit KILOBIT = GpuCounterDescriptor_MeasureUnit_KILOBIT; - static const MeasureUnit MEGABIT = GpuCounterDescriptor_MeasureUnit_MEGABIT; - static const MeasureUnit GIGABIT = GpuCounterDescriptor_MeasureUnit_GIGABIT; - static const MeasureUnit TERABIT = GpuCounterDescriptor_MeasureUnit_TERABIT; - static const MeasureUnit PETABIT = GpuCounterDescriptor_MeasureUnit_PETABIT; - static const MeasureUnit BYTE = GpuCounterDescriptor_MeasureUnit_BYTE; - static const MeasureUnit KILOBYTE = GpuCounterDescriptor_MeasureUnit_KILOBYTE; - static const MeasureUnit MEGABYTE = GpuCounterDescriptor_MeasureUnit_MEGABYTE; - static const MeasureUnit GIGABYTE = GpuCounterDescriptor_MeasureUnit_GIGABYTE; - static const MeasureUnit TERABYTE = GpuCounterDescriptor_MeasureUnit_TERABYTE; - static const MeasureUnit PETABYTE = GpuCounterDescriptor_MeasureUnit_PETABYTE; - static const MeasureUnit HERTZ = GpuCounterDescriptor_MeasureUnit_HERTZ; - static const MeasureUnit KILOHERTZ = GpuCounterDescriptor_MeasureUnit_KILOHERTZ; - static const MeasureUnit MEGAHERTZ = GpuCounterDescriptor_MeasureUnit_MEGAHERTZ; - static const MeasureUnit GIGAHERTZ = GpuCounterDescriptor_MeasureUnit_GIGAHERTZ; - static const MeasureUnit TERAHERTZ = GpuCounterDescriptor_MeasureUnit_TERAHERTZ; - static const MeasureUnit PETAHERTZ = GpuCounterDescriptor_MeasureUnit_PETAHERTZ; - static const MeasureUnit NANOSECOND = GpuCounterDescriptor_MeasureUnit_NANOSECOND; - static const MeasureUnit MICROSECOND = GpuCounterDescriptor_MeasureUnit_MICROSECOND; - static const MeasureUnit MILLISECOND = GpuCounterDescriptor_MeasureUnit_MILLISECOND; - static const MeasureUnit SECOND = GpuCounterDescriptor_MeasureUnit_SECOND; - static const MeasureUnit MINUTE = GpuCounterDescriptor_MeasureUnit_MINUTE; - static const MeasureUnit HOUR = GpuCounterDescriptor_MeasureUnit_HOUR; - static const MeasureUnit VERTEX = GpuCounterDescriptor_MeasureUnit_VERTEX; - static const MeasureUnit PIXEL = GpuCounterDescriptor_MeasureUnit_PIXEL; - static const MeasureUnit TRIANGLE = GpuCounterDescriptor_MeasureUnit_TRIANGLE; - static const MeasureUnit PRIMITIVE = GpuCounterDescriptor_MeasureUnit_PRIMITIVE; - static const MeasureUnit FRAGMENT = GpuCounterDescriptor_MeasureUnit_FRAGMENT; - static const MeasureUnit MILLIWATT = GpuCounterDescriptor_MeasureUnit_MILLIWATT; - static const MeasureUnit WATT = GpuCounterDescriptor_MeasureUnit_WATT; - static const MeasureUnit KILOWATT = GpuCounterDescriptor_MeasureUnit_KILOWATT; - static const MeasureUnit JOULE = GpuCounterDescriptor_MeasureUnit_JOULE; - static const MeasureUnit VOLT = GpuCounterDescriptor_MeasureUnit_VOLT; - static const MeasureUnit AMPERE = GpuCounterDescriptor_MeasureUnit_AMPERE; - static const MeasureUnit CELSIUS = GpuCounterDescriptor_MeasureUnit_CELSIUS; - static const MeasureUnit FAHRENHEIT = GpuCounterDescriptor_MeasureUnit_FAHRENHEIT; - static const MeasureUnit KELVIN = GpuCounterDescriptor_MeasureUnit_KELVIN; - static const MeasureUnit PERCENT = GpuCounterDescriptor_MeasureUnit_PERCENT; - static const MeasureUnit INSTRUCTION = GpuCounterDescriptor_MeasureUnit_INSTRUCTION; + static inline const char* MeasureUnit_Name(MeasureUnit value) { + return ::perfetto::protos::pbzero::GpuCounterDescriptor_MeasureUnit_Name(value); + } + static const GpuCounterGroup UNCLASSIFIED = GpuCounterGroup::UNCLASSIFIED; + static const GpuCounterGroup SYSTEM = GpuCounterGroup::SYSTEM; + static const GpuCounterGroup VERTICES = GpuCounterGroup::VERTICES; + static const GpuCounterGroup FRAGMENTS = GpuCounterGroup::FRAGMENTS; + static const GpuCounterGroup PRIMITIVES = GpuCounterGroup::PRIMITIVES; + static const GpuCounterGroup MEMORY = GpuCounterGroup::MEMORY; + static const GpuCounterGroup COMPUTE = GpuCounterGroup::COMPUTE; + static const MeasureUnit NONE = MeasureUnit::NONE; + static const MeasureUnit BIT = MeasureUnit::BIT; + static const MeasureUnit KILOBIT = MeasureUnit::KILOBIT; + static const MeasureUnit MEGABIT = MeasureUnit::MEGABIT; + static const MeasureUnit GIGABIT = MeasureUnit::GIGABIT; + static const MeasureUnit TERABIT = MeasureUnit::TERABIT; + static const MeasureUnit PETABIT = MeasureUnit::PETABIT; + static const MeasureUnit BYTE = MeasureUnit::BYTE; + static const MeasureUnit KILOBYTE = MeasureUnit::KILOBYTE; + static const MeasureUnit MEGABYTE = MeasureUnit::MEGABYTE; + static const MeasureUnit GIGABYTE = MeasureUnit::GIGABYTE; + static const MeasureUnit TERABYTE = MeasureUnit::TERABYTE; + static const MeasureUnit PETABYTE = MeasureUnit::PETABYTE; + static const MeasureUnit HERTZ = MeasureUnit::HERTZ; + static const MeasureUnit KILOHERTZ = MeasureUnit::KILOHERTZ; + static const MeasureUnit MEGAHERTZ = MeasureUnit::MEGAHERTZ; + static const MeasureUnit GIGAHERTZ = MeasureUnit::GIGAHERTZ; + static const MeasureUnit TERAHERTZ = MeasureUnit::TERAHERTZ; + static const MeasureUnit PETAHERTZ = MeasureUnit::PETAHERTZ; + static const MeasureUnit NANOSECOND = MeasureUnit::NANOSECOND; + static const MeasureUnit MICROSECOND = MeasureUnit::MICROSECOND; + static const MeasureUnit MILLISECOND = MeasureUnit::MILLISECOND; + static const MeasureUnit SECOND = MeasureUnit::SECOND; + static const MeasureUnit MINUTE = MeasureUnit::MINUTE; + static const MeasureUnit HOUR = MeasureUnit::HOUR; + static const MeasureUnit VERTEX = MeasureUnit::VERTEX; + static const MeasureUnit PIXEL = MeasureUnit::PIXEL; + static const MeasureUnit TRIANGLE = MeasureUnit::TRIANGLE; + static const MeasureUnit PRIMITIVE = MeasureUnit::PRIMITIVE; + static const MeasureUnit FRAGMENT = MeasureUnit::FRAGMENT; + static const MeasureUnit MILLIWATT = MeasureUnit::MILLIWATT; + static const MeasureUnit WATT = MeasureUnit::WATT; + static const MeasureUnit KILOWATT = MeasureUnit::KILOWATT; + static const MeasureUnit JOULE = MeasureUnit::JOULE; + static const MeasureUnit VOLT = MeasureUnit::VOLT; + static const MeasureUnit AMPERE = MeasureUnit::AMPERE; + static const MeasureUnit CELSIUS = MeasureUnit::CELSIUS; + static const MeasureUnit FAHRENHEIT = MeasureUnit::FAHRENHEIT; + static const MeasureUnit KELVIN = MeasureUnit::KELVIN; + static const MeasureUnit PERCENT = MeasureUnit::PERCENT; + static const MeasureUnit INSTRUCTION = MeasureUnit::INSTRUCTION; using FieldMetadata_Specs = ::protozero::proto_utils::FieldMetadata< @@ -24971,14 +25868,7 @@ class GpuCounterDescriptor : public ::protozero::Message { GpuCounterDescriptor_GpuCounterSpec, GpuCounterDescriptor>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Specs kSpecs() { return {}; } + static constexpr FieldMetadata_Specs kSpecs{}; template T* add_specs() { return BeginNestedMessage(1); } @@ -24992,14 +25882,7 @@ class GpuCounterDescriptor : public ::protozero::Message { GpuCounterDescriptor_GpuCounterBlock, GpuCounterDescriptor>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Blocks kBlocks() { return {}; } + static constexpr FieldMetadata_Blocks kBlocks{}; template T* add_blocks() { return BeginNestedMessage(2); } @@ -25013,14 +25896,7 @@ class GpuCounterDescriptor : public ::protozero::Message { uint64_t, GpuCounterDescriptor>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_MinSamplingPeriodNs kMinSamplingPeriodNs() { return {}; } + static constexpr FieldMetadata_MinSamplingPeriodNs kMinSamplingPeriodNs{}; void set_min_sampling_period_ns(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_MinSamplingPeriodNs::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -25038,14 +25914,7 @@ class GpuCounterDescriptor : public ::protozero::Message { uint64_t, GpuCounterDescriptor>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_MaxSamplingPeriodNs kMaxSamplingPeriodNs() { return {}; } + static constexpr FieldMetadata_MaxSamplingPeriodNs kMaxSamplingPeriodNs{}; void set_max_sampling_period_ns(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_MaxSamplingPeriodNs::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -25063,14 +25932,7 @@ class GpuCounterDescriptor : public ::protozero::Message { bool, GpuCounterDescriptor>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_SupportsInstrumentedSampling kSupportsInstrumentedSampling() { return {}; } + static constexpr FieldMetadata_SupportsInstrumentedSampling kSupportsInstrumentedSampling{}; void set_supports_instrumented_sampling(bool value) { static constexpr uint32_t field_id = FieldMetadata_SupportsInstrumentedSampling::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -25119,14 +25981,7 @@ class GpuCounterDescriptor_GpuCounterBlock : public ::protozero::Message { uint32_t, GpuCounterDescriptor_GpuCounterBlock>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_BlockId kBlockId() { return {}; } + static constexpr FieldMetadata_BlockId kBlockId{}; void set_block_id(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_BlockId::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -25144,14 +25999,7 @@ class GpuCounterDescriptor_GpuCounterBlock : public ::protozero::Message { uint32_t, GpuCounterDescriptor_GpuCounterBlock>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_BlockCapacity kBlockCapacity() { return {}; } + static constexpr FieldMetadata_BlockCapacity kBlockCapacity{}; void set_block_capacity(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_BlockCapacity::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -25169,17 +26017,13 @@ class GpuCounterDescriptor_GpuCounterBlock : public ::protozero::Message { std::string, GpuCounterDescriptor_GpuCounterBlock>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Name kName() { return {}; } + static constexpr FieldMetadata_Name kName{}; void set_name(const char* data, size_t size) { AppendBytes(FieldMetadata_Name::kFieldId, data, size); } + void set_name(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Name::kFieldId, chars.data, chars.size); + } void set_name(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Name::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -25197,17 +26041,13 @@ class GpuCounterDescriptor_GpuCounterBlock : public ::protozero::Message { std::string, GpuCounterDescriptor_GpuCounterBlock>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Description kDescription() { return {}; } + static constexpr FieldMetadata_Description kDescription{}; void set_description(const char* data, size_t size) { AppendBytes(FieldMetadata_Description::kFieldId, data, size); } + void set_description(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Description::kFieldId, chars.data, chars.size); + } void set_description(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Description::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -25225,14 +26065,7 @@ class GpuCounterDescriptor_GpuCounterBlock : public ::protozero::Message { uint32_t, GpuCounterDescriptor_GpuCounterBlock>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_CounterIds kCounterIds() { return {}; } + static constexpr FieldMetadata_CounterIds kCounterIds{}; void add_counter_ids(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_CounterIds::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -25293,14 +26126,7 @@ class GpuCounterDescriptor_GpuCounterSpec : public ::protozero::Message { uint32_t, GpuCounterDescriptor_GpuCounterSpec>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_CounterId kCounterId() { return {}; } + static constexpr FieldMetadata_CounterId kCounterId{}; void set_counter_id(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_CounterId::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -25318,17 +26144,13 @@ class GpuCounterDescriptor_GpuCounterSpec : public ::protozero::Message { std::string, GpuCounterDescriptor_GpuCounterSpec>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Name kName() { return {}; } + static constexpr FieldMetadata_Name kName{}; void set_name(const char* data, size_t size) { AppendBytes(FieldMetadata_Name::kFieldId, data, size); } + void set_name(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Name::kFieldId, chars.data, chars.size); + } void set_name(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Name::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -25346,17 +26168,13 @@ class GpuCounterDescriptor_GpuCounterSpec : public ::protozero::Message { std::string, GpuCounterDescriptor_GpuCounterSpec>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Description kDescription() { return {}; } + static constexpr FieldMetadata_Description kDescription{}; void set_description(const char* data, size_t size) { AppendBytes(FieldMetadata_Description::kFieldId, data, size); } + void set_description(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Description::kFieldId, chars.data, chars.size); + } void set_description(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Description::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -25374,14 +26192,7 @@ class GpuCounterDescriptor_GpuCounterSpec : public ::protozero::Message { int64_t, GpuCounterDescriptor_GpuCounterSpec>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_IntPeakValue kIntPeakValue() { return {}; } + static constexpr FieldMetadata_IntPeakValue kIntPeakValue{}; void set_int_peak_value(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_IntPeakValue::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -25399,14 +26210,7 @@ class GpuCounterDescriptor_GpuCounterSpec : public ::protozero::Message { double, GpuCounterDescriptor_GpuCounterSpec>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_DoublePeakValue kDoublePeakValue() { return {}; } + static constexpr FieldMetadata_DoublePeakValue kDoublePeakValue{}; void set_double_peak_value(double value) { static constexpr uint32_t field_id = FieldMetadata_DoublePeakValue::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -25424,14 +26228,7 @@ class GpuCounterDescriptor_GpuCounterSpec : public ::protozero::Message { ::perfetto::protos::pbzero::GpuCounterDescriptor_MeasureUnit, GpuCounterDescriptor_GpuCounterSpec>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_NumeratorUnits kNumeratorUnits() { return {}; } + static constexpr FieldMetadata_NumeratorUnits kNumeratorUnits{}; void add_numerator_units(::perfetto::protos::pbzero::GpuCounterDescriptor_MeasureUnit value) { static constexpr uint32_t field_id = FieldMetadata_NumeratorUnits::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -25449,14 +26246,7 @@ class GpuCounterDescriptor_GpuCounterSpec : public ::protozero::Message { ::perfetto::protos::pbzero::GpuCounterDescriptor_MeasureUnit, GpuCounterDescriptor_GpuCounterSpec>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_DenominatorUnits kDenominatorUnits() { return {}; } + static constexpr FieldMetadata_DenominatorUnits kDenominatorUnits{}; void add_denominator_units(::perfetto::protos::pbzero::GpuCounterDescriptor_MeasureUnit value) { static constexpr uint32_t field_id = FieldMetadata_DenominatorUnits::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -25474,14 +26264,7 @@ class GpuCounterDescriptor_GpuCounterSpec : public ::protozero::Message { bool, GpuCounterDescriptor_GpuCounterSpec>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_SelectByDefault kSelectByDefault() { return {}; } + static constexpr FieldMetadata_SelectByDefault kSelectByDefault{}; void set_select_by_default(bool value) { static constexpr uint32_t field_id = FieldMetadata_SelectByDefault::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -25499,14 +26282,7 @@ class GpuCounterDescriptor_GpuCounterSpec : public ::protozero::Message { ::perfetto::protos::pbzero::GpuCounterDescriptor_GpuCounterGroup, GpuCounterDescriptor_GpuCounterSpec>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Groups kGroups() { return {}; } + static constexpr FieldMetadata_Groups kGroups{}; void add_groups(::perfetto::protos::pbzero::GpuCounterDescriptor_GpuCounterGroup value) { static constexpr uint32_t field_id = FieldMetadata_Groups::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -25567,17 +26343,13 @@ class InterceptorDescriptor : public ::protozero::Message { std::string, InterceptorDescriptor>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Name kName() { return {}; } + static constexpr FieldMetadata_Name kName{}; void set_name(const char* data, size_t size) { AppendBytes(FieldMetadata_Name::kFieldId, data, size); } + void set_name(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Name::kFieldId, chars.data, chars.size); + } void set_name(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Name::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -25612,24 +26384,64 @@ namespace protos { namespace pbzero { class ObservableEvents_DataSourceInstanceStateChange; -enum ObservableEvents_DataSourceInstanceState : int32_t; +namespace perfetto_pbzero_enum_ObservableEvents { +enum DataSourceInstanceState : int32_t; +} // namespace perfetto_pbzero_enum_ObservableEvents +using ObservableEvents_DataSourceInstanceState = perfetto_pbzero_enum_ObservableEvents::DataSourceInstanceState; -enum ObservableEvents_Type : int32_t { - ObservableEvents_Type_TYPE_UNSPECIFIED = 0, - ObservableEvents_Type_TYPE_DATA_SOURCES_INSTANCES = 1, - ObservableEvents_Type_TYPE_ALL_DATA_SOURCES_STARTED = 2, +namespace perfetto_pbzero_enum_ObservableEvents { +enum Type : int32_t { + TYPE_UNSPECIFIED = 0, + TYPE_DATA_SOURCES_INSTANCES = 1, + TYPE_ALL_DATA_SOURCES_STARTED = 2, }; +} // namespace perfetto_pbzero_enum_ObservableEvents +using ObservableEvents_Type = perfetto_pbzero_enum_ObservableEvents::Type; -const ObservableEvents_Type ObservableEvents_Type_MIN = ObservableEvents_Type_TYPE_UNSPECIFIED; -const ObservableEvents_Type ObservableEvents_Type_MAX = ObservableEvents_Type_TYPE_ALL_DATA_SOURCES_STARTED; -enum ObservableEvents_DataSourceInstanceState : int32_t { - ObservableEvents_DataSourceInstanceState_DATA_SOURCE_INSTANCE_STATE_STOPPED = 1, - ObservableEvents_DataSourceInstanceState_DATA_SOURCE_INSTANCE_STATE_STARTED = 2, +constexpr ObservableEvents_Type ObservableEvents_Type_MIN = ObservableEvents_Type::TYPE_UNSPECIFIED; +constexpr ObservableEvents_Type ObservableEvents_Type_MAX = ObservableEvents_Type::TYPE_ALL_DATA_SOURCES_STARTED; + + +PERFETTO_PROTOZERO_CONSTEXPR14_OR_INLINE +const char* ObservableEvents_Type_Name(::perfetto::protos::pbzero::ObservableEvents_Type value) { + switch (value) { + case ::perfetto::protos::pbzero::ObservableEvents_Type::TYPE_UNSPECIFIED: + return "TYPE_UNSPECIFIED"; + + case ::perfetto::protos::pbzero::ObservableEvents_Type::TYPE_DATA_SOURCES_INSTANCES: + return "TYPE_DATA_SOURCES_INSTANCES"; + + case ::perfetto::protos::pbzero::ObservableEvents_Type::TYPE_ALL_DATA_SOURCES_STARTED: + return "TYPE_ALL_DATA_SOURCES_STARTED"; + } + return "PBZERO_UNKNOWN_ENUM_VALUE"; +} + +namespace perfetto_pbzero_enum_ObservableEvents { +enum DataSourceInstanceState : int32_t { + DATA_SOURCE_INSTANCE_STATE_STOPPED = 1, + DATA_SOURCE_INSTANCE_STATE_STARTED = 2, }; +} // namespace perfetto_pbzero_enum_ObservableEvents +using ObservableEvents_DataSourceInstanceState = perfetto_pbzero_enum_ObservableEvents::DataSourceInstanceState; -const ObservableEvents_DataSourceInstanceState ObservableEvents_DataSourceInstanceState_MIN = ObservableEvents_DataSourceInstanceState_DATA_SOURCE_INSTANCE_STATE_STOPPED; -const ObservableEvents_DataSourceInstanceState ObservableEvents_DataSourceInstanceState_MAX = ObservableEvents_DataSourceInstanceState_DATA_SOURCE_INSTANCE_STATE_STARTED; + +constexpr ObservableEvents_DataSourceInstanceState ObservableEvents_DataSourceInstanceState_MIN = ObservableEvents_DataSourceInstanceState::DATA_SOURCE_INSTANCE_STATE_STOPPED; +constexpr ObservableEvents_DataSourceInstanceState ObservableEvents_DataSourceInstanceState_MAX = ObservableEvents_DataSourceInstanceState::DATA_SOURCE_INSTANCE_STATE_STARTED; + + +PERFETTO_PROTOZERO_CONSTEXPR14_OR_INLINE +const char* ObservableEvents_DataSourceInstanceState_Name(::perfetto::protos::pbzero::ObservableEvents_DataSourceInstanceState value) { + switch (value) { + case ::perfetto::protos::pbzero::ObservableEvents_DataSourceInstanceState::DATA_SOURCE_INSTANCE_STATE_STOPPED: + return "DATA_SOURCE_INSTANCE_STATE_STOPPED"; + + case ::perfetto::protos::pbzero::ObservableEvents_DataSourceInstanceState::DATA_SOURCE_INSTANCE_STATE_STARTED: + return "DATA_SOURCE_INSTANCE_STATE_STARTED"; + } + return "PBZERO_UNKNOWN_ENUM_VALUE"; +} class ObservableEvents_Decoder : public ::protozero::TypedProtoDecoder { public: @@ -25652,13 +26464,21 @@ class ObservableEvents : public ::protozero::Message { static constexpr const char* GetName() { return ".perfetto.protos.ObservableEvents"; } using DataSourceInstanceStateChange = ::perfetto::protos::pbzero::ObservableEvents_DataSourceInstanceStateChange; + using Type = ::perfetto::protos::pbzero::ObservableEvents_Type; + static inline const char* Type_Name(Type value) { + return ::perfetto::protos::pbzero::ObservableEvents_Type_Name(value); + } + using DataSourceInstanceState = ::perfetto::protos::pbzero::ObservableEvents_DataSourceInstanceState; - static const Type TYPE_UNSPECIFIED = ObservableEvents_Type_TYPE_UNSPECIFIED; - static const Type TYPE_DATA_SOURCES_INSTANCES = ObservableEvents_Type_TYPE_DATA_SOURCES_INSTANCES; - static const Type TYPE_ALL_DATA_SOURCES_STARTED = ObservableEvents_Type_TYPE_ALL_DATA_SOURCES_STARTED; - static const DataSourceInstanceState DATA_SOURCE_INSTANCE_STATE_STOPPED = ObservableEvents_DataSourceInstanceState_DATA_SOURCE_INSTANCE_STATE_STOPPED; - static const DataSourceInstanceState DATA_SOURCE_INSTANCE_STATE_STARTED = ObservableEvents_DataSourceInstanceState_DATA_SOURCE_INSTANCE_STATE_STARTED; + static inline const char* DataSourceInstanceState_Name(DataSourceInstanceState value) { + return ::perfetto::protos::pbzero::ObservableEvents_DataSourceInstanceState_Name(value); + } + static const Type TYPE_UNSPECIFIED = Type::TYPE_UNSPECIFIED; + static const Type TYPE_DATA_SOURCES_INSTANCES = Type::TYPE_DATA_SOURCES_INSTANCES; + static const Type TYPE_ALL_DATA_SOURCES_STARTED = Type::TYPE_ALL_DATA_SOURCES_STARTED; + static const DataSourceInstanceState DATA_SOURCE_INSTANCE_STATE_STOPPED = DataSourceInstanceState::DATA_SOURCE_INSTANCE_STATE_STOPPED; + static const DataSourceInstanceState DATA_SOURCE_INSTANCE_STATE_STARTED = DataSourceInstanceState::DATA_SOURCE_INSTANCE_STATE_STARTED; using FieldMetadata_InstanceStateChanges = ::protozero::proto_utils::FieldMetadata< @@ -25668,14 +26488,7 @@ class ObservableEvents : public ::protozero::Message { ObservableEvents_DataSourceInstanceStateChange, ObservableEvents>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_InstanceStateChanges kInstanceStateChanges() { return {}; } + static constexpr FieldMetadata_InstanceStateChanges kInstanceStateChanges{}; template T* add_instance_state_changes() { return BeginNestedMessage(1); } @@ -25689,14 +26502,7 @@ class ObservableEvents : public ::protozero::Message { bool, ObservableEvents>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_AllDataSourcesStarted kAllDataSourcesStarted() { return {}; } + static constexpr FieldMetadata_AllDataSourcesStarted kAllDataSourcesStarted{}; void set_all_data_sources_started(bool value) { static constexpr uint32_t field_id = FieldMetadata_AllDataSourcesStarted::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -25739,17 +26545,13 @@ class ObservableEvents_DataSourceInstanceStateChange : public ::protozero::Messa std::string, ObservableEvents_DataSourceInstanceStateChange>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ProducerName kProducerName() { return {}; } + static constexpr FieldMetadata_ProducerName kProducerName{}; void set_producer_name(const char* data, size_t size) { AppendBytes(FieldMetadata_ProducerName::kFieldId, data, size); } + void set_producer_name(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_ProducerName::kFieldId, chars.data, chars.size); + } void set_producer_name(std::string value) { static constexpr uint32_t field_id = FieldMetadata_ProducerName::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -25767,17 +26569,13 @@ class ObservableEvents_DataSourceInstanceStateChange : public ::protozero::Messa std::string, ObservableEvents_DataSourceInstanceStateChange>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_DataSourceName kDataSourceName() { return {}; } + static constexpr FieldMetadata_DataSourceName kDataSourceName{}; void set_data_source_name(const char* data, size_t size) { AppendBytes(FieldMetadata_DataSourceName::kFieldId, data, size); } + void set_data_source_name(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_DataSourceName::kFieldId, chars.data, chars.size); + } void set_data_source_name(std::string value) { static constexpr uint32_t field_id = FieldMetadata_DataSourceName::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -25795,14 +26593,7 @@ class ObservableEvents_DataSourceInstanceStateChange : public ::protozero::Messa ::perfetto::protos::pbzero::ObservableEvents_DataSourceInstanceState, ObservableEvents_DataSourceInstanceStateChange>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_State kState() { return {}; } + static constexpr FieldMetadata_State kState{}; void set_state(::perfetto::protos::pbzero::ObservableEvents_DataSourceInstanceState value) { static constexpr uint32_t field_id = FieldMetadata_State::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -25839,46 +26630,152 @@ namespace pbzero { class PerfEvents_RawEvent; class PerfEvents_Timebase; class PerfEvents_Tracepoint; -enum PerfEvents_Counter : int32_t; -enum PerfEvents_PerfClock : int32_t; +namespace perfetto_pbzero_enum_PerfEvents { +enum Counter : int32_t; +} // namespace perfetto_pbzero_enum_PerfEvents +using PerfEvents_Counter = perfetto_pbzero_enum_PerfEvents::Counter; +namespace perfetto_pbzero_enum_PerfEvents { +enum PerfClock : int32_t; +} // namespace perfetto_pbzero_enum_PerfEvents +using PerfEvents_PerfClock = perfetto_pbzero_enum_PerfEvents::PerfClock; -enum PerfEvents_Counter : int32_t { - PerfEvents_Counter_UNKNOWN_COUNTER = 0, - PerfEvents_Counter_SW_CPU_CLOCK = 1, - PerfEvents_Counter_SW_PAGE_FAULTS = 2, - PerfEvents_Counter_SW_TASK_CLOCK = 3, - PerfEvents_Counter_SW_CONTEXT_SWITCHES = 4, - PerfEvents_Counter_SW_CPU_MIGRATIONS = 5, - PerfEvents_Counter_SW_PAGE_FAULTS_MIN = 6, - PerfEvents_Counter_SW_PAGE_FAULTS_MAJ = 7, - PerfEvents_Counter_SW_ALIGNMENT_FAULTS = 8, - PerfEvents_Counter_SW_EMULATION_FAULTS = 9, - PerfEvents_Counter_SW_DUMMY = 20, - PerfEvents_Counter_HW_CPU_CYCLES = 10, - PerfEvents_Counter_HW_INSTRUCTIONS = 11, - PerfEvents_Counter_HW_CACHE_REFERENCES = 12, - PerfEvents_Counter_HW_CACHE_MISSES = 13, - PerfEvents_Counter_HW_BRANCH_INSTRUCTIONS = 14, - PerfEvents_Counter_HW_BRANCH_MISSES = 15, - PerfEvents_Counter_HW_BUS_CYCLES = 16, - PerfEvents_Counter_HW_STALLED_CYCLES_FRONTEND = 17, - PerfEvents_Counter_HW_STALLED_CYCLES_BACKEND = 18, - PerfEvents_Counter_HW_REF_CPU_CYCLES = 19, +namespace perfetto_pbzero_enum_PerfEvents { +enum Counter : int32_t { + UNKNOWN_COUNTER = 0, + SW_CPU_CLOCK = 1, + SW_PAGE_FAULTS = 2, + SW_TASK_CLOCK = 3, + SW_CONTEXT_SWITCHES = 4, + SW_CPU_MIGRATIONS = 5, + SW_PAGE_FAULTS_MIN = 6, + SW_PAGE_FAULTS_MAJ = 7, + SW_ALIGNMENT_FAULTS = 8, + SW_EMULATION_FAULTS = 9, + SW_DUMMY = 20, + HW_CPU_CYCLES = 10, + HW_INSTRUCTIONS = 11, + HW_CACHE_REFERENCES = 12, + HW_CACHE_MISSES = 13, + HW_BRANCH_INSTRUCTIONS = 14, + HW_BRANCH_MISSES = 15, + HW_BUS_CYCLES = 16, + HW_STALLED_CYCLES_FRONTEND = 17, + HW_STALLED_CYCLES_BACKEND = 18, + HW_REF_CPU_CYCLES = 19, }; +} // namespace perfetto_pbzero_enum_PerfEvents +using PerfEvents_Counter = perfetto_pbzero_enum_PerfEvents::Counter; -const PerfEvents_Counter PerfEvents_Counter_MIN = PerfEvents_Counter_UNKNOWN_COUNTER; -const PerfEvents_Counter PerfEvents_Counter_MAX = PerfEvents_Counter_SW_DUMMY; -enum PerfEvents_PerfClock : int32_t { - PerfEvents_PerfClock_UNKNOWN_PERF_CLOCK = 0, - PerfEvents_PerfClock_PERF_CLOCK_REALTIME = 1, - PerfEvents_PerfClock_PERF_CLOCK_MONOTONIC = 2, - PerfEvents_PerfClock_PERF_CLOCK_MONOTONIC_RAW = 3, - PerfEvents_PerfClock_PERF_CLOCK_BOOTTIME = 4, +constexpr PerfEvents_Counter PerfEvents_Counter_MIN = PerfEvents_Counter::UNKNOWN_COUNTER; +constexpr PerfEvents_Counter PerfEvents_Counter_MAX = PerfEvents_Counter::SW_DUMMY; + + +PERFETTO_PROTOZERO_CONSTEXPR14_OR_INLINE +const char* PerfEvents_Counter_Name(::perfetto::protos::pbzero::PerfEvents_Counter value) { + switch (value) { + case ::perfetto::protos::pbzero::PerfEvents_Counter::UNKNOWN_COUNTER: + return "UNKNOWN_COUNTER"; + + case ::perfetto::protos::pbzero::PerfEvents_Counter::SW_CPU_CLOCK: + return "SW_CPU_CLOCK"; + + case ::perfetto::protos::pbzero::PerfEvents_Counter::SW_PAGE_FAULTS: + return "SW_PAGE_FAULTS"; + + case ::perfetto::protos::pbzero::PerfEvents_Counter::SW_TASK_CLOCK: + return "SW_TASK_CLOCK"; + + case ::perfetto::protos::pbzero::PerfEvents_Counter::SW_CONTEXT_SWITCHES: + return "SW_CONTEXT_SWITCHES"; + + case ::perfetto::protos::pbzero::PerfEvents_Counter::SW_CPU_MIGRATIONS: + return "SW_CPU_MIGRATIONS"; + + case ::perfetto::protos::pbzero::PerfEvents_Counter::SW_PAGE_FAULTS_MIN: + return "SW_PAGE_FAULTS_MIN"; + + case ::perfetto::protos::pbzero::PerfEvents_Counter::SW_PAGE_FAULTS_MAJ: + return "SW_PAGE_FAULTS_MAJ"; + + case ::perfetto::protos::pbzero::PerfEvents_Counter::SW_ALIGNMENT_FAULTS: + return "SW_ALIGNMENT_FAULTS"; + + case ::perfetto::protos::pbzero::PerfEvents_Counter::SW_EMULATION_FAULTS: + return "SW_EMULATION_FAULTS"; + + case ::perfetto::protos::pbzero::PerfEvents_Counter::SW_DUMMY: + return "SW_DUMMY"; + + case ::perfetto::protos::pbzero::PerfEvents_Counter::HW_CPU_CYCLES: + return "HW_CPU_CYCLES"; + + case ::perfetto::protos::pbzero::PerfEvents_Counter::HW_INSTRUCTIONS: + return "HW_INSTRUCTIONS"; + + case ::perfetto::protos::pbzero::PerfEvents_Counter::HW_CACHE_REFERENCES: + return "HW_CACHE_REFERENCES"; + + case ::perfetto::protos::pbzero::PerfEvents_Counter::HW_CACHE_MISSES: + return "HW_CACHE_MISSES"; + + case ::perfetto::protos::pbzero::PerfEvents_Counter::HW_BRANCH_INSTRUCTIONS: + return "HW_BRANCH_INSTRUCTIONS"; + + case ::perfetto::protos::pbzero::PerfEvents_Counter::HW_BRANCH_MISSES: + return "HW_BRANCH_MISSES"; + + case ::perfetto::protos::pbzero::PerfEvents_Counter::HW_BUS_CYCLES: + return "HW_BUS_CYCLES"; + + case ::perfetto::protos::pbzero::PerfEvents_Counter::HW_STALLED_CYCLES_FRONTEND: + return "HW_STALLED_CYCLES_FRONTEND"; + + case ::perfetto::protos::pbzero::PerfEvents_Counter::HW_STALLED_CYCLES_BACKEND: + return "HW_STALLED_CYCLES_BACKEND"; + + case ::perfetto::protos::pbzero::PerfEvents_Counter::HW_REF_CPU_CYCLES: + return "HW_REF_CPU_CYCLES"; + } + return "PBZERO_UNKNOWN_ENUM_VALUE"; +} + +namespace perfetto_pbzero_enum_PerfEvents { +enum PerfClock : int32_t { + UNKNOWN_PERF_CLOCK = 0, + PERF_CLOCK_REALTIME = 1, + PERF_CLOCK_MONOTONIC = 2, + PERF_CLOCK_MONOTONIC_RAW = 3, + PERF_CLOCK_BOOTTIME = 4, }; +} // namespace perfetto_pbzero_enum_PerfEvents +using PerfEvents_PerfClock = perfetto_pbzero_enum_PerfEvents::PerfClock; -const PerfEvents_PerfClock PerfEvents_PerfClock_MIN = PerfEvents_PerfClock_UNKNOWN_PERF_CLOCK; -const PerfEvents_PerfClock PerfEvents_PerfClock_MAX = PerfEvents_PerfClock_PERF_CLOCK_BOOTTIME; + +constexpr PerfEvents_PerfClock PerfEvents_PerfClock_MIN = PerfEvents_PerfClock::UNKNOWN_PERF_CLOCK; +constexpr PerfEvents_PerfClock PerfEvents_PerfClock_MAX = PerfEvents_PerfClock::PERF_CLOCK_BOOTTIME; + + +PERFETTO_PROTOZERO_CONSTEXPR14_OR_INLINE +const char* PerfEvents_PerfClock_Name(::perfetto::protos::pbzero::PerfEvents_PerfClock value) { + switch (value) { + case ::perfetto::protos::pbzero::PerfEvents_PerfClock::UNKNOWN_PERF_CLOCK: + return "UNKNOWN_PERF_CLOCK"; + + case ::perfetto::protos::pbzero::PerfEvents_PerfClock::PERF_CLOCK_REALTIME: + return "PERF_CLOCK_REALTIME"; + + case ::perfetto::protos::pbzero::PerfEvents_PerfClock::PERF_CLOCK_MONOTONIC: + return "PERF_CLOCK_MONOTONIC"; + + case ::perfetto::protos::pbzero::PerfEvents_PerfClock::PERF_CLOCK_MONOTONIC_RAW: + return "PERF_CLOCK_MONOTONIC_RAW"; + + case ::perfetto::protos::pbzero::PerfEvents_PerfClock::PERF_CLOCK_BOOTTIME: + return "PERF_CLOCK_BOOTTIME"; + } + return "PBZERO_UNKNOWN_ENUM_VALUE"; +} class PerfEvents_Decoder : public ::protozero::TypedProtoDecoder { public: @@ -25895,34 +26792,42 @@ class PerfEvents : public ::protozero::Message { using Timebase = ::perfetto::protos::pbzero::PerfEvents_Timebase; using Tracepoint = ::perfetto::protos::pbzero::PerfEvents_Tracepoint; using RawEvent = ::perfetto::protos::pbzero::PerfEvents_RawEvent; + using Counter = ::perfetto::protos::pbzero::PerfEvents_Counter; + static inline const char* Counter_Name(Counter value) { + return ::perfetto::protos::pbzero::PerfEvents_Counter_Name(value); + } + using PerfClock = ::perfetto::protos::pbzero::PerfEvents_PerfClock; - static const Counter UNKNOWN_COUNTER = PerfEvents_Counter_UNKNOWN_COUNTER; - static const Counter SW_CPU_CLOCK = PerfEvents_Counter_SW_CPU_CLOCK; - static const Counter SW_PAGE_FAULTS = PerfEvents_Counter_SW_PAGE_FAULTS; - static const Counter SW_TASK_CLOCK = PerfEvents_Counter_SW_TASK_CLOCK; - static const Counter SW_CONTEXT_SWITCHES = PerfEvents_Counter_SW_CONTEXT_SWITCHES; - static const Counter SW_CPU_MIGRATIONS = PerfEvents_Counter_SW_CPU_MIGRATIONS; - static const Counter SW_PAGE_FAULTS_MIN = PerfEvents_Counter_SW_PAGE_FAULTS_MIN; - static const Counter SW_PAGE_FAULTS_MAJ = PerfEvents_Counter_SW_PAGE_FAULTS_MAJ; - static const Counter SW_ALIGNMENT_FAULTS = PerfEvents_Counter_SW_ALIGNMENT_FAULTS; - static const Counter SW_EMULATION_FAULTS = PerfEvents_Counter_SW_EMULATION_FAULTS; - static const Counter SW_DUMMY = PerfEvents_Counter_SW_DUMMY; - static const Counter HW_CPU_CYCLES = PerfEvents_Counter_HW_CPU_CYCLES; - static const Counter HW_INSTRUCTIONS = PerfEvents_Counter_HW_INSTRUCTIONS; - static const Counter HW_CACHE_REFERENCES = PerfEvents_Counter_HW_CACHE_REFERENCES; - static const Counter HW_CACHE_MISSES = PerfEvents_Counter_HW_CACHE_MISSES; - static const Counter HW_BRANCH_INSTRUCTIONS = PerfEvents_Counter_HW_BRANCH_INSTRUCTIONS; - static const Counter HW_BRANCH_MISSES = PerfEvents_Counter_HW_BRANCH_MISSES; - static const Counter HW_BUS_CYCLES = PerfEvents_Counter_HW_BUS_CYCLES; - static const Counter HW_STALLED_CYCLES_FRONTEND = PerfEvents_Counter_HW_STALLED_CYCLES_FRONTEND; - static const Counter HW_STALLED_CYCLES_BACKEND = PerfEvents_Counter_HW_STALLED_CYCLES_BACKEND; - static const Counter HW_REF_CPU_CYCLES = PerfEvents_Counter_HW_REF_CPU_CYCLES; - static const PerfClock UNKNOWN_PERF_CLOCK = PerfEvents_PerfClock_UNKNOWN_PERF_CLOCK; - static const PerfClock PERF_CLOCK_REALTIME = PerfEvents_PerfClock_PERF_CLOCK_REALTIME; - static const PerfClock PERF_CLOCK_MONOTONIC = PerfEvents_PerfClock_PERF_CLOCK_MONOTONIC; - static const PerfClock PERF_CLOCK_MONOTONIC_RAW = PerfEvents_PerfClock_PERF_CLOCK_MONOTONIC_RAW; - static const PerfClock PERF_CLOCK_BOOTTIME = PerfEvents_PerfClock_PERF_CLOCK_BOOTTIME; + static inline const char* PerfClock_Name(PerfClock value) { + return ::perfetto::protos::pbzero::PerfEvents_PerfClock_Name(value); + } + static const Counter UNKNOWN_COUNTER = Counter::UNKNOWN_COUNTER; + static const Counter SW_CPU_CLOCK = Counter::SW_CPU_CLOCK; + static const Counter SW_PAGE_FAULTS = Counter::SW_PAGE_FAULTS; + static const Counter SW_TASK_CLOCK = Counter::SW_TASK_CLOCK; + static const Counter SW_CONTEXT_SWITCHES = Counter::SW_CONTEXT_SWITCHES; + static const Counter SW_CPU_MIGRATIONS = Counter::SW_CPU_MIGRATIONS; + static const Counter SW_PAGE_FAULTS_MIN = Counter::SW_PAGE_FAULTS_MIN; + static const Counter SW_PAGE_FAULTS_MAJ = Counter::SW_PAGE_FAULTS_MAJ; + static const Counter SW_ALIGNMENT_FAULTS = Counter::SW_ALIGNMENT_FAULTS; + static const Counter SW_EMULATION_FAULTS = Counter::SW_EMULATION_FAULTS; + static const Counter SW_DUMMY = Counter::SW_DUMMY; + static const Counter HW_CPU_CYCLES = Counter::HW_CPU_CYCLES; + static const Counter HW_INSTRUCTIONS = Counter::HW_INSTRUCTIONS; + static const Counter HW_CACHE_REFERENCES = Counter::HW_CACHE_REFERENCES; + static const Counter HW_CACHE_MISSES = Counter::HW_CACHE_MISSES; + static const Counter HW_BRANCH_INSTRUCTIONS = Counter::HW_BRANCH_INSTRUCTIONS; + static const Counter HW_BRANCH_MISSES = Counter::HW_BRANCH_MISSES; + static const Counter HW_BUS_CYCLES = Counter::HW_BUS_CYCLES; + static const Counter HW_STALLED_CYCLES_FRONTEND = Counter::HW_STALLED_CYCLES_FRONTEND; + static const Counter HW_STALLED_CYCLES_BACKEND = Counter::HW_STALLED_CYCLES_BACKEND; + static const Counter HW_REF_CPU_CYCLES = Counter::HW_REF_CPU_CYCLES; + static const PerfClock UNKNOWN_PERF_CLOCK = PerfClock::UNKNOWN_PERF_CLOCK; + static const PerfClock PERF_CLOCK_REALTIME = PerfClock::PERF_CLOCK_REALTIME; + static const PerfClock PERF_CLOCK_MONOTONIC = PerfClock::PERF_CLOCK_MONOTONIC; + static const PerfClock PERF_CLOCK_MONOTONIC_RAW = PerfClock::PERF_CLOCK_MONOTONIC_RAW; + static const PerfClock PERF_CLOCK_BOOTTIME = PerfClock::PERF_CLOCK_BOOTTIME; }; class PerfEvents_RawEvent_Decoder : public ::protozero::TypedProtoDecoder { @@ -25960,14 +26865,7 @@ class PerfEvents_RawEvent : public ::protozero::Message { uint32_t, PerfEvents_RawEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Type kType() { return {}; } + static constexpr FieldMetadata_Type kType{}; void set_type(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Type::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -25985,14 +26883,7 @@ class PerfEvents_RawEvent : public ::protozero::Message { uint64_t, PerfEvents_RawEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Config kConfig() { return {}; } + static constexpr FieldMetadata_Config kConfig{}; void set_config(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Config::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -26010,14 +26901,7 @@ class PerfEvents_RawEvent : public ::protozero::Message { uint64_t, PerfEvents_RawEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Config1 kConfig1() { return {}; } + static constexpr FieldMetadata_Config1 kConfig1{}; void set_config1(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Config1::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -26035,14 +26919,7 @@ class PerfEvents_RawEvent : public ::protozero::Message { uint64_t, PerfEvents_RawEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Config2 kConfig2() { return {}; } + static constexpr FieldMetadata_Config2 kConfig2{}; void set_config2(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Config2::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -26082,17 +26959,13 @@ class PerfEvents_Tracepoint : public ::protozero::Message { std::string, PerfEvents_Tracepoint>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Name kName() { return {}; } + static constexpr FieldMetadata_Name kName{}; void set_name(const char* data, size_t size) { AppendBytes(FieldMetadata_Name::kFieldId, data, size); } + void set_name(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Name::kFieldId, chars.data, chars.size); + } void set_name(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Name::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -26110,17 +26983,13 @@ class PerfEvents_Tracepoint : public ::protozero::Message { std::string, PerfEvents_Tracepoint>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Filter kFilter() { return {}; } + static constexpr FieldMetadata_Filter kFilter{}; void set_filter(const char* data, size_t size) { AppendBytes(FieldMetadata_Filter::kFieldId, data, size); } + void set_filter(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Filter::kFieldId, chars.data, chars.size); + } void set_filter(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Filter::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -26175,14 +27044,7 @@ class PerfEvents_Timebase : public ::protozero::Message { uint64_t, PerfEvents_Timebase>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Frequency kFrequency() { return {}; } + static constexpr FieldMetadata_Frequency kFrequency{}; void set_frequency(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Frequency::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -26200,14 +27062,7 @@ class PerfEvents_Timebase : public ::protozero::Message { uint64_t, PerfEvents_Timebase>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Period kPeriod() { return {}; } + static constexpr FieldMetadata_Period kPeriod{}; void set_period(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Period::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -26225,14 +27080,7 @@ class PerfEvents_Timebase : public ::protozero::Message { ::perfetto::protos::pbzero::PerfEvents_Counter, PerfEvents_Timebase>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Counter kCounter() { return {}; } + static constexpr FieldMetadata_Counter kCounter{}; void set_counter(::perfetto::protos::pbzero::PerfEvents_Counter value) { static constexpr uint32_t field_id = FieldMetadata_Counter::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -26250,14 +27098,7 @@ class PerfEvents_Timebase : public ::protozero::Message { PerfEvents_Tracepoint, PerfEvents_Timebase>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Tracepoint kTracepoint() { return {}; } + static constexpr FieldMetadata_Tracepoint kTracepoint{}; template T* set_tracepoint() { return BeginNestedMessage(3); } @@ -26271,14 +27112,7 @@ class PerfEvents_Timebase : public ::protozero::Message { PerfEvents_RawEvent, PerfEvents_Timebase>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_RawEvent kRawEvent() { return {}; } + static constexpr FieldMetadata_RawEvent kRawEvent{}; template T* set_raw_event() { return BeginNestedMessage(5); } @@ -26292,14 +27126,7 @@ class PerfEvents_Timebase : public ::protozero::Message { ::perfetto::protos::pbzero::PerfEvents_PerfClock, PerfEvents_Timebase>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_TimestampClock kTimestampClock() { return {}; } + static constexpr FieldMetadata_TimestampClock kTimestampClock{}; void set_timestamp_clock(::perfetto::protos::pbzero::PerfEvents_PerfClock value) { static constexpr uint32_t field_id = FieldMetadata_TimestampClock::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -26317,17 +27144,13 @@ class PerfEvents_Timebase : public ::protozero::Message { std::string, PerfEvents_Timebase>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Name kName() { return {}; } + static constexpr FieldMetadata_Name kName{}; void set_name(const char* data, size_t size) { AppendBytes(FieldMetadata_Name::kFieldId, data, size); } + void set_name(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Name::kFieldId, chars.data, chars.size); + } void set_name(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Name::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -26399,8 +27222,117 @@ enum MeminfoCounters : int32_t { MEMINFO_CMA_FREE = 33, }; -const MeminfoCounters MeminfoCounters_MIN = MEMINFO_UNSPECIFIED; -const MeminfoCounters MeminfoCounters_MAX = MEMINFO_CMA_FREE; +constexpr MeminfoCounters MeminfoCounters_MIN = MeminfoCounters::MEMINFO_UNSPECIFIED; +constexpr MeminfoCounters MeminfoCounters_MAX = MeminfoCounters::MEMINFO_CMA_FREE; + + +PERFETTO_PROTOZERO_CONSTEXPR14_OR_INLINE +const char* MeminfoCounters_Name(::perfetto::protos::pbzero::MeminfoCounters value) { + switch (value) { + case ::perfetto::protos::pbzero::MeminfoCounters::MEMINFO_UNSPECIFIED: + return "MEMINFO_UNSPECIFIED"; + + case ::perfetto::protos::pbzero::MeminfoCounters::MEMINFO_MEM_TOTAL: + return "MEMINFO_MEM_TOTAL"; + + case ::perfetto::protos::pbzero::MeminfoCounters::MEMINFO_MEM_FREE: + return "MEMINFO_MEM_FREE"; + + case ::perfetto::protos::pbzero::MeminfoCounters::MEMINFO_MEM_AVAILABLE: + return "MEMINFO_MEM_AVAILABLE"; + + case ::perfetto::protos::pbzero::MeminfoCounters::MEMINFO_BUFFERS: + return "MEMINFO_BUFFERS"; + + case ::perfetto::protos::pbzero::MeminfoCounters::MEMINFO_CACHED: + return "MEMINFO_CACHED"; + + case ::perfetto::protos::pbzero::MeminfoCounters::MEMINFO_SWAP_CACHED: + return "MEMINFO_SWAP_CACHED"; + + case ::perfetto::protos::pbzero::MeminfoCounters::MEMINFO_ACTIVE: + return "MEMINFO_ACTIVE"; + + case ::perfetto::protos::pbzero::MeminfoCounters::MEMINFO_INACTIVE: + return "MEMINFO_INACTIVE"; + + case ::perfetto::protos::pbzero::MeminfoCounters::MEMINFO_ACTIVE_ANON: + return "MEMINFO_ACTIVE_ANON"; + + case ::perfetto::protos::pbzero::MeminfoCounters::MEMINFO_INACTIVE_ANON: + return "MEMINFO_INACTIVE_ANON"; + + case ::perfetto::protos::pbzero::MeminfoCounters::MEMINFO_ACTIVE_FILE: + return "MEMINFO_ACTIVE_FILE"; + + case ::perfetto::protos::pbzero::MeminfoCounters::MEMINFO_INACTIVE_FILE: + return "MEMINFO_INACTIVE_FILE"; + + case ::perfetto::protos::pbzero::MeminfoCounters::MEMINFO_UNEVICTABLE: + return "MEMINFO_UNEVICTABLE"; + + case ::perfetto::protos::pbzero::MeminfoCounters::MEMINFO_MLOCKED: + return "MEMINFO_MLOCKED"; + + case ::perfetto::protos::pbzero::MeminfoCounters::MEMINFO_SWAP_TOTAL: + return "MEMINFO_SWAP_TOTAL"; + + case ::perfetto::protos::pbzero::MeminfoCounters::MEMINFO_SWAP_FREE: + return "MEMINFO_SWAP_FREE"; + + case ::perfetto::protos::pbzero::MeminfoCounters::MEMINFO_DIRTY: + return "MEMINFO_DIRTY"; + + case ::perfetto::protos::pbzero::MeminfoCounters::MEMINFO_WRITEBACK: + return "MEMINFO_WRITEBACK"; + + case ::perfetto::protos::pbzero::MeminfoCounters::MEMINFO_ANON_PAGES: + return "MEMINFO_ANON_PAGES"; + + case ::perfetto::protos::pbzero::MeminfoCounters::MEMINFO_MAPPED: + return "MEMINFO_MAPPED"; + + case ::perfetto::protos::pbzero::MeminfoCounters::MEMINFO_SHMEM: + return "MEMINFO_SHMEM"; + + case ::perfetto::protos::pbzero::MeminfoCounters::MEMINFO_SLAB: + return "MEMINFO_SLAB"; + + case ::perfetto::protos::pbzero::MeminfoCounters::MEMINFO_SLAB_RECLAIMABLE: + return "MEMINFO_SLAB_RECLAIMABLE"; + + case ::perfetto::protos::pbzero::MeminfoCounters::MEMINFO_SLAB_UNRECLAIMABLE: + return "MEMINFO_SLAB_UNRECLAIMABLE"; + + case ::perfetto::protos::pbzero::MeminfoCounters::MEMINFO_KERNEL_STACK: + return "MEMINFO_KERNEL_STACK"; + + case ::perfetto::protos::pbzero::MeminfoCounters::MEMINFO_PAGE_TABLES: + return "MEMINFO_PAGE_TABLES"; + + case ::perfetto::protos::pbzero::MeminfoCounters::MEMINFO_COMMIT_LIMIT: + return "MEMINFO_COMMIT_LIMIT"; + + case ::perfetto::protos::pbzero::MeminfoCounters::MEMINFO_COMMITED_AS: + return "MEMINFO_COMMITED_AS"; + + case ::perfetto::protos::pbzero::MeminfoCounters::MEMINFO_VMALLOC_TOTAL: + return "MEMINFO_VMALLOC_TOTAL"; + + case ::perfetto::protos::pbzero::MeminfoCounters::MEMINFO_VMALLOC_USED: + return "MEMINFO_VMALLOC_USED"; + + case ::perfetto::protos::pbzero::MeminfoCounters::MEMINFO_VMALLOC_CHUNK: + return "MEMINFO_VMALLOC_CHUNK"; + + case ::perfetto::protos::pbzero::MeminfoCounters::MEMINFO_CMA_TOTAL: + return "MEMINFO_CMA_TOTAL"; + + case ::perfetto::protos::pbzero::MeminfoCounters::MEMINFO_CMA_FREE: + return "MEMINFO_CMA_FREE"; + } + return "PBZERO_UNKNOWN_ENUM_VALUE"; +} enum VmstatCounters : int32_t { VMSTAT_UNSPECIFIED = 0, @@ -26534,8 +27466,402 @@ enum VmstatCounters : int32_t { VMSTAT_WORKINGSET_RESTORE = 128, }; -const VmstatCounters VmstatCounters_MIN = VMSTAT_UNSPECIFIED; -const VmstatCounters VmstatCounters_MAX = VMSTAT_WORKINGSET_RESTORE; +constexpr VmstatCounters VmstatCounters_MIN = VmstatCounters::VMSTAT_UNSPECIFIED; +constexpr VmstatCounters VmstatCounters_MAX = VmstatCounters::VMSTAT_WORKINGSET_RESTORE; + + +PERFETTO_PROTOZERO_CONSTEXPR14_OR_INLINE +const char* VmstatCounters_Name(::perfetto::protos::pbzero::VmstatCounters value) { + switch (value) { + case ::perfetto::protos::pbzero::VmstatCounters::VMSTAT_UNSPECIFIED: + return "VMSTAT_UNSPECIFIED"; + + case ::perfetto::protos::pbzero::VmstatCounters::VMSTAT_NR_FREE_PAGES: + return "VMSTAT_NR_FREE_PAGES"; + + case ::perfetto::protos::pbzero::VmstatCounters::VMSTAT_NR_ALLOC_BATCH: + return "VMSTAT_NR_ALLOC_BATCH"; + + case ::perfetto::protos::pbzero::VmstatCounters::VMSTAT_NR_INACTIVE_ANON: + return "VMSTAT_NR_INACTIVE_ANON"; + + case ::perfetto::protos::pbzero::VmstatCounters::VMSTAT_NR_ACTIVE_ANON: + return "VMSTAT_NR_ACTIVE_ANON"; + + case ::perfetto::protos::pbzero::VmstatCounters::VMSTAT_NR_INACTIVE_FILE: + return "VMSTAT_NR_INACTIVE_FILE"; + + case ::perfetto::protos::pbzero::VmstatCounters::VMSTAT_NR_ACTIVE_FILE: + return "VMSTAT_NR_ACTIVE_FILE"; + + case ::perfetto::protos::pbzero::VmstatCounters::VMSTAT_NR_UNEVICTABLE: + return "VMSTAT_NR_UNEVICTABLE"; + + case ::perfetto::protos::pbzero::VmstatCounters::VMSTAT_NR_MLOCK: + return "VMSTAT_NR_MLOCK"; + + case ::perfetto::protos::pbzero::VmstatCounters::VMSTAT_NR_ANON_PAGES: + return "VMSTAT_NR_ANON_PAGES"; + + case ::perfetto::protos::pbzero::VmstatCounters::VMSTAT_NR_MAPPED: + return "VMSTAT_NR_MAPPED"; + + case ::perfetto::protos::pbzero::VmstatCounters::VMSTAT_NR_FILE_PAGES: + return "VMSTAT_NR_FILE_PAGES"; + + case ::perfetto::protos::pbzero::VmstatCounters::VMSTAT_NR_DIRTY: + return "VMSTAT_NR_DIRTY"; + + case ::perfetto::protos::pbzero::VmstatCounters::VMSTAT_NR_WRITEBACK: + return "VMSTAT_NR_WRITEBACK"; + + case ::perfetto::protos::pbzero::VmstatCounters::VMSTAT_NR_SLAB_RECLAIMABLE: + return "VMSTAT_NR_SLAB_RECLAIMABLE"; + + case ::perfetto::protos::pbzero::VmstatCounters::VMSTAT_NR_SLAB_UNRECLAIMABLE: + return "VMSTAT_NR_SLAB_UNRECLAIMABLE"; + + case ::perfetto::protos::pbzero::VmstatCounters::VMSTAT_NR_PAGE_TABLE_PAGES: + return "VMSTAT_NR_PAGE_TABLE_PAGES"; + + case ::perfetto::protos::pbzero::VmstatCounters::VMSTAT_NR_KERNEL_STACK: + return "VMSTAT_NR_KERNEL_STACK"; + + case ::perfetto::protos::pbzero::VmstatCounters::VMSTAT_NR_OVERHEAD: + return "VMSTAT_NR_OVERHEAD"; + + case ::perfetto::protos::pbzero::VmstatCounters::VMSTAT_NR_UNSTABLE: + return "VMSTAT_NR_UNSTABLE"; + + case ::perfetto::protos::pbzero::VmstatCounters::VMSTAT_NR_BOUNCE: + return "VMSTAT_NR_BOUNCE"; + + case ::perfetto::protos::pbzero::VmstatCounters::VMSTAT_NR_VMSCAN_WRITE: + return "VMSTAT_NR_VMSCAN_WRITE"; + + case ::perfetto::protos::pbzero::VmstatCounters::VMSTAT_NR_VMSCAN_IMMEDIATE_RECLAIM: + return "VMSTAT_NR_VMSCAN_IMMEDIATE_RECLAIM"; + + case ::perfetto::protos::pbzero::VmstatCounters::VMSTAT_NR_WRITEBACK_TEMP: + return "VMSTAT_NR_WRITEBACK_TEMP"; + + case ::perfetto::protos::pbzero::VmstatCounters::VMSTAT_NR_ISOLATED_ANON: + return "VMSTAT_NR_ISOLATED_ANON"; + + case ::perfetto::protos::pbzero::VmstatCounters::VMSTAT_NR_ISOLATED_FILE: + return "VMSTAT_NR_ISOLATED_FILE"; + + case ::perfetto::protos::pbzero::VmstatCounters::VMSTAT_NR_SHMEM: + return "VMSTAT_NR_SHMEM"; + + case ::perfetto::protos::pbzero::VmstatCounters::VMSTAT_NR_DIRTIED: + return "VMSTAT_NR_DIRTIED"; + + case ::perfetto::protos::pbzero::VmstatCounters::VMSTAT_NR_WRITTEN: + return "VMSTAT_NR_WRITTEN"; + + case ::perfetto::protos::pbzero::VmstatCounters::VMSTAT_NR_PAGES_SCANNED: + return "VMSTAT_NR_PAGES_SCANNED"; + + case ::perfetto::protos::pbzero::VmstatCounters::VMSTAT_WORKINGSET_REFAULT: + return "VMSTAT_WORKINGSET_REFAULT"; + + case ::perfetto::protos::pbzero::VmstatCounters::VMSTAT_WORKINGSET_ACTIVATE: + return "VMSTAT_WORKINGSET_ACTIVATE"; + + case ::perfetto::protos::pbzero::VmstatCounters::VMSTAT_WORKINGSET_NODERECLAIM: + return "VMSTAT_WORKINGSET_NODERECLAIM"; + + case ::perfetto::protos::pbzero::VmstatCounters::VMSTAT_NR_ANON_TRANSPARENT_HUGEPAGES: + return "VMSTAT_NR_ANON_TRANSPARENT_HUGEPAGES"; + + case ::perfetto::protos::pbzero::VmstatCounters::VMSTAT_NR_FREE_CMA: + return "VMSTAT_NR_FREE_CMA"; + + case ::perfetto::protos::pbzero::VmstatCounters::VMSTAT_NR_SWAPCACHE: + return "VMSTAT_NR_SWAPCACHE"; + + case ::perfetto::protos::pbzero::VmstatCounters::VMSTAT_NR_DIRTY_THRESHOLD: + return "VMSTAT_NR_DIRTY_THRESHOLD"; + + case ::perfetto::protos::pbzero::VmstatCounters::VMSTAT_NR_DIRTY_BACKGROUND_THRESHOLD: + return "VMSTAT_NR_DIRTY_BACKGROUND_THRESHOLD"; + + case ::perfetto::protos::pbzero::VmstatCounters::VMSTAT_PGPGIN: + return "VMSTAT_PGPGIN"; + + case ::perfetto::protos::pbzero::VmstatCounters::VMSTAT_PGPGOUT: + return "VMSTAT_PGPGOUT"; + + case ::perfetto::protos::pbzero::VmstatCounters::VMSTAT_PGPGOUTCLEAN: + return "VMSTAT_PGPGOUTCLEAN"; + + case ::perfetto::protos::pbzero::VmstatCounters::VMSTAT_PSWPIN: + return "VMSTAT_PSWPIN"; + + case ::perfetto::protos::pbzero::VmstatCounters::VMSTAT_PSWPOUT: + return "VMSTAT_PSWPOUT"; + + case ::perfetto::protos::pbzero::VmstatCounters::VMSTAT_PGALLOC_DMA: + return "VMSTAT_PGALLOC_DMA"; + + case ::perfetto::protos::pbzero::VmstatCounters::VMSTAT_PGALLOC_NORMAL: + return "VMSTAT_PGALLOC_NORMAL"; + + case ::perfetto::protos::pbzero::VmstatCounters::VMSTAT_PGALLOC_MOVABLE: + return "VMSTAT_PGALLOC_MOVABLE"; + + case ::perfetto::protos::pbzero::VmstatCounters::VMSTAT_PGFREE: + return "VMSTAT_PGFREE"; + + case ::perfetto::protos::pbzero::VmstatCounters::VMSTAT_PGACTIVATE: + return "VMSTAT_PGACTIVATE"; + + case ::perfetto::protos::pbzero::VmstatCounters::VMSTAT_PGDEACTIVATE: + return "VMSTAT_PGDEACTIVATE"; + + case ::perfetto::protos::pbzero::VmstatCounters::VMSTAT_PGFAULT: + return "VMSTAT_PGFAULT"; + + case ::perfetto::protos::pbzero::VmstatCounters::VMSTAT_PGMAJFAULT: + return "VMSTAT_PGMAJFAULT"; + + case ::perfetto::protos::pbzero::VmstatCounters::VMSTAT_PGREFILL_DMA: + return "VMSTAT_PGREFILL_DMA"; + + case ::perfetto::protos::pbzero::VmstatCounters::VMSTAT_PGREFILL_NORMAL: + return "VMSTAT_PGREFILL_NORMAL"; + + case ::perfetto::protos::pbzero::VmstatCounters::VMSTAT_PGREFILL_MOVABLE: + return "VMSTAT_PGREFILL_MOVABLE"; + + case ::perfetto::protos::pbzero::VmstatCounters::VMSTAT_PGSTEAL_KSWAPD_DMA: + return "VMSTAT_PGSTEAL_KSWAPD_DMA"; + + case ::perfetto::protos::pbzero::VmstatCounters::VMSTAT_PGSTEAL_KSWAPD_NORMAL: + return "VMSTAT_PGSTEAL_KSWAPD_NORMAL"; + + case ::perfetto::protos::pbzero::VmstatCounters::VMSTAT_PGSTEAL_KSWAPD_MOVABLE: + return "VMSTAT_PGSTEAL_KSWAPD_MOVABLE"; + + case ::perfetto::protos::pbzero::VmstatCounters::VMSTAT_PGSTEAL_DIRECT_DMA: + return "VMSTAT_PGSTEAL_DIRECT_DMA"; + + case ::perfetto::protos::pbzero::VmstatCounters::VMSTAT_PGSTEAL_DIRECT_NORMAL: + return "VMSTAT_PGSTEAL_DIRECT_NORMAL"; + + case ::perfetto::protos::pbzero::VmstatCounters::VMSTAT_PGSTEAL_DIRECT_MOVABLE: + return "VMSTAT_PGSTEAL_DIRECT_MOVABLE"; + + case ::perfetto::protos::pbzero::VmstatCounters::VMSTAT_PGSCAN_KSWAPD_DMA: + return "VMSTAT_PGSCAN_KSWAPD_DMA"; + + case ::perfetto::protos::pbzero::VmstatCounters::VMSTAT_PGSCAN_KSWAPD_NORMAL: + return "VMSTAT_PGSCAN_KSWAPD_NORMAL"; + + case ::perfetto::protos::pbzero::VmstatCounters::VMSTAT_PGSCAN_KSWAPD_MOVABLE: + return "VMSTAT_PGSCAN_KSWAPD_MOVABLE"; + + case ::perfetto::protos::pbzero::VmstatCounters::VMSTAT_PGSCAN_DIRECT_DMA: + return "VMSTAT_PGSCAN_DIRECT_DMA"; + + case ::perfetto::protos::pbzero::VmstatCounters::VMSTAT_PGSCAN_DIRECT_NORMAL: + return "VMSTAT_PGSCAN_DIRECT_NORMAL"; + + case ::perfetto::protos::pbzero::VmstatCounters::VMSTAT_PGSCAN_DIRECT_MOVABLE: + return "VMSTAT_PGSCAN_DIRECT_MOVABLE"; + + case ::perfetto::protos::pbzero::VmstatCounters::VMSTAT_PGSCAN_DIRECT_THROTTLE: + return "VMSTAT_PGSCAN_DIRECT_THROTTLE"; + + case ::perfetto::protos::pbzero::VmstatCounters::VMSTAT_PGINODESTEAL: + return "VMSTAT_PGINODESTEAL"; + + case ::perfetto::protos::pbzero::VmstatCounters::VMSTAT_SLABS_SCANNED: + return "VMSTAT_SLABS_SCANNED"; + + case ::perfetto::protos::pbzero::VmstatCounters::VMSTAT_KSWAPD_INODESTEAL: + return "VMSTAT_KSWAPD_INODESTEAL"; + + case ::perfetto::protos::pbzero::VmstatCounters::VMSTAT_KSWAPD_LOW_WMARK_HIT_QUICKLY: + return "VMSTAT_KSWAPD_LOW_WMARK_HIT_QUICKLY"; + + case ::perfetto::protos::pbzero::VmstatCounters::VMSTAT_KSWAPD_HIGH_WMARK_HIT_QUICKLY: + return "VMSTAT_KSWAPD_HIGH_WMARK_HIT_QUICKLY"; + + case ::perfetto::protos::pbzero::VmstatCounters::VMSTAT_PAGEOUTRUN: + return "VMSTAT_PAGEOUTRUN"; + + case ::perfetto::protos::pbzero::VmstatCounters::VMSTAT_ALLOCSTALL: + return "VMSTAT_ALLOCSTALL"; + + case ::perfetto::protos::pbzero::VmstatCounters::VMSTAT_PGROTATED: + return "VMSTAT_PGROTATED"; + + case ::perfetto::protos::pbzero::VmstatCounters::VMSTAT_DROP_PAGECACHE: + return "VMSTAT_DROP_PAGECACHE"; + + case ::perfetto::protos::pbzero::VmstatCounters::VMSTAT_DROP_SLAB: + return "VMSTAT_DROP_SLAB"; + + case ::perfetto::protos::pbzero::VmstatCounters::VMSTAT_PGMIGRATE_SUCCESS: + return "VMSTAT_PGMIGRATE_SUCCESS"; + + case ::perfetto::protos::pbzero::VmstatCounters::VMSTAT_PGMIGRATE_FAIL: + return "VMSTAT_PGMIGRATE_FAIL"; + + case ::perfetto::protos::pbzero::VmstatCounters::VMSTAT_COMPACT_MIGRATE_SCANNED: + return "VMSTAT_COMPACT_MIGRATE_SCANNED"; + + case ::perfetto::protos::pbzero::VmstatCounters::VMSTAT_COMPACT_FREE_SCANNED: + return "VMSTAT_COMPACT_FREE_SCANNED"; + + case ::perfetto::protos::pbzero::VmstatCounters::VMSTAT_COMPACT_ISOLATED: + return "VMSTAT_COMPACT_ISOLATED"; + + case ::perfetto::protos::pbzero::VmstatCounters::VMSTAT_COMPACT_STALL: + return "VMSTAT_COMPACT_STALL"; + + case ::perfetto::protos::pbzero::VmstatCounters::VMSTAT_COMPACT_FAIL: + return "VMSTAT_COMPACT_FAIL"; + + case ::perfetto::protos::pbzero::VmstatCounters::VMSTAT_COMPACT_SUCCESS: + return "VMSTAT_COMPACT_SUCCESS"; + + case ::perfetto::protos::pbzero::VmstatCounters::VMSTAT_COMPACT_DAEMON_WAKE: + return "VMSTAT_COMPACT_DAEMON_WAKE"; + + case ::perfetto::protos::pbzero::VmstatCounters::VMSTAT_UNEVICTABLE_PGS_CULLED: + return "VMSTAT_UNEVICTABLE_PGS_CULLED"; + + case ::perfetto::protos::pbzero::VmstatCounters::VMSTAT_UNEVICTABLE_PGS_SCANNED: + return "VMSTAT_UNEVICTABLE_PGS_SCANNED"; + + case ::perfetto::protos::pbzero::VmstatCounters::VMSTAT_UNEVICTABLE_PGS_RESCUED: + return "VMSTAT_UNEVICTABLE_PGS_RESCUED"; + + case ::perfetto::protos::pbzero::VmstatCounters::VMSTAT_UNEVICTABLE_PGS_MLOCKED: + return "VMSTAT_UNEVICTABLE_PGS_MLOCKED"; + + case ::perfetto::protos::pbzero::VmstatCounters::VMSTAT_UNEVICTABLE_PGS_MUNLOCKED: + return "VMSTAT_UNEVICTABLE_PGS_MUNLOCKED"; + + case ::perfetto::protos::pbzero::VmstatCounters::VMSTAT_UNEVICTABLE_PGS_CLEARED: + return "VMSTAT_UNEVICTABLE_PGS_CLEARED"; + + case ::perfetto::protos::pbzero::VmstatCounters::VMSTAT_UNEVICTABLE_PGS_STRANDED: + return "VMSTAT_UNEVICTABLE_PGS_STRANDED"; + + case ::perfetto::protos::pbzero::VmstatCounters::VMSTAT_NR_ZSPAGES: + return "VMSTAT_NR_ZSPAGES"; + + case ::perfetto::protos::pbzero::VmstatCounters::VMSTAT_NR_ION_HEAP: + return "VMSTAT_NR_ION_HEAP"; + + case ::perfetto::protos::pbzero::VmstatCounters::VMSTAT_NR_GPU_HEAP: + return "VMSTAT_NR_GPU_HEAP"; + + case ::perfetto::protos::pbzero::VmstatCounters::VMSTAT_ALLOCSTALL_DMA: + return "VMSTAT_ALLOCSTALL_DMA"; + + case ::perfetto::protos::pbzero::VmstatCounters::VMSTAT_ALLOCSTALL_MOVABLE: + return "VMSTAT_ALLOCSTALL_MOVABLE"; + + case ::perfetto::protos::pbzero::VmstatCounters::VMSTAT_ALLOCSTALL_NORMAL: + return "VMSTAT_ALLOCSTALL_NORMAL"; + + case ::perfetto::protos::pbzero::VmstatCounters::VMSTAT_COMPACT_DAEMON_FREE_SCANNED: + return "VMSTAT_COMPACT_DAEMON_FREE_SCANNED"; + + case ::perfetto::protos::pbzero::VmstatCounters::VMSTAT_COMPACT_DAEMON_MIGRATE_SCANNED: + return "VMSTAT_COMPACT_DAEMON_MIGRATE_SCANNED"; + + case ::perfetto::protos::pbzero::VmstatCounters::VMSTAT_NR_FASTRPC: + return "VMSTAT_NR_FASTRPC"; + + case ::perfetto::protos::pbzero::VmstatCounters::VMSTAT_NR_INDIRECTLY_RECLAIMABLE: + return "VMSTAT_NR_INDIRECTLY_RECLAIMABLE"; + + case ::perfetto::protos::pbzero::VmstatCounters::VMSTAT_NR_ION_HEAP_POOL: + return "VMSTAT_NR_ION_HEAP_POOL"; + + case ::perfetto::protos::pbzero::VmstatCounters::VMSTAT_NR_KERNEL_MISC_RECLAIMABLE: + return "VMSTAT_NR_KERNEL_MISC_RECLAIMABLE"; + + case ::perfetto::protos::pbzero::VmstatCounters::VMSTAT_NR_SHADOW_CALL_STACK_BYTES: + return "VMSTAT_NR_SHADOW_CALL_STACK_BYTES"; + + case ::perfetto::protos::pbzero::VmstatCounters::VMSTAT_NR_SHMEM_HUGEPAGES: + return "VMSTAT_NR_SHMEM_HUGEPAGES"; + + case ::perfetto::protos::pbzero::VmstatCounters::VMSTAT_NR_SHMEM_PMDMAPPED: + return "VMSTAT_NR_SHMEM_PMDMAPPED"; + + case ::perfetto::protos::pbzero::VmstatCounters::VMSTAT_NR_UNRECLAIMABLE_PAGES: + return "VMSTAT_NR_UNRECLAIMABLE_PAGES"; + + case ::perfetto::protos::pbzero::VmstatCounters::VMSTAT_NR_ZONE_ACTIVE_ANON: + return "VMSTAT_NR_ZONE_ACTIVE_ANON"; + + case ::perfetto::protos::pbzero::VmstatCounters::VMSTAT_NR_ZONE_ACTIVE_FILE: + return "VMSTAT_NR_ZONE_ACTIVE_FILE"; + + case ::perfetto::protos::pbzero::VmstatCounters::VMSTAT_NR_ZONE_INACTIVE_ANON: + return "VMSTAT_NR_ZONE_INACTIVE_ANON"; + + case ::perfetto::protos::pbzero::VmstatCounters::VMSTAT_NR_ZONE_INACTIVE_FILE: + return "VMSTAT_NR_ZONE_INACTIVE_FILE"; + + case ::perfetto::protos::pbzero::VmstatCounters::VMSTAT_NR_ZONE_UNEVICTABLE: + return "VMSTAT_NR_ZONE_UNEVICTABLE"; + + case ::perfetto::protos::pbzero::VmstatCounters::VMSTAT_NR_ZONE_WRITE_PENDING: + return "VMSTAT_NR_ZONE_WRITE_PENDING"; + + case ::perfetto::protos::pbzero::VmstatCounters::VMSTAT_OOM_KILL: + return "VMSTAT_OOM_KILL"; + + case ::perfetto::protos::pbzero::VmstatCounters::VMSTAT_PGLAZYFREE: + return "VMSTAT_PGLAZYFREE"; + + case ::perfetto::protos::pbzero::VmstatCounters::VMSTAT_PGLAZYFREED: + return "VMSTAT_PGLAZYFREED"; + + case ::perfetto::protos::pbzero::VmstatCounters::VMSTAT_PGREFILL: + return "VMSTAT_PGREFILL"; + + case ::perfetto::protos::pbzero::VmstatCounters::VMSTAT_PGSCAN_DIRECT: + return "VMSTAT_PGSCAN_DIRECT"; + + case ::perfetto::protos::pbzero::VmstatCounters::VMSTAT_PGSCAN_KSWAPD: + return "VMSTAT_PGSCAN_KSWAPD"; + + case ::perfetto::protos::pbzero::VmstatCounters::VMSTAT_PGSKIP_DMA: + return "VMSTAT_PGSKIP_DMA"; + + case ::perfetto::protos::pbzero::VmstatCounters::VMSTAT_PGSKIP_MOVABLE: + return "VMSTAT_PGSKIP_MOVABLE"; + + case ::perfetto::protos::pbzero::VmstatCounters::VMSTAT_PGSKIP_NORMAL: + return "VMSTAT_PGSKIP_NORMAL"; + + case ::perfetto::protos::pbzero::VmstatCounters::VMSTAT_PGSTEAL_DIRECT: + return "VMSTAT_PGSTEAL_DIRECT"; + + case ::perfetto::protos::pbzero::VmstatCounters::VMSTAT_PGSTEAL_KSWAPD: + return "VMSTAT_PGSTEAL_KSWAPD"; + + case ::perfetto::protos::pbzero::VmstatCounters::VMSTAT_SWAP_RA: + return "VMSTAT_SWAP_RA"; + + case ::perfetto::protos::pbzero::VmstatCounters::VMSTAT_SWAP_RA_HIT: + return "VMSTAT_SWAP_RA_HIT"; + + case ::perfetto::protos::pbzero::VmstatCounters::VMSTAT_WORKINGSET_RESTORE: + return "VMSTAT_WORKINGSET_RESTORE"; + } + return "PBZERO_UNKNOWN_ENUM_VALUE"; +} } // Namespace. } // Namespace. @@ -26562,24 +27888,52 @@ namespace pbzero { class TraceStats_BufferStats; class TraceStats_FilterStats; -enum TraceStats_FinalFlushOutcome : int32_t; +class TraceStats_WriterStats; +namespace perfetto_pbzero_enum_TraceStats { +enum FinalFlushOutcome : int32_t; +} // namespace perfetto_pbzero_enum_TraceStats +using TraceStats_FinalFlushOutcome = perfetto_pbzero_enum_TraceStats::FinalFlushOutcome; -enum TraceStats_FinalFlushOutcome : int32_t { - TraceStats_FinalFlushOutcome_FINAL_FLUSH_UNSPECIFIED = 0, - TraceStats_FinalFlushOutcome_FINAL_FLUSH_SUCCEEDED = 1, - TraceStats_FinalFlushOutcome_FINAL_FLUSH_FAILED = 2, +namespace perfetto_pbzero_enum_TraceStats { +enum FinalFlushOutcome : int32_t { + FINAL_FLUSH_UNSPECIFIED = 0, + FINAL_FLUSH_SUCCEEDED = 1, + FINAL_FLUSH_FAILED = 2, }; +} // namespace perfetto_pbzero_enum_TraceStats +using TraceStats_FinalFlushOutcome = perfetto_pbzero_enum_TraceStats::FinalFlushOutcome; -const TraceStats_FinalFlushOutcome TraceStats_FinalFlushOutcome_MIN = TraceStats_FinalFlushOutcome_FINAL_FLUSH_UNSPECIFIED; -const TraceStats_FinalFlushOutcome TraceStats_FinalFlushOutcome_MAX = TraceStats_FinalFlushOutcome_FINAL_FLUSH_FAILED; -class TraceStats_Decoder : public ::protozero::TypedProtoDecoder { +constexpr TraceStats_FinalFlushOutcome TraceStats_FinalFlushOutcome_MIN = TraceStats_FinalFlushOutcome::FINAL_FLUSH_UNSPECIFIED; +constexpr TraceStats_FinalFlushOutcome TraceStats_FinalFlushOutcome_MAX = TraceStats_FinalFlushOutcome::FINAL_FLUSH_FAILED; + + +PERFETTO_PROTOZERO_CONSTEXPR14_OR_INLINE +const char* TraceStats_FinalFlushOutcome_Name(::perfetto::protos::pbzero::TraceStats_FinalFlushOutcome value) { + switch (value) { + case ::perfetto::protos::pbzero::TraceStats_FinalFlushOutcome::FINAL_FLUSH_UNSPECIFIED: + return "FINAL_FLUSH_UNSPECIFIED"; + + case ::perfetto::protos::pbzero::TraceStats_FinalFlushOutcome::FINAL_FLUSH_SUCCEEDED: + return "FINAL_FLUSH_SUCCEEDED"; + + case ::perfetto::protos::pbzero::TraceStats_FinalFlushOutcome::FINAL_FLUSH_FAILED: + return "FINAL_FLUSH_FAILED"; + } + return "PBZERO_UNKNOWN_ENUM_VALUE"; +} + +class TraceStats_Decoder : public ::protozero::TypedProtoDecoder { public: TraceStats_Decoder(const uint8_t* data, size_t len) : TypedProtoDecoder(data, len) {} explicit TraceStats_Decoder(const std::string& raw) : TypedProtoDecoder(reinterpret_cast(raw.data()), raw.size()) {} explicit TraceStats_Decoder(const ::protozero::ConstBytes& raw) : TypedProtoDecoder(raw.data, raw.size) {} bool has_buffer_stats() const { return at<1>().valid(); } ::protozero::RepeatedFieldIterator<::protozero::ConstBytes> buffer_stats() const { return GetRepeated<::protozero::ConstBytes>(1); } + bool has_chunk_payload_histogram_def() const { return at<17>().valid(); } + ::protozero::RepeatedFieldIterator chunk_payload_histogram_def() const { return GetRepeated(17); } + bool has_writer_stats() const { return at<18>().valid(); } + ::protozero::RepeatedFieldIterator<::protozero::ConstBytes> writer_stats() const { return GetRepeated<::protozero::ConstBytes>(18); } bool has_producers_connected() const { return at<2>().valid(); } uint32_t producers_connected() const { return at<2>().as_uint32(); } bool has_producers_seen() const { return at<3>().valid(); } @@ -26615,6 +27969,8 @@ class TraceStats : public ::protozero::Message { using Decoder = TraceStats_Decoder; enum : int32_t { kBufferStatsFieldNumber = 1, + kChunkPayloadHistogramDefFieldNumber = 17, + kWriterStatsFieldNumber = 18, kProducersConnectedFieldNumber = 2, kProducersSeenFieldNumber = 3, kDataSourcesRegisteredFieldNumber = 4, @@ -26633,11 +27989,16 @@ class TraceStats : public ::protozero::Message { static constexpr const char* GetName() { return ".perfetto.protos.TraceStats"; } using BufferStats = ::perfetto::protos::pbzero::TraceStats_BufferStats; + using WriterStats = ::perfetto::protos::pbzero::TraceStats_WriterStats; using FilterStats = ::perfetto::protos::pbzero::TraceStats_FilterStats; + using FinalFlushOutcome = ::perfetto::protos::pbzero::TraceStats_FinalFlushOutcome; - static const FinalFlushOutcome FINAL_FLUSH_UNSPECIFIED = TraceStats_FinalFlushOutcome_FINAL_FLUSH_UNSPECIFIED; - static const FinalFlushOutcome FINAL_FLUSH_SUCCEEDED = TraceStats_FinalFlushOutcome_FINAL_FLUSH_SUCCEEDED; - static const FinalFlushOutcome FINAL_FLUSH_FAILED = TraceStats_FinalFlushOutcome_FINAL_FLUSH_FAILED; + static inline const char* FinalFlushOutcome_Name(FinalFlushOutcome value) { + return ::perfetto::protos::pbzero::TraceStats_FinalFlushOutcome_Name(value); + } + static const FinalFlushOutcome FINAL_FLUSH_UNSPECIFIED = FinalFlushOutcome::FINAL_FLUSH_UNSPECIFIED; + static const FinalFlushOutcome FINAL_FLUSH_SUCCEEDED = FinalFlushOutcome::FINAL_FLUSH_SUCCEEDED; + static const FinalFlushOutcome FINAL_FLUSH_FAILED = FinalFlushOutcome::FINAL_FLUSH_FAILED; using FieldMetadata_BufferStats = ::protozero::proto_utils::FieldMetadata< @@ -26647,19 +28008,44 @@ class TraceStats : public ::protozero::Message { TraceStats_BufferStats, TraceStats>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_BufferStats kBufferStats() { return {}; } + static constexpr FieldMetadata_BufferStats kBufferStats{}; template T* add_buffer_stats() { return BeginNestedMessage(1); } + using FieldMetadata_ChunkPayloadHistogramDef = + ::protozero::proto_utils::FieldMetadata< + 17, + ::protozero::proto_utils::RepetitionType::kRepeatedNotPacked, + ::protozero::proto_utils::ProtoSchemaType::kInt64, + int64_t, + TraceStats>; + + static constexpr FieldMetadata_ChunkPayloadHistogramDef kChunkPayloadHistogramDef{}; + void add_chunk_payload_histogram_def(int64_t value) { + static constexpr uint32_t field_id = FieldMetadata_ChunkPayloadHistogramDef::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kInt64> + ::Append(*this, field_id, value); + } + + using FieldMetadata_WriterStats = + ::protozero::proto_utils::FieldMetadata< + 18, + ::protozero::proto_utils::RepetitionType::kRepeatedNotPacked, + ::protozero::proto_utils::ProtoSchemaType::kMessage, + TraceStats_WriterStats, + TraceStats>; + + static constexpr FieldMetadata_WriterStats kWriterStats{}; + template T* add_writer_stats() { + return BeginNestedMessage(18); + } + + using FieldMetadata_ProducersConnected = ::protozero::proto_utils::FieldMetadata< 2, @@ -26668,14 +28054,7 @@ class TraceStats : public ::protozero::Message { uint32_t, TraceStats>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ProducersConnected kProducersConnected() { return {}; } + static constexpr FieldMetadata_ProducersConnected kProducersConnected{}; void set_producers_connected(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_ProducersConnected::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -26693,14 +28072,7 @@ class TraceStats : public ::protozero::Message { uint64_t, TraceStats>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ProducersSeen kProducersSeen() { return {}; } + static constexpr FieldMetadata_ProducersSeen kProducersSeen{}; void set_producers_seen(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_ProducersSeen::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -26718,14 +28090,7 @@ class TraceStats : public ::protozero::Message { uint32_t, TraceStats>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_DataSourcesRegistered kDataSourcesRegistered() { return {}; } + static constexpr FieldMetadata_DataSourcesRegistered kDataSourcesRegistered{}; void set_data_sources_registered(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_DataSourcesRegistered::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -26743,14 +28108,7 @@ class TraceStats : public ::protozero::Message { uint64_t, TraceStats>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_DataSourcesSeen kDataSourcesSeen() { return {}; } + static constexpr FieldMetadata_DataSourcesSeen kDataSourcesSeen{}; void set_data_sources_seen(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_DataSourcesSeen::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -26768,14 +28126,7 @@ class TraceStats : public ::protozero::Message { uint32_t, TraceStats>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_TracingSessions kTracingSessions() { return {}; } + static constexpr FieldMetadata_TracingSessions kTracingSessions{}; void set_tracing_sessions(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_TracingSessions::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -26793,14 +28144,7 @@ class TraceStats : public ::protozero::Message { uint32_t, TraceStats>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_TotalBuffers kTotalBuffers() { return {}; } + static constexpr FieldMetadata_TotalBuffers kTotalBuffers{}; void set_total_buffers(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_TotalBuffers::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -26818,14 +28162,7 @@ class TraceStats : public ::protozero::Message { uint64_t, TraceStats>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ChunksDiscarded kChunksDiscarded() { return {}; } + static constexpr FieldMetadata_ChunksDiscarded kChunksDiscarded{}; void set_chunks_discarded(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_ChunksDiscarded::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -26843,14 +28180,7 @@ class TraceStats : public ::protozero::Message { uint64_t, TraceStats>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_PatchesDiscarded kPatchesDiscarded() { return {}; } + static constexpr FieldMetadata_PatchesDiscarded kPatchesDiscarded{}; void set_patches_discarded(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_PatchesDiscarded::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -26868,14 +28198,7 @@ class TraceStats : public ::protozero::Message { uint64_t, TraceStats>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_InvalidPackets kInvalidPackets() { return {}; } + static constexpr FieldMetadata_InvalidPackets kInvalidPackets{}; void set_invalid_packets(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_InvalidPackets::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -26893,14 +28216,7 @@ class TraceStats : public ::protozero::Message { TraceStats_FilterStats, TraceStats>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_FilterStats kFilterStats() { return {}; } + static constexpr FieldMetadata_FilterStats kFilterStats{}; template T* set_filter_stats() { return BeginNestedMessage(11); } @@ -26914,14 +28230,7 @@ class TraceStats : public ::protozero::Message { uint64_t, TraceStats>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_FlushesRequested kFlushesRequested() { return {}; } + static constexpr FieldMetadata_FlushesRequested kFlushesRequested{}; void set_flushes_requested(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_FlushesRequested::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -26939,14 +28248,7 @@ class TraceStats : public ::protozero::Message { uint64_t, TraceStats>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_FlushesSucceeded kFlushesSucceeded() { return {}; } + static constexpr FieldMetadata_FlushesSucceeded kFlushesSucceeded{}; void set_flushes_succeeded(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_FlushesSucceeded::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -26964,14 +28266,7 @@ class TraceStats : public ::protozero::Message { uint64_t, TraceStats>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_FlushesFailed kFlushesFailed() { return {}; } + static constexpr FieldMetadata_FlushesFailed kFlushesFailed{}; void set_flushes_failed(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_FlushesFailed::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -26989,14 +28284,7 @@ class TraceStats : public ::protozero::Message { ::perfetto::protos::pbzero::TraceStats_FinalFlushOutcome, TraceStats>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_FinalFlushOutcome kFinalFlushOutcome() { return {}; } + static constexpr FieldMetadata_FinalFlushOutcome kFinalFlushOutcome{}; void set_final_flush_outcome(::perfetto::protos::pbzero::TraceStats_FinalFlushOutcome value) { static constexpr uint32_t field_id = FieldMetadata_FinalFlushOutcome::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -27042,14 +28330,7 @@ class TraceStats_FilterStats : public ::protozero::Message { uint64_t, TraceStats_FilterStats>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_InputPackets kInputPackets() { return {}; } + static constexpr FieldMetadata_InputPackets kInputPackets{}; void set_input_packets(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_InputPackets::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -27067,14 +28348,7 @@ class TraceStats_FilterStats : public ::protozero::Message { uint64_t, TraceStats_FilterStats>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_InputBytes kInputBytes() { return {}; } + static constexpr FieldMetadata_InputBytes kInputBytes{}; void set_input_bytes(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_InputBytes::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -27092,14 +28366,7 @@ class TraceStats_FilterStats : public ::protozero::Message { uint64_t, TraceStats_FilterStats>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_OutputBytes kOutputBytes() { return {}; } + static constexpr FieldMetadata_OutputBytes kOutputBytes{}; void set_output_bytes(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_OutputBytes::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -27117,14 +28384,7 @@ class TraceStats_FilterStats : public ::protozero::Message { uint64_t, TraceStats_FilterStats>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Errors kErrors() { return {}; } + static constexpr FieldMetadata_Errors kErrors{}; void set_errors(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Errors::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -27135,6 +28395,77 @@ class TraceStats_FilterStats : public ::protozero::Message { } }; +class TraceStats_WriterStats_Decoder : public ::protozero::TypedProtoDecoder { + public: + TraceStats_WriterStats_Decoder(const uint8_t* data, size_t len) : TypedProtoDecoder(data, len) {} + explicit TraceStats_WriterStats_Decoder(const std::string& raw) : TypedProtoDecoder(reinterpret_cast(raw.data()), raw.size()) {} + explicit TraceStats_WriterStats_Decoder(const ::protozero::ConstBytes& raw) : TypedProtoDecoder(raw.data, raw.size) {} + bool has_sequence_id() const { return at<1>().valid(); } + uint64_t sequence_id() const { return at<1>().as_uint64(); } + bool has_chunk_payload_histogram_counts() const { return at<2>().valid(); } + ::protozero::PackedRepeatedFieldIterator<::protozero::proto_utils::ProtoWireType::kVarInt, uint64_t> chunk_payload_histogram_counts(bool* parse_error_ptr) const { return GetPackedRepeated<::protozero::proto_utils::ProtoWireType::kVarInt, uint64_t>(2, parse_error_ptr); } + bool has_chunk_payload_histogram_sum() const { return at<3>().valid(); } + ::protozero::PackedRepeatedFieldIterator<::protozero::proto_utils::ProtoWireType::kVarInt, int64_t> chunk_payload_histogram_sum(bool* parse_error_ptr) const { return GetPackedRepeated<::protozero::proto_utils::ProtoWireType::kVarInt, int64_t>(3, parse_error_ptr); } +}; + +class TraceStats_WriterStats : public ::protozero::Message { + public: + using Decoder = TraceStats_WriterStats_Decoder; + enum : int32_t { + kSequenceIdFieldNumber = 1, + kChunkPayloadHistogramCountsFieldNumber = 2, + kChunkPayloadHistogramSumFieldNumber = 3, + }; + static constexpr const char* GetName() { return ".perfetto.protos.TraceStats.WriterStats"; } + + + using FieldMetadata_SequenceId = + ::protozero::proto_utils::FieldMetadata< + 1, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint64, + uint64_t, + TraceStats_WriterStats>; + + static constexpr FieldMetadata_SequenceId kSequenceId{}; + void set_sequence_id(uint64_t value) { + static constexpr uint32_t field_id = FieldMetadata_SequenceId::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint64> + ::Append(*this, field_id, value); + } + + using FieldMetadata_ChunkPayloadHistogramCounts = + ::protozero::proto_utils::FieldMetadata< + 2, + ::protozero::proto_utils::RepetitionType::kRepeatedPacked, + ::protozero::proto_utils::ProtoSchemaType::kUint64, + uint64_t, + TraceStats_WriterStats>; + + static constexpr FieldMetadata_ChunkPayloadHistogramCounts kChunkPayloadHistogramCounts{}; + void set_chunk_payload_histogram_counts(const ::protozero::PackedVarInt& packed_buffer) { + AppendBytes(FieldMetadata_ChunkPayloadHistogramCounts::kFieldId, packed_buffer.data(), + packed_buffer.size()); + } + + using FieldMetadata_ChunkPayloadHistogramSum = + ::protozero::proto_utils::FieldMetadata< + 3, + ::protozero::proto_utils::RepetitionType::kRepeatedPacked, + ::protozero::proto_utils::ProtoSchemaType::kInt64, + int64_t, + TraceStats_WriterStats>; + + static constexpr FieldMetadata_ChunkPayloadHistogramSum kChunkPayloadHistogramSum{}; + void set_chunk_payload_histogram_sum(const ::protozero::PackedVarInt& packed_buffer) { + AppendBytes(FieldMetadata_ChunkPayloadHistogramSum::kFieldId, packed_buffer.data(), + packed_buffer.size()); + } +}; + class TraceStats_BufferStats_Decoder : public ::protozero::TypedProtoDecoder { public: TraceStats_BufferStats_Decoder(const uint8_t* data, size_t len) : TypedProtoDecoder(data, len) {} @@ -27215,14 +28546,7 @@ class TraceStats_BufferStats : public ::protozero::Message { uint64_t, TraceStats_BufferStats>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_BufferSize kBufferSize() { return {}; } + static constexpr FieldMetadata_BufferSize kBufferSize{}; void set_buffer_size(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_BufferSize::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -27240,14 +28564,7 @@ class TraceStats_BufferStats : public ::protozero::Message { uint64_t, TraceStats_BufferStats>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_BytesWritten kBytesWritten() { return {}; } + static constexpr FieldMetadata_BytesWritten kBytesWritten{}; void set_bytes_written(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_BytesWritten::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -27265,14 +28582,7 @@ class TraceStats_BufferStats : public ::protozero::Message { uint64_t, TraceStats_BufferStats>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_BytesOverwritten kBytesOverwritten() { return {}; } + static constexpr FieldMetadata_BytesOverwritten kBytesOverwritten{}; void set_bytes_overwritten(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_BytesOverwritten::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -27290,14 +28600,7 @@ class TraceStats_BufferStats : public ::protozero::Message { uint64_t, TraceStats_BufferStats>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_BytesRead kBytesRead() { return {}; } + static constexpr FieldMetadata_BytesRead kBytesRead{}; void set_bytes_read(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_BytesRead::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -27315,14 +28618,7 @@ class TraceStats_BufferStats : public ::protozero::Message { uint64_t, TraceStats_BufferStats>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_PaddingBytesWritten kPaddingBytesWritten() { return {}; } + static constexpr FieldMetadata_PaddingBytesWritten kPaddingBytesWritten{}; void set_padding_bytes_written(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_PaddingBytesWritten::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -27340,14 +28636,7 @@ class TraceStats_BufferStats : public ::protozero::Message { uint64_t, TraceStats_BufferStats>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_PaddingBytesCleared kPaddingBytesCleared() { return {}; } + static constexpr FieldMetadata_PaddingBytesCleared kPaddingBytesCleared{}; void set_padding_bytes_cleared(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_PaddingBytesCleared::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -27365,14 +28654,7 @@ class TraceStats_BufferStats : public ::protozero::Message { uint64_t, TraceStats_BufferStats>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ChunksWritten kChunksWritten() { return {}; } + static constexpr FieldMetadata_ChunksWritten kChunksWritten{}; void set_chunks_written(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_ChunksWritten::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -27390,14 +28672,7 @@ class TraceStats_BufferStats : public ::protozero::Message { uint64_t, TraceStats_BufferStats>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ChunksRewritten kChunksRewritten() { return {}; } + static constexpr FieldMetadata_ChunksRewritten kChunksRewritten{}; void set_chunks_rewritten(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_ChunksRewritten::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -27415,14 +28690,7 @@ class TraceStats_BufferStats : public ::protozero::Message { uint64_t, TraceStats_BufferStats>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ChunksOverwritten kChunksOverwritten() { return {}; } + static constexpr FieldMetadata_ChunksOverwritten kChunksOverwritten{}; void set_chunks_overwritten(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_ChunksOverwritten::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -27440,14 +28708,7 @@ class TraceStats_BufferStats : public ::protozero::Message { uint64_t, TraceStats_BufferStats>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ChunksDiscarded kChunksDiscarded() { return {}; } + static constexpr FieldMetadata_ChunksDiscarded kChunksDiscarded{}; void set_chunks_discarded(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_ChunksDiscarded::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -27465,14 +28726,7 @@ class TraceStats_BufferStats : public ::protozero::Message { uint64_t, TraceStats_BufferStats>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ChunksRead kChunksRead() { return {}; } + static constexpr FieldMetadata_ChunksRead kChunksRead{}; void set_chunks_read(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_ChunksRead::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -27490,14 +28744,7 @@ class TraceStats_BufferStats : public ::protozero::Message { uint64_t, TraceStats_BufferStats>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ChunksCommittedOutOfOrder kChunksCommittedOutOfOrder() { return {}; } + static constexpr FieldMetadata_ChunksCommittedOutOfOrder kChunksCommittedOutOfOrder{}; void set_chunks_committed_out_of_order(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_ChunksCommittedOutOfOrder::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -27515,14 +28762,7 @@ class TraceStats_BufferStats : public ::protozero::Message { uint64_t, TraceStats_BufferStats>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_WriteWrapCount kWriteWrapCount() { return {}; } + static constexpr FieldMetadata_WriteWrapCount kWriteWrapCount{}; void set_write_wrap_count(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_WriteWrapCount::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -27540,14 +28780,7 @@ class TraceStats_BufferStats : public ::protozero::Message { uint64_t, TraceStats_BufferStats>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_PatchesSucceeded kPatchesSucceeded() { return {}; } + static constexpr FieldMetadata_PatchesSucceeded kPatchesSucceeded{}; void set_patches_succeeded(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_PatchesSucceeded::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -27565,14 +28798,7 @@ class TraceStats_BufferStats : public ::protozero::Message { uint64_t, TraceStats_BufferStats>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_PatchesFailed kPatchesFailed() { return {}; } + static constexpr FieldMetadata_PatchesFailed kPatchesFailed{}; void set_patches_failed(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_PatchesFailed::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -27590,14 +28816,7 @@ class TraceStats_BufferStats : public ::protozero::Message { uint64_t, TraceStats_BufferStats>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ReadaheadsSucceeded kReadaheadsSucceeded() { return {}; } + static constexpr FieldMetadata_ReadaheadsSucceeded kReadaheadsSucceeded{}; void set_readaheads_succeeded(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_ReadaheadsSucceeded::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -27615,14 +28834,7 @@ class TraceStats_BufferStats : public ::protozero::Message { uint64_t, TraceStats_BufferStats>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ReadaheadsFailed kReadaheadsFailed() { return {}; } + static constexpr FieldMetadata_ReadaheadsFailed kReadaheadsFailed{}; void set_readaheads_failed(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_ReadaheadsFailed::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -27640,14 +28852,7 @@ class TraceStats_BufferStats : public ::protozero::Message { uint64_t, TraceStats_BufferStats>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_AbiViolations kAbiViolations() { return {}; } + static constexpr FieldMetadata_AbiViolations kAbiViolations{}; void set_abi_violations(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_AbiViolations::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -27665,14 +28870,7 @@ class TraceStats_BufferStats : public ::protozero::Message { uint64_t, TraceStats_BufferStats>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_TraceWriterPacketLoss kTraceWriterPacketLoss() { return {}; } + static constexpr FieldMetadata_TraceWriterPacketLoss kTraceWriterPacketLoss{}; void set_trace_writer_packet_loss(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_TraceWriterPacketLoss::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -27706,7 +28904,10 @@ namespace perfetto { namespace protos { namespace pbzero { -enum ObservableEvents_Type : int32_t; +namespace perfetto_pbzero_enum_ObservableEvents { +enum Type : int32_t; +} // namespace perfetto_pbzero_enum_ObservableEvents +using ObservableEvents_Type = perfetto_pbzero_enum_ObservableEvents::Type; class TracingServiceCapabilities_Decoder : public ::protozero::TypedProtoDecoder { public: @@ -27740,14 +28941,7 @@ class TracingServiceCapabilities : public ::protozero::Message { bool, TracingServiceCapabilities>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_HasQueryCapabilities kHasQueryCapabilities() { return {}; } + static constexpr FieldMetadata_HasQueryCapabilities kHasQueryCapabilities{}; void set_has_query_capabilities(bool value) { static constexpr uint32_t field_id = FieldMetadata_HasQueryCapabilities::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -27765,14 +28959,7 @@ class TracingServiceCapabilities : public ::protozero::Message { ::perfetto::protos::pbzero::ObservableEvents_Type, TracingServiceCapabilities>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ObservableEvents kObservableEvents() { return {}; } + static constexpr FieldMetadata_ObservableEvents kObservableEvents{}; void add_observable_events(::perfetto::protos::pbzero::ObservableEvents_Type value) { static constexpr uint32_t field_id = FieldMetadata_ObservableEvents::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -27790,14 +28977,7 @@ class TracingServiceCapabilities : public ::protozero::Message { bool, TracingServiceCapabilities>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_HasTraceConfigOutputPath kHasTraceConfigOutputPath() { return {}; } + static constexpr FieldMetadata_HasTraceConfigOutputPath kHasTraceConfigOutputPath{}; void set_has_trace_config_output_path(bool value) { static constexpr uint32_t field_id = FieldMetadata_HasTraceConfigOutputPath::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -27883,14 +29063,7 @@ class TracingServiceState : public ::protozero::Message { TracingServiceState_Producer, TracingServiceState>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Producers kProducers() { return {}; } + static constexpr FieldMetadata_Producers kProducers{}; template T* add_producers() { return BeginNestedMessage(1); } @@ -27904,14 +29077,7 @@ class TracingServiceState : public ::protozero::Message { TracingServiceState_DataSource, TracingServiceState>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_DataSources kDataSources() { return {}; } + static constexpr FieldMetadata_DataSources kDataSources{}; template T* add_data_sources() { return BeginNestedMessage(2); } @@ -27925,14 +29091,7 @@ class TracingServiceState : public ::protozero::Message { TracingServiceState_TracingSession, TracingServiceState>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_TracingSessions kTracingSessions() { return {}; } + static constexpr FieldMetadata_TracingSessions kTracingSessions{}; template T* add_tracing_sessions() { return BeginNestedMessage(6); } @@ -27946,14 +29105,7 @@ class TracingServiceState : public ::protozero::Message { bool, TracingServiceState>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_SupportsTracingSessions kSupportsTracingSessions() { return {}; } + static constexpr FieldMetadata_SupportsTracingSessions kSupportsTracingSessions{}; void set_supports_tracing_sessions(bool value) { static constexpr uint32_t field_id = FieldMetadata_SupportsTracingSessions::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -27971,14 +29123,7 @@ class TracingServiceState : public ::protozero::Message { int32_t, TracingServiceState>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_NumSessions kNumSessions() { return {}; } + static constexpr FieldMetadata_NumSessions kNumSessions{}; void set_num_sessions(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_NumSessions::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -27996,14 +29141,7 @@ class TracingServiceState : public ::protozero::Message { int32_t, TracingServiceState>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_NumSessionsStarted kNumSessionsStarted() { return {}; } + static constexpr FieldMetadata_NumSessionsStarted kNumSessionsStarted{}; void set_num_sessions_started(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_NumSessionsStarted::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -28021,17 +29159,13 @@ class TracingServiceState : public ::protozero::Message { std::string, TracingServiceState>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_TracingServiceVersion kTracingServiceVersion() { return {}; } + static constexpr FieldMetadata_TracingServiceVersion kTracingServiceVersion{}; void set_tracing_service_version(const char* data, size_t size) { AppendBytes(FieldMetadata_TracingServiceVersion::kFieldId, data, size); } + void set_tracing_service_version(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_TracingServiceVersion::kFieldId, chars.data, chars.size); + } void set_tracing_service_version(std::string value) { static constexpr uint32_t field_id = FieldMetadata_TracingServiceVersion::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -28089,14 +29223,7 @@ class TracingServiceState_TracingSession : public ::protozero::Message { uint64_t, TracingServiceState_TracingSession>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Id kId() { return {}; } + static constexpr FieldMetadata_Id kId{}; void set_id(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Id::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -28114,14 +29241,7 @@ class TracingServiceState_TracingSession : public ::protozero::Message { int32_t, TracingServiceState_TracingSession>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ConsumerUid kConsumerUid() { return {}; } + static constexpr FieldMetadata_ConsumerUid kConsumerUid{}; void set_consumer_uid(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_ConsumerUid::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -28139,17 +29259,13 @@ class TracingServiceState_TracingSession : public ::protozero::Message { std::string, TracingServiceState_TracingSession>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_State kState() { return {}; } + static constexpr FieldMetadata_State kState{}; void set_state(const char* data, size_t size) { AppendBytes(FieldMetadata_State::kFieldId, data, size); } + void set_state(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_State::kFieldId, chars.data, chars.size); + } void set_state(std::string value) { static constexpr uint32_t field_id = FieldMetadata_State::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -28167,17 +29283,13 @@ class TracingServiceState_TracingSession : public ::protozero::Message { std::string, TracingServiceState_TracingSession>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_UniqueSessionName kUniqueSessionName() { return {}; } + static constexpr FieldMetadata_UniqueSessionName kUniqueSessionName{}; void set_unique_session_name(const char* data, size_t size) { AppendBytes(FieldMetadata_UniqueSessionName::kFieldId, data, size); } + void set_unique_session_name(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_UniqueSessionName::kFieldId, chars.data, chars.size); + } void set_unique_session_name(std::string value) { static constexpr uint32_t field_id = FieldMetadata_UniqueSessionName::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -28195,14 +29307,7 @@ class TracingServiceState_TracingSession : public ::protozero::Message { uint32_t, TracingServiceState_TracingSession>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_BufferSizeKb kBufferSizeKb() { return {}; } + static constexpr FieldMetadata_BufferSizeKb kBufferSizeKb{}; void add_buffer_size_kb(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_BufferSizeKb::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -28220,14 +29325,7 @@ class TracingServiceState_TracingSession : public ::protozero::Message { uint32_t, TracingServiceState_TracingSession>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_DurationMs kDurationMs() { return {}; } + static constexpr FieldMetadata_DurationMs kDurationMs{}; void set_duration_ms(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_DurationMs::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -28245,14 +29343,7 @@ class TracingServiceState_TracingSession : public ::protozero::Message { uint32_t, TracingServiceState_TracingSession>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_NumDataSources kNumDataSources() { return {}; } + static constexpr FieldMetadata_NumDataSources kNumDataSources{}; void set_num_data_sources(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_NumDataSources::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -28270,14 +29361,7 @@ class TracingServiceState_TracingSession : public ::protozero::Message { int64_t, TracingServiceState_TracingSession>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_StartRealtimeNs kStartRealtimeNs() { return {}; } + static constexpr FieldMetadata_StartRealtimeNs kStartRealtimeNs{}; void set_start_realtime_ns(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_StartRealtimeNs::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -28317,14 +29401,7 @@ class TracingServiceState_DataSource : public ::protozero::Message { DataSourceDescriptor, TracingServiceState_DataSource>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_DsDescriptor kDsDescriptor() { return {}; } + static constexpr FieldMetadata_DsDescriptor kDsDescriptor{}; template T* set_ds_descriptor() { return BeginNestedMessage(1); } @@ -28338,14 +29415,7 @@ class TracingServiceState_DataSource : public ::protozero::Message { int32_t, TracingServiceState_DataSource>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ProducerId kProducerId() { return {}; } + static constexpr FieldMetadata_ProducerId kProducerId{}; void set_producer_id(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_ProducerId::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -28394,14 +29464,7 @@ class TracingServiceState_Producer : public ::protozero::Message { int32_t, TracingServiceState_Producer>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Id kId() { return {}; } + static constexpr FieldMetadata_Id kId{}; void set_id(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Id::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -28419,17 +29482,13 @@ class TracingServiceState_Producer : public ::protozero::Message { std::string, TracingServiceState_Producer>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Name kName() { return {}; } + static constexpr FieldMetadata_Name kName{}; void set_name(const char* data, size_t size) { AppendBytes(FieldMetadata_Name::kFieldId, data, size); } + void set_name(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Name::kFieldId, chars.data, chars.size); + } void set_name(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Name::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -28447,14 +29506,7 @@ class TracingServiceState_Producer : public ::protozero::Message { int32_t, TracingServiceState_Producer>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Pid kPid() { return {}; } + static constexpr FieldMetadata_Pid kPid{}; void set_pid(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Pid::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -28472,14 +29524,7 @@ class TracingServiceState_Producer : public ::protozero::Message { int32_t, TracingServiceState_Producer>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Uid kUid() { return {}; } + static constexpr FieldMetadata_Uid kUid{}; void set_uid(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Uid::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -28497,17 +29542,13 @@ class TracingServiceState_Producer : public ::protozero::Message { std::string, TracingServiceState_Producer>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_SdkVersion kSdkVersion() { return {}; } + static constexpr FieldMetadata_SdkVersion kSdkVersion{}; void set_sdk_version(const char* data, size_t size) { AppendBytes(FieldMetadata_SdkVersion::kFieldId, data, size); } + void set_sdk_version(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_SdkVersion::kFieldId, chars.data, chars.size); + } void set_sdk_version(std::string value) { static constexpr uint32_t field_id = FieldMetadata_SdkVersion::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -28569,14 +29610,7 @@ class TrackEventDescriptor : public ::protozero::Message { TrackEventCategory, TrackEventDescriptor>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_AvailableCategories kAvailableCategories() { return {}; } + static constexpr FieldMetadata_AvailableCategories kAvailableCategories{}; template T* add_available_categories() { return BeginNestedMessage(1); } @@ -28615,17 +29649,13 @@ class TrackEventCategory : public ::protozero::Message { std::string, TrackEventCategory>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Name kName() { return {}; } + static constexpr FieldMetadata_Name kName{}; void set_name(const char* data, size_t size) { AppendBytes(FieldMetadata_Name::kFieldId, data, size); } + void set_name(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Name::kFieldId, chars.data, chars.size); + } void set_name(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Name::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -28643,17 +29673,13 @@ class TrackEventCategory : public ::protozero::Message { std::string, TrackEventCategory>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Description kDescription() { return {}; } + static constexpr FieldMetadata_Description kDescription{}; void set_description(const char* data, size_t size) { AppendBytes(FieldMetadata_Description::kFieldId, data, size); } + void set_description(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Description::kFieldId, chars.data, chars.size); + } void set_description(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Description::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -28671,17 +29697,13 @@ class TrackEventCategory : public ::protozero::Message { std::string, TrackEventCategory>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Tags kTags() { return {}; } + static constexpr FieldMetadata_Tags kTags{}; void add_tags(const char* data, size_t size) { AppendBytes(FieldMetadata_Tags::kFieldId, data, size); } + void add_tags(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Tags::kFieldId, chars.data, chars.size); + } void add_tags(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Tags::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -28872,17 +29894,13 @@ class AndroidGameInterventionListConfig : public ::protozero::Message { std::string, AndroidGameInterventionListConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_PackageNameFilter kPackageNameFilter() { return {}; } + static constexpr FieldMetadata_PackageNameFilter kPackageNameFilter{}; void add_package_name_filter(const char* data, size_t size) { AppendBytes(FieldMetadata_PackageNameFilter::kFieldId, data, size); } + void add_package_name_filter(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_PackageNameFilter::kFieldId, chars.data, chars.size); + } void add_package_name_filter(std::string value) { static constexpr uint32_t field_id = FieldMetadata_PackageNameFilter::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -28951,14 +29969,7 @@ class AndroidLogConfig : public ::protozero::Message { ::perfetto::protos::pbzero::AndroidLogId, AndroidLogConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_LogIds kLogIds() { return {}; } + static constexpr FieldMetadata_LogIds kLogIds{}; void add_log_ids(::perfetto::protos::pbzero::AndroidLogId value) { static constexpr uint32_t field_id = FieldMetadata_LogIds::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -28976,14 +29987,7 @@ class AndroidLogConfig : public ::protozero::Message { ::perfetto::protos::pbzero::AndroidLogPriority, AndroidLogConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_MinPrio kMinPrio() { return {}; } + static constexpr FieldMetadata_MinPrio kMinPrio{}; void set_min_prio(::perfetto::protos::pbzero::AndroidLogPriority value) { static constexpr uint32_t field_id = FieldMetadata_MinPrio::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -29001,17 +30005,13 @@ class AndroidLogConfig : public ::protozero::Message { std::string, AndroidLogConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_FilterTags kFilterTags() { return {}; } + static constexpr FieldMetadata_FilterTags kFilterTags{}; void add_filter_tags(const char* data, size_t size) { AppendBytes(FieldMetadata_FilterTags::kFieldId, data, size); } + void add_filter_tags(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_FilterTags::kFieldId, chars.data, chars.size); + } void add_filter_tags(std::string value) { static constexpr uint32_t field_id = FieldMetadata_FilterTags::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -29072,14 +30072,7 @@ class AndroidPolledStateConfig : public ::protozero::Message { uint32_t, AndroidPolledStateConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_PollMs kPollMs() { return {}; } + static constexpr FieldMetadata_PollMs kPollMs{}; void set_poll_ms(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_PollMs::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -29090,6 +30083,260 @@ class AndroidPolledStateConfig : public ::protozero::Message { } }; +} // Namespace. +} // Namespace. +} // Namespace. +#endif // Include guard. +// gen_amalgamated begin header: gen/protos/perfetto/config/android/android_system_property_config.pbzero.h +// Autogenerated by the ProtoZero compiler plugin. DO NOT EDIT. + +#ifndef PERFETTO_PROTOS_PROTOS_PERFETTO_CONFIG_ANDROID_ANDROID_SYSTEM_PROPERTY_CONFIG_PROTO_H_ +#define PERFETTO_PROTOS_PROTOS_PERFETTO_CONFIG_ANDROID_ANDROID_SYSTEM_PROPERTY_CONFIG_PROTO_H_ + +#include +#include + +// gen_amalgamated expanded: #include "perfetto/protozero/field_writer.h" +// gen_amalgamated expanded: #include "perfetto/protozero/message.h" +// gen_amalgamated expanded: #include "perfetto/protozero/packed_repeated_fields.h" +// gen_amalgamated expanded: #include "perfetto/protozero/proto_decoder.h" +// gen_amalgamated expanded: #include "perfetto/protozero/proto_utils.h" + +namespace perfetto { +namespace protos { +namespace pbzero { + + +class AndroidSystemPropertyConfig_Decoder : public ::protozero::TypedProtoDecoder { + public: + AndroidSystemPropertyConfig_Decoder(const uint8_t* data, size_t len) : TypedProtoDecoder(data, len) {} + explicit AndroidSystemPropertyConfig_Decoder(const std::string& raw) : TypedProtoDecoder(reinterpret_cast(raw.data()), raw.size()) {} + explicit AndroidSystemPropertyConfig_Decoder(const ::protozero::ConstBytes& raw) : TypedProtoDecoder(raw.data, raw.size) {} + bool has_poll_ms() const { return at<1>().valid(); } + uint32_t poll_ms() const { return at<1>().as_uint32(); } + bool has_property_name() const { return at<2>().valid(); } + ::protozero::RepeatedFieldIterator<::protozero::ConstChars> property_name() const { return GetRepeated<::protozero::ConstChars>(2); } +}; + +class AndroidSystemPropertyConfig : public ::protozero::Message { + public: + using Decoder = AndroidSystemPropertyConfig_Decoder; + enum : int32_t { + kPollMsFieldNumber = 1, + kPropertyNameFieldNumber = 2, + }; + static constexpr const char* GetName() { return ".perfetto.protos.AndroidSystemPropertyConfig"; } + + + using FieldMetadata_PollMs = + ::protozero::proto_utils::FieldMetadata< + 1, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint32, + uint32_t, + AndroidSystemPropertyConfig>; + + static constexpr FieldMetadata_PollMs kPollMs{}; + void set_poll_ms(uint32_t value) { + static constexpr uint32_t field_id = FieldMetadata_PollMs::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint32> + ::Append(*this, field_id, value); + } + + using FieldMetadata_PropertyName = + ::protozero::proto_utils::FieldMetadata< + 2, + ::protozero::proto_utils::RepetitionType::kRepeatedNotPacked, + ::protozero::proto_utils::ProtoSchemaType::kString, + std::string, + AndroidSystemPropertyConfig>; + + static constexpr FieldMetadata_PropertyName kPropertyName{}; + void add_property_name(const char* data, size_t size) { + AppendBytes(FieldMetadata_PropertyName::kFieldId, data, size); + } + void add_property_name(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_PropertyName::kFieldId, chars.data, chars.size); + } + void add_property_name(std::string value) { + static constexpr uint32_t field_id = FieldMetadata_PropertyName::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kString> + ::Append(*this, field_id, value); + } +}; + +} // Namespace. +} // Namespace. +} // Namespace. +#endif // Include guard. +// gen_amalgamated begin header: gen/protos/perfetto/config/android/network_trace_config.pbzero.h +// Autogenerated by the ProtoZero compiler plugin. DO NOT EDIT. + +#ifndef PERFETTO_PROTOS_PROTOS_PERFETTO_CONFIG_ANDROID_NETWORK_TRACE_CONFIG_PROTO_H_ +#define PERFETTO_PROTOS_PROTOS_PERFETTO_CONFIG_ANDROID_NETWORK_TRACE_CONFIG_PROTO_H_ + +#include +#include + +// gen_amalgamated expanded: #include "perfetto/protozero/field_writer.h" +// gen_amalgamated expanded: #include "perfetto/protozero/message.h" +// gen_amalgamated expanded: #include "perfetto/protozero/packed_repeated_fields.h" +// gen_amalgamated expanded: #include "perfetto/protozero/proto_decoder.h" +// gen_amalgamated expanded: #include "perfetto/protozero/proto_utils.h" + +namespace perfetto { +namespace protos { +namespace pbzero { + + +class NetworkPacketTraceConfig_Decoder : public ::protozero::TypedProtoDecoder { + public: + NetworkPacketTraceConfig_Decoder(const uint8_t* data, size_t len) : TypedProtoDecoder(data, len) {} + explicit NetworkPacketTraceConfig_Decoder(const std::string& raw) : TypedProtoDecoder(reinterpret_cast(raw.data()), raw.size()) {} + explicit NetworkPacketTraceConfig_Decoder(const ::protozero::ConstBytes& raw) : TypedProtoDecoder(raw.data, raw.size) {} + bool has_poll_ms() const { return at<1>().valid(); } + uint32_t poll_ms() const { return at<1>().as_uint32(); } + bool has_aggregation_threshold() const { return at<2>().valid(); } + uint32_t aggregation_threshold() const { return at<2>().as_uint32(); } + bool has_intern_limit() const { return at<3>().valid(); } + uint32_t intern_limit() const { return at<3>().as_uint32(); } + bool has_drop_local_port() const { return at<4>().valid(); } + bool drop_local_port() const { return at<4>().as_bool(); } + bool has_drop_remote_port() const { return at<5>().valid(); } + bool drop_remote_port() const { return at<5>().as_bool(); } + bool has_drop_tcp_flags() const { return at<6>().valid(); } + bool drop_tcp_flags() const { return at<6>().as_bool(); } +}; + +class NetworkPacketTraceConfig : public ::protozero::Message { + public: + using Decoder = NetworkPacketTraceConfig_Decoder; + enum : int32_t { + kPollMsFieldNumber = 1, + kAggregationThresholdFieldNumber = 2, + kInternLimitFieldNumber = 3, + kDropLocalPortFieldNumber = 4, + kDropRemotePortFieldNumber = 5, + kDropTcpFlagsFieldNumber = 6, + }; + static constexpr const char* GetName() { return ".perfetto.protos.NetworkPacketTraceConfig"; } + + + using FieldMetadata_PollMs = + ::protozero::proto_utils::FieldMetadata< + 1, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint32, + uint32_t, + NetworkPacketTraceConfig>; + + static constexpr FieldMetadata_PollMs kPollMs{}; + void set_poll_ms(uint32_t value) { + static constexpr uint32_t field_id = FieldMetadata_PollMs::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint32> + ::Append(*this, field_id, value); + } + + using FieldMetadata_AggregationThreshold = + ::protozero::proto_utils::FieldMetadata< + 2, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint32, + uint32_t, + NetworkPacketTraceConfig>; + + static constexpr FieldMetadata_AggregationThreshold kAggregationThreshold{}; + void set_aggregation_threshold(uint32_t value) { + static constexpr uint32_t field_id = FieldMetadata_AggregationThreshold::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint32> + ::Append(*this, field_id, value); + } + + using FieldMetadata_InternLimit = + ::protozero::proto_utils::FieldMetadata< + 3, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint32, + uint32_t, + NetworkPacketTraceConfig>; + + static constexpr FieldMetadata_InternLimit kInternLimit{}; + void set_intern_limit(uint32_t value) { + static constexpr uint32_t field_id = FieldMetadata_InternLimit::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint32> + ::Append(*this, field_id, value); + } + + using FieldMetadata_DropLocalPort = + ::protozero::proto_utils::FieldMetadata< + 4, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kBool, + bool, + NetworkPacketTraceConfig>; + + static constexpr FieldMetadata_DropLocalPort kDropLocalPort{}; + void set_drop_local_port(bool value) { + static constexpr uint32_t field_id = FieldMetadata_DropLocalPort::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kBool> + ::Append(*this, field_id, value); + } + + using FieldMetadata_DropRemotePort = + ::protozero::proto_utils::FieldMetadata< + 5, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kBool, + bool, + NetworkPacketTraceConfig>; + + static constexpr FieldMetadata_DropRemotePort kDropRemotePort{}; + void set_drop_remote_port(bool value) { + static constexpr uint32_t field_id = FieldMetadata_DropRemotePort::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kBool> + ::Append(*this, field_id, value); + } + + using FieldMetadata_DropTcpFlags = + ::protozero::proto_utils::FieldMetadata< + 6, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kBool, + bool, + NetworkPacketTraceConfig>; + + static constexpr FieldMetadata_DropTcpFlags kDropTcpFlags{}; + void set_drop_tcp_flags(bool value) { + static constexpr uint32_t field_id = FieldMetadata_DropTcpFlags::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kBool> + ::Append(*this, field_id, value); + } +}; + } // Namespace. } // Namespace. } // Namespace. @@ -29140,17 +30387,13 @@ class PackagesListConfig : public ::protozero::Message { std::string, PackagesListConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_PackageNameFilter kPackageNameFilter() { return {}; } + static constexpr FieldMetadata_PackageNameFilter kPackageNameFilter{}; void add_package_name_filter(const char* data, size_t size) { AppendBytes(FieldMetadata_PackageNameFilter::kFieldId, data, size); } + void add_package_name_filter(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_PackageNameFilter::kFieldId, chars.data, chars.size); + } void add_package_name_filter(std::string value) { static constexpr uint32_t field_id = FieldMetadata_PackageNameFilter::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -29185,8 +30428,44 @@ namespace protos { namespace pbzero { class FtraceConfig_CompactSchedConfig; +class FtraceConfig_PrintFilter; +class FtraceConfig_PrintFilter_Rule; +class FtraceConfig_PrintFilter_Rule_AtraceMessage; +namespace perfetto_pbzero_enum_FtraceConfig { +enum KsymsMemPolicy : int32_t; +} // namespace perfetto_pbzero_enum_FtraceConfig +using FtraceConfig_KsymsMemPolicy = perfetto_pbzero_enum_FtraceConfig::KsymsMemPolicy; -class FtraceConfig_Decoder : public ::protozero::TypedProtoDecoder { +namespace perfetto_pbzero_enum_FtraceConfig { +enum KsymsMemPolicy : int32_t { + KSYMS_UNSPECIFIED = 0, + KSYMS_CLEANUP_ON_STOP = 1, + KSYMS_RETAIN = 2, +}; +} // namespace perfetto_pbzero_enum_FtraceConfig +using FtraceConfig_KsymsMemPolicy = perfetto_pbzero_enum_FtraceConfig::KsymsMemPolicy; + + +constexpr FtraceConfig_KsymsMemPolicy FtraceConfig_KsymsMemPolicy_MIN = FtraceConfig_KsymsMemPolicy::KSYMS_UNSPECIFIED; +constexpr FtraceConfig_KsymsMemPolicy FtraceConfig_KsymsMemPolicy_MAX = FtraceConfig_KsymsMemPolicy::KSYMS_RETAIN; + + +PERFETTO_PROTOZERO_CONSTEXPR14_OR_INLINE +const char* FtraceConfig_KsymsMemPolicy_Name(::perfetto::protos::pbzero::FtraceConfig_KsymsMemPolicy value) { + switch (value) { + case ::perfetto::protos::pbzero::FtraceConfig_KsymsMemPolicy::KSYMS_UNSPECIFIED: + return "KSYMS_UNSPECIFIED"; + + case ::perfetto::protos::pbzero::FtraceConfig_KsymsMemPolicy::KSYMS_CLEANUP_ON_STOP: + return "KSYMS_CLEANUP_ON_STOP"; + + case ::perfetto::protos::pbzero::FtraceConfig_KsymsMemPolicy::KSYMS_RETAIN: + return "KSYMS_RETAIN"; + } + return "PBZERO_UNKNOWN_ENUM_VALUE"; +} + +class FtraceConfig_Decoder : public ::protozero::TypedProtoDecoder { public: FtraceConfig_Decoder(const uint8_t* data, size_t len) : TypedProtoDecoder(data, len) {} explicit FtraceConfig_Decoder(const std::string& raw) : TypedProtoDecoder(reinterpret_cast(raw.data()), raw.size()) {} @@ -29203,14 +30482,32 @@ class FtraceConfig_Decoder : public ::protozero::TypedProtoDecoder().as_uint32(); } bool has_compact_sched() const { return at<12>().valid(); } ::protozero::ConstBytes compact_sched() const { return at<12>().as_bytes(); } + bool has_print_filter() const { return at<22>().valid(); } + ::protozero::ConstBytes print_filter() const { return at<22>().as_bytes(); } bool has_symbolize_ksyms() const { return at<13>().valid(); } bool symbolize_ksyms() const { return at<13>().as_bool(); } + bool has_ksyms_mem_policy() const { return at<17>().valid(); } + int32_t ksyms_mem_policy() const { return at<17>().as_int32(); } bool has_initialize_ksyms_synchronously_for_testing() const { return at<14>().valid(); } bool initialize_ksyms_synchronously_for_testing() const { return at<14>().as_bool(); } bool has_throttle_rss_stat() const { return at<15>().valid(); } bool throttle_rss_stat() const { return at<15>().as_bool(); } bool has_disable_generic_events() const { return at<16>().valid(); } bool disable_generic_events() const { return at<16>().as_bool(); } + bool has_syscall_events() const { return at<18>().valid(); } + ::protozero::RepeatedFieldIterator<::protozero::ConstChars> syscall_events() const { return GetRepeated<::protozero::ConstChars>(18); } + bool has_enable_function_graph() const { return at<19>().valid(); } + bool enable_function_graph() const { return at<19>().as_bool(); } + bool has_function_filters() const { return at<20>().valid(); } + ::protozero::RepeatedFieldIterator<::protozero::ConstChars> function_filters() const { return GetRepeated<::protozero::ConstChars>(20); } + bool has_function_graph_roots() const { return at<21>().valid(); } + ::protozero::RepeatedFieldIterator<::protozero::ConstChars> function_graph_roots() const { return GetRepeated<::protozero::ConstChars>(21); } + bool has_preserve_ftrace_buffer() const { return at<23>().valid(); } + bool preserve_ftrace_buffer() const { return at<23>().as_bool(); } + bool has_use_monotonic_raw_clock() const { return at<24>().valid(); } + bool use_monotonic_raw_clock() const { return at<24>().as_bool(); } + bool has_instance_name() const { return at<25>().valid(); } + ::protozero::ConstChars instance_name() const { return at<25>().as_string(); } }; class FtraceConfig : public ::protozero::Message { @@ -29223,14 +30520,32 @@ class FtraceConfig : public ::protozero::Message { kBufferSizeKbFieldNumber = 10, kDrainPeriodMsFieldNumber = 11, kCompactSchedFieldNumber = 12, + kPrintFilterFieldNumber = 22, kSymbolizeKsymsFieldNumber = 13, + kKsymsMemPolicyFieldNumber = 17, kInitializeKsymsSynchronouslyForTestingFieldNumber = 14, kThrottleRssStatFieldNumber = 15, kDisableGenericEventsFieldNumber = 16, + kSyscallEventsFieldNumber = 18, + kEnableFunctionGraphFieldNumber = 19, + kFunctionFiltersFieldNumber = 20, + kFunctionGraphRootsFieldNumber = 21, + kPreserveFtraceBufferFieldNumber = 23, + kUseMonotonicRawClockFieldNumber = 24, + kInstanceNameFieldNumber = 25, }; static constexpr const char* GetName() { return ".perfetto.protos.FtraceConfig"; } using CompactSchedConfig = ::perfetto::protos::pbzero::FtraceConfig_CompactSchedConfig; + using PrintFilter = ::perfetto::protos::pbzero::FtraceConfig_PrintFilter; + + using KsymsMemPolicy = ::perfetto::protos::pbzero::FtraceConfig_KsymsMemPolicy; + static inline const char* KsymsMemPolicy_Name(KsymsMemPolicy value) { + return ::perfetto::protos::pbzero::FtraceConfig_KsymsMemPolicy_Name(value); + } + static const KsymsMemPolicy KSYMS_UNSPECIFIED = KsymsMemPolicy::KSYMS_UNSPECIFIED; + static const KsymsMemPolicy KSYMS_CLEANUP_ON_STOP = KsymsMemPolicy::KSYMS_CLEANUP_ON_STOP; + static const KsymsMemPolicy KSYMS_RETAIN = KsymsMemPolicy::KSYMS_RETAIN; using FieldMetadata_FtraceEvents = ::protozero::proto_utils::FieldMetadata< @@ -29240,17 +30555,13 @@ class FtraceConfig : public ::protozero::Message { std::string, FtraceConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_FtraceEvents kFtraceEvents() { return {}; } + static constexpr FieldMetadata_FtraceEvents kFtraceEvents{}; void add_ftrace_events(const char* data, size_t size) { AppendBytes(FieldMetadata_FtraceEvents::kFieldId, data, size); } + void add_ftrace_events(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_FtraceEvents::kFieldId, chars.data, chars.size); + } void add_ftrace_events(std::string value) { static constexpr uint32_t field_id = FieldMetadata_FtraceEvents::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -29268,17 +30579,13 @@ class FtraceConfig : public ::protozero::Message { std::string, FtraceConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_AtraceCategories kAtraceCategories() { return {}; } + static constexpr FieldMetadata_AtraceCategories kAtraceCategories{}; void add_atrace_categories(const char* data, size_t size) { AppendBytes(FieldMetadata_AtraceCategories::kFieldId, data, size); } + void add_atrace_categories(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_AtraceCategories::kFieldId, chars.data, chars.size); + } void add_atrace_categories(std::string value) { static constexpr uint32_t field_id = FieldMetadata_AtraceCategories::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -29296,17 +30603,13 @@ class FtraceConfig : public ::protozero::Message { std::string, FtraceConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_AtraceApps kAtraceApps() { return {}; } + static constexpr FieldMetadata_AtraceApps kAtraceApps{}; void add_atrace_apps(const char* data, size_t size) { AppendBytes(FieldMetadata_AtraceApps::kFieldId, data, size); } + void add_atrace_apps(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_AtraceApps::kFieldId, chars.data, chars.size); + } void add_atrace_apps(std::string value) { static constexpr uint32_t field_id = FieldMetadata_AtraceApps::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -29324,14 +30627,7 @@ class FtraceConfig : public ::protozero::Message { uint32_t, FtraceConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_BufferSizeKb kBufferSizeKb() { return {}; } + static constexpr FieldMetadata_BufferSizeKb kBufferSizeKb{}; void set_buffer_size_kb(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_BufferSizeKb::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -29349,14 +30645,7 @@ class FtraceConfig : public ::protozero::Message { uint32_t, FtraceConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_DrainPeriodMs kDrainPeriodMs() { return {}; } + static constexpr FieldMetadata_DrainPeriodMs kDrainPeriodMs{}; void set_drain_period_ms(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_DrainPeriodMs::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -29374,19 +30663,26 @@ class FtraceConfig : public ::protozero::Message { FtraceConfig_CompactSchedConfig, FtraceConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_CompactSched kCompactSched() { return {}; } + static constexpr FieldMetadata_CompactSched kCompactSched{}; template T* set_compact_sched() { return BeginNestedMessage(12); } + using FieldMetadata_PrintFilter = + ::protozero::proto_utils::FieldMetadata< + 22, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kMessage, + FtraceConfig_PrintFilter, + FtraceConfig>; + + static constexpr FieldMetadata_PrintFilter kPrintFilter{}; + template T* set_print_filter() { + return BeginNestedMessage(22); + } + + using FieldMetadata_SymbolizeKsyms = ::protozero::proto_utils::FieldMetadata< 13, @@ -29395,14 +30691,7 @@ class FtraceConfig : public ::protozero::Message { bool, FtraceConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_SymbolizeKsyms kSymbolizeKsyms() { return {}; } + static constexpr FieldMetadata_SymbolizeKsyms kSymbolizeKsyms{}; void set_symbolize_ksyms(bool value) { static constexpr uint32_t field_id = FieldMetadata_SymbolizeKsyms::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -29412,6 +30701,24 @@ class FtraceConfig : public ::protozero::Message { ::Append(*this, field_id, value); } + using FieldMetadata_KsymsMemPolicy = + ::protozero::proto_utils::FieldMetadata< + 17, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kEnum, + ::perfetto::protos::pbzero::FtraceConfig_KsymsMemPolicy, + FtraceConfig>; + + static constexpr FieldMetadata_KsymsMemPolicy kKsymsMemPolicy{}; + void set_ksyms_mem_policy(::perfetto::protos::pbzero::FtraceConfig_KsymsMemPolicy value) { + static constexpr uint32_t field_id = FieldMetadata_KsymsMemPolicy::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kEnum> + ::Append(*this, field_id, value); + } + using FieldMetadata_InitializeKsymsSynchronouslyForTesting = ::protozero::proto_utils::FieldMetadata< 14, @@ -29420,14 +30727,7 @@ class FtraceConfig : public ::protozero::Message { bool, FtraceConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_InitializeKsymsSynchronouslyForTesting kInitializeKsymsSynchronouslyForTesting() { return {}; } + static constexpr FieldMetadata_InitializeKsymsSynchronouslyForTesting kInitializeKsymsSynchronouslyForTesting{}; void set_initialize_ksyms_synchronously_for_testing(bool value) { static constexpr uint32_t field_id = FieldMetadata_InitializeKsymsSynchronouslyForTesting::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -29445,14 +30745,7 @@ class FtraceConfig : public ::protozero::Message { bool, FtraceConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ThrottleRssStat kThrottleRssStat() { return {}; } + static constexpr FieldMetadata_ThrottleRssStat kThrottleRssStat{}; void set_throttle_rss_stat(bool value) { static constexpr uint32_t field_id = FieldMetadata_ThrottleRssStat::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -29470,14 +30763,7 @@ class FtraceConfig : public ::protozero::Message { bool, FtraceConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_DisableGenericEvents kDisableGenericEvents() { return {}; } + static constexpr FieldMetadata_DisableGenericEvents kDisableGenericEvents{}; void set_disable_generic_events(bool value) { static constexpr uint32_t field_id = FieldMetadata_DisableGenericEvents::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -29486,6 +30772,342 @@ class FtraceConfig : public ::protozero::Message { ::protozero::proto_utils::ProtoSchemaType::kBool> ::Append(*this, field_id, value); } + + using FieldMetadata_SyscallEvents = + ::protozero::proto_utils::FieldMetadata< + 18, + ::protozero::proto_utils::RepetitionType::kRepeatedNotPacked, + ::protozero::proto_utils::ProtoSchemaType::kString, + std::string, + FtraceConfig>; + + static constexpr FieldMetadata_SyscallEvents kSyscallEvents{}; + void add_syscall_events(const char* data, size_t size) { + AppendBytes(FieldMetadata_SyscallEvents::kFieldId, data, size); + } + void add_syscall_events(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_SyscallEvents::kFieldId, chars.data, chars.size); + } + void add_syscall_events(std::string value) { + static constexpr uint32_t field_id = FieldMetadata_SyscallEvents::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kString> + ::Append(*this, field_id, value); + } + + using FieldMetadata_EnableFunctionGraph = + ::protozero::proto_utils::FieldMetadata< + 19, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kBool, + bool, + FtraceConfig>; + + static constexpr FieldMetadata_EnableFunctionGraph kEnableFunctionGraph{}; + void set_enable_function_graph(bool value) { + static constexpr uint32_t field_id = FieldMetadata_EnableFunctionGraph::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kBool> + ::Append(*this, field_id, value); + } + + using FieldMetadata_FunctionFilters = + ::protozero::proto_utils::FieldMetadata< + 20, + ::protozero::proto_utils::RepetitionType::kRepeatedNotPacked, + ::protozero::proto_utils::ProtoSchemaType::kString, + std::string, + FtraceConfig>; + + static constexpr FieldMetadata_FunctionFilters kFunctionFilters{}; + void add_function_filters(const char* data, size_t size) { + AppendBytes(FieldMetadata_FunctionFilters::kFieldId, data, size); + } + void add_function_filters(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_FunctionFilters::kFieldId, chars.data, chars.size); + } + void add_function_filters(std::string value) { + static constexpr uint32_t field_id = FieldMetadata_FunctionFilters::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kString> + ::Append(*this, field_id, value); + } + + using FieldMetadata_FunctionGraphRoots = + ::protozero::proto_utils::FieldMetadata< + 21, + ::protozero::proto_utils::RepetitionType::kRepeatedNotPacked, + ::protozero::proto_utils::ProtoSchemaType::kString, + std::string, + FtraceConfig>; + + static constexpr FieldMetadata_FunctionGraphRoots kFunctionGraphRoots{}; + void add_function_graph_roots(const char* data, size_t size) { + AppendBytes(FieldMetadata_FunctionGraphRoots::kFieldId, data, size); + } + void add_function_graph_roots(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_FunctionGraphRoots::kFieldId, chars.data, chars.size); + } + void add_function_graph_roots(std::string value) { + static constexpr uint32_t field_id = FieldMetadata_FunctionGraphRoots::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kString> + ::Append(*this, field_id, value); + } + + using FieldMetadata_PreserveFtraceBuffer = + ::protozero::proto_utils::FieldMetadata< + 23, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kBool, + bool, + FtraceConfig>; + + static constexpr FieldMetadata_PreserveFtraceBuffer kPreserveFtraceBuffer{}; + void set_preserve_ftrace_buffer(bool value) { + static constexpr uint32_t field_id = FieldMetadata_PreserveFtraceBuffer::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kBool> + ::Append(*this, field_id, value); + } + + using FieldMetadata_UseMonotonicRawClock = + ::protozero::proto_utils::FieldMetadata< + 24, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kBool, + bool, + FtraceConfig>; + + static constexpr FieldMetadata_UseMonotonicRawClock kUseMonotonicRawClock{}; + void set_use_monotonic_raw_clock(bool value) { + static constexpr uint32_t field_id = FieldMetadata_UseMonotonicRawClock::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kBool> + ::Append(*this, field_id, value); + } + + using FieldMetadata_InstanceName = + ::protozero::proto_utils::FieldMetadata< + 25, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kString, + std::string, + FtraceConfig>; + + static constexpr FieldMetadata_InstanceName kInstanceName{}; + void set_instance_name(const char* data, size_t size) { + AppendBytes(FieldMetadata_InstanceName::kFieldId, data, size); + } + void set_instance_name(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_InstanceName::kFieldId, chars.data, chars.size); + } + void set_instance_name(std::string value) { + static constexpr uint32_t field_id = FieldMetadata_InstanceName::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kString> + ::Append(*this, field_id, value); + } +}; + +class FtraceConfig_PrintFilter_Decoder : public ::protozero::TypedProtoDecoder { + public: + FtraceConfig_PrintFilter_Decoder(const uint8_t* data, size_t len) : TypedProtoDecoder(data, len) {} + explicit FtraceConfig_PrintFilter_Decoder(const std::string& raw) : TypedProtoDecoder(reinterpret_cast(raw.data()), raw.size()) {} + explicit FtraceConfig_PrintFilter_Decoder(const ::protozero::ConstBytes& raw) : TypedProtoDecoder(raw.data, raw.size) {} + bool has_rules() const { return at<1>().valid(); } + ::protozero::RepeatedFieldIterator<::protozero::ConstBytes> rules() const { return GetRepeated<::protozero::ConstBytes>(1); } +}; + +class FtraceConfig_PrintFilter : public ::protozero::Message { + public: + using Decoder = FtraceConfig_PrintFilter_Decoder; + enum : int32_t { + kRulesFieldNumber = 1, + }; + static constexpr const char* GetName() { return ".perfetto.protos.FtraceConfig.PrintFilter"; } + + using Rule = ::perfetto::protos::pbzero::FtraceConfig_PrintFilter_Rule; + + using FieldMetadata_Rules = + ::protozero::proto_utils::FieldMetadata< + 1, + ::protozero::proto_utils::RepetitionType::kRepeatedNotPacked, + ::protozero::proto_utils::ProtoSchemaType::kMessage, + FtraceConfig_PrintFilter_Rule, + FtraceConfig_PrintFilter>; + + static constexpr FieldMetadata_Rules kRules{}; + template T* add_rules() { + return BeginNestedMessage(1); + } + +}; + +class FtraceConfig_PrintFilter_Rule_Decoder : public ::protozero::TypedProtoDecoder { + public: + FtraceConfig_PrintFilter_Rule_Decoder(const uint8_t* data, size_t len) : TypedProtoDecoder(data, len) {} + explicit FtraceConfig_PrintFilter_Rule_Decoder(const std::string& raw) : TypedProtoDecoder(reinterpret_cast(raw.data()), raw.size()) {} + explicit FtraceConfig_PrintFilter_Rule_Decoder(const ::protozero::ConstBytes& raw) : TypedProtoDecoder(raw.data, raw.size) {} + bool has_prefix() const { return at<1>().valid(); } + ::protozero::ConstChars prefix() const { return at<1>().as_string(); } + bool has_atrace_msg() const { return at<3>().valid(); } + ::protozero::ConstBytes atrace_msg() const { return at<3>().as_bytes(); } + bool has_allow() const { return at<2>().valid(); } + bool allow() const { return at<2>().as_bool(); } +}; + +class FtraceConfig_PrintFilter_Rule : public ::protozero::Message { + public: + using Decoder = FtraceConfig_PrintFilter_Rule_Decoder; + enum : int32_t { + kPrefixFieldNumber = 1, + kAtraceMsgFieldNumber = 3, + kAllowFieldNumber = 2, + }; + static constexpr const char* GetName() { return ".perfetto.protos.FtraceConfig.PrintFilter.Rule"; } + + using AtraceMessage = ::perfetto::protos::pbzero::FtraceConfig_PrintFilter_Rule_AtraceMessage; + + using FieldMetadata_Prefix = + ::protozero::proto_utils::FieldMetadata< + 1, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kString, + std::string, + FtraceConfig_PrintFilter_Rule>; + + static constexpr FieldMetadata_Prefix kPrefix{}; + void set_prefix(const char* data, size_t size) { + AppendBytes(FieldMetadata_Prefix::kFieldId, data, size); + } + void set_prefix(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Prefix::kFieldId, chars.data, chars.size); + } + void set_prefix(std::string value) { + static constexpr uint32_t field_id = FieldMetadata_Prefix::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kString> + ::Append(*this, field_id, value); + } + + using FieldMetadata_AtraceMsg = + ::protozero::proto_utils::FieldMetadata< + 3, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kMessage, + FtraceConfig_PrintFilter_Rule_AtraceMessage, + FtraceConfig_PrintFilter_Rule>; + + static constexpr FieldMetadata_AtraceMsg kAtraceMsg{}; + template T* set_atrace_msg() { + return BeginNestedMessage(3); + } + + + using FieldMetadata_Allow = + ::protozero::proto_utils::FieldMetadata< + 2, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kBool, + bool, + FtraceConfig_PrintFilter_Rule>; + + static constexpr FieldMetadata_Allow kAllow{}; + void set_allow(bool value) { + static constexpr uint32_t field_id = FieldMetadata_Allow::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kBool> + ::Append(*this, field_id, value); + } +}; + +class FtraceConfig_PrintFilter_Rule_AtraceMessage_Decoder : public ::protozero::TypedProtoDecoder { + public: + FtraceConfig_PrintFilter_Rule_AtraceMessage_Decoder(const uint8_t* data, size_t len) : TypedProtoDecoder(data, len) {} + explicit FtraceConfig_PrintFilter_Rule_AtraceMessage_Decoder(const std::string& raw) : TypedProtoDecoder(reinterpret_cast(raw.data()), raw.size()) {} + explicit FtraceConfig_PrintFilter_Rule_AtraceMessage_Decoder(const ::protozero::ConstBytes& raw) : TypedProtoDecoder(raw.data, raw.size) {} + bool has_type() const { return at<1>().valid(); } + ::protozero::ConstChars type() const { return at<1>().as_string(); } + bool has_prefix() const { return at<2>().valid(); } + ::protozero::ConstChars prefix() const { return at<2>().as_string(); } +}; + +class FtraceConfig_PrintFilter_Rule_AtraceMessage : public ::protozero::Message { + public: + using Decoder = FtraceConfig_PrintFilter_Rule_AtraceMessage_Decoder; + enum : int32_t { + kTypeFieldNumber = 1, + kPrefixFieldNumber = 2, + }; + static constexpr const char* GetName() { return ".perfetto.protos.FtraceConfig.PrintFilter.Rule.AtraceMessage"; } + + + using FieldMetadata_Type = + ::protozero::proto_utils::FieldMetadata< + 1, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kString, + std::string, + FtraceConfig_PrintFilter_Rule_AtraceMessage>; + + static constexpr FieldMetadata_Type kType{}; + void set_type(const char* data, size_t size) { + AppendBytes(FieldMetadata_Type::kFieldId, data, size); + } + void set_type(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Type::kFieldId, chars.data, chars.size); + } + void set_type(std::string value) { + static constexpr uint32_t field_id = FieldMetadata_Type::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kString> + ::Append(*this, field_id, value); + } + + using FieldMetadata_Prefix = + ::protozero::proto_utils::FieldMetadata< + 2, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kString, + std::string, + FtraceConfig_PrintFilter_Rule_AtraceMessage>; + + static constexpr FieldMetadata_Prefix kPrefix{}; + void set_prefix(const char* data, size_t size) { + AppendBytes(FieldMetadata_Prefix::kFieldId, data, size); + } + void set_prefix(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Prefix::kFieldId, chars.data, chars.size); + } + void set_prefix(std::string value) { + static constexpr uint32_t field_id = FieldMetadata_Prefix::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kString> + ::Append(*this, field_id, value); + } }; class FtraceConfig_CompactSchedConfig_Decoder : public ::protozero::TypedProtoDecoder { @@ -29514,14 +31136,7 @@ class FtraceConfig_CompactSchedConfig : public ::protozero::Message { bool, FtraceConfig_CompactSchedConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Enabled kEnabled() { return {}; } + static constexpr FieldMetadata_Enabled kEnabled{}; void set_enabled(bool value) { static constexpr uint32_t field_id = FieldMetadata_Enabled::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -29591,14 +31206,7 @@ class GpuCounterConfig : public ::protozero::Message { uint64_t, GpuCounterConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_CounterPeriodNs kCounterPeriodNs() { return {}; } + static constexpr FieldMetadata_CounterPeriodNs kCounterPeriodNs{}; void set_counter_period_ns(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_CounterPeriodNs::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -29616,14 +31224,7 @@ class GpuCounterConfig : public ::protozero::Message { uint32_t, GpuCounterConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_CounterIds kCounterIds() { return {}; } + static constexpr FieldMetadata_CounterIds kCounterIds{}; void add_counter_ids(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_CounterIds::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -29641,14 +31242,7 @@ class GpuCounterConfig : public ::protozero::Message { bool, GpuCounterConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_InstrumentedSampling kInstrumentedSampling() { return {}; } + static constexpr FieldMetadata_InstrumentedSampling kInstrumentedSampling{}; void set_instrumented_sampling(bool value) { static constexpr uint32_t field_id = FieldMetadata_InstrumentedSampling::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -29666,14 +31260,7 @@ class GpuCounterConfig : public ::protozero::Message { bool, GpuCounterConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_FixGpuClock kFixGpuClock() { return {}; } + static constexpr FieldMetadata_FixGpuClock kFixGpuClock{}; void set_fix_gpu_clock(bool value) { static constexpr uint32_t field_id = FieldMetadata_FixGpuClock::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -29737,14 +31324,7 @@ class VulkanMemoryConfig : public ::protozero::Message { bool, VulkanMemoryConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_TrackDriverMemoryUsage kTrackDriverMemoryUsage() { return {}; } + static constexpr FieldMetadata_TrackDriverMemoryUsage kTrackDriverMemoryUsage{}; void set_track_driver_memory_usage(bool value) { static constexpr uint32_t field_id = FieldMetadata_TrackDriverMemoryUsage::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -29762,14 +31342,7 @@ class VulkanMemoryConfig : public ::protozero::Message { bool, VulkanMemoryConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_TrackDeviceMemoryUsage kTrackDeviceMemoryUsage() { return {}; } + static constexpr FieldMetadata_TrackDeviceMemoryUsage kTrackDeviceMemoryUsage{}; void set_track_device_memory_usage(bool value) { static constexpr uint32_t field_id = FieldMetadata_TrackDeviceMemoryUsage::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -29847,14 +31420,7 @@ class InodeFileConfig : public ::protozero::Message { uint32_t, InodeFileConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ScanIntervalMs kScanIntervalMs() { return {}; } + static constexpr FieldMetadata_ScanIntervalMs kScanIntervalMs{}; void set_scan_interval_ms(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_ScanIntervalMs::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -29872,14 +31438,7 @@ class InodeFileConfig : public ::protozero::Message { uint32_t, InodeFileConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ScanDelayMs kScanDelayMs() { return {}; } + static constexpr FieldMetadata_ScanDelayMs kScanDelayMs{}; void set_scan_delay_ms(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_ScanDelayMs::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -29897,14 +31456,7 @@ class InodeFileConfig : public ::protozero::Message { uint32_t, InodeFileConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ScanBatchSize kScanBatchSize() { return {}; } + static constexpr FieldMetadata_ScanBatchSize kScanBatchSize{}; void set_scan_batch_size(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_ScanBatchSize::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -29922,14 +31474,7 @@ class InodeFileConfig : public ::protozero::Message { bool, InodeFileConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_DoNotScan kDoNotScan() { return {}; } + static constexpr FieldMetadata_DoNotScan kDoNotScan{}; void set_do_not_scan(bool value) { static constexpr uint32_t field_id = FieldMetadata_DoNotScan::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -29947,17 +31492,13 @@ class InodeFileConfig : public ::protozero::Message { std::string, InodeFileConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ScanMountPoints kScanMountPoints() { return {}; } + static constexpr FieldMetadata_ScanMountPoints kScanMountPoints{}; void add_scan_mount_points(const char* data, size_t size) { AppendBytes(FieldMetadata_ScanMountPoints::kFieldId, data, size); } + void add_scan_mount_points(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_ScanMountPoints::kFieldId, chars.data, chars.size); + } void add_scan_mount_points(std::string value) { static constexpr uint32_t field_id = FieldMetadata_ScanMountPoints::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -29975,14 +31516,7 @@ class InodeFileConfig : public ::protozero::Message { InodeFileConfig_MountPointMappingEntry, InodeFileConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_MountPointMapping kMountPointMapping() { return {}; } + static constexpr FieldMetadata_MountPointMapping kMountPointMapping{}; template T* add_mount_point_mapping() { return BeginNestedMessage(6); } @@ -30018,17 +31552,13 @@ class InodeFileConfig_MountPointMappingEntry : public ::protozero::Message { std::string, InodeFileConfig_MountPointMappingEntry>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Mountpoint kMountpoint() { return {}; } + static constexpr FieldMetadata_Mountpoint kMountpoint{}; void set_mountpoint(const char* data, size_t size) { AppendBytes(FieldMetadata_Mountpoint::kFieldId, data, size); } + void set_mountpoint(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Mountpoint::kFieldId, chars.data, chars.size); + } void set_mountpoint(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Mountpoint::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -30046,17 +31576,13 @@ class InodeFileConfig_MountPointMappingEntry : public ::protozero::Message { std::string, InodeFileConfig_MountPointMappingEntry>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ScanRoots kScanRoots() { return {}; } + static constexpr FieldMetadata_ScanRoots kScanRoots{}; void add_scan_roots(const char* data, size_t size) { AppendBytes(FieldMetadata_ScanRoots::kFieldId, data, size); } + void add_scan_roots(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_ScanRoots::kFieldId, chars.data, chars.size); + } void add_scan_roots(std::string value) { static constexpr uint32_t field_id = FieldMetadata_ScanRoots::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -30090,16 +31616,39 @@ namespace perfetto { namespace protos { namespace pbzero { -enum ConsoleConfig_Output : int32_t; +namespace perfetto_pbzero_enum_ConsoleConfig { +enum Output : int32_t; +} // namespace perfetto_pbzero_enum_ConsoleConfig +using ConsoleConfig_Output = perfetto_pbzero_enum_ConsoleConfig::Output; -enum ConsoleConfig_Output : int32_t { - ConsoleConfig_Output_OUTPUT_UNSPECIFIED = 0, - ConsoleConfig_Output_OUTPUT_STDOUT = 1, - ConsoleConfig_Output_OUTPUT_STDERR = 2, +namespace perfetto_pbzero_enum_ConsoleConfig { +enum Output : int32_t { + OUTPUT_UNSPECIFIED = 0, + OUTPUT_STDOUT = 1, + OUTPUT_STDERR = 2, }; +} // namespace perfetto_pbzero_enum_ConsoleConfig +using ConsoleConfig_Output = perfetto_pbzero_enum_ConsoleConfig::Output; -const ConsoleConfig_Output ConsoleConfig_Output_MIN = ConsoleConfig_Output_OUTPUT_UNSPECIFIED; -const ConsoleConfig_Output ConsoleConfig_Output_MAX = ConsoleConfig_Output_OUTPUT_STDERR; + +constexpr ConsoleConfig_Output ConsoleConfig_Output_MIN = ConsoleConfig_Output::OUTPUT_UNSPECIFIED; +constexpr ConsoleConfig_Output ConsoleConfig_Output_MAX = ConsoleConfig_Output::OUTPUT_STDERR; + + +PERFETTO_PROTOZERO_CONSTEXPR14_OR_INLINE +const char* ConsoleConfig_Output_Name(::perfetto::protos::pbzero::ConsoleConfig_Output value) { + switch (value) { + case ::perfetto::protos::pbzero::ConsoleConfig_Output::OUTPUT_UNSPECIFIED: + return "OUTPUT_UNSPECIFIED"; + + case ::perfetto::protos::pbzero::ConsoleConfig_Output::OUTPUT_STDOUT: + return "OUTPUT_STDOUT"; + + case ::perfetto::protos::pbzero::ConsoleConfig_Output::OUTPUT_STDERR: + return "OUTPUT_STDERR"; + } + return "PBZERO_UNKNOWN_ENUM_VALUE"; +} class ConsoleConfig_Decoder : public ::protozero::TypedProtoDecoder { public: @@ -30121,10 +31670,14 @@ class ConsoleConfig : public ::protozero::Message { }; static constexpr const char* GetName() { return ".perfetto.protos.ConsoleConfig"; } + using Output = ::perfetto::protos::pbzero::ConsoleConfig_Output; - static const Output OUTPUT_UNSPECIFIED = ConsoleConfig_Output_OUTPUT_UNSPECIFIED; - static const Output OUTPUT_STDOUT = ConsoleConfig_Output_OUTPUT_STDOUT; - static const Output OUTPUT_STDERR = ConsoleConfig_Output_OUTPUT_STDERR; + static inline const char* Output_Name(Output value) { + return ::perfetto::protos::pbzero::ConsoleConfig_Output_Name(value); + } + static const Output OUTPUT_UNSPECIFIED = Output::OUTPUT_UNSPECIFIED; + static const Output OUTPUT_STDOUT = Output::OUTPUT_STDOUT; + static const Output OUTPUT_STDERR = Output::OUTPUT_STDERR; using FieldMetadata_Output = ::protozero::proto_utils::FieldMetadata< @@ -30134,14 +31687,7 @@ class ConsoleConfig : public ::protozero::Message { ::perfetto::protos::pbzero::ConsoleConfig_Output, ConsoleConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Output kOutput() { return {}; } + static constexpr FieldMetadata_Output kOutput{}; void set_output(::perfetto::protos::pbzero::ConsoleConfig_Output value) { static constexpr uint32_t field_id = FieldMetadata_Output::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -30159,14 +31705,7 @@ class ConsoleConfig : public ::protozero::Message { bool, ConsoleConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_EnableColors kEnableColors() { return {}; } + static constexpr FieldMetadata_EnableColors kEnableColors{}; void set_enable_colors(bool value) { static constexpr uint32_t field_id = FieldMetadata_EnableColors::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -30200,20 +31739,49 @@ namespace perfetto { namespace protos { namespace pbzero { -enum AndroidPowerConfig_BatteryCounters : int32_t; +namespace perfetto_pbzero_enum_AndroidPowerConfig { +enum BatteryCounters : int32_t; +} // namespace perfetto_pbzero_enum_AndroidPowerConfig +using AndroidPowerConfig_BatteryCounters = perfetto_pbzero_enum_AndroidPowerConfig::BatteryCounters; -enum AndroidPowerConfig_BatteryCounters : int32_t { - AndroidPowerConfig_BatteryCounters_BATTERY_COUNTER_UNSPECIFIED = 0, - AndroidPowerConfig_BatteryCounters_BATTERY_COUNTER_CHARGE = 1, - AndroidPowerConfig_BatteryCounters_BATTERY_COUNTER_CAPACITY_PERCENT = 2, - AndroidPowerConfig_BatteryCounters_BATTERY_COUNTER_CURRENT = 3, - AndroidPowerConfig_BatteryCounters_BATTERY_COUNTER_CURRENT_AVG = 4, +namespace perfetto_pbzero_enum_AndroidPowerConfig { +enum BatteryCounters : int32_t { + BATTERY_COUNTER_UNSPECIFIED = 0, + BATTERY_COUNTER_CHARGE = 1, + BATTERY_COUNTER_CAPACITY_PERCENT = 2, + BATTERY_COUNTER_CURRENT = 3, + BATTERY_COUNTER_CURRENT_AVG = 4, }; +} // namespace perfetto_pbzero_enum_AndroidPowerConfig +using AndroidPowerConfig_BatteryCounters = perfetto_pbzero_enum_AndroidPowerConfig::BatteryCounters; -const AndroidPowerConfig_BatteryCounters AndroidPowerConfig_BatteryCounters_MIN = AndroidPowerConfig_BatteryCounters_BATTERY_COUNTER_UNSPECIFIED; -const AndroidPowerConfig_BatteryCounters AndroidPowerConfig_BatteryCounters_MAX = AndroidPowerConfig_BatteryCounters_BATTERY_COUNTER_CURRENT_AVG; -class AndroidPowerConfig_Decoder : public ::protozero::TypedProtoDecoder { +constexpr AndroidPowerConfig_BatteryCounters AndroidPowerConfig_BatteryCounters_MIN = AndroidPowerConfig_BatteryCounters::BATTERY_COUNTER_UNSPECIFIED; +constexpr AndroidPowerConfig_BatteryCounters AndroidPowerConfig_BatteryCounters_MAX = AndroidPowerConfig_BatteryCounters::BATTERY_COUNTER_CURRENT_AVG; + + +PERFETTO_PROTOZERO_CONSTEXPR14_OR_INLINE +const char* AndroidPowerConfig_BatteryCounters_Name(::perfetto::protos::pbzero::AndroidPowerConfig_BatteryCounters value) { + switch (value) { + case ::perfetto::protos::pbzero::AndroidPowerConfig_BatteryCounters::BATTERY_COUNTER_UNSPECIFIED: + return "BATTERY_COUNTER_UNSPECIFIED"; + + case ::perfetto::protos::pbzero::AndroidPowerConfig_BatteryCounters::BATTERY_COUNTER_CHARGE: + return "BATTERY_COUNTER_CHARGE"; + + case ::perfetto::protos::pbzero::AndroidPowerConfig_BatteryCounters::BATTERY_COUNTER_CAPACITY_PERCENT: + return "BATTERY_COUNTER_CAPACITY_PERCENT"; + + case ::perfetto::protos::pbzero::AndroidPowerConfig_BatteryCounters::BATTERY_COUNTER_CURRENT: + return "BATTERY_COUNTER_CURRENT"; + + case ::perfetto::protos::pbzero::AndroidPowerConfig_BatteryCounters::BATTERY_COUNTER_CURRENT_AVG: + return "BATTERY_COUNTER_CURRENT_AVG"; + } + return "PBZERO_UNKNOWN_ENUM_VALUE"; +} + +class AndroidPowerConfig_Decoder : public ::protozero::TypedProtoDecoder { public: AndroidPowerConfig_Decoder(const uint8_t* data, size_t len) : TypedProtoDecoder(data, len) {} explicit AndroidPowerConfig_Decoder(const std::string& raw) : TypedProtoDecoder(reinterpret_cast(raw.data()), raw.size()) {} @@ -30226,6 +31794,8 @@ class AndroidPowerConfig_Decoder : public ::protozero::TypedProtoDecoder().as_bool(); } bool has_collect_energy_estimation_breakdown() const { return at<4>().valid(); } bool collect_energy_estimation_breakdown() const { return at<4>().as_bool(); } + bool has_collect_entity_state_residency() const { return at<5>().valid(); } + bool collect_entity_state_residency() const { return at<5>().as_bool(); } }; class AndroidPowerConfig : public ::protozero::Message { @@ -30236,15 +31806,20 @@ class AndroidPowerConfig : public ::protozero::Message { kBatteryCountersFieldNumber = 2, kCollectPowerRailsFieldNumber = 3, kCollectEnergyEstimationBreakdownFieldNumber = 4, + kCollectEntityStateResidencyFieldNumber = 5, }; static constexpr const char* GetName() { return ".perfetto.protos.AndroidPowerConfig"; } + using BatteryCounters = ::perfetto::protos::pbzero::AndroidPowerConfig_BatteryCounters; - static const BatteryCounters BATTERY_COUNTER_UNSPECIFIED = AndroidPowerConfig_BatteryCounters_BATTERY_COUNTER_UNSPECIFIED; - static const BatteryCounters BATTERY_COUNTER_CHARGE = AndroidPowerConfig_BatteryCounters_BATTERY_COUNTER_CHARGE; - static const BatteryCounters BATTERY_COUNTER_CAPACITY_PERCENT = AndroidPowerConfig_BatteryCounters_BATTERY_COUNTER_CAPACITY_PERCENT; - static const BatteryCounters BATTERY_COUNTER_CURRENT = AndroidPowerConfig_BatteryCounters_BATTERY_COUNTER_CURRENT; - static const BatteryCounters BATTERY_COUNTER_CURRENT_AVG = AndroidPowerConfig_BatteryCounters_BATTERY_COUNTER_CURRENT_AVG; + static inline const char* BatteryCounters_Name(BatteryCounters value) { + return ::perfetto::protos::pbzero::AndroidPowerConfig_BatteryCounters_Name(value); + } + static const BatteryCounters BATTERY_COUNTER_UNSPECIFIED = BatteryCounters::BATTERY_COUNTER_UNSPECIFIED; + static const BatteryCounters BATTERY_COUNTER_CHARGE = BatteryCounters::BATTERY_COUNTER_CHARGE; + static const BatteryCounters BATTERY_COUNTER_CAPACITY_PERCENT = BatteryCounters::BATTERY_COUNTER_CAPACITY_PERCENT; + static const BatteryCounters BATTERY_COUNTER_CURRENT = BatteryCounters::BATTERY_COUNTER_CURRENT; + static const BatteryCounters BATTERY_COUNTER_CURRENT_AVG = BatteryCounters::BATTERY_COUNTER_CURRENT_AVG; using FieldMetadata_BatteryPollMs = ::protozero::proto_utils::FieldMetadata< @@ -30254,14 +31829,7 @@ class AndroidPowerConfig : public ::protozero::Message { uint32_t, AndroidPowerConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_BatteryPollMs kBatteryPollMs() { return {}; } + static constexpr FieldMetadata_BatteryPollMs kBatteryPollMs{}; void set_battery_poll_ms(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_BatteryPollMs::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -30279,14 +31847,7 @@ class AndroidPowerConfig : public ::protozero::Message { ::perfetto::protos::pbzero::AndroidPowerConfig_BatteryCounters, AndroidPowerConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_BatteryCounters kBatteryCounters() { return {}; } + static constexpr FieldMetadata_BatteryCounters kBatteryCounters{}; void add_battery_counters(::perfetto::protos::pbzero::AndroidPowerConfig_BatteryCounters value) { static constexpr uint32_t field_id = FieldMetadata_BatteryCounters::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -30304,14 +31865,7 @@ class AndroidPowerConfig : public ::protozero::Message { bool, AndroidPowerConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_CollectPowerRails kCollectPowerRails() { return {}; } + static constexpr FieldMetadata_CollectPowerRails kCollectPowerRails{}; void set_collect_power_rails(bool value) { static constexpr uint32_t field_id = FieldMetadata_CollectPowerRails::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -30329,14 +31883,7 @@ class AndroidPowerConfig : public ::protozero::Message { bool, AndroidPowerConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_CollectEnergyEstimationBreakdown kCollectEnergyEstimationBreakdown() { return {}; } + static constexpr FieldMetadata_CollectEnergyEstimationBreakdown kCollectEnergyEstimationBreakdown{}; void set_collect_energy_estimation_breakdown(bool value) { static constexpr uint32_t field_id = FieldMetadata_CollectEnergyEstimationBreakdown::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -30345,6 +31892,24 @@ class AndroidPowerConfig : public ::protozero::Message { ::protozero::proto_utils::ProtoSchemaType::kBool> ::Append(*this, field_id, value); } + + using FieldMetadata_CollectEntityStateResidency = + ::protozero::proto_utils::FieldMetadata< + 5, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kBool, + bool, + AndroidPowerConfig>; + + static constexpr FieldMetadata_CollectEntityStateResidency kCollectEntityStateResidency{}; + void set_collect_entity_state_residency(bool value) { + static constexpr uint32_t field_id = FieldMetadata_CollectEntityStateResidency::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kBool> + ::Append(*this, field_id, value); + } }; } // Namespace. @@ -30370,18 +31935,41 @@ namespace perfetto { namespace protos { namespace pbzero { -enum ProcessStatsConfig_Quirks : int32_t; +namespace perfetto_pbzero_enum_ProcessStatsConfig { +enum Quirks : int32_t; +} // namespace perfetto_pbzero_enum_ProcessStatsConfig +using ProcessStatsConfig_Quirks = perfetto_pbzero_enum_ProcessStatsConfig::Quirks; -enum ProcessStatsConfig_Quirks : int32_t { - ProcessStatsConfig_Quirks_QUIRKS_UNSPECIFIED = 0, - ProcessStatsConfig_Quirks_DISABLE_INITIAL_DUMP = 1, - ProcessStatsConfig_Quirks_DISABLE_ON_DEMAND = 2, +namespace perfetto_pbzero_enum_ProcessStatsConfig { +enum Quirks : int32_t { + QUIRKS_UNSPECIFIED = 0, + DISABLE_INITIAL_DUMP = 1, + DISABLE_ON_DEMAND = 2, }; +} // namespace perfetto_pbzero_enum_ProcessStatsConfig +using ProcessStatsConfig_Quirks = perfetto_pbzero_enum_ProcessStatsConfig::Quirks; -const ProcessStatsConfig_Quirks ProcessStatsConfig_Quirks_MIN = ProcessStatsConfig_Quirks_QUIRKS_UNSPECIFIED; -const ProcessStatsConfig_Quirks ProcessStatsConfig_Quirks_MAX = ProcessStatsConfig_Quirks_DISABLE_ON_DEMAND; -class ProcessStatsConfig_Decoder : public ::protozero::TypedProtoDecoder { +constexpr ProcessStatsConfig_Quirks ProcessStatsConfig_Quirks_MIN = ProcessStatsConfig_Quirks::QUIRKS_UNSPECIFIED; +constexpr ProcessStatsConfig_Quirks ProcessStatsConfig_Quirks_MAX = ProcessStatsConfig_Quirks::DISABLE_ON_DEMAND; + + +PERFETTO_PROTOZERO_CONSTEXPR14_OR_INLINE +const char* ProcessStatsConfig_Quirks_Name(::perfetto::protos::pbzero::ProcessStatsConfig_Quirks value) { + switch (value) { + case ::perfetto::protos::pbzero::ProcessStatsConfig_Quirks::QUIRKS_UNSPECIFIED: + return "QUIRKS_UNSPECIFIED"; + + case ::perfetto::protos::pbzero::ProcessStatsConfig_Quirks::DISABLE_INITIAL_DUMP: + return "DISABLE_INITIAL_DUMP"; + + case ::perfetto::protos::pbzero::ProcessStatsConfig_Quirks::DISABLE_ON_DEMAND: + return "DISABLE_ON_DEMAND"; + } + return "PBZERO_UNKNOWN_ENUM_VALUE"; +} + +class ProcessStatsConfig_Decoder : public ::protozero::TypedProtoDecoder { public: ProcessStatsConfig_Decoder(const uint8_t* data, size_t len) : TypedProtoDecoder(data, len) {} explicit ProcessStatsConfig_Decoder(const std::string& raw) : TypedProtoDecoder(reinterpret_cast(raw.data()), raw.size()) {} @@ -30396,6 +31984,8 @@ class ProcessStatsConfig_Decoder : public ::protozero::TypedProtoDecoder().as_uint32(); } bool has_proc_stats_cache_ttl_ms() const { return at<6>().valid(); } uint32_t proc_stats_cache_ttl_ms() const { return at<6>().as_uint32(); } + bool has_resolve_process_fds() const { return at<9>().valid(); } + bool resolve_process_fds() const { return at<9>().as_bool(); } }; class ProcessStatsConfig : public ::protozero::Message { @@ -30407,13 +31997,18 @@ class ProcessStatsConfig : public ::protozero::Message { kRecordThreadNamesFieldNumber = 3, kProcStatsPollMsFieldNumber = 4, kProcStatsCacheTtlMsFieldNumber = 6, + kResolveProcessFdsFieldNumber = 9, }; static constexpr const char* GetName() { return ".perfetto.protos.ProcessStatsConfig"; } + using Quirks = ::perfetto::protos::pbzero::ProcessStatsConfig_Quirks; - static const Quirks QUIRKS_UNSPECIFIED = ProcessStatsConfig_Quirks_QUIRKS_UNSPECIFIED; - static const Quirks DISABLE_INITIAL_DUMP = ProcessStatsConfig_Quirks_DISABLE_INITIAL_DUMP; - static const Quirks DISABLE_ON_DEMAND = ProcessStatsConfig_Quirks_DISABLE_ON_DEMAND; + static inline const char* Quirks_Name(Quirks value) { + return ::perfetto::protos::pbzero::ProcessStatsConfig_Quirks_Name(value); + } + static const Quirks QUIRKS_UNSPECIFIED = Quirks::QUIRKS_UNSPECIFIED; + static const Quirks DISABLE_INITIAL_DUMP = Quirks::DISABLE_INITIAL_DUMP; + static const Quirks DISABLE_ON_DEMAND = Quirks::DISABLE_ON_DEMAND; using FieldMetadata_Quirks = ::protozero::proto_utils::FieldMetadata< @@ -30423,14 +32018,7 @@ class ProcessStatsConfig : public ::protozero::Message { ::perfetto::protos::pbzero::ProcessStatsConfig_Quirks, ProcessStatsConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Quirks kQuirks() { return {}; } + static constexpr FieldMetadata_Quirks kQuirks{}; void add_quirks(::perfetto::protos::pbzero::ProcessStatsConfig_Quirks value) { static constexpr uint32_t field_id = FieldMetadata_Quirks::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -30448,14 +32036,7 @@ class ProcessStatsConfig : public ::protozero::Message { bool, ProcessStatsConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ScanAllProcessesOnStart kScanAllProcessesOnStart() { return {}; } + static constexpr FieldMetadata_ScanAllProcessesOnStart kScanAllProcessesOnStart{}; void set_scan_all_processes_on_start(bool value) { static constexpr uint32_t field_id = FieldMetadata_ScanAllProcessesOnStart::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -30473,14 +32054,7 @@ class ProcessStatsConfig : public ::protozero::Message { bool, ProcessStatsConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_RecordThreadNames kRecordThreadNames() { return {}; } + static constexpr FieldMetadata_RecordThreadNames kRecordThreadNames{}; void set_record_thread_names(bool value) { static constexpr uint32_t field_id = FieldMetadata_RecordThreadNames::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -30498,14 +32072,7 @@ class ProcessStatsConfig : public ::protozero::Message { uint32_t, ProcessStatsConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ProcStatsPollMs kProcStatsPollMs() { return {}; } + static constexpr FieldMetadata_ProcStatsPollMs kProcStatsPollMs{}; void set_proc_stats_poll_ms(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_ProcStatsPollMs::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -30523,14 +32090,7 @@ class ProcessStatsConfig : public ::protozero::Message { uint32_t, ProcessStatsConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ProcStatsCacheTtlMs kProcStatsCacheTtlMs() { return {}; } + static constexpr FieldMetadata_ProcStatsCacheTtlMs kProcStatsCacheTtlMs{}; void set_proc_stats_cache_ttl_ms(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_ProcStatsCacheTtlMs::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -30539,6 +32099,24 @@ class ProcessStatsConfig : public ::protozero::Message { ::protozero::proto_utils::ProtoSchemaType::kUint32> ::Append(*this, field_id, value); } + + using FieldMetadata_ResolveProcessFds = + ::protozero::proto_utils::FieldMetadata< + 9, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kBool, + bool, + ProcessStatsConfig>; + + static constexpr FieldMetadata_ResolveProcessFds kResolveProcessFds{}; + void set_resolve_process_fds(bool value) { + static constexpr uint32_t field_id = FieldMetadata_ResolveProcessFds::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kBool> + ::Append(*this, field_id, value); + } }; } // Namespace. @@ -30665,14 +32243,7 @@ class HeapprofdConfig : public ::protozero::Message { uint64_t, HeapprofdConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_SamplingIntervalBytes kSamplingIntervalBytes() { return {}; } + static constexpr FieldMetadata_SamplingIntervalBytes kSamplingIntervalBytes{}; void set_sampling_interval_bytes(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_SamplingIntervalBytes::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -30690,14 +32261,7 @@ class HeapprofdConfig : public ::protozero::Message { uint64_t, HeapprofdConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_AdaptiveSamplingShmemThreshold kAdaptiveSamplingShmemThreshold() { return {}; } + static constexpr FieldMetadata_AdaptiveSamplingShmemThreshold kAdaptiveSamplingShmemThreshold{}; void set_adaptive_sampling_shmem_threshold(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_AdaptiveSamplingShmemThreshold::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -30715,14 +32279,7 @@ class HeapprofdConfig : public ::protozero::Message { uint64_t, HeapprofdConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_AdaptiveSamplingMaxSamplingIntervalBytes kAdaptiveSamplingMaxSamplingIntervalBytes() { return {}; } + static constexpr FieldMetadata_AdaptiveSamplingMaxSamplingIntervalBytes kAdaptiveSamplingMaxSamplingIntervalBytes{}; void set_adaptive_sampling_max_sampling_interval_bytes(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_AdaptiveSamplingMaxSamplingIntervalBytes::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -30740,17 +32297,13 @@ class HeapprofdConfig : public ::protozero::Message { std::string, HeapprofdConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ProcessCmdline kProcessCmdline() { return {}; } + static constexpr FieldMetadata_ProcessCmdline kProcessCmdline{}; void add_process_cmdline(const char* data, size_t size) { AppendBytes(FieldMetadata_ProcessCmdline::kFieldId, data, size); } + void add_process_cmdline(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_ProcessCmdline::kFieldId, chars.data, chars.size); + } void add_process_cmdline(std::string value) { static constexpr uint32_t field_id = FieldMetadata_ProcessCmdline::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -30768,14 +32321,7 @@ class HeapprofdConfig : public ::protozero::Message { uint64_t, HeapprofdConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Pid kPid() { return {}; } + static constexpr FieldMetadata_Pid kPid{}; void add_pid(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Pid::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -30793,17 +32339,13 @@ class HeapprofdConfig : public ::protozero::Message { std::string, HeapprofdConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_TargetInstalledBy kTargetInstalledBy() { return {}; } + static constexpr FieldMetadata_TargetInstalledBy kTargetInstalledBy{}; void add_target_installed_by(const char* data, size_t size) { AppendBytes(FieldMetadata_TargetInstalledBy::kFieldId, data, size); } + void add_target_installed_by(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_TargetInstalledBy::kFieldId, chars.data, chars.size); + } void add_target_installed_by(std::string value) { static constexpr uint32_t field_id = FieldMetadata_TargetInstalledBy::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -30821,17 +32363,13 @@ class HeapprofdConfig : public ::protozero::Message { std::string, HeapprofdConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Heaps kHeaps() { return {}; } + static constexpr FieldMetadata_Heaps kHeaps{}; void add_heaps(const char* data, size_t size) { AppendBytes(FieldMetadata_Heaps::kFieldId, data, size); } + void add_heaps(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Heaps::kFieldId, chars.data, chars.size); + } void add_heaps(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Heaps::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -30849,17 +32387,13 @@ class HeapprofdConfig : public ::protozero::Message { std::string, HeapprofdConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ExcludeHeaps kExcludeHeaps() { return {}; } + static constexpr FieldMetadata_ExcludeHeaps kExcludeHeaps{}; void add_exclude_heaps(const char* data, size_t size) { AppendBytes(FieldMetadata_ExcludeHeaps::kFieldId, data, size); } + void add_exclude_heaps(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_ExcludeHeaps::kFieldId, chars.data, chars.size); + } void add_exclude_heaps(std::string value) { static constexpr uint32_t field_id = FieldMetadata_ExcludeHeaps::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -30877,14 +32411,7 @@ class HeapprofdConfig : public ::protozero::Message { bool, HeapprofdConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_StreamAllocations kStreamAllocations() { return {}; } + static constexpr FieldMetadata_StreamAllocations kStreamAllocations{}; void set_stream_allocations(bool value) { static constexpr uint32_t field_id = FieldMetadata_StreamAllocations::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -30902,14 +32429,7 @@ class HeapprofdConfig : public ::protozero::Message { uint64_t, HeapprofdConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_HeapSamplingIntervals kHeapSamplingIntervals() { return {}; } + static constexpr FieldMetadata_HeapSamplingIntervals kHeapSamplingIntervals{}; void add_heap_sampling_intervals(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_HeapSamplingIntervals::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -30927,14 +32447,7 @@ class HeapprofdConfig : public ::protozero::Message { bool, HeapprofdConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_AllHeaps kAllHeaps() { return {}; } + static constexpr FieldMetadata_AllHeaps kAllHeaps{}; void set_all_heaps(bool value) { static constexpr uint32_t field_id = FieldMetadata_AllHeaps::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -30952,14 +32465,7 @@ class HeapprofdConfig : public ::protozero::Message { bool, HeapprofdConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_All kAll() { return {}; } + static constexpr FieldMetadata_All kAll{}; void set_all(bool value) { static constexpr uint32_t field_id = FieldMetadata_All::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -30977,14 +32483,7 @@ class HeapprofdConfig : public ::protozero::Message { uint32_t, HeapprofdConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_MinAnonymousMemoryKb kMinAnonymousMemoryKb() { return {}; } + static constexpr FieldMetadata_MinAnonymousMemoryKb kMinAnonymousMemoryKb{}; void set_min_anonymous_memory_kb(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_MinAnonymousMemoryKb::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -31002,14 +32501,7 @@ class HeapprofdConfig : public ::protozero::Message { uint32_t, HeapprofdConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_MaxHeapprofdMemoryKb kMaxHeapprofdMemoryKb() { return {}; } + static constexpr FieldMetadata_MaxHeapprofdMemoryKb kMaxHeapprofdMemoryKb{}; void set_max_heapprofd_memory_kb(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_MaxHeapprofdMemoryKb::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -31027,14 +32519,7 @@ class HeapprofdConfig : public ::protozero::Message { uint64_t, HeapprofdConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_MaxHeapprofdCpuSecs kMaxHeapprofdCpuSecs() { return {}; } + static constexpr FieldMetadata_MaxHeapprofdCpuSecs kMaxHeapprofdCpuSecs{}; void set_max_heapprofd_cpu_secs(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_MaxHeapprofdCpuSecs::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -31052,17 +32537,13 @@ class HeapprofdConfig : public ::protozero::Message { std::string, HeapprofdConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_SkipSymbolPrefix kSkipSymbolPrefix() { return {}; } + static constexpr FieldMetadata_SkipSymbolPrefix kSkipSymbolPrefix{}; void add_skip_symbol_prefix(const char* data, size_t size) { AppendBytes(FieldMetadata_SkipSymbolPrefix::kFieldId, data, size); } + void add_skip_symbol_prefix(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_SkipSymbolPrefix::kFieldId, chars.data, chars.size); + } void add_skip_symbol_prefix(std::string value) { static constexpr uint32_t field_id = FieldMetadata_SkipSymbolPrefix::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -31080,14 +32561,7 @@ class HeapprofdConfig : public ::protozero::Message { HeapprofdConfig_ContinuousDumpConfig, HeapprofdConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ContinuousDumpConfig kContinuousDumpConfig() { return {}; } + static constexpr FieldMetadata_ContinuousDumpConfig kContinuousDumpConfig{}; template T* set_continuous_dump_config() { return BeginNestedMessage(6); } @@ -31101,14 +32575,7 @@ class HeapprofdConfig : public ::protozero::Message { uint64_t, HeapprofdConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ShmemSizeBytes kShmemSizeBytes() { return {}; } + static constexpr FieldMetadata_ShmemSizeBytes kShmemSizeBytes{}; void set_shmem_size_bytes(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_ShmemSizeBytes::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -31126,14 +32593,7 @@ class HeapprofdConfig : public ::protozero::Message { bool, HeapprofdConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_BlockClient kBlockClient() { return {}; } + static constexpr FieldMetadata_BlockClient kBlockClient{}; void set_block_client(bool value) { static constexpr uint32_t field_id = FieldMetadata_BlockClient::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -31151,14 +32611,7 @@ class HeapprofdConfig : public ::protozero::Message { uint32_t, HeapprofdConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_BlockClientTimeoutUs kBlockClientTimeoutUs() { return {}; } + static constexpr FieldMetadata_BlockClientTimeoutUs kBlockClientTimeoutUs{}; void set_block_client_timeout_us(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_BlockClientTimeoutUs::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -31176,14 +32629,7 @@ class HeapprofdConfig : public ::protozero::Message { bool, HeapprofdConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_NoStartup kNoStartup() { return {}; } + static constexpr FieldMetadata_NoStartup kNoStartup{}; void set_no_startup(bool value) { static constexpr uint32_t field_id = FieldMetadata_NoStartup::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -31201,14 +32647,7 @@ class HeapprofdConfig : public ::protozero::Message { bool, HeapprofdConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_NoRunning kNoRunning() { return {}; } + static constexpr FieldMetadata_NoRunning kNoRunning{}; void set_no_running(bool value) { static constexpr uint32_t field_id = FieldMetadata_NoRunning::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -31226,14 +32665,7 @@ class HeapprofdConfig : public ::protozero::Message { bool, HeapprofdConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_DumpAtMax kDumpAtMax() { return {}; } + static constexpr FieldMetadata_DumpAtMax kDumpAtMax{}; void set_dump_at_max(bool value) { static constexpr uint32_t field_id = FieldMetadata_DumpAtMax::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -31251,14 +32683,7 @@ class HeapprofdConfig : public ::protozero::Message { bool, HeapprofdConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_DisableForkTeardown kDisableForkTeardown() { return {}; } + static constexpr FieldMetadata_DisableForkTeardown kDisableForkTeardown{}; void set_disable_fork_teardown(bool value) { static constexpr uint32_t field_id = FieldMetadata_DisableForkTeardown::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -31276,14 +32701,7 @@ class HeapprofdConfig : public ::protozero::Message { bool, HeapprofdConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_DisableVforkDetection kDisableVforkDetection() { return {}; } + static constexpr FieldMetadata_DisableVforkDetection kDisableVforkDetection{}; void set_disable_vfork_detection(bool value) { static constexpr uint32_t field_id = FieldMetadata_DisableVforkDetection::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -31323,14 +32741,7 @@ class HeapprofdConfig_ContinuousDumpConfig : public ::protozero::Message { uint32_t, HeapprofdConfig_ContinuousDumpConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_DumpPhaseMs kDumpPhaseMs() { return {}; } + static constexpr FieldMetadata_DumpPhaseMs kDumpPhaseMs{}; void set_dump_phase_ms(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_DumpPhaseMs::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -31348,14 +32759,7 @@ class HeapprofdConfig_ContinuousDumpConfig : public ::protozero::Message { uint32_t, HeapprofdConfig_ContinuousDumpConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_DumpIntervalMs kDumpIntervalMs() { return {}; } + static constexpr FieldMetadata_DumpIntervalMs kDumpIntervalMs{}; void set_dump_interval_ms(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_DumpIntervalMs::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -31436,17 +32840,13 @@ class JavaHprofConfig : public ::protozero::Message { std::string, JavaHprofConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ProcessCmdline kProcessCmdline() { return {}; } + static constexpr FieldMetadata_ProcessCmdline kProcessCmdline{}; void add_process_cmdline(const char* data, size_t size) { AppendBytes(FieldMetadata_ProcessCmdline::kFieldId, data, size); } + void add_process_cmdline(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_ProcessCmdline::kFieldId, chars.data, chars.size); + } void add_process_cmdline(std::string value) { static constexpr uint32_t field_id = FieldMetadata_ProcessCmdline::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -31464,14 +32864,7 @@ class JavaHprofConfig : public ::protozero::Message { uint64_t, JavaHprofConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Pid kPid() { return {}; } + static constexpr FieldMetadata_Pid kPid{}; void add_pid(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Pid::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -31489,17 +32882,13 @@ class JavaHprofConfig : public ::protozero::Message { std::string, JavaHprofConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_TargetInstalledBy kTargetInstalledBy() { return {}; } + static constexpr FieldMetadata_TargetInstalledBy kTargetInstalledBy{}; void add_target_installed_by(const char* data, size_t size) { AppendBytes(FieldMetadata_TargetInstalledBy::kFieldId, data, size); } + void add_target_installed_by(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_TargetInstalledBy::kFieldId, chars.data, chars.size); + } void add_target_installed_by(std::string value) { static constexpr uint32_t field_id = FieldMetadata_TargetInstalledBy::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -31517,14 +32906,7 @@ class JavaHprofConfig : public ::protozero::Message { JavaHprofConfig_ContinuousDumpConfig, JavaHprofConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ContinuousDumpConfig kContinuousDumpConfig() { return {}; } + static constexpr FieldMetadata_ContinuousDumpConfig kContinuousDumpConfig{}; template T* set_continuous_dump_config() { return BeginNestedMessage(3); } @@ -31538,14 +32920,7 @@ class JavaHprofConfig : public ::protozero::Message { uint32_t, JavaHprofConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_MinAnonymousMemoryKb kMinAnonymousMemoryKb() { return {}; } + static constexpr FieldMetadata_MinAnonymousMemoryKb kMinAnonymousMemoryKb{}; void set_min_anonymous_memory_kb(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_MinAnonymousMemoryKb::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -31563,14 +32938,7 @@ class JavaHprofConfig : public ::protozero::Message { bool, JavaHprofConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_DumpSmaps kDumpSmaps() { return {}; } + static constexpr FieldMetadata_DumpSmaps kDumpSmaps{}; void set_dump_smaps(bool value) { static constexpr uint32_t field_id = FieldMetadata_DumpSmaps::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -31588,17 +32956,13 @@ class JavaHprofConfig : public ::protozero::Message { std::string, JavaHprofConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_IgnoredTypes kIgnoredTypes() { return {}; } + static constexpr FieldMetadata_IgnoredTypes kIgnoredTypes{}; void add_ignored_types(const char* data, size_t size) { AppendBytes(FieldMetadata_IgnoredTypes::kFieldId, data, size); } + void add_ignored_types(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_IgnoredTypes::kFieldId, chars.data, chars.size); + } void add_ignored_types(std::string value) { static constexpr uint32_t field_id = FieldMetadata_IgnoredTypes::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -31641,14 +33005,7 @@ class JavaHprofConfig_ContinuousDumpConfig : public ::protozero::Message { uint32_t, JavaHprofConfig_ContinuousDumpConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_DumpPhaseMs kDumpPhaseMs() { return {}; } + static constexpr FieldMetadata_DumpPhaseMs kDumpPhaseMs{}; void set_dump_phase_ms(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_DumpPhaseMs::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -31666,14 +33023,7 @@ class JavaHprofConfig_ContinuousDumpConfig : public ::protozero::Message { uint32_t, JavaHprofConfig_ContinuousDumpConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_DumpIntervalMs kDumpIntervalMs() { return {}; } + static constexpr FieldMetadata_DumpIntervalMs kDumpIntervalMs{}; void set_dump_interval_ms(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_DumpIntervalMs::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -31691,14 +33041,7 @@ class JavaHprofConfig_ContinuousDumpConfig : public ::protozero::Message { bool, JavaHprofConfig_ContinuousDumpConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ScanPidsOnlyOnStart kScanPidsOnlyOnStart() { return {}; } + static constexpr FieldMetadata_ScanPidsOnlyOnStart kScanPidsOnlyOnStart{}; void set_scan_pids_only_on_start(bool value) { static constexpr uint32_t field_id = FieldMetadata_ScanPidsOnlyOnStart::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -31735,16 +33078,39 @@ namespace pbzero { class PerfEventConfig_CallstackSampling; class PerfEventConfig_Scope; class PerfEvents_Timebase; -enum PerfEventConfig_UnwindMode : int32_t; +namespace perfetto_pbzero_enum_PerfEventConfig { +enum UnwindMode : int32_t; +} // namespace perfetto_pbzero_enum_PerfEventConfig +using PerfEventConfig_UnwindMode = perfetto_pbzero_enum_PerfEventConfig::UnwindMode; -enum PerfEventConfig_UnwindMode : int32_t { - PerfEventConfig_UnwindMode_UNWIND_UNKNOWN = 0, - PerfEventConfig_UnwindMode_UNWIND_SKIP = 1, - PerfEventConfig_UnwindMode_UNWIND_DWARF = 2, +namespace perfetto_pbzero_enum_PerfEventConfig { +enum UnwindMode : int32_t { + UNWIND_UNKNOWN = 0, + UNWIND_SKIP = 1, + UNWIND_DWARF = 2, }; +} // namespace perfetto_pbzero_enum_PerfEventConfig +using PerfEventConfig_UnwindMode = perfetto_pbzero_enum_PerfEventConfig::UnwindMode; -const PerfEventConfig_UnwindMode PerfEventConfig_UnwindMode_MIN = PerfEventConfig_UnwindMode_UNWIND_UNKNOWN; -const PerfEventConfig_UnwindMode PerfEventConfig_UnwindMode_MAX = PerfEventConfig_UnwindMode_UNWIND_DWARF; + +constexpr PerfEventConfig_UnwindMode PerfEventConfig_UnwindMode_MIN = PerfEventConfig_UnwindMode::UNWIND_UNKNOWN; +constexpr PerfEventConfig_UnwindMode PerfEventConfig_UnwindMode_MAX = PerfEventConfig_UnwindMode::UNWIND_DWARF; + + +PERFETTO_PROTOZERO_CONSTEXPR14_OR_INLINE +const char* PerfEventConfig_UnwindMode_Name(::perfetto::protos::pbzero::PerfEventConfig_UnwindMode value) { + switch (value) { + case ::perfetto::protos::pbzero::PerfEventConfig_UnwindMode::UNWIND_UNKNOWN: + return "UNWIND_UNKNOWN"; + + case ::perfetto::protos::pbzero::PerfEventConfig_UnwindMode::UNWIND_SKIP: + return "UNWIND_SKIP"; + + case ::perfetto::protos::pbzero::PerfEventConfig_UnwindMode::UNWIND_DWARF: + return "UNWIND_DWARF"; + } + return "PBZERO_UNKNOWN_ENUM_VALUE"; +} class PerfEventConfig_Decoder : public ::protozero::TypedProtoDecoder { public: @@ -31813,10 +33179,14 @@ class PerfEventConfig : public ::protozero::Message { using CallstackSampling = ::perfetto::protos::pbzero::PerfEventConfig_CallstackSampling; using Scope = ::perfetto::protos::pbzero::PerfEventConfig_Scope; + using UnwindMode = ::perfetto::protos::pbzero::PerfEventConfig_UnwindMode; - static const UnwindMode UNWIND_UNKNOWN = PerfEventConfig_UnwindMode_UNWIND_UNKNOWN; - static const UnwindMode UNWIND_SKIP = PerfEventConfig_UnwindMode_UNWIND_SKIP; - static const UnwindMode UNWIND_DWARF = PerfEventConfig_UnwindMode_UNWIND_DWARF; + static inline const char* UnwindMode_Name(UnwindMode value) { + return ::perfetto::protos::pbzero::PerfEventConfig_UnwindMode_Name(value); + } + static const UnwindMode UNWIND_UNKNOWN = UnwindMode::UNWIND_UNKNOWN; + static const UnwindMode UNWIND_SKIP = UnwindMode::UNWIND_SKIP; + static const UnwindMode UNWIND_DWARF = UnwindMode::UNWIND_DWARF; using FieldMetadata_Timebase = ::protozero::proto_utils::FieldMetadata< @@ -31826,14 +33196,7 @@ class PerfEventConfig : public ::protozero::Message { PerfEvents_Timebase, PerfEventConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Timebase kTimebase() { return {}; } + static constexpr FieldMetadata_Timebase kTimebase{}; template T* set_timebase() { return BeginNestedMessage(15); } @@ -31847,14 +33210,7 @@ class PerfEventConfig : public ::protozero::Message { PerfEventConfig_CallstackSampling, PerfEventConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_CallstackSampling kCallstackSampling() { return {}; } + static constexpr FieldMetadata_CallstackSampling kCallstackSampling{}; template T* set_callstack_sampling() { return BeginNestedMessage(16); } @@ -31868,14 +33224,7 @@ class PerfEventConfig : public ::protozero::Message { uint32_t, PerfEventConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_RingBufferReadPeriodMs kRingBufferReadPeriodMs() { return {}; } + static constexpr FieldMetadata_RingBufferReadPeriodMs kRingBufferReadPeriodMs{}; void set_ring_buffer_read_period_ms(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_RingBufferReadPeriodMs::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -31893,14 +33242,7 @@ class PerfEventConfig : public ::protozero::Message { uint32_t, PerfEventConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_RingBufferPages kRingBufferPages() { return {}; } + static constexpr FieldMetadata_RingBufferPages kRingBufferPages{}; void set_ring_buffer_pages(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_RingBufferPages::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -31918,14 +33260,7 @@ class PerfEventConfig : public ::protozero::Message { uint64_t, PerfEventConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_MaxEnqueuedFootprintKb kMaxEnqueuedFootprintKb() { return {}; } + static constexpr FieldMetadata_MaxEnqueuedFootprintKb kMaxEnqueuedFootprintKb{}; void set_max_enqueued_footprint_kb(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_MaxEnqueuedFootprintKb::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -31943,14 +33278,7 @@ class PerfEventConfig : public ::protozero::Message { uint32_t, PerfEventConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_MaxDaemonMemoryKb kMaxDaemonMemoryKb() { return {}; } + static constexpr FieldMetadata_MaxDaemonMemoryKb kMaxDaemonMemoryKb{}; void set_max_daemon_memory_kb(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_MaxDaemonMemoryKb::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -31968,14 +33296,7 @@ class PerfEventConfig : public ::protozero::Message { uint32_t, PerfEventConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_RemoteDescriptorTimeoutMs kRemoteDescriptorTimeoutMs() { return {}; } + static constexpr FieldMetadata_RemoteDescriptorTimeoutMs kRemoteDescriptorTimeoutMs{}; void set_remote_descriptor_timeout_ms(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_RemoteDescriptorTimeoutMs::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -31993,14 +33314,7 @@ class PerfEventConfig : public ::protozero::Message { uint32_t, PerfEventConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_UnwindStateClearPeriodMs kUnwindStateClearPeriodMs() { return {}; } + static constexpr FieldMetadata_UnwindStateClearPeriodMs kUnwindStateClearPeriodMs{}; void set_unwind_state_clear_period_ms(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_UnwindStateClearPeriodMs::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -32018,17 +33332,13 @@ class PerfEventConfig : public ::protozero::Message { std::string, PerfEventConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_TargetInstalledBy kTargetInstalledBy() { return {}; } + static constexpr FieldMetadata_TargetInstalledBy kTargetInstalledBy{}; void add_target_installed_by(const char* data, size_t size) { AppendBytes(FieldMetadata_TargetInstalledBy::kFieldId, data, size); } + void add_target_installed_by(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_TargetInstalledBy::kFieldId, chars.data, chars.size); + } void add_target_installed_by(std::string value) { static constexpr uint32_t field_id = FieldMetadata_TargetInstalledBy::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -32046,14 +33356,7 @@ class PerfEventConfig : public ::protozero::Message { bool, PerfEventConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_AllCpus kAllCpus() { return {}; } + static constexpr FieldMetadata_AllCpus kAllCpus{}; void set_all_cpus(bool value) { static constexpr uint32_t field_id = FieldMetadata_AllCpus::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -32071,14 +33374,7 @@ class PerfEventConfig : public ::protozero::Message { uint32_t, PerfEventConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_SamplingFrequency kSamplingFrequency() { return {}; } + static constexpr FieldMetadata_SamplingFrequency kSamplingFrequency{}; void set_sampling_frequency(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_SamplingFrequency::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -32096,14 +33392,7 @@ class PerfEventConfig : public ::protozero::Message { bool, PerfEventConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_KernelFrames kKernelFrames() { return {}; } + static constexpr FieldMetadata_KernelFrames kKernelFrames{}; void set_kernel_frames(bool value) { static constexpr uint32_t field_id = FieldMetadata_KernelFrames::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -32121,14 +33410,7 @@ class PerfEventConfig : public ::protozero::Message { int32_t, PerfEventConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_TargetPid kTargetPid() { return {}; } + static constexpr FieldMetadata_TargetPid kTargetPid{}; void add_target_pid(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_TargetPid::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -32146,17 +33428,13 @@ class PerfEventConfig : public ::protozero::Message { std::string, PerfEventConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_TargetCmdline kTargetCmdline() { return {}; } + static constexpr FieldMetadata_TargetCmdline kTargetCmdline{}; void add_target_cmdline(const char* data, size_t size) { AppendBytes(FieldMetadata_TargetCmdline::kFieldId, data, size); } + void add_target_cmdline(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_TargetCmdline::kFieldId, chars.data, chars.size); + } void add_target_cmdline(std::string value) { static constexpr uint32_t field_id = FieldMetadata_TargetCmdline::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -32174,14 +33452,7 @@ class PerfEventConfig : public ::protozero::Message { int32_t, PerfEventConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ExcludePid kExcludePid() { return {}; } + static constexpr FieldMetadata_ExcludePid kExcludePid{}; void add_exclude_pid(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_ExcludePid::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -32199,17 +33470,13 @@ class PerfEventConfig : public ::protozero::Message { std::string, PerfEventConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ExcludeCmdline kExcludeCmdline() { return {}; } + static constexpr FieldMetadata_ExcludeCmdline kExcludeCmdline{}; void add_exclude_cmdline(const char* data, size_t size) { AppendBytes(FieldMetadata_ExcludeCmdline::kFieldId, data, size); } + void add_exclude_cmdline(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_ExcludeCmdline::kFieldId, chars.data, chars.size); + } void add_exclude_cmdline(std::string value) { static constexpr uint32_t field_id = FieldMetadata_ExcludeCmdline::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -32227,14 +33494,7 @@ class PerfEventConfig : public ::protozero::Message { uint32_t, PerfEventConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_AdditionalCmdlineCount kAdditionalCmdlineCount() { return {}; } + static constexpr FieldMetadata_AdditionalCmdlineCount kAdditionalCmdlineCount{}; void set_additional_cmdline_count(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_AdditionalCmdlineCount::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -32245,7 +33505,7 @@ class PerfEventConfig : public ::protozero::Message { } }; -class PerfEventConfig_Scope_Decoder : public ::protozero::TypedProtoDecoder { +class PerfEventConfig_Scope_Decoder : public ::protozero::TypedProtoDecoder { public: PerfEventConfig_Scope_Decoder(const uint8_t* data, size_t len) : TypedProtoDecoder(data, len) {} explicit PerfEventConfig_Scope_Decoder(const std::string& raw) : TypedProtoDecoder(reinterpret_cast(raw.data()), raw.size()) {} @@ -32260,6 +33520,8 @@ class PerfEventConfig_Scope_Decoder : public ::protozero::TypedProtoDecoder exclude_cmdline() const { return GetRepeated<::protozero::ConstChars>(4); } bool has_additional_cmdline_count() const { return at<5>().valid(); } uint32_t additional_cmdline_count() const { return at<5>().as_uint32(); } + bool has_process_shard_count() const { return at<6>().valid(); } + uint32_t process_shard_count() const { return at<6>().as_uint32(); } }; class PerfEventConfig_Scope : public ::protozero::Message { @@ -32271,6 +33533,7 @@ class PerfEventConfig_Scope : public ::protozero::Message { kExcludePidFieldNumber = 3, kExcludeCmdlineFieldNumber = 4, kAdditionalCmdlineCountFieldNumber = 5, + kProcessShardCountFieldNumber = 6, }; static constexpr const char* GetName() { return ".perfetto.protos.PerfEventConfig.Scope"; } @@ -32283,14 +33546,7 @@ class PerfEventConfig_Scope : public ::protozero::Message { int32_t, PerfEventConfig_Scope>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_TargetPid kTargetPid() { return {}; } + static constexpr FieldMetadata_TargetPid kTargetPid{}; void add_target_pid(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_TargetPid::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -32308,17 +33564,13 @@ class PerfEventConfig_Scope : public ::protozero::Message { std::string, PerfEventConfig_Scope>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_TargetCmdline kTargetCmdline() { return {}; } + static constexpr FieldMetadata_TargetCmdline kTargetCmdline{}; void add_target_cmdline(const char* data, size_t size) { AppendBytes(FieldMetadata_TargetCmdline::kFieldId, data, size); } + void add_target_cmdline(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_TargetCmdline::kFieldId, chars.data, chars.size); + } void add_target_cmdline(std::string value) { static constexpr uint32_t field_id = FieldMetadata_TargetCmdline::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -32336,14 +33588,7 @@ class PerfEventConfig_Scope : public ::protozero::Message { int32_t, PerfEventConfig_Scope>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ExcludePid kExcludePid() { return {}; } + static constexpr FieldMetadata_ExcludePid kExcludePid{}; void add_exclude_pid(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_ExcludePid::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -32361,17 +33606,13 @@ class PerfEventConfig_Scope : public ::protozero::Message { std::string, PerfEventConfig_Scope>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ExcludeCmdline kExcludeCmdline() { return {}; } + static constexpr FieldMetadata_ExcludeCmdline kExcludeCmdline{}; void add_exclude_cmdline(const char* data, size_t size) { AppendBytes(FieldMetadata_ExcludeCmdline::kFieldId, data, size); } + void add_exclude_cmdline(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_ExcludeCmdline::kFieldId, chars.data, chars.size); + } void add_exclude_cmdline(std::string value) { static constexpr uint32_t field_id = FieldMetadata_ExcludeCmdline::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -32389,14 +33630,7 @@ class PerfEventConfig_Scope : public ::protozero::Message { uint32_t, PerfEventConfig_Scope>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_AdditionalCmdlineCount kAdditionalCmdlineCount() { return {}; } + static constexpr FieldMetadata_AdditionalCmdlineCount kAdditionalCmdlineCount{}; void set_additional_cmdline_count(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_AdditionalCmdlineCount::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -32405,6 +33639,24 @@ class PerfEventConfig_Scope : public ::protozero::Message { ::protozero::proto_utils::ProtoSchemaType::kUint32> ::Append(*this, field_id, value); } + + using FieldMetadata_ProcessShardCount = + ::protozero::proto_utils::FieldMetadata< + 6, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint32, + uint32_t, + PerfEventConfig_Scope>; + + static constexpr FieldMetadata_ProcessShardCount kProcessShardCount{}; + void set_process_shard_count(uint32_t value) { + static constexpr uint32_t field_id = FieldMetadata_ProcessShardCount::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint32> + ::Append(*this, field_id, value); + } }; class PerfEventConfig_CallstackSampling_Decoder : public ::protozero::TypedProtoDecoder { @@ -32439,14 +33691,7 @@ class PerfEventConfig_CallstackSampling : public ::protozero::Message { PerfEventConfig_Scope, PerfEventConfig_CallstackSampling>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Scope kScope() { return {}; } + static constexpr FieldMetadata_Scope kScope{}; template T* set_scope() { return BeginNestedMessage(1); } @@ -32460,14 +33705,7 @@ class PerfEventConfig_CallstackSampling : public ::protozero::Message { bool, PerfEventConfig_CallstackSampling>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_KernelFrames kKernelFrames() { return {}; } + static constexpr FieldMetadata_KernelFrames kKernelFrames{}; void set_kernel_frames(bool value) { static constexpr uint32_t field_id = FieldMetadata_KernelFrames::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -32485,14 +33723,7 @@ class PerfEventConfig_CallstackSampling : public ::protozero::Message { ::perfetto::protos::pbzero::PerfEventConfig_UnwindMode, PerfEventConfig_CallstackSampling>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_UserFrames kUserFrames() { return {}; } + static constexpr FieldMetadata_UserFrames kUserFrames{}; void set_user_frames(::perfetto::protos::pbzero::PerfEventConfig_UnwindMode value) { static constexpr uint32_t field_id = FieldMetadata_UserFrames::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -32503,6 +33734,2910 @@ class PerfEventConfig_CallstackSampling : public ::protozero::Message { } }; +} // Namespace. +} // Namespace. +} // Namespace. +#endif // Include guard. +// gen_amalgamated begin header: gen/protos/perfetto/config/statsd/atom_ids.pbzero.h +// Autogenerated by the ProtoZero compiler plugin. DO NOT EDIT. + +#ifndef PERFETTO_PROTOS_PROTOS_PERFETTO_CONFIG_STATSD_ATOM_IDS_PROTO_H_ +#define PERFETTO_PROTOS_PROTOS_PERFETTO_CONFIG_STATSD_ATOM_IDS_PROTO_H_ + +#include +#include + +// gen_amalgamated expanded: #include "perfetto/protozero/field_writer.h" +// gen_amalgamated expanded: #include "perfetto/protozero/message.h" +// gen_amalgamated expanded: #include "perfetto/protozero/packed_repeated_fields.h" +// gen_amalgamated expanded: #include "perfetto/protozero/proto_decoder.h" +// gen_amalgamated expanded: #include "perfetto/protozero/proto_utils.h" + +namespace perfetto { +namespace protos { +namespace pbzero { + + +enum AtomId : int32_t { + ATOM_UNSPECIFIED = 0, + ATOM_BLE_SCAN_STATE_CHANGED = 2, + ATOM_PROCESS_STATE_CHANGED = 3, + ATOM_BLE_SCAN_RESULT_RECEIVED = 4, + ATOM_SENSOR_STATE_CHANGED = 5, + ATOM_GPS_SCAN_STATE_CHANGED = 6, + ATOM_SYNC_STATE_CHANGED = 7, + ATOM_SCHEDULED_JOB_STATE_CHANGED = 8, + ATOM_SCREEN_BRIGHTNESS_CHANGED = 9, + ATOM_WAKELOCK_STATE_CHANGED = 10, + ATOM_LONG_PARTIAL_WAKELOCK_STATE_CHANGED = 11, + ATOM_MOBILE_RADIO_POWER_STATE_CHANGED = 12, + ATOM_WIFI_RADIO_POWER_STATE_CHANGED = 13, + ATOM_ACTIVITY_MANAGER_SLEEP_STATE_CHANGED = 14, + ATOM_MEMORY_FACTOR_STATE_CHANGED = 15, + ATOM_EXCESSIVE_CPU_USAGE_REPORTED = 16, + ATOM_CACHED_KILL_REPORTED = 17, + ATOM_PROCESS_MEMORY_STAT_REPORTED = 18, + ATOM_LAUNCHER_EVENT = 19, + ATOM_BATTERY_SAVER_MODE_STATE_CHANGED = 20, + ATOM_DEVICE_IDLE_MODE_STATE_CHANGED = 21, + ATOM_DEVICE_IDLING_MODE_STATE_CHANGED = 22, + ATOM_AUDIO_STATE_CHANGED = 23, + ATOM_MEDIA_CODEC_STATE_CHANGED = 24, + ATOM_CAMERA_STATE_CHANGED = 25, + ATOM_FLASHLIGHT_STATE_CHANGED = 26, + ATOM_UID_PROCESS_STATE_CHANGED = 27, + ATOM_PROCESS_LIFE_CYCLE_STATE_CHANGED = 28, + ATOM_SCREEN_STATE_CHANGED = 29, + ATOM_BATTERY_LEVEL_CHANGED = 30, + ATOM_CHARGING_STATE_CHANGED = 31, + ATOM_PLUGGED_STATE_CHANGED = 32, + ATOM_INTERACTIVE_STATE_CHANGED = 33, + ATOM_TOUCH_EVENT_REPORTED = 34, + ATOM_WAKEUP_ALARM_OCCURRED = 35, + ATOM_KERNEL_WAKEUP_REPORTED = 36, + ATOM_WIFI_LOCK_STATE_CHANGED = 37, + ATOM_WIFI_SIGNAL_STRENGTH_CHANGED = 38, + ATOM_WIFI_SCAN_STATE_CHANGED = 39, + ATOM_PHONE_SIGNAL_STRENGTH_CHANGED = 40, + ATOM_SETTING_CHANGED = 41, + ATOM_ACTIVITY_FOREGROUND_STATE_CHANGED = 42, + ATOM_ISOLATED_UID_CHANGED = 43, + ATOM_PACKET_WAKEUP_OCCURRED = 44, + ATOM_WALL_CLOCK_TIME_SHIFTED = 45, + ATOM_ANOMALY_DETECTED = 46, + ATOM_APP_BREADCRUMB_REPORTED = 47, + ATOM_APP_START_OCCURRED = 48, + ATOM_APP_START_CANCELED = 49, + ATOM_APP_START_FULLY_DRAWN = 50, + ATOM_LMK_KILL_OCCURRED = 51, + ATOM_PICTURE_IN_PICTURE_STATE_CHANGED = 52, + ATOM_WIFI_MULTICAST_LOCK_STATE_CHANGED = 53, + ATOM_LMK_STATE_CHANGED = 54, + ATOM_APP_START_MEMORY_STATE_CAPTURED = 55, + ATOM_SHUTDOWN_SEQUENCE_REPORTED = 56, + ATOM_BOOT_SEQUENCE_REPORTED = 57, + ATOM_DAVEY_OCCURRED = 58, + ATOM_OVERLAY_STATE_CHANGED = 59, + ATOM_FOREGROUND_SERVICE_STATE_CHANGED = 60, + ATOM_CALL_STATE_CHANGED = 61, + ATOM_KEYGUARD_STATE_CHANGED = 62, + ATOM_KEYGUARD_BOUNCER_STATE_CHANGED = 63, + ATOM_KEYGUARD_BOUNCER_PASSWORD_ENTERED = 64, + ATOM_APP_DIED = 65, + ATOM_RESOURCE_CONFIGURATION_CHANGED = 66, + ATOM_BLUETOOTH_ENABLED_STATE_CHANGED = 67, + ATOM_BLUETOOTH_CONNECTION_STATE_CHANGED = 68, + ATOM_GPS_SIGNAL_QUALITY_CHANGED = 69, + ATOM_USB_CONNECTOR_STATE_CHANGED = 70, + ATOM_SPEAKER_IMPEDANCE_REPORTED = 71, + ATOM_HARDWARE_FAILED = 72, + ATOM_PHYSICAL_DROP_DETECTED = 73, + ATOM_CHARGE_CYCLES_REPORTED = 74, + ATOM_MOBILE_CONNECTION_STATE_CHANGED = 75, + ATOM_MOBILE_RADIO_TECHNOLOGY_CHANGED = 76, + ATOM_USB_DEVICE_ATTACHED = 77, + ATOM_APP_CRASH_OCCURRED = 78, + ATOM_ANR_OCCURRED = 79, + ATOM_WTF_OCCURRED = 80, + ATOM_LOW_MEM_REPORTED = 81, + ATOM_GENERIC_ATOM = 82, + ATOM_VIBRATOR_STATE_CHANGED = 84, + ATOM_DEFERRED_JOB_STATS_REPORTED = 85, + ATOM_THERMAL_THROTTLING = 86, + ATOM_BIOMETRIC_ACQUIRED = 87, + ATOM_BIOMETRIC_AUTHENTICATED = 88, + ATOM_BIOMETRIC_ERROR_OCCURRED = 89, + ATOM_UI_EVENT_REPORTED = 90, + ATOM_BATTERY_HEALTH_SNAPSHOT = 91, + ATOM_SLOW_IO = 92, + ATOM_BATTERY_CAUSED_SHUTDOWN = 93, + ATOM_PHONE_SERVICE_STATE_CHANGED = 94, + ATOM_PHONE_STATE_CHANGED = 95, + ATOM_USER_RESTRICTION_CHANGED = 96, + ATOM_SETTINGS_UI_CHANGED = 97, + ATOM_CONNECTIVITY_STATE_CHANGED = 98, + ATOM_SERVICE_STATE_CHANGED = 99, + ATOM_SERVICE_LAUNCH_REPORTED = 100, + ATOM_FLAG_FLIP_UPDATE_OCCURRED = 101, + ATOM_BINARY_PUSH_STATE_CHANGED = 102, + ATOM_DEVICE_POLICY_EVENT = 103, + ATOM_DOCS_UI_FILE_OP_CANCELED = 104, + ATOM_DOCS_UI_FILE_OP_COPY_MOVE_MODE_REPORTED = 105, + ATOM_DOCS_UI_FILE_OP_FAILURE = 106, + ATOM_DOCS_UI_PROVIDER_FILE_OP = 107, + ATOM_DOCS_UI_INVALID_SCOPED_ACCESS_REQUEST = 108, + ATOM_DOCS_UI_LAUNCH_REPORTED = 109, + ATOM_DOCS_UI_ROOT_VISITED = 110, + ATOM_DOCS_UI_STARTUP_MS = 111, + ATOM_DOCS_UI_USER_ACTION_REPORTED = 112, + ATOM_WIFI_ENABLED_STATE_CHANGED = 113, + ATOM_WIFI_RUNNING_STATE_CHANGED = 114, + ATOM_APP_COMPACTED = 115, + ATOM_NETWORK_DNS_EVENT_REPORTED = 116, + ATOM_DOCS_UI_PICKER_LAUNCHED_FROM_REPORTED = 117, + ATOM_DOCS_UI_PICK_RESULT_REPORTED = 118, + ATOM_DOCS_UI_SEARCH_MODE_REPORTED = 119, + ATOM_DOCS_UI_SEARCH_TYPE_REPORTED = 120, + ATOM_DATA_STALL_EVENT = 121, + ATOM_RESCUE_PARTY_RESET_REPORTED = 122, + ATOM_SIGNED_CONFIG_REPORTED = 123, + ATOM_GNSS_NI_EVENT_REPORTED = 124, + ATOM_BLUETOOTH_LINK_LAYER_CONNECTION_EVENT = 125, + ATOM_BLUETOOTH_ACL_CONNECTION_STATE_CHANGED = 126, + ATOM_BLUETOOTH_SCO_CONNECTION_STATE_CHANGED = 127, + ATOM_APP_DOWNGRADED = 128, + ATOM_APP_OPTIMIZED_AFTER_DOWNGRADED = 129, + ATOM_LOW_STORAGE_STATE_CHANGED = 130, + ATOM_GNSS_NFW_NOTIFICATION_REPORTED = 131, + ATOM_GNSS_CONFIGURATION_REPORTED = 132, + ATOM_USB_PORT_OVERHEAT_EVENT_REPORTED = 133, + ATOM_NFC_ERROR_OCCURRED = 134, + ATOM_NFC_STATE_CHANGED = 135, + ATOM_NFC_BEAM_OCCURRED = 136, + ATOM_NFC_CARDEMULATION_OCCURRED = 137, + ATOM_NFC_TAG_OCCURRED = 138, + ATOM_NFC_HCE_TRANSACTION_OCCURRED = 139, + ATOM_SE_STATE_CHANGED = 140, + ATOM_SE_OMAPI_REPORTED = 141, + ATOM_BROADCAST_DISPATCH_LATENCY_REPORTED = 142, + ATOM_ATTENTION_MANAGER_SERVICE_RESULT_REPORTED = 143, + ATOM_ADB_CONNECTION_CHANGED = 144, + ATOM_SPEECH_DSP_STAT_REPORTED = 145, + ATOM_USB_CONTAMINANT_REPORTED = 146, + ATOM_WATCHDOG_ROLLBACK_OCCURRED = 147, + ATOM_BIOMETRIC_SYSTEM_HEALTH_ISSUE_DETECTED = 148, + ATOM_BUBBLE_UI_CHANGED = 149, + ATOM_SCHEDULED_JOB_CONSTRAINT_CHANGED = 150, + ATOM_BLUETOOTH_ACTIVE_DEVICE_CHANGED = 151, + ATOM_BLUETOOTH_A2DP_PLAYBACK_STATE_CHANGED = 152, + ATOM_BLUETOOTH_A2DP_CODEC_CONFIG_CHANGED = 153, + ATOM_BLUETOOTH_A2DP_CODEC_CAPABILITY_CHANGED = 154, + ATOM_BLUETOOTH_A2DP_AUDIO_UNDERRUN_REPORTED = 155, + ATOM_BLUETOOTH_A2DP_AUDIO_OVERRUN_REPORTED = 156, + ATOM_BLUETOOTH_DEVICE_RSSI_REPORTED = 157, + ATOM_BLUETOOTH_DEVICE_FAILED_CONTACT_COUNTER_REPORTED = 158, + ATOM_BLUETOOTH_DEVICE_TX_POWER_LEVEL_REPORTED = 159, + ATOM_BLUETOOTH_HCI_TIMEOUT_REPORTED = 160, + ATOM_BLUETOOTH_QUALITY_REPORT_REPORTED = 161, + ATOM_BLUETOOTH_DEVICE_INFO_REPORTED = 162, + ATOM_BLUETOOTH_REMOTE_VERSION_INFO_REPORTED = 163, + ATOM_BLUETOOTH_SDP_ATTRIBUTE_REPORTED = 164, + ATOM_BLUETOOTH_BOND_STATE_CHANGED = 165, + ATOM_BLUETOOTH_CLASSIC_PAIRING_EVENT_REPORTED = 166, + ATOM_BLUETOOTH_SMP_PAIRING_EVENT_REPORTED = 167, + ATOM_SCREEN_TIMEOUT_EXTENSION_REPORTED = 168, + ATOM_PROCESS_START_TIME = 169, + ATOM_PERMISSION_GRANT_REQUEST_RESULT_REPORTED = 170, + ATOM_BLUETOOTH_SOCKET_CONNECTION_STATE_CHANGED = 171, + ATOM_DEVICE_IDENTIFIER_ACCESS_DENIED = 172, + ATOM_BUBBLE_DEVELOPER_ERROR_REPORTED = 173, + ATOM_ASSIST_GESTURE_STAGE_REPORTED = 174, + ATOM_ASSIST_GESTURE_FEEDBACK_REPORTED = 175, + ATOM_ASSIST_GESTURE_PROGRESS_REPORTED = 176, + ATOM_TOUCH_GESTURE_CLASSIFIED = 177, + ATOM_HIDDEN_API_USED = 178, + ATOM_STYLE_UI_CHANGED = 179, + ATOM_PRIVACY_INDICATORS_INTERACTED = 180, + ATOM_APP_INSTALL_ON_EXTERNAL_STORAGE_REPORTED = 181, + ATOM_NETWORK_STACK_REPORTED = 182, + ATOM_APP_MOVED_STORAGE_REPORTED = 183, + ATOM_BIOMETRIC_ENROLLED = 184, + ATOM_SYSTEM_SERVER_WATCHDOG_OCCURRED = 185, + ATOM_TOMB_STONE_OCCURRED = 186, + ATOM_BLUETOOTH_CLASS_OF_DEVICE_REPORTED = 187, + ATOM_INTELLIGENCE_EVENT_REPORTED = 188, + ATOM_THERMAL_THROTTLING_SEVERITY_STATE_CHANGED = 189, + ATOM_ROLE_REQUEST_RESULT_REPORTED = 190, + ATOM_MEDIAMETRICS_AUDIOPOLICY_REPORTED = 191, + ATOM_MEDIAMETRICS_AUDIORECORD_REPORTED = 192, + ATOM_MEDIAMETRICS_AUDIOTHREAD_REPORTED = 193, + ATOM_MEDIAMETRICS_AUDIOTRACK_REPORTED = 194, + ATOM_MEDIAMETRICS_CODEC_REPORTED = 195, + ATOM_MEDIAMETRICS_DRM_WIDEVINE_REPORTED = 196, + ATOM_MEDIAMETRICS_EXTRACTOR_REPORTED = 197, + ATOM_MEDIAMETRICS_MEDIADRM_REPORTED = 198, + ATOM_MEDIAMETRICS_NUPLAYER_REPORTED = 199, + ATOM_MEDIAMETRICS_RECORDER_REPORTED = 200, + ATOM_MEDIAMETRICS_DRMMANAGER_REPORTED = 201, + ATOM_CAR_POWER_STATE_CHANGED = 203, + ATOM_GARAGE_MODE_INFO = 204, + ATOM_TEST_ATOM_REPORTED = 205, + ATOM_CONTENT_CAPTURE_CALLER_MISMATCH_REPORTED = 206, + ATOM_CONTENT_CAPTURE_SERVICE_EVENTS = 207, + ATOM_CONTENT_CAPTURE_SESSION_EVENTS = 208, + ATOM_CONTENT_CAPTURE_FLUSHED = 209, + ATOM_LOCATION_MANAGER_API_USAGE_REPORTED = 210, + ATOM_REVIEW_PERMISSIONS_FRAGMENT_RESULT_REPORTED = 211, + ATOM_RUNTIME_PERMISSIONS_UPGRADE_RESULT = 212, + ATOM_GRANT_PERMISSIONS_ACTIVITY_BUTTON_ACTIONS = 213, + ATOM_LOCATION_ACCESS_CHECK_NOTIFICATION_ACTION = 214, + ATOM_APP_PERMISSION_FRAGMENT_ACTION_REPORTED = 215, + ATOM_APP_PERMISSION_FRAGMENT_VIEWED = 216, + ATOM_APP_PERMISSIONS_FRAGMENT_VIEWED = 217, + ATOM_PERMISSION_APPS_FRAGMENT_VIEWED = 218, + ATOM_TEXT_SELECTION_EVENT = 219, + ATOM_TEXT_LINKIFY_EVENT = 220, + ATOM_CONVERSATION_ACTIONS_EVENT = 221, + ATOM_LANGUAGE_DETECTION_EVENT = 222, + ATOM_EXCLUSION_RECT_STATE_CHANGED = 223, + ATOM_BACK_GESTURE_REPORTED_REPORTED = 224, + ATOM_UPDATE_ENGINE_UPDATE_ATTEMPT_REPORTED = 225, + ATOM_UPDATE_ENGINE_SUCCESSFUL_UPDATE_REPORTED = 226, + ATOM_CAMERA_ACTION_EVENT = 227, + ATOM_APP_COMPATIBILITY_CHANGE_REPORTED = 228, + ATOM_PERFETTO_UPLOADED = 229, + ATOM_VMS_CLIENT_CONNECTION_STATE_CHANGED = 230, + ATOM_MEDIA_PROVIDER_SCAN_OCCURRED = 233, + ATOM_MEDIA_CONTENT_DELETED = 234, + ATOM_MEDIA_PROVIDER_PERMISSION_REQUESTED = 235, + ATOM_MEDIA_PROVIDER_SCHEMA_CHANGED = 236, + ATOM_MEDIA_PROVIDER_IDLE_MAINTENANCE_FINISHED = 237, + ATOM_REBOOT_ESCROW_RECOVERY_REPORTED = 238, + ATOM_BOOT_TIME_EVENT_DURATION_REPORTED = 239, + ATOM_BOOT_TIME_EVENT_ELAPSED_TIME_REPORTED = 240, + ATOM_BOOT_TIME_EVENT_UTC_TIME_REPORTED = 241, + ATOM_BOOT_TIME_EVENT_ERROR_CODE_REPORTED = 242, + ATOM_USERSPACE_REBOOT_REPORTED = 243, + ATOM_NOTIFICATION_REPORTED = 244, + ATOM_NOTIFICATION_PANEL_REPORTED = 245, + ATOM_NOTIFICATION_CHANNEL_MODIFIED = 246, + ATOM_INTEGRITY_CHECK_RESULT_REPORTED = 247, + ATOM_INTEGRITY_RULES_PUSHED = 248, + ATOM_CB_MESSAGE_REPORTED = 249, + ATOM_CB_MESSAGE_ERROR = 250, + ATOM_WIFI_HEALTH_STAT_REPORTED = 251, + ATOM_WIFI_FAILURE_STAT_REPORTED = 252, + ATOM_WIFI_CONNECTION_RESULT_REPORTED = 253, + ATOM_APP_FREEZE_CHANGED = 254, + ATOM_SNAPSHOT_MERGE_REPORTED = 255, + ATOM_FOREGROUND_SERVICE_APP_OP_SESSION_ENDED = 256, + ATOM_DISPLAY_JANK_REPORTED = 257, + ATOM_APP_STANDBY_BUCKET_CHANGED = 258, + ATOM_SHARESHEET_STARTED = 259, + ATOM_RANKING_SELECTED = 260, + ATOM_TVSETTINGS_UI_INTERACTED = 261, + ATOM_LAUNCHER_SNAPSHOT = 262, + ATOM_PACKAGE_INSTALLER_V2_REPORTED = 263, + ATOM_USER_LIFECYCLE_JOURNEY_REPORTED = 264, + ATOM_USER_LIFECYCLE_EVENT_OCCURRED = 265, + ATOM_ACCESSIBILITY_SHORTCUT_REPORTED = 266, + ATOM_ACCESSIBILITY_SERVICE_REPORTED = 267, + ATOM_DOCS_UI_DRAG_AND_DROP_REPORTED = 268, + ATOM_APP_USAGE_EVENT_OCCURRED = 269, + ATOM_AUTO_REVOKE_NOTIFICATION_CLICKED = 270, + ATOM_AUTO_REVOKE_FRAGMENT_APP_VIEWED = 271, + ATOM_AUTO_REVOKED_APP_INTERACTION = 272, + ATOM_APP_PERMISSION_GROUPS_FRAGMENT_AUTO_REVOKE_ACTION = 273, + ATOM_EVS_USAGE_STATS_REPORTED = 274, + ATOM_AUDIO_POWER_USAGE_DATA_REPORTED = 275, + ATOM_TV_TUNER_STATE_CHANGED = 276, + ATOM_MEDIAOUTPUT_OP_SWITCH_REPORTED = 277, + ATOM_CB_MESSAGE_FILTERED = 278, + ATOM_TV_TUNER_DVR_STATUS = 279, + ATOM_TV_CAS_SESSION_OPEN_STATUS = 280, + ATOM_ASSISTANT_INVOCATION_REPORTED = 281, + ATOM_DISPLAY_WAKE_REPORTED = 282, + ATOM_CAR_USER_HAL_MODIFY_USER_REQUEST_REPORTED = 283, + ATOM_CAR_USER_HAL_MODIFY_USER_RESPONSE_REPORTED = 284, + ATOM_CAR_USER_HAL_POST_SWITCH_RESPONSE_REPORTED = 285, + ATOM_CAR_USER_HAL_INITIAL_USER_INFO_REQUEST_REPORTED = 286, + ATOM_CAR_USER_HAL_INITIAL_USER_INFO_RESPONSE_REPORTED = 287, + ATOM_CAR_USER_HAL_USER_ASSOCIATION_REQUEST_REPORTED = 288, + ATOM_CAR_USER_HAL_SET_USER_ASSOCIATION_RESPONSE_REPORTED = 289, + ATOM_NETWORK_IP_PROVISIONING_REPORTED = 290, + ATOM_NETWORK_DHCP_RENEW_REPORTED = 291, + ATOM_NETWORK_VALIDATION_REPORTED = 292, + ATOM_NETWORK_STACK_QUIRK_REPORTED = 293, + ATOM_MEDIAMETRICS_AUDIORECORDDEVICEUSAGE_REPORTED = 294, + ATOM_MEDIAMETRICS_AUDIOTHREADDEVICEUSAGE_REPORTED = 295, + ATOM_MEDIAMETRICS_AUDIOTRACKDEVICEUSAGE_REPORTED = 296, + ATOM_MEDIAMETRICS_AUDIODEVICECONNECTION_REPORTED = 297, + ATOM_BLOB_COMMITTED = 298, + ATOM_BLOB_LEASED = 299, + ATOM_BLOB_OPENED = 300, + ATOM_CONTACTS_PROVIDER_STATUS_REPORTED = 301, + ATOM_KEYSTORE_KEY_EVENT_REPORTED = 302, + ATOM_NETWORK_TETHERING_REPORTED = 303, + ATOM_IME_TOUCH_REPORTED = 304, + ATOM_UI_INTERACTION_FRAME_INFO_REPORTED = 305, + ATOM_UI_ACTION_LATENCY_REPORTED = 306, + ATOM_WIFI_DISCONNECT_REPORTED = 307, + ATOM_WIFI_CONNECTION_STATE_CHANGED = 308, + ATOM_HDMI_CEC_ACTIVE_SOURCE_CHANGED = 309, + ATOM_HDMI_CEC_MESSAGE_REPORTED = 310, + ATOM_AIRPLANE_MODE = 311, + ATOM_MODEM_RESTART = 312, + ATOM_CARRIER_ID_MISMATCH_REPORTED = 313, + ATOM_CARRIER_ID_TABLE_UPDATED = 314, + ATOM_DATA_STALL_RECOVERY_REPORTED = 315, + ATOM_MEDIAMETRICS_MEDIAPARSER_REPORTED = 316, + ATOM_TLS_HANDSHAKE_REPORTED = 317, + ATOM_TEXT_CLASSIFIER_API_USAGE_REPORTED = 318, + ATOM_CAR_WATCHDOG_KILL_STATS_REPORTED = 319, + ATOM_MEDIAMETRICS_PLAYBACK_REPORTED = 320, + ATOM_MEDIA_NETWORK_INFO_CHANGED = 321, + ATOM_MEDIA_PLAYBACK_STATE_CHANGED = 322, + ATOM_MEDIA_PLAYBACK_ERROR_REPORTED = 323, + ATOM_MEDIA_PLAYBACK_TRACK_CHANGED = 324, + ATOM_WIFI_SCAN_REPORTED = 325, + ATOM_WIFI_PNO_SCAN_REPORTED = 326, + ATOM_TIF_TUNE_CHANGED = 327, + ATOM_AUTO_ROTATE_REPORTED = 328, + ATOM_PERFETTO_TRIGGER = 329, + ATOM_TRANSCODING_DATA = 330, + ATOM_IMS_SERVICE_ENTITLEMENT_UPDATED = 331, + ATOM_ART_DATUM_REPORTED = 332, + ATOM_DEVICE_ROTATED = 333, + ATOM_SIM_SPECIFIC_SETTINGS_RESTORED = 334, + ATOM_TEXT_CLASSIFIER_DOWNLOAD_REPORTED = 335, + ATOM_PIN_STORAGE_EVENT = 336, + ATOM_FACE_DOWN_REPORTED = 337, + ATOM_BLUETOOTH_HAL_CRASH_REASON_REPORTED = 338, + ATOM_REBOOT_ESCROW_PREPARATION_REPORTED = 339, + ATOM_REBOOT_ESCROW_LSKF_CAPTURE_REPORTED = 340, + ATOM_REBOOT_ESCROW_REBOOT_REPORTED = 341, + ATOM_BINDER_LATENCY_REPORTED = 342, + ATOM_MEDIAMETRICS_AAUDIOSTREAM_REPORTED = 343, + ATOM_MEDIA_TRANSCODING_SESSION_ENDED = 344, + ATOM_MAGNIFICATION_USAGE_REPORTED = 345, + ATOM_MAGNIFICATION_MODE_WITH_IME_ON_REPORTED = 346, + ATOM_APP_SEARCH_CALL_STATS_REPORTED = 347, + ATOM_APP_SEARCH_PUT_DOCUMENT_STATS_REPORTED = 348, + ATOM_DEVICE_CONTROL_CHANGED = 349, + ATOM_DEVICE_STATE_CHANGED = 350, + ATOM_INPUTDEVICE_REGISTERED = 351, + ATOM_SMARTSPACE_CARD_REPORTED = 352, + ATOM_AUTH_PROMPT_AUTHENTICATE_INVOKED = 353, + ATOM_AUTH_MANAGER_CAN_AUTHENTICATE_INVOKED = 354, + ATOM_AUTH_ENROLL_ACTION_INVOKED = 355, + ATOM_AUTH_DEPRECATED_API_USED = 356, + ATOM_UNATTENDED_REBOOT_OCCURRED = 357, + ATOM_LONG_REBOOT_BLOCKING_REPORTED = 358, + ATOM_LOCATION_TIME_ZONE_PROVIDER_STATE_CHANGED = 359, + ATOM_FDTRACK_EVENT_OCCURRED = 364, + ATOM_TIMEOUT_AUTO_EXTENDED_REPORTED = 365, + ATOM_ODREFRESH_REPORTED = 366, + ATOM_ALARM_BATCH_DELIVERED = 367, + ATOM_ALARM_SCHEDULED = 368, + ATOM_CAR_WATCHDOG_IO_OVERUSE_STATS_REPORTED = 369, + ATOM_USER_LEVEL_HIBERNATION_STATE_CHANGED = 370, + ATOM_APP_SEARCH_INITIALIZE_STATS_REPORTED = 371, + ATOM_APP_SEARCH_QUERY_STATS_REPORTED = 372, + ATOM_APP_PROCESS_DIED = 373, + ATOM_NETWORK_IP_REACHABILITY_MONITOR_REPORTED = 374, + ATOM_SLOW_INPUT_EVENT_REPORTED = 375, + ATOM_ANR_OCCURRED_PROCESSING_STARTED = 376, + ATOM_APP_SEARCH_REMOVE_STATS_REPORTED = 377, + ATOM_MEDIA_CODEC_REPORTED = 378, + ATOM_PERMISSION_USAGE_FRAGMENT_INTERACTION = 379, + ATOM_PERMISSION_DETAILS_INTERACTION = 380, + ATOM_PRIVACY_SENSOR_TOGGLE_INTERACTION = 381, + ATOM_PRIVACY_TOGGLE_DIALOG_INTERACTION = 382, + ATOM_APP_SEARCH_OPTIMIZE_STATS_REPORTED = 383, + ATOM_NON_A11Y_TOOL_SERVICE_WARNING_REPORT = 384, + ATOM_APP_SEARCH_SET_SCHEMA_STATS_REPORTED = 385, + ATOM_APP_COMPAT_STATE_CHANGED = 386, + ATOM_SIZE_COMPAT_RESTART_BUTTON_EVENT_REPORTED = 387, + ATOM_SPLITSCREEN_UI_CHANGED = 388, + ATOM_NETWORK_DNS_HANDSHAKE_REPORTED = 389, + ATOM_BLUETOOTH_CODE_PATH_COUNTER = 390, + ATOM_BLUETOOTH_LE_BATCH_SCAN_REPORT_DELAY = 392, + ATOM_ACCESSIBILITY_FLOATING_MENU_UI_CHANGED = 393, + ATOM_NEURALNETWORKS_COMPILATION_COMPLETED = 394, + ATOM_NEURALNETWORKS_EXECUTION_COMPLETED = 395, + ATOM_NEURALNETWORKS_COMPILATION_FAILED = 396, + ATOM_NEURALNETWORKS_EXECUTION_FAILED = 397, + ATOM_CONTEXT_HUB_BOOTED = 398, + ATOM_CONTEXT_HUB_RESTARTED = 399, + ATOM_CONTEXT_HUB_LOADED_NANOAPP_SNAPSHOT_REPORTED = 400, + ATOM_CHRE_CODE_DOWNLOAD_TRANSACTED = 401, + ATOM_UWB_SESSION_INITED = 402, + ATOM_UWB_SESSION_CLOSED = 403, + ATOM_UWB_FIRST_RANGING_RECEIVED = 404, + ATOM_UWB_RANGING_MEASUREMENT_RECEIVED = 405, + ATOM_TEXT_CLASSIFIER_DOWNLOAD_WORK_SCHEDULED = 406, + ATOM_TEXT_CLASSIFIER_DOWNLOAD_WORK_COMPLETED = 407, + ATOM_CLIPBOARD_CLEARED = 408, + ATOM_VM_CREATION_REQUESTED = 409, + ATOM_NEARBY_DEVICE_SCAN_STATE_CHANGED = 410, + ATOM_CAMERA_COMPAT_CONTROL_EVENT_REPORTED = 411, + ATOM_APPLICATION_LOCALES_CHANGED = 412, + ATOM_MEDIAMETRICS_AUDIOTRACKSTATUS_REPORTED = 413, + ATOM_FOLD_STATE_DURATION_REPORTED = 414, + ATOM_LOCATION_TIME_ZONE_PROVIDER_CONTROLLER_STATE_CHANGED = 415, + ATOM_DISPLAY_HBM_STATE_CHANGED = 416, + ATOM_DISPLAY_HBM_BRIGHTNESS_CHANGED = 417, + ATOM_PERSISTENT_URI_PERMISSIONS_FLUSHED = 418, + ATOM_EARLY_BOOT_COMP_OS_ARTIFACTS_CHECK_REPORTED = 419, + ATOM_VBMETA_DIGEST_REPORTED = 420, + ATOM_APEX_INFO_GATHERED = 421, + ATOM_PVM_INFO_GATHERED = 422, + ATOM_WEAR_SETTINGS_UI_INTERACTED = 423, + ATOM_TRACING_SERVICE_REPORT_EVENT = 424, + ATOM_MEDIAMETRICS_AUDIORECORDSTATUS_REPORTED = 425, + ATOM_LAUNCHER_LATENCY = 426, + ATOM_DROPBOX_ENTRY_DROPPED = 427, + ATOM_WIFI_P2P_CONNECTION_REPORTED = 428, + ATOM_GAME_STATE_CHANGED = 429, + ATOM_HOTWORD_DETECTOR_CREATE_REQUESTED = 430, + ATOM_HOTWORD_DETECTION_SERVICE_INIT_RESULT_REPORTED = 431, + ATOM_HOTWORD_DETECTION_SERVICE_RESTARTED = 432, + ATOM_HOTWORD_DETECTOR_KEYPHRASE_TRIGGERED = 433, + ATOM_HOTWORD_DETECTOR_EVENTS = 434, + ATOM_BOOT_COMPLETED_BROADCAST_COMPLETION_LATENCY_REPORTED = 437, + ATOM_CONTACTS_INDEXER_UPDATE_STATS_REPORTED = 440, + ATOM_APP_BACKGROUND_RESTRICTIONS_INFO = 441, + ATOM_MMS_SMS_PROVIDER_GET_THREAD_ID_FAILED = 442, + ATOM_MMS_SMS_DATABASE_HELPER_ON_UPGRADE_FAILED = 443, + ATOM_PERMISSION_REMINDER_NOTIFICATION_INTERACTED = 444, + ATOM_RECENT_PERMISSION_DECISIONS_INTERACTED = 445, + ATOM_GNSS_PSDS_DOWNLOAD_REPORTED = 446, + ATOM_LE_AUDIO_CONNECTION_SESSION_REPORTED = 447, + ATOM_LE_AUDIO_BROADCAST_SESSION_REPORTED = 448, + ATOM_DREAM_UI_EVENT_REPORTED = 449, + ATOM_TASK_MANAGER_EVENT_REPORTED = 450, + ATOM_CDM_ASSOCIATION_ACTION = 451, + ATOM_MAGNIFICATION_TRIPLE_TAP_AND_HOLD_ACTIVATED_SESSION_REPORTED = 452, + ATOM_MAGNIFICATION_FOLLOW_TYPING_FOCUS_ACTIVATED_SESSION_REPORTED = 453, + ATOM_ACCESSIBILITY_TEXT_READING_OPTIONS_CHANGED = 454, + ATOM_WIFI_SETUP_FAILURE_CRASH_REPORTED = 455, + ATOM_UWB_DEVICE_ERROR_REPORTED = 456, + ATOM_ISOLATED_COMPILATION_SCHEDULED = 457, + ATOM_ISOLATED_COMPILATION_ENDED = 458, + ATOM_ONS_OPPORTUNISTIC_ESIM_PROVISIONING_COMPLETE = 459, + ATOM_TELEPHONY_ANOMALY_DETECTED = 461, + ATOM_LETTERBOX_POSITION_CHANGED = 462, + ATOM_REMOTE_KEY_PROVISIONING_ATTEMPT = 463, + ATOM_REMOTE_KEY_PROVISIONING_NETWORK_INFO = 464, + ATOM_REMOTE_KEY_PROVISIONING_TIMING = 465, + ATOM_MEDIAOUTPUT_OP_INTERACTION_REPORT = 466, + ATOM_BACKGROUND_DEXOPT_JOB_ENDED = 467, + ATOM_SYNC_EXEMPTION_OCCURRED = 468, + ATOM_AUTOFILL_PRESENTATION_EVENT_REPORTED = 469, + ATOM_DOCK_STATE_CHANGED = 470, + ATOM_BROADCAST_DELIVERY_EVENT_REPORTED = 475, + ATOM_SERVICE_REQUEST_EVENT_REPORTED = 476, + ATOM_PROVIDER_ACQUISITION_EVENT_REPORTED = 477, + ATOM_BLUETOOTH_DEVICE_NAME_REPORTED = 478, + ATOM_VIBRATION_REPORTED = 487, + ATOM_UWB_RANGING_START = 489, + ATOM_DISPLAY_BRIGHTNESS_CHANGED = 494, + ATOM_ACTIVITY_ACTION_BLOCKED = 495, + ATOM_NETWORK_DNS_SERVER_SUPPORT_REPORTED = 504, + ATOM_VM_BOOTED = 505, + ATOM_VM_EXITED = 506, + ATOM_AMBIENT_BRIGHTNESS_STATS_REPORTED = 507, + ATOM_MEDIAMETRICS_SPATIALIZERCAPABILITIES_REPORTED = 508, + ATOM_MEDIAMETRICS_SPATIALIZERDEVICEENABLED_REPORTED = 509, + ATOM_MEDIAMETRICS_HEADTRACKERDEVICEENABLED_REPORTED = 510, + ATOM_MEDIAMETRICS_HEADTRACKERDEVICESUPPORTED_REPORTED = 511, + ATOM_HEARING_AID_INFO_REPORTED = 513, + ATOM_DEVICE_WIDE_JOB_CONSTRAINT_CHANGED = 514, + ATOM_IWLAN_SETUP_DATA_CALL_RESULT_REPORTED = 519, + ATOM_IWLAN_PDN_DISCONNECTED_REASON_REPORTED = 520, + ATOM_AIRPLANE_MODE_SESSION_REPORTED = 521, + ATOM_VM_CPU_STATUS_REPORTED = 522, + ATOM_VM_MEM_STATUS_REPORTED = 523, + ATOM_DEFAULT_NETWORK_REMATCH_INFO = 525, + ATOM_NETWORK_SELECTION_PERFORMANCE = 526, + ATOM_NETWORK_NSD_REPORTED = 527, + ATOM_BLUETOOTH_DISCONNECTION_REASON_REPORTED = 529, + ATOM_BLUETOOTH_LOCAL_VERSIONS_REPORTED = 530, + ATOM_BLUETOOTH_REMOTE_SUPPORTED_FEATURES_REPORTED = 531, + ATOM_BLUETOOTH_LOCAL_SUPPORTED_FEATURES_REPORTED = 532, + ATOM_BLUETOOTH_GATT_APP_INFO = 533, + ATOM_BRIGHTNESS_CONFIGURATION_UPDATED = 534, + ATOM_LAUNCHER_IMPRESSION_EVENT = 547, + ATOM_ODSIGN_REPORTED = 548, + ATOM_ART_DEVICE_DATUM_REPORTED = 550, + ATOM_NETWORK_SLICE_SESSION_ENDED = 558, + ATOM_NETWORK_SLICE_DAILY_DATA_USAGE_REPORTED = 559, + ATOM_NFC_TAG_TYPE_OCCURRED = 560, + ATOM_NFC_AID_CONFLICT_OCCURRED = 561, + ATOM_NFC_READER_CONFLICT_OCCURRED = 562, + ATOM_ART_DATUM_DELTA_REPORTED = 565, + ATOM_MEDIA_DRM_CREATED = 568, + ATOM_MEDIA_DRM_ERRORED = 569, + ATOM_MEDIA_DRM_SESSION_OPENED = 570, + ATOM_MEDIA_DRM_SESSION_CLOSED = 571, + ATOM_PERFORMANCE_HINT_SESSION_REPORTED = 574, + ATOM_HOTWORD_AUDIO_EGRESS_EVENT_REPORTED = 578, + ATOM_NETWORK_VALIDATION_FAILURE_STATS_DAILY_REPORTED = 601, + ATOM_WIFI_BYTES_TRANSFER = 10000, + ATOM_WIFI_BYTES_TRANSFER_BY_FG_BG = 10001, + ATOM_MOBILE_BYTES_TRANSFER = 10002, + ATOM_MOBILE_BYTES_TRANSFER_BY_FG_BG = 10003, + ATOM_BLUETOOTH_BYTES_TRANSFER = 10006, + ATOM_KERNEL_WAKELOCK = 10004, + ATOM_SUBSYSTEM_SLEEP_STATE = 10005, + ATOM_CPU_TIME_PER_UID = 10009, + ATOM_CPU_TIME_PER_UID_FREQ = 10010, + ATOM_WIFI_ACTIVITY_INFO = 10011, + ATOM_MODEM_ACTIVITY_INFO = 10012, + ATOM_BLUETOOTH_ACTIVITY_INFO = 10007, + ATOM_PROCESS_MEMORY_STATE = 10013, + ATOM_SYSTEM_ELAPSED_REALTIME = 10014, + ATOM_SYSTEM_UPTIME = 10015, + ATOM_CPU_ACTIVE_TIME = 10016, + ATOM_CPU_CLUSTER_TIME = 10017, + ATOM_DISK_SPACE = 10018, + ATOM_REMAINING_BATTERY_CAPACITY = 10019, + ATOM_FULL_BATTERY_CAPACITY = 10020, + ATOM_TEMPERATURE = 10021, + ATOM_BINDER_CALLS = 10022, + ATOM_BINDER_CALLS_EXCEPTIONS = 10023, + ATOM_LOOPER_STATS = 10024, + ATOM_DISK_STATS = 10025, + ATOM_DIRECTORY_USAGE = 10026, + ATOM_APP_SIZE = 10027, + ATOM_CATEGORY_SIZE = 10028, + ATOM_PROC_STATS = 10029, + ATOM_BATTERY_VOLTAGE = 10030, + ATOM_NUM_FINGERPRINTS_ENROLLED = 10031, + ATOM_DISK_IO = 10032, + ATOM_POWER_PROFILE = 10033, + ATOM_PROC_STATS_PKG_PROC = 10034, + ATOM_PROCESS_CPU_TIME = 10035, + ATOM_CPU_TIME_PER_THREAD_FREQ = 10037, + ATOM_ON_DEVICE_POWER_MEASUREMENT = 10038, + ATOM_DEVICE_CALCULATED_POWER_USE = 10039, + ATOM_PROCESS_MEMORY_HIGH_WATER_MARK = 10042, + ATOM_BATTERY_LEVEL = 10043, + ATOM_BUILD_INFORMATION = 10044, + ATOM_BATTERY_CYCLE_COUNT = 10045, + ATOM_DEBUG_ELAPSED_CLOCK = 10046, + ATOM_DEBUG_FAILING_ELAPSED_CLOCK = 10047, + ATOM_NUM_FACES_ENROLLED = 10048, + ATOM_ROLE_HOLDER = 10049, + ATOM_DANGEROUS_PERMISSION_STATE = 10050, + ATOM_TRAIN_INFO = 10051, + ATOM_TIME_ZONE_DATA_INFO = 10052, + ATOM_EXTERNAL_STORAGE_INFO = 10053, + ATOM_GPU_STATS_GLOBAL_INFO = 10054, + ATOM_GPU_STATS_APP_INFO = 10055, + ATOM_SYSTEM_ION_HEAP_SIZE = 10056, + ATOM_APPS_ON_EXTERNAL_STORAGE_INFO = 10057, + ATOM_FACE_SETTINGS = 10058, + ATOM_COOLING_DEVICE = 10059, + ATOM_APP_OPS = 10060, + ATOM_PROCESS_SYSTEM_ION_HEAP_SIZE = 10061, + ATOM_SURFACEFLINGER_STATS_GLOBAL_INFO = 10062, + ATOM_SURFACEFLINGER_STATS_LAYER_INFO = 10063, + ATOM_PROCESS_MEMORY_SNAPSHOT = 10064, + ATOM_VMS_CLIENT_STATS = 10065, + ATOM_NOTIFICATION_REMOTE_VIEWS = 10066, + ATOM_DANGEROUS_PERMISSION_STATE_SAMPLED = 10067, + ATOM_GRAPHICS_STATS = 10068, + ATOM_RUNTIME_APP_OP_ACCESS = 10069, + ATOM_ION_HEAP_SIZE = 10070, + ATOM_PACKAGE_NOTIFICATION_PREFERENCES = 10071, + ATOM_PACKAGE_NOTIFICATION_CHANNEL_PREFERENCES = 10072, + ATOM_PACKAGE_NOTIFICATION_CHANNEL_GROUP_PREFERENCES = 10073, + ATOM_GNSS_STATS = 10074, + ATOM_ATTRIBUTED_APP_OPS = 10075, + ATOM_VOICE_CALL_SESSION = 10076, + ATOM_VOICE_CALL_RAT_USAGE = 10077, + ATOM_SIM_SLOT_STATE = 10078, + ATOM_SUPPORTED_RADIO_ACCESS_FAMILY = 10079, + ATOM_SETTING_SNAPSHOT = 10080, + ATOM_BLOB_INFO = 10081, + ATOM_DATA_USAGE_BYTES_TRANSFER = 10082, + ATOM_BYTES_TRANSFER_BY_TAG_AND_METERED = 10083, + ATOM_DND_MODE_RULE = 10084, + ATOM_GENERAL_EXTERNAL_STORAGE_ACCESS_STATS = 10085, + ATOM_INCOMING_SMS = 10086, + ATOM_OUTGOING_SMS = 10087, + ATOM_CARRIER_ID_TABLE_VERSION = 10088, + ATOM_DATA_CALL_SESSION = 10089, + ATOM_CELLULAR_SERVICE_STATE = 10090, + ATOM_CELLULAR_DATA_SERVICE_SWITCH = 10091, + ATOM_SYSTEM_MEMORY = 10092, + ATOM_IMS_REGISTRATION_TERMINATION = 10093, + ATOM_IMS_REGISTRATION_STATS = 10094, + ATOM_CPU_TIME_PER_CLUSTER_FREQ = 10095, + ATOM_CPU_CYCLES_PER_UID_CLUSTER = 10096, + ATOM_DEVICE_ROTATED_DATA = 10097, + ATOM_CPU_CYCLES_PER_THREAD_GROUP_CLUSTER = 10098, + ATOM_MEDIA_DRM_ACTIVITY_INFO = 10099, + ATOM_OEM_MANAGED_BYTES_TRANSFER = 10100, + ATOM_GNSS_POWER_STATS = 10101, + ATOM_TIME_ZONE_DETECTOR_STATE = 10102, + ATOM_KEYSTORE2_STORAGE_STATS = 10103, + ATOM_RKP_POOL_STATS = 10104, + ATOM_PROCESS_DMABUF_MEMORY = 10105, + ATOM_PENDING_ALARM_INFO = 10106, + ATOM_USER_LEVEL_HIBERNATED_APPS = 10107, + ATOM_LAUNCHER_LAYOUT_SNAPSHOT = 10108, + ATOM_GLOBAL_HIBERNATED_APPS = 10109, + ATOM_INPUT_EVENT_LATENCY_SKETCH = 10110, + ATOM_BATTERY_USAGE_STATS_BEFORE_RESET = 10111, + ATOM_BATTERY_USAGE_STATS_SINCE_RESET = 10112, + ATOM_BATTERY_USAGE_STATS_SINCE_RESET_USING_POWER_PROFILE_MODEL = 10113, + ATOM_INSTALLED_INCREMENTAL_PACKAGE = 10114, + ATOM_TELEPHONY_NETWORK_REQUESTS = 10115, + ATOM_APP_SEARCH_STORAGE_INFO = 10116, + ATOM_VMSTAT = 10117, + ATOM_KEYSTORE2_KEY_CREATION_WITH_GENERAL_INFO = 10118, + ATOM_KEYSTORE2_KEY_CREATION_WITH_AUTH_INFO = 10119, + ATOM_KEYSTORE2_KEY_CREATION_WITH_PURPOSE_AND_MODES_INFO = 10120, + ATOM_KEYSTORE2_ATOM_WITH_OVERFLOW = 10121, + ATOM_KEYSTORE2_KEY_OPERATION_WITH_PURPOSE_AND_MODES_INFO = 10122, + ATOM_KEYSTORE2_KEY_OPERATION_WITH_GENERAL_INFO = 10123, + ATOM_RKP_ERROR_STATS = 10124, + ATOM_KEYSTORE2_CRASH_STATS = 10125, + ATOM_VENDOR_APEX_INFO = 10126, + ATOM_ACCESSIBILITY_SHORTCUT_STATS = 10127, + ATOM_ACCESSIBILITY_FLOATING_MENU_STATS = 10128, + ATOM_DATA_USAGE_BYTES_TRANSFER_V2 = 10129, + ATOM_MEDIA_CAPABILITIES = 10130, + ATOM_CAR_WATCHDOG_SYSTEM_IO_USAGE_SUMMARY = 10131, + ATOM_CAR_WATCHDOG_UID_IO_USAGE_SUMMARY = 10132, + ATOM_IMS_REGISTRATION_FEATURE_TAG_STATS = 10133, + ATOM_RCS_CLIENT_PROVISIONING_STATS = 10134, + ATOM_RCS_ACS_PROVISIONING_STATS = 10135, + ATOM_SIP_DELEGATE_STATS = 10136, + ATOM_SIP_TRANSPORT_FEATURE_TAG_STATS = 10137, + ATOM_SIP_MESSAGE_RESPONSE = 10138, + ATOM_SIP_TRANSPORT_SESSION = 10139, + ATOM_IMS_DEDICATED_BEARER_LISTENER_EVENT = 10140, + ATOM_IMS_DEDICATED_BEARER_EVENT = 10141, + ATOM_IMS_REGISTRATION_SERVICE_DESC_STATS = 10142, + ATOM_UCE_EVENT_STATS = 10143, + ATOM_PRESENCE_NOTIFY_EVENT = 10144, + ATOM_GBA_EVENT = 10145, + ATOM_PER_SIM_STATUS = 10146, + ATOM_GPU_WORK_PER_UID = 10147, + ATOM_PERSISTENT_URI_PERMISSIONS_AMOUNT_PER_PACKAGE = 10148, + ATOM_SIGNED_PARTITION_INFO = 10149, + ATOM_PINNED_FILE_SIZES_PER_PACKAGE = 10150, + ATOM_PENDING_INTENTS_PER_PACKAGE = 10151, + ATOM_USER_INFO = 10152, + ATOM_TELEPHONY_NETWORK_REQUESTS_V2 = 10153, + ATOM_DEVICE_TELEPHONY_PROPERTIES = 10154, + ATOM_REMOTE_KEY_PROVISIONING_ERROR_COUNTS = 10155, + ATOM_INCOMING_MMS = 10157, + ATOM_OUTGOING_MMS = 10158, + ATOM_MULTI_USER_INFO = 10160, + ATOM_NETWORK_BPF_MAP_INFO = 10161, + ATOM_CONNECTIVITY_STATE_SAMPLE = 10163, + ATOM_NETWORK_SELECTION_REMATCH_REASONS_INFO = 10164, + ATOM_NETWORK_SLICE_REQUEST_COUNT = 10168, + ATOM_ADPF_SYSTEM_COMPONENT_INFO = 10173, + ATOM_NOTIFICATION_MEMORY_USE = 10174, +}; + +constexpr AtomId AtomId_MIN = AtomId::ATOM_UNSPECIFIED; +constexpr AtomId AtomId_MAX = AtomId::ATOM_NOTIFICATION_MEMORY_USE; + + +PERFETTO_PROTOZERO_CONSTEXPR14_OR_INLINE +const char* AtomId_Name(::perfetto::protos::pbzero::AtomId value) { + switch (value) { + case ::perfetto::protos::pbzero::AtomId::ATOM_UNSPECIFIED: + return "ATOM_UNSPECIFIED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_BLE_SCAN_STATE_CHANGED: + return "ATOM_BLE_SCAN_STATE_CHANGED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_PROCESS_STATE_CHANGED: + return "ATOM_PROCESS_STATE_CHANGED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_BLE_SCAN_RESULT_RECEIVED: + return "ATOM_BLE_SCAN_RESULT_RECEIVED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_SENSOR_STATE_CHANGED: + return "ATOM_SENSOR_STATE_CHANGED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_GPS_SCAN_STATE_CHANGED: + return "ATOM_GPS_SCAN_STATE_CHANGED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_SYNC_STATE_CHANGED: + return "ATOM_SYNC_STATE_CHANGED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_SCHEDULED_JOB_STATE_CHANGED: + return "ATOM_SCHEDULED_JOB_STATE_CHANGED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_SCREEN_BRIGHTNESS_CHANGED: + return "ATOM_SCREEN_BRIGHTNESS_CHANGED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_WAKELOCK_STATE_CHANGED: + return "ATOM_WAKELOCK_STATE_CHANGED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_LONG_PARTIAL_WAKELOCK_STATE_CHANGED: + return "ATOM_LONG_PARTIAL_WAKELOCK_STATE_CHANGED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_MOBILE_RADIO_POWER_STATE_CHANGED: + return "ATOM_MOBILE_RADIO_POWER_STATE_CHANGED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_WIFI_RADIO_POWER_STATE_CHANGED: + return "ATOM_WIFI_RADIO_POWER_STATE_CHANGED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_ACTIVITY_MANAGER_SLEEP_STATE_CHANGED: + return "ATOM_ACTIVITY_MANAGER_SLEEP_STATE_CHANGED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_MEMORY_FACTOR_STATE_CHANGED: + return "ATOM_MEMORY_FACTOR_STATE_CHANGED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_EXCESSIVE_CPU_USAGE_REPORTED: + return "ATOM_EXCESSIVE_CPU_USAGE_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_CACHED_KILL_REPORTED: + return "ATOM_CACHED_KILL_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_PROCESS_MEMORY_STAT_REPORTED: + return "ATOM_PROCESS_MEMORY_STAT_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_LAUNCHER_EVENT: + return "ATOM_LAUNCHER_EVENT"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_BATTERY_SAVER_MODE_STATE_CHANGED: + return "ATOM_BATTERY_SAVER_MODE_STATE_CHANGED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_DEVICE_IDLE_MODE_STATE_CHANGED: + return "ATOM_DEVICE_IDLE_MODE_STATE_CHANGED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_DEVICE_IDLING_MODE_STATE_CHANGED: + return "ATOM_DEVICE_IDLING_MODE_STATE_CHANGED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_AUDIO_STATE_CHANGED: + return "ATOM_AUDIO_STATE_CHANGED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_MEDIA_CODEC_STATE_CHANGED: + return "ATOM_MEDIA_CODEC_STATE_CHANGED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_CAMERA_STATE_CHANGED: + return "ATOM_CAMERA_STATE_CHANGED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_FLASHLIGHT_STATE_CHANGED: + return "ATOM_FLASHLIGHT_STATE_CHANGED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_UID_PROCESS_STATE_CHANGED: + return "ATOM_UID_PROCESS_STATE_CHANGED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_PROCESS_LIFE_CYCLE_STATE_CHANGED: + return "ATOM_PROCESS_LIFE_CYCLE_STATE_CHANGED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_SCREEN_STATE_CHANGED: + return "ATOM_SCREEN_STATE_CHANGED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_BATTERY_LEVEL_CHANGED: + return "ATOM_BATTERY_LEVEL_CHANGED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_CHARGING_STATE_CHANGED: + return "ATOM_CHARGING_STATE_CHANGED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_PLUGGED_STATE_CHANGED: + return "ATOM_PLUGGED_STATE_CHANGED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_INTERACTIVE_STATE_CHANGED: + return "ATOM_INTERACTIVE_STATE_CHANGED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_TOUCH_EVENT_REPORTED: + return "ATOM_TOUCH_EVENT_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_WAKEUP_ALARM_OCCURRED: + return "ATOM_WAKEUP_ALARM_OCCURRED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_KERNEL_WAKEUP_REPORTED: + return "ATOM_KERNEL_WAKEUP_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_WIFI_LOCK_STATE_CHANGED: + return "ATOM_WIFI_LOCK_STATE_CHANGED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_WIFI_SIGNAL_STRENGTH_CHANGED: + return "ATOM_WIFI_SIGNAL_STRENGTH_CHANGED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_WIFI_SCAN_STATE_CHANGED: + return "ATOM_WIFI_SCAN_STATE_CHANGED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_PHONE_SIGNAL_STRENGTH_CHANGED: + return "ATOM_PHONE_SIGNAL_STRENGTH_CHANGED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_SETTING_CHANGED: + return "ATOM_SETTING_CHANGED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_ACTIVITY_FOREGROUND_STATE_CHANGED: + return "ATOM_ACTIVITY_FOREGROUND_STATE_CHANGED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_ISOLATED_UID_CHANGED: + return "ATOM_ISOLATED_UID_CHANGED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_PACKET_WAKEUP_OCCURRED: + return "ATOM_PACKET_WAKEUP_OCCURRED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_WALL_CLOCK_TIME_SHIFTED: + return "ATOM_WALL_CLOCK_TIME_SHIFTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_ANOMALY_DETECTED: + return "ATOM_ANOMALY_DETECTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_APP_BREADCRUMB_REPORTED: + return "ATOM_APP_BREADCRUMB_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_APP_START_OCCURRED: + return "ATOM_APP_START_OCCURRED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_APP_START_CANCELED: + return "ATOM_APP_START_CANCELED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_APP_START_FULLY_DRAWN: + return "ATOM_APP_START_FULLY_DRAWN"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_LMK_KILL_OCCURRED: + return "ATOM_LMK_KILL_OCCURRED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_PICTURE_IN_PICTURE_STATE_CHANGED: + return "ATOM_PICTURE_IN_PICTURE_STATE_CHANGED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_WIFI_MULTICAST_LOCK_STATE_CHANGED: + return "ATOM_WIFI_MULTICAST_LOCK_STATE_CHANGED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_LMK_STATE_CHANGED: + return "ATOM_LMK_STATE_CHANGED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_APP_START_MEMORY_STATE_CAPTURED: + return "ATOM_APP_START_MEMORY_STATE_CAPTURED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_SHUTDOWN_SEQUENCE_REPORTED: + return "ATOM_SHUTDOWN_SEQUENCE_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_BOOT_SEQUENCE_REPORTED: + return "ATOM_BOOT_SEQUENCE_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_DAVEY_OCCURRED: + return "ATOM_DAVEY_OCCURRED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_OVERLAY_STATE_CHANGED: + return "ATOM_OVERLAY_STATE_CHANGED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_FOREGROUND_SERVICE_STATE_CHANGED: + return "ATOM_FOREGROUND_SERVICE_STATE_CHANGED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_CALL_STATE_CHANGED: + return "ATOM_CALL_STATE_CHANGED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_KEYGUARD_STATE_CHANGED: + return "ATOM_KEYGUARD_STATE_CHANGED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_KEYGUARD_BOUNCER_STATE_CHANGED: + return "ATOM_KEYGUARD_BOUNCER_STATE_CHANGED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_KEYGUARD_BOUNCER_PASSWORD_ENTERED: + return "ATOM_KEYGUARD_BOUNCER_PASSWORD_ENTERED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_APP_DIED: + return "ATOM_APP_DIED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_RESOURCE_CONFIGURATION_CHANGED: + return "ATOM_RESOURCE_CONFIGURATION_CHANGED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_BLUETOOTH_ENABLED_STATE_CHANGED: + return "ATOM_BLUETOOTH_ENABLED_STATE_CHANGED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_BLUETOOTH_CONNECTION_STATE_CHANGED: + return "ATOM_BLUETOOTH_CONNECTION_STATE_CHANGED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_GPS_SIGNAL_QUALITY_CHANGED: + return "ATOM_GPS_SIGNAL_QUALITY_CHANGED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_USB_CONNECTOR_STATE_CHANGED: + return "ATOM_USB_CONNECTOR_STATE_CHANGED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_SPEAKER_IMPEDANCE_REPORTED: + return "ATOM_SPEAKER_IMPEDANCE_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_HARDWARE_FAILED: + return "ATOM_HARDWARE_FAILED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_PHYSICAL_DROP_DETECTED: + return "ATOM_PHYSICAL_DROP_DETECTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_CHARGE_CYCLES_REPORTED: + return "ATOM_CHARGE_CYCLES_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_MOBILE_CONNECTION_STATE_CHANGED: + return "ATOM_MOBILE_CONNECTION_STATE_CHANGED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_MOBILE_RADIO_TECHNOLOGY_CHANGED: + return "ATOM_MOBILE_RADIO_TECHNOLOGY_CHANGED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_USB_DEVICE_ATTACHED: + return "ATOM_USB_DEVICE_ATTACHED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_APP_CRASH_OCCURRED: + return "ATOM_APP_CRASH_OCCURRED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_ANR_OCCURRED: + return "ATOM_ANR_OCCURRED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_WTF_OCCURRED: + return "ATOM_WTF_OCCURRED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_LOW_MEM_REPORTED: + return "ATOM_LOW_MEM_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_GENERIC_ATOM: + return "ATOM_GENERIC_ATOM"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_VIBRATOR_STATE_CHANGED: + return "ATOM_VIBRATOR_STATE_CHANGED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_DEFERRED_JOB_STATS_REPORTED: + return "ATOM_DEFERRED_JOB_STATS_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_THERMAL_THROTTLING: + return "ATOM_THERMAL_THROTTLING"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_BIOMETRIC_ACQUIRED: + return "ATOM_BIOMETRIC_ACQUIRED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_BIOMETRIC_AUTHENTICATED: + return "ATOM_BIOMETRIC_AUTHENTICATED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_BIOMETRIC_ERROR_OCCURRED: + return "ATOM_BIOMETRIC_ERROR_OCCURRED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_UI_EVENT_REPORTED: + return "ATOM_UI_EVENT_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_BATTERY_HEALTH_SNAPSHOT: + return "ATOM_BATTERY_HEALTH_SNAPSHOT"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_SLOW_IO: + return "ATOM_SLOW_IO"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_BATTERY_CAUSED_SHUTDOWN: + return "ATOM_BATTERY_CAUSED_SHUTDOWN"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_PHONE_SERVICE_STATE_CHANGED: + return "ATOM_PHONE_SERVICE_STATE_CHANGED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_PHONE_STATE_CHANGED: + return "ATOM_PHONE_STATE_CHANGED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_USER_RESTRICTION_CHANGED: + return "ATOM_USER_RESTRICTION_CHANGED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_SETTINGS_UI_CHANGED: + return "ATOM_SETTINGS_UI_CHANGED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_CONNECTIVITY_STATE_CHANGED: + return "ATOM_CONNECTIVITY_STATE_CHANGED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_SERVICE_STATE_CHANGED: + return "ATOM_SERVICE_STATE_CHANGED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_SERVICE_LAUNCH_REPORTED: + return "ATOM_SERVICE_LAUNCH_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_FLAG_FLIP_UPDATE_OCCURRED: + return "ATOM_FLAG_FLIP_UPDATE_OCCURRED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_BINARY_PUSH_STATE_CHANGED: + return "ATOM_BINARY_PUSH_STATE_CHANGED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_DEVICE_POLICY_EVENT: + return "ATOM_DEVICE_POLICY_EVENT"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_DOCS_UI_FILE_OP_CANCELED: + return "ATOM_DOCS_UI_FILE_OP_CANCELED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_DOCS_UI_FILE_OP_COPY_MOVE_MODE_REPORTED: + return "ATOM_DOCS_UI_FILE_OP_COPY_MOVE_MODE_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_DOCS_UI_FILE_OP_FAILURE: + return "ATOM_DOCS_UI_FILE_OP_FAILURE"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_DOCS_UI_PROVIDER_FILE_OP: + return "ATOM_DOCS_UI_PROVIDER_FILE_OP"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_DOCS_UI_INVALID_SCOPED_ACCESS_REQUEST: + return "ATOM_DOCS_UI_INVALID_SCOPED_ACCESS_REQUEST"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_DOCS_UI_LAUNCH_REPORTED: + return "ATOM_DOCS_UI_LAUNCH_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_DOCS_UI_ROOT_VISITED: + return "ATOM_DOCS_UI_ROOT_VISITED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_DOCS_UI_STARTUP_MS: + return "ATOM_DOCS_UI_STARTUP_MS"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_DOCS_UI_USER_ACTION_REPORTED: + return "ATOM_DOCS_UI_USER_ACTION_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_WIFI_ENABLED_STATE_CHANGED: + return "ATOM_WIFI_ENABLED_STATE_CHANGED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_WIFI_RUNNING_STATE_CHANGED: + return "ATOM_WIFI_RUNNING_STATE_CHANGED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_APP_COMPACTED: + return "ATOM_APP_COMPACTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_NETWORK_DNS_EVENT_REPORTED: + return "ATOM_NETWORK_DNS_EVENT_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_DOCS_UI_PICKER_LAUNCHED_FROM_REPORTED: + return "ATOM_DOCS_UI_PICKER_LAUNCHED_FROM_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_DOCS_UI_PICK_RESULT_REPORTED: + return "ATOM_DOCS_UI_PICK_RESULT_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_DOCS_UI_SEARCH_MODE_REPORTED: + return "ATOM_DOCS_UI_SEARCH_MODE_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_DOCS_UI_SEARCH_TYPE_REPORTED: + return "ATOM_DOCS_UI_SEARCH_TYPE_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_DATA_STALL_EVENT: + return "ATOM_DATA_STALL_EVENT"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_RESCUE_PARTY_RESET_REPORTED: + return "ATOM_RESCUE_PARTY_RESET_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_SIGNED_CONFIG_REPORTED: + return "ATOM_SIGNED_CONFIG_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_GNSS_NI_EVENT_REPORTED: + return "ATOM_GNSS_NI_EVENT_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_BLUETOOTH_LINK_LAYER_CONNECTION_EVENT: + return "ATOM_BLUETOOTH_LINK_LAYER_CONNECTION_EVENT"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_BLUETOOTH_ACL_CONNECTION_STATE_CHANGED: + return "ATOM_BLUETOOTH_ACL_CONNECTION_STATE_CHANGED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_BLUETOOTH_SCO_CONNECTION_STATE_CHANGED: + return "ATOM_BLUETOOTH_SCO_CONNECTION_STATE_CHANGED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_APP_DOWNGRADED: + return "ATOM_APP_DOWNGRADED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_APP_OPTIMIZED_AFTER_DOWNGRADED: + return "ATOM_APP_OPTIMIZED_AFTER_DOWNGRADED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_LOW_STORAGE_STATE_CHANGED: + return "ATOM_LOW_STORAGE_STATE_CHANGED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_GNSS_NFW_NOTIFICATION_REPORTED: + return "ATOM_GNSS_NFW_NOTIFICATION_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_GNSS_CONFIGURATION_REPORTED: + return "ATOM_GNSS_CONFIGURATION_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_USB_PORT_OVERHEAT_EVENT_REPORTED: + return "ATOM_USB_PORT_OVERHEAT_EVENT_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_NFC_ERROR_OCCURRED: + return "ATOM_NFC_ERROR_OCCURRED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_NFC_STATE_CHANGED: + return "ATOM_NFC_STATE_CHANGED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_NFC_BEAM_OCCURRED: + return "ATOM_NFC_BEAM_OCCURRED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_NFC_CARDEMULATION_OCCURRED: + return "ATOM_NFC_CARDEMULATION_OCCURRED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_NFC_TAG_OCCURRED: + return "ATOM_NFC_TAG_OCCURRED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_NFC_HCE_TRANSACTION_OCCURRED: + return "ATOM_NFC_HCE_TRANSACTION_OCCURRED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_SE_STATE_CHANGED: + return "ATOM_SE_STATE_CHANGED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_SE_OMAPI_REPORTED: + return "ATOM_SE_OMAPI_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_BROADCAST_DISPATCH_LATENCY_REPORTED: + return "ATOM_BROADCAST_DISPATCH_LATENCY_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_ATTENTION_MANAGER_SERVICE_RESULT_REPORTED: + return "ATOM_ATTENTION_MANAGER_SERVICE_RESULT_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_ADB_CONNECTION_CHANGED: + return "ATOM_ADB_CONNECTION_CHANGED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_SPEECH_DSP_STAT_REPORTED: + return "ATOM_SPEECH_DSP_STAT_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_USB_CONTAMINANT_REPORTED: + return "ATOM_USB_CONTAMINANT_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_WATCHDOG_ROLLBACK_OCCURRED: + return "ATOM_WATCHDOG_ROLLBACK_OCCURRED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_BIOMETRIC_SYSTEM_HEALTH_ISSUE_DETECTED: + return "ATOM_BIOMETRIC_SYSTEM_HEALTH_ISSUE_DETECTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_BUBBLE_UI_CHANGED: + return "ATOM_BUBBLE_UI_CHANGED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_SCHEDULED_JOB_CONSTRAINT_CHANGED: + return "ATOM_SCHEDULED_JOB_CONSTRAINT_CHANGED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_BLUETOOTH_ACTIVE_DEVICE_CHANGED: + return "ATOM_BLUETOOTH_ACTIVE_DEVICE_CHANGED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_BLUETOOTH_A2DP_PLAYBACK_STATE_CHANGED: + return "ATOM_BLUETOOTH_A2DP_PLAYBACK_STATE_CHANGED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_BLUETOOTH_A2DP_CODEC_CONFIG_CHANGED: + return "ATOM_BLUETOOTH_A2DP_CODEC_CONFIG_CHANGED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_BLUETOOTH_A2DP_CODEC_CAPABILITY_CHANGED: + return "ATOM_BLUETOOTH_A2DP_CODEC_CAPABILITY_CHANGED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_BLUETOOTH_A2DP_AUDIO_UNDERRUN_REPORTED: + return "ATOM_BLUETOOTH_A2DP_AUDIO_UNDERRUN_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_BLUETOOTH_A2DP_AUDIO_OVERRUN_REPORTED: + return "ATOM_BLUETOOTH_A2DP_AUDIO_OVERRUN_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_BLUETOOTH_DEVICE_RSSI_REPORTED: + return "ATOM_BLUETOOTH_DEVICE_RSSI_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_BLUETOOTH_DEVICE_FAILED_CONTACT_COUNTER_REPORTED: + return "ATOM_BLUETOOTH_DEVICE_FAILED_CONTACT_COUNTER_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_BLUETOOTH_DEVICE_TX_POWER_LEVEL_REPORTED: + return "ATOM_BLUETOOTH_DEVICE_TX_POWER_LEVEL_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_BLUETOOTH_HCI_TIMEOUT_REPORTED: + return "ATOM_BLUETOOTH_HCI_TIMEOUT_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_BLUETOOTH_QUALITY_REPORT_REPORTED: + return "ATOM_BLUETOOTH_QUALITY_REPORT_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_BLUETOOTH_DEVICE_INFO_REPORTED: + return "ATOM_BLUETOOTH_DEVICE_INFO_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_BLUETOOTH_REMOTE_VERSION_INFO_REPORTED: + return "ATOM_BLUETOOTH_REMOTE_VERSION_INFO_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_BLUETOOTH_SDP_ATTRIBUTE_REPORTED: + return "ATOM_BLUETOOTH_SDP_ATTRIBUTE_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_BLUETOOTH_BOND_STATE_CHANGED: + return "ATOM_BLUETOOTH_BOND_STATE_CHANGED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_BLUETOOTH_CLASSIC_PAIRING_EVENT_REPORTED: + return "ATOM_BLUETOOTH_CLASSIC_PAIRING_EVENT_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_BLUETOOTH_SMP_PAIRING_EVENT_REPORTED: + return "ATOM_BLUETOOTH_SMP_PAIRING_EVENT_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_SCREEN_TIMEOUT_EXTENSION_REPORTED: + return "ATOM_SCREEN_TIMEOUT_EXTENSION_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_PROCESS_START_TIME: + return "ATOM_PROCESS_START_TIME"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_PERMISSION_GRANT_REQUEST_RESULT_REPORTED: + return "ATOM_PERMISSION_GRANT_REQUEST_RESULT_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_BLUETOOTH_SOCKET_CONNECTION_STATE_CHANGED: + return "ATOM_BLUETOOTH_SOCKET_CONNECTION_STATE_CHANGED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_DEVICE_IDENTIFIER_ACCESS_DENIED: + return "ATOM_DEVICE_IDENTIFIER_ACCESS_DENIED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_BUBBLE_DEVELOPER_ERROR_REPORTED: + return "ATOM_BUBBLE_DEVELOPER_ERROR_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_ASSIST_GESTURE_STAGE_REPORTED: + return "ATOM_ASSIST_GESTURE_STAGE_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_ASSIST_GESTURE_FEEDBACK_REPORTED: + return "ATOM_ASSIST_GESTURE_FEEDBACK_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_ASSIST_GESTURE_PROGRESS_REPORTED: + return "ATOM_ASSIST_GESTURE_PROGRESS_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_TOUCH_GESTURE_CLASSIFIED: + return "ATOM_TOUCH_GESTURE_CLASSIFIED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_HIDDEN_API_USED: + return "ATOM_HIDDEN_API_USED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_STYLE_UI_CHANGED: + return "ATOM_STYLE_UI_CHANGED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_PRIVACY_INDICATORS_INTERACTED: + return "ATOM_PRIVACY_INDICATORS_INTERACTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_APP_INSTALL_ON_EXTERNAL_STORAGE_REPORTED: + return "ATOM_APP_INSTALL_ON_EXTERNAL_STORAGE_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_NETWORK_STACK_REPORTED: + return "ATOM_NETWORK_STACK_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_APP_MOVED_STORAGE_REPORTED: + return "ATOM_APP_MOVED_STORAGE_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_BIOMETRIC_ENROLLED: + return "ATOM_BIOMETRIC_ENROLLED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_SYSTEM_SERVER_WATCHDOG_OCCURRED: + return "ATOM_SYSTEM_SERVER_WATCHDOG_OCCURRED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_TOMB_STONE_OCCURRED: + return "ATOM_TOMB_STONE_OCCURRED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_BLUETOOTH_CLASS_OF_DEVICE_REPORTED: + return "ATOM_BLUETOOTH_CLASS_OF_DEVICE_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_INTELLIGENCE_EVENT_REPORTED: + return "ATOM_INTELLIGENCE_EVENT_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_THERMAL_THROTTLING_SEVERITY_STATE_CHANGED: + return "ATOM_THERMAL_THROTTLING_SEVERITY_STATE_CHANGED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_ROLE_REQUEST_RESULT_REPORTED: + return "ATOM_ROLE_REQUEST_RESULT_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_MEDIAMETRICS_AUDIOPOLICY_REPORTED: + return "ATOM_MEDIAMETRICS_AUDIOPOLICY_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_MEDIAMETRICS_AUDIORECORD_REPORTED: + return "ATOM_MEDIAMETRICS_AUDIORECORD_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_MEDIAMETRICS_AUDIOTHREAD_REPORTED: + return "ATOM_MEDIAMETRICS_AUDIOTHREAD_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_MEDIAMETRICS_AUDIOTRACK_REPORTED: + return "ATOM_MEDIAMETRICS_AUDIOTRACK_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_MEDIAMETRICS_CODEC_REPORTED: + return "ATOM_MEDIAMETRICS_CODEC_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_MEDIAMETRICS_DRM_WIDEVINE_REPORTED: + return "ATOM_MEDIAMETRICS_DRM_WIDEVINE_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_MEDIAMETRICS_EXTRACTOR_REPORTED: + return "ATOM_MEDIAMETRICS_EXTRACTOR_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_MEDIAMETRICS_MEDIADRM_REPORTED: + return "ATOM_MEDIAMETRICS_MEDIADRM_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_MEDIAMETRICS_NUPLAYER_REPORTED: + return "ATOM_MEDIAMETRICS_NUPLAYER_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_MEDIAMETRICS_RECORDER_REPORTED: + return "ATOM_MEDIAMETRICS_RECORDER_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_MEDIAMETRICS_DRMMANAGER_REPORTED: + return "ATOM_MEDIAMETRICS_DRMMANAGER_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_CAR_POWER_STATE_CHANGED: + return "ATOM_CAR_POWER_STATE_CHANGED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_GARAGE_MODE_INFO: + return "ATOM_GARAGE_MODE_INFO"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_TEST_ATOM_REPORTED: + return "ATOM_TEST_ATOM_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_CONTENT_CAPTURE_CALLER_MISMATCH_REPORTED: + return "ATOM_CONTENT_CAPTURE_CALLER_MISMATCH_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_CONTENT_CAPTURE_SERVICE_EVENTS: + return "ATOM_CONTENT_CAPTURE_SERVICE_EVENTS"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_CONTENT_CAPTURE_SESSION_EVENTS: + return "ATOM_CONTENT_CAPTURE_SESSION_EVENTS"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_CONTENT_CAPTURE_FLUSHED: + return "ATOM_CONTENT_CAPTURE_FLUSHED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_LOCATION_MANAGER_API_USAGE_REPORTED: + return "ATOM_LOCATION_MANAGER_API_USAGE_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_REVIEW_PERMISSIONS_FRAGMENT_RESULT_REPORTED: + return "ATOM_REVIEW_PERMISSIONS_FRAGMENT_RESULT_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_RUNTIME_PERMISSIONS_UPGRADE_RESULT: + return "ATOM_RUNTIME_PERMISSIONS_UPGRADE_RESULT"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_GRANT_PERMISSIONS_ACTIVITY_BUTTON_ACTIONS: + return "ATOM_GRANT_PERMISSIONS_ACTIVITY_BUTTON_ACTIONS"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_LOCATION_ACCESS_CHECK_NOTIFICATION_ACTION: + return "ATOM_LOCATION_ACCESS_CHECK_NOTIFICATION_ACTION"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_APP_PERMISSION_FRAGMENT_ACTION_REPORTED: + return "ATOM_APP_PERMISSION_FRAGMENT_ACTION_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_APP_PERMISSION_FRAGMENT_VIEWED: + return "ATOM_APP_PERMISSION_FRAGMENT_VIEWED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_APP_PERMISSIONS_FRAGMENT_VIEWED: + return "ATOM_APP_PERMISSIONS_FRAGMENT_VIEWED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_PERMISSION_APPS_FRAGMENT_VIEWED: + return "ATOM_PERMISSION_APPS_FRAGMENT_VIEWED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_TEXT_SELECTION_EVENT: + return "ATOM_TEXT_SELECTION_EVENT"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_TEXT_LINKIFY_EVENT: + return "ATOM_TEXT_LINKIFY_EVENT"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_CONVERSATION_ACTIONS_EVENT: + return "ATOM_CONVERSATION_ACTIONS_EVENT"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_LANGUAGE_DETECTION_EVENT: + return "ATOM_LANGUAGE_DETECTION_EVENT"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_EXCLUSION_RECT_STATE_CHANGED: + return "ATOM_EXCLUSION_RECT_STATE_CHANGED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_BACK_GESTURE_REPORTED_REPORTED: + return "ATOM_BACK_GESTURE_REPORTED_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_UPDATE_ENGINE_UPDATE_ATTEMPT_REPORTED: + return "ATOM_UPDATE_ENGINE_UPDATE_ATTEMPT_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_UPDATE_ENGINE_SUCCESSFUL_UPDATE_REPORTED: + return "ATOM_UPDATE_ENGINE_SUCCESSFUL_UPDATE_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_CAMERA_ACTION_EVENT: + return "ATOM_CAMERA_ACTION_EVENT"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_APP_COMPATIBILITY_CHANGE_REPORTED: + return "ATOM_APP_COMPATIBILITY_CHANGE_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_PERFETTO_UPLOADED: + return "ATOM_PERFETTO_UPLOADED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_VMS_CLIENT_CONNECTION_STATE_CHANGED: + return "ATOM_VMS_CLIENT_CONNECTION_STATE_CHANGED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_MEDIA_PROVIDER_SCAN_OCCURRED: + return "ATOM_MEDIA_PROVIDER_SCAN_OCCURRED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_MEDIA_CONTENT_DELETED: + return "ATOM_MEDIA_CONTENT_DELETED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_MEDIA_PROVIDER_PERMISSION_REQUESTED: + return "ATOM_MEDIA_PROVIDER_PERMISSION_REQUESTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_MEDIA_PROVIDER_SCHEMA_CHANGED: + return "ATOM_MEDIA_PROVIDER_SCHEMA_CHANGED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_MEDIA_PROVIDER_IDLE_MAINTENANCE_FINISHED: + return "ATOM_MEDIA_PROVIDER_IDLE_MAINTENANCE_FINISHED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_REBOOT_ESCROW_RECOVERY_REPORTED: + return "ATOM_REBOOT_ESCROW_RECOVERY_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_BOOT_TIME_EVENT_DURATION_REPORTED: + return "ATOM_BOOT_TIME_EVENT_DURATION_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_BOOT_TIME_EVENT_ELAPSED_TIME_REPORTED: + return "ATOM_BOOT_TIME_EVENT_ELAPSED_TIME_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_BOOT_TIME_EVENT_UTC_TIME_REPORTED: + return "ATOM_BOOT_TIME_EVENT_UTC_TIME_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_BOOT_TIME_EVENT_ERROR_CODE_REPORTED: + return "ATOM_BOOT_TIME_EVENT_ERROR_CODE_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_USERSPACE_REBOOT_REPORTED: + return "ATOM_USERSPACE_REBOOT_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_NOTIFICATION_REPORTED: + return "ATOM_NOTIFICATION_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_NOTIFICATION_PANEL_REPORTED: + return "ATOM_NOTIFICATION_PANEL_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_NOTIFICATION_CHANNEL_MODIFIED: + return "ATOM_NOTIFICATION_CHANNEL_MODIFIED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_INTEGRITY_CHECK_RESULT_REPORTED: + return "ATOM_INTEGRITY_CHECK_RESULT_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_INTEGRITY_RULES_PUSHED: + return "ATOM_INTEGRITY_RULES_PUSHED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_CB_MESSAGE_REPORTED: + return "ATOM_CB_MESSAGE_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_CB_MESSAGE_ERROR: + return "ATOM_CB_MESSAGE_ERROR"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_WIFI_HEALTH_STAT_REPORTED: + return "ATOM_WIFI_HEALTH_STAT_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_WIFI_FAILURE_STAT_REPORTED: + return "ATOM_WIFI_FAILURE_STAT_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_WIFI_CONNECTION_RESULT_REPORTED: + return "ATOM_WIFI_CONNECTION_RESULT_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_APP_FREEZE_CHANGED: + return "ATOM_APP_FREEZE_CHANGED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_SNAPSHOT_MERGE_REPORTED: + return "ATOM_SNAPSHOT_MERGE_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_FOREGROUND_SERVICE_APP_OP_SESSION_ENDED: + return "ATOM_FOREGROUND_SERVICE_APP_OP_SESSION_ENDED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_DISPLAY_JANK_REPORTED: + return "ATOM_DISPLAY_JANK_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_APP_STANDBY_BUCKET_CHANGED: + return "ATOM_APP_STANDBY_BUCKET_CHANGED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_SHARESHEET_STARTED: + return "ATOM_SHARESHEET_STARTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_RANKING_SELECTED: + return "ATOM_RANKING_SELECTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_TVSETTINGS_UI_INTERACTED: + return "ATOM_TVSETTINGS_UI_INTERACTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_LAUNCHER_SNAPSHOT: + return "ATOM_LAUNCHER_SNAPSHOT"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_PACKAGE_INSTALLER_V2_REPORTED: + return "ATOM_PACKAGE_INSTALLER_V2_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_USER_LIFECYCLE_JOURNEY_REPORTED: + return "ATOM_USER_LIFECYCLE_JOURNEY_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_USER_LIFECYCLE_EVENT_OCCURRED: + return "ATOM_USER_LIFECYCLE_EVENT_OCCURRED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_ACCESSIBILITY_SHORTCUT_REPORTED: + return "ATOM_ACCESSIBILITY_SHORTCUT_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_ACCESSIBILITY_SERVICE_REPORTED: + return "ATOM_ACCESSIBILITY_SERVICE_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_DOCS_UI_DRAG_AND_DROP_REPORTED: + return "ATOM_DOCS_UI_DRAG_AND_DROP_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_APP_USAGE_EVENT_OCCURRED: + return "ATOM_APP_USAGE_EVENT_OCCURRED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_AUTO_REVOKE_NOTIFICATION_CLICKED: + return "ATOM_AUTO_REVOKE_NOTIFICATION_CLICKED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_AUTO_REVOKE_FRAGMENT_APP_VIEWED: + return "ATOM_AUTO_REVOKE_FRAGMENT_APP_VIEWED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_AUTO_REVOKED_APP_INTERACTION: + return "ATOM_AUTO_REVOKED_APP_INTERACTION"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_APP_PERMISSION_GROUPS_FRAGMENT_AUTO_REVOKE_ACTION: + return "ATOM_APP_PERMISSION_GROUPS_FRAGMENT_AUTO_REVOKE_ACTION"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_EVS_USAGE_STATS_REPORTED: + return "ATOM_EVS_USAGE_STATS_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_AUDIO_POWER_USAGE_DATA_REPORTED: + return "ATOM_AUDIO_POWER_USAGE_DATA_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_TV_TUNER_STATE_CHANGED: + return "ATOM_TV_TUNER_STATE_CHANGED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_MEDIAOUTPUT_OP_SWITCH_REPORTED: + return "ATOM_MEDIAOUTPUT_OP_SWITCH_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_CB_MESSAGE_FILTERED: + return "ATOM_CB_MESSAGE_FILTERED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_TV_TUNER_DVR_STATUS: + return "ATOM_TV_TUNER_DVR_STATUS"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_TV_CAS_SESSION_OPEN_STATUS: + return "ATOM_TV_CAS_SESSION_OPEN_STATUS"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_ASSISTANT_INVOCATION_REPORTED: + return "ATOM_ASSISTANT_INVOCATION_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_DISPLAY_WAKE_REPORTED: + return "ATOM_DISPLAY_WAKE_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_CAR_USER_HAL_MODIFY_USER_REQUEST_REPORTED: + return "ATOM_CAR_USER_HAL_MODIFY_USER_REQUEST_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_CAR_USER_HAL_MODIFY_USER_RESPONSE_REPORTED: + return "ATOM_CAR_USER_HAL_MODIFY_USER_RESPONSE_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_CAR_USER_HAL_POST_SWITCH_RESPONSE_REPORTED: + return "ATOM_CAR_USER_HAL_POST_SWITCH_RESPONSE_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_CAR_USER_HAL_INITIAL_USER_INFO_REQUEST_REPORTED: + return "ATOM_CAR_USER_HAL_INITIAL_USER_INFO_REQUEST_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_CAR_USER_HAL_INITIAL_USER_INFO_RESPONSE_REPORTED: + return "ATOM_CAR_USER_HAL_INITIAL_USER_INFO_RESPONSE_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_CAR_USER_HAL_USER_ASSOCIATION_REQUEST_REPORTED: + return "ATOM_CAR_USER_HAL_USER_ASSOCIATION_REQUEST_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_CAR_USER_HAL_SET_USER_ASSOCIATION_RESPONSE_REPORTED: + return "ATOM_CAR_USER_HAL_SET_USER_ASSOCIATION_RESPONSE_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_NETWORK_IP_PROVISIONING_REPORTED: + return "ATOM_NETWORK_IP_PROVISIONING_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_NETWORK_DHCP_RENEW_REPORTED: + return "ATOM_NETWORK_DHCP_RENEW_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_NETWORK_VALIDATION_REPORTED: + return "ATOM_NETWORK_VALIDATION_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_NETWORK_STACK_QUIRK_REPORTED: + return "ATOM_NETWORK_STACK_QUIRK_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_MEDIAMETRICS_AUDIORECORDDEVICEUSAGE_REPORTED: + return "ATOM_MEDIAMETRICS_AUDIORECORDDEVICEUSAGE_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_MEDIAMETRICS_AUDIOTHREADDEVICEUSAGE_REPORTED: + return "ATOM_MEDIAMETRICS_AUDIOTHREADDEVICEUSAGE_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_MEDIAMETRICS_AUDIOTRACKDEVICEUSAGE_REPORTED: + return "ATOM_MEDIAMETRICS_AUDIOTRACKDEVICEUSAGE_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_MEDIAMETRICS_AUDIODEVICECONNECTION_REPORTED: + return "ATOM_MEDIAMETRICS_AUDIODEVICECONNECTION_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_BLOB_COMMITTED: + return "ATOM_BLOB_COMMITTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_BLOB_LEASED: + return "ATOM_BLOB_LEASED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_BLOB_OPENED: + return "ATOM_BLOB_OPENED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_CONTACTS_PROVIDER_STATUS_REPORTED: + return "ATOM_CONTACTS_PROVIDER_STATUS_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_KEYSTORE_KEY_EVENT_REPORTED: + return "ATOM_KEYSTORE_KEY_EVENT_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_NETWORK_TETHERING_REPORTED: + return "ATOM_NETWORK_TETHERING_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_IME_TOUCH_REPORTED: + return "ATOM_IME_TOUCH_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_UI_INTERACTION_FRAME_INFO_REPORTED: + return "ATOM_UI_INTERACTION_FRAME_INFO_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_UI_ACTION_LATENCY_REPORTED: + return "ATOM_UI_ACTION_LATENCY_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_WIFI_DISCONNECT_REPORTED: + return "ATOM_WIFI_DISCONNECT_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_WIFI_CONNECTION_STATE_CHANGED: + return "ATOM_WIFI_CONNECTION_STATE_CHANGED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_HDMI_CEC_ACTIVE_SOURCE_CHANGED: + return "ATOM_HDMI_CEC_ACTIVE_SOURCE_CHANGED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_HDMI_CEC_MESSAGE_REPORTED: + return "ATOM_HDMI_CEC_MESSAGE_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_AIRPLANE_MODE: + return "ATOM_AIRPLANE_MODE"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_MODEM_RESTART: + return "ATOM_MODEM_RESTART"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_CARRIER_ID_MISMATCH_REPORTED: + return "ATOM_CARRIER_ID_MISMATCH_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_CARRIER_ID_TABLE_UPDATED: + return "ATOM_CARRIER_ID_TABLE_UPDATED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_DATA_STALL_RECOVERY_REPORTED: + return "ATOM_DATA_STALL_RECOVERY_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_MEDIAMETRICS_MEDIAPARSER_REPORTED: + return "ATOM_MEDIAMETRICS_MEDIAPARSER_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_TLS_HANDSHAKE_REPORTED: + return "ATOM_TLS_HANDSHAKE_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_TEXT_CLASSIFIER_API_USAGE_REPORTED: + return "ATOM_TEXT_CLASSIFIER_API_USAGE_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_CAR_WATCHDOG_KILL_STATS_REPORTED: + return "ATOM_CAR_WATCHDOG_KILL_STATS_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_MEDIAMETRICS_PLAYBACK_REPORTED: + return "ATOM_MEDIAMETRICS_PLAYBACK_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_MEDIA_NETWORK_INFO_CHANGED: + return "ATOM_MEDIA_NETWORK_INFO_CHANGED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_MEDIA_PLAYBACK_STATE_CHANGED: + return "ATOM_MEDIA_PLAYBACK_STATE_CHANGED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_MEDIA_PLAYBACK_ERROR_REPORTED: + return "ATOM_MEDIA_PLAYBACK_ERROR_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_MEDIA_PLAYBACK_TRACK_CHANGED: + return "ATOM_MEDIA_PLAYBACK_TRACK_CHANGED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_WIFI_SCAN_REPORTED: + return "ATOM_WIFI_SCAN_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_WIFI_PNO_SCAN_REPORTED: + return "ATOM_WIFI_PNO_SCAN_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_TIF_TUNE_CHANGED: + return "ATOM_TIF_TUNE_CHANGED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_AUTO_ROTATE_REPORTED: + return "ATOM_AUTO_ROTATE_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_PERFETTO_TRIGGER: + return "ATOM_PERFETTO_TRIGGER"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_TRANSCODING_DATA: + return "ATOM_TRANSCODING_DATA"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_IMS_SERVICE_ENTITLEMENT_UPDATED: + return "ATOM_IMS_SERVICE_ENTITLEMENT_UPDATED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_ART_DATUM_REPORTED: + return "ATOM_ART_DATUM_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_DEVICE_ROTATED: + return "ATOM_DEVICE_ROTATED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_SIM_SPECIFIC_SETTINGS_RESTORED: + return "ATOM_SIM_SPECIFIC_SETTINGS_RESTORED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_TEXT_CLASSIFIER_DOWNLOAD_REPORTED: + return "ATOM_TEXT_CLASSIFIER_DOWNLOAD_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_PIN_STORAGE_EVENT: + return "ATOM_PIN_STORAGE_EVENT"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_FACE_DOWN_REPORTED: + return "ATOM_FACE_DOWN_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_BLUETOOTH_HAL_CRASH_REASON_REPORTED: + return "ATOM_BLUETOOTH_HAL_CRASH_REASON_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_REBOOT_ESCROW_PREPARATION_REPORTED: + return "ATOM_REBOOT_ESCROW_PREPARATION_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_REBOOT_ESCROW_LSKF_CAPTURE_REPORTED: + return "ATOM_REBOOT_ESCROW_LSKF_CAPTURE_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_REBOOT_ESCROW_REBOOT_REPORTED: + return "ATOM_REBOOT_ESCROW_REBOOT_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_BINDER_LATENCY_REPORTED: + return "ATOM_BINDER_LATENCY_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_MEDIAMETRICS_AAUDIOSTREAM_REPORTED: + return "ATOM_MEDIAMETRICS_AAUDIOSTREAM_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_MEDIA_TRANSCODING_SESSION_ENDED: + return "ATOM_MEDIA_TRANSCODING_SESSION_ENDED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_MAGNIFICATION_USAGE_REPORTED: + return "ATOM_MAGNIFICATION_USAGE_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_MAGNIFICATION_MODE_WITH_IME_ON_REPORTED: + return "ATOM_MAGNIFICATION_MODE_WITH_IME_ON_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_APP_SEARCH_CALL_STATS_REPORTED: + return "ATOM_APP_SEARCH_CALL_STATS_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_APP_SEARCH_PUT_DOCUMENT_STATS_REPORTED: + return "ATOM_APP_SEARCH_PUT_DOCUMENT_STATS_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_DEVICE_CONTROL_CHANGED: + return "ATOM_DEVICE_CONTROL_CHANGED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_DEVICE_STATE_CHANGED: + return "ATOM_DEVICE_STATE_CHANGED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_INPUTDEVICE_REGISTERED: + return "ATOM_INPUTDEVICE_REGISTERED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_SMARTSPACE_CARD_REPORTED: + return "ATOM_SMARTSPACE_CARD_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_AUTH_PROMPT_AUTHENTICATE_INVOKED: + return "ATOM_AUTH_PROMPT_AUTHENTICATE_INVOKED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_AUTH_MANAGER_CAN_AUTHENTICATE_INVOKED: + return "ATOM_AUTH_MANAGER_CAN_AUTHENTICATE_INVOKED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_AUTH_ENROLL_ACTION_INVOKED: + return "ATOM_AUTH_ENROLL_ACTION_INVOKED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_AUTH_DEPRECATED_API_USED: + return "ATOM_AUTH_DEPRECATED_API_USED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_UNATTENDED_REBOOT_OCCURRED: + return "ATOM_UNATTENDED_REBOOT_OCCURRED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_LONG_REBOOT_BLOCKING_REPORTED: + return "ATOM_LONG_REBOOT_BLOCKING_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_LOCATION_TIME_ZONE_PROVIDER_STATE_CHANGED: + return "ATOM_LOCATION_TIME_ZONE_PROVIDER_STATE_CHANGED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_FDTRACK_EVENT_OCCURRED: + return "ATOM_FDTRACK_EVENT_OCCURRED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_TIMEOUT_AUTO_EXTENDED_REPORTED: + return "ATOM_TIMEOUT_AUTO_EXTENDED_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_ODREFRESH_REPORTED: + return "ATOM_ODREFRESH_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_ALARM_BATCH_DELIVERED: + return "ATOM_ALARM_BATCH_DELIVERED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_ALARM_SCHEDULED: + return "ATOM_ALARM_SCHEDULED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_CAR_WATCHDOG_IO_OVERUSE_STATS_REPORTED: + return "ATOM_CAR_WATCHDOG_IO_OVERUSE_STATS_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_USER_LEVEL_HIBERNATION_STATE_CHANGED: + return "ATOM_USER_LEVEL_HIBERNATION_STATE_CHANGED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_APP_SEARCH_INITIALIZE_STATS_REPORTED: + return "ATOM_APP_SEARCH_INITIALIZE_STATS_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_APP_SEARCH_QUERY_STATS_REPORTED: + return "ATOM_APP_SEARCH_QUERY_STATS_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_APP_PROCESS_DIED: + return "ATOM_APP_PROCESS_DIED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_NETWORK_IP_REACHABILITY_MONITOR_REPORTED: + return "ATOM_NETWORK_IP_REACHABILITY_MONITOR_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_SLOW_INPUT_EVENT_REPORTED: + return "ATOM_SLOW_INPUT_EVENT_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_ANR_OCCURRED_PROCESSING_STARTED: + return "ATOM_ANR_OCCURRED_PROCESSING_STARTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_APP_SEARCH_REMOVE_STATS_REPORTED: + return "ATOM_APP_SEARCH_REMOVE_STATS_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_MEDIA_CODEC_REPORTED: + return "ATOM_MEDIA_CODEC_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_PERMISSION_USAGE_FRAGMENT_INTERACTION: + return "ATOM_PERMISSION_USAGE_FRAGMENT_INTERACTION"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_PERMISSION_DETAILS_INTERACTION: + return "ATOM_PERMISSION_DETAILS_INTERACTION"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_PRIVACY_SENSOR_TOGGLE_INTERACTION: + return "ATOM_PRIVACY_SENSOR_TOGGLE_INTERACTION"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_PRIVACY_TOGGLE_DIALOG_INTERACTION: + return "ATOM_PRIVACY_TOGGLE_DIALOG_INTERACTION"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_APP_SEARCH_OPTIMIZE_STATS_REPORTED: + return "ATOM_APP_SEARCH_OPTIMIZE_STATS_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_NON_A11Y_TOOL_SERVICE_WARNING_REPORT: + return "ATOM_NON_A11Y_TOOL_SERVICE_WARNING_REPORT"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_APP_SEARCH_SET_SCHEMA_STATS_REPORTED: + return "ATOM_APP_SEARCH_SET_SCHEMA_STATS_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_APP_COMPAT_STATE_CHANGED: + return "ATOM_APP_COMPAT_STATE_CHANGED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_SIZE_COMPAT_RESTART_BUTTON_EVENT_REPORTED: + return "ATOM_SIZE_COMPAT_RESTART_BUTTON_EVENT_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_SPLITSCREEN_UI_CHANGED: + return "ATOM_SPLITSCREEN_UI_CHANGED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_NETWORK_DNS_HANDSHAKE_REPORTED: + return "ATOM_NETWORK_DNS_HANDSHAKE_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_BLUETOOTH_CODE_PATH_COUNTER: + return "ATOM_BLUETOOTH_CODE_PATH_COUNTER"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_BLUETOOTH_LE_BATCH_SCAN_REPORT_DELAY: + return "ATOM_BLUETOOTH_LE_BATCH_SCAN_REPORT_DELAY"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_ACCESSIBILITY_FLOATING_MENU_UI_CHANGED: + return "ATOM_ACCESSIBILITY_FLOATING_MENU_UI_CHANGED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_NEURALNETWORKS_COMPILATION_COMPLETED: + return "ATOM_NEURALNETWORKS_COMPILATION_COMPLETED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_NEURALNETWORKS_EXECUTION_COMPLETED: + return "ATOM_NEURALNETWORKS_EXECUTION_COMPLETED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_NEURALNETWORKS_COMPILATION_FAILED: + return "ATOM_NEURALNETWORKS_COMPILATION_FAILED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_NEURALNETWORKS_EXECUTION_FAILED: + return "ATOM_NEURALNETWORKS_EXECUTION_FAILED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_CONTEXT_HUB_BOOTED: + return "ATOM_CONTEXT_HUB_BOOTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_CONTEXT_HUB_RESTARTED: + return "ATOM_CONTEXT_HUB_RESTARTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_CONTEXT_HUB_LOADED_NANOAPP_SNAPSHOT_REPORTED: + return "ATOM_CONTEXT_HUB_LOADED_NANOAPP_SNAPSHOT_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_CHRE_CODE_DOWNLOAD_TRANSACTED: + return "ATOM_CHRE_CODE_DOWNLOAD_TRANSACTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_UWB_SESSION_INITED: + return "ATOM_UWB_SESSION_INITED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_UWB_SESSION_CLOSED: + return "ATOM_UWB_SESSION_CLOSED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_UWB_FIRST_RANGING_RECEIVED: + return "ATOM_UWB_FIRST_RANGING_RECEIVED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_UWB_RANGING_MEASUREMENT_RECEIVED: + return "ATOM_UWB_RANGING_MEASUREMENT_RECEIVED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_TEXT_CLASSIFIER_DOWNLOAD_WORK_SCHEDULED: + return "ATOM_TEXT_CLASSIFIER_DOWNLOAD_WORK_SCHEDULED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_TEXT_CLASSIFIER_DOWNLOAD_WORK_COMPLETED: + return "ATOM_TEXT_CLASSIFIER_DOWNLOAD_WORK_COMPLETED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_CLIPBOARD_CLEARED: + return "ATOM_CLIPBOARD_CLEARED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_VM_CREATION_REQUESTED: + return "ATOM_VM_CREATION_REQUESTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_NEARBY_DEVICE_SCAN_STATE_CHANGED: + return "ATOM_NEARBY_DEVICE_SCAN_STATE_CHANGED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_CAMERA_COMPAT_CONTROL_EVENT_REPORTED: + return "ATOM_CAMERA_COMPAT_CONTROL_EVENT_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_APPLICATION_LOCALES_CHANGED: + return "ATOM_APPLICATION_LOCALES_CHANGED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_MEDIAMETRICS_AUDIOTRACKSTATUS_REPORTED: + return "ATOM_MEDIAMETRICS_AUDIOTRACKSTATUS_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_FOLD_STATE_DURATION_REPORTED: + return "ATOM_FOLD_STATE_DURATION_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_LOCATION_TIME_ZONE_PROVIDER_CONTROLLER_STATE_CHANGED: + return "ATOM_LOCATION_TIME_ZONE_PROVIDER_CONTROLLER_STATE_CHANGED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_DISPLAY_HBM_STATE_CHANGED: + return "ATOM_DISPLAY_HBM_STATE_CHANGED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_DISPLAY_HBM_BRIGHTNESS_CHANGED: + return "ATOM_DISPLAY_HBM_BRIGHTNESS_CHANGED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_PERSISTENT_URI_PERMISSIONS_FLUSHED: + return "ATOM_PERSISTENT_URI_PERMISSIONS_FLUSHED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_EARLY_BOOT_COMP_OS_ARTIFACTS_CHECK_REPORTED: + return "ATOM_EARLY_BOOT_COMP_OS_ARTIFACTS_CHECK_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_VBMETA_DIGEST_REPORTED: + return "ATOM_VBMETA_DIGEST_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_APEX_INFO_GATHERED: + return "ATOM_APEX_INFO_GATHERED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_PVM_INFO_GATHERED: + return "ATOM_PVM_INFO_GATHERED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_WEAR_SETTINGS_UI_INTERACTED: + return "ATOM_WEAR_SETTINGS_UI_INTERACTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_TRACING_SERVICE_REPORT_EVENT: + return "ATOM_TRACING_SERVICE_REPORT_EVENT"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_MEDIAMETRICS_AUDIORECORDSTATUS_REPORTED: + return "ATOM_MEDIAMETRICS_AUDIORECORDSTATUS_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_LAUNCHER_LATENCY: + return "ATOM_LAUNCHER_LATENCY"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_DROPBOX_ENTRY_DROPPED: + return "ATOM_DROPBOX_ENTRY_DROPPED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_WIFI_P2P_CONNECTION_REPORTED: + return "ATOM_WIFI_P2P_CONNECTION_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_GAME_STATE_CHANGED: + return "ATOM_GAME_STATE_CHANGED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_HOTWORD_DETECTOR_CREATE_REQUESTED: + return "ATOM_HOTWORD_DETECTOR_CREATE_REQUESTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_HOTWORD_DETECTION_SERVICE_INIT_RESULT_REPORTED: + return "ATOM_HOTWORD_DETECTION_SERVICE_INIT_RESULT_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_HOTWORD_DETECTION_SERVICE_RESTARTED: + return "ATOM_HOTWORD_DETECTION_SERVICE_RESTARTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_HOTWORD_DETECTOR_KEYPHRASE_TRIGGERED: + return "ATOM_HOTWORD_DETECTOR_KEYPHRASE_TRIGGERED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_HOTWORD_DETECTOR_EVENTS: + return "ATOM_HOTWORD_DETECTOR_EVENTS"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_BOOT_COMPLETED_BROADCAST_COMPLETION_LATENCY_REPORTED: + return "ATOM_BOOT_COMPLETED_BROADCAST_COMPLETION_LATENCY_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_CONTACTS_INDEXER_UPDATE_STATS_REPORTED: + return "ATOM_CONTACTS_INDEXER_UPDATE_STATS_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_APP_BACKGROUND_RESTRICTIONS_INFO: + return "ATOM_APP_BACKGROUND_RESTRICTIONS_INFO"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_MMS_SMS_PROVIDER_GET_THREAD_ID_FAILED: + return "ATOM_MMS_SMS_PROVIDER_GET_THREAD_ID_FAILED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_MMS_SMS_DATABASE_HELPER_ON_UPGRADE_FAILED: + return "ATOM_MMS_SMS_DATABASE_HELPER_ON_UPGRADE_FAILED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_PERMISSION_REMINDER_NOTIFICATION_INTERACTED: + return "ATOM_PERMISSION_REMINDER_NOTIFICATION_INTERACTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_RECENT_PERMISSION_DECISIONS_INTERACTED: + return "ATOM_RECENT_PERMISSION_DECISIONS_INTERACTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_GNSS_PSDS_DOWNLOAD_REPORTED: + return "ATOM_GNSS_PSDS_DOWNLOAD_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_LE_AUDIO_CONNECTION_SESSION_REPORTED: + return "ATOM_LE_AUDIO_CONNECTION_SESSION_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_LE_AUDIO_BROADCAST_SESSION_REPORTED: + return "ATOM_LE_AUDIO_BROADCAST_SESSION_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_DREAM_UI_EVENT_REPORTED: + return "ATOM_DREAM_UI_EVENT_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_TASK_MANAGER_EVENT_REPORTED: + return "ATOM_TASK_MANAGER_EVENT_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_CDM_ASSOCIATION_ACTION: + return "ATOM_CDM_ASSOCIATION_ACTION"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_MAGNIFICATION_TRIPLE_TAP_AND_HOLD_ACTIVATED_SESSION_REPORTED: + return "ATOM_MAGNIFICATION_TRIPLE_TAP_AND_HOLD_ACTIVATED_SESSION_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_MAGNIFICATION_FOLLOW_TYPING_FOCUS_ACTIVATED_SESSION_REPORTED: + return "ATOM_MAGNIFICATION_FOLLOW_TYPING_FOCUS_ACTIVATED_SESSION_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_ACCESSIBILITY_TEXT_READING_OPTIONS_CHANGED: + return "ATOM_ACCESSIBILITY_TEXT_READING_OPTIONS_CHANGED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_WIFI_SETUP_FAILURE_CRASH_REPORTED: + return "ATOM_WIFI_SETUP_FAILURE_CRASH_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_UWB_DEVICE_ERROR_REPORTED: + return "ATOM_UWB_DEVICE_ERROR_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_ISOLATED_COMPILATION_SCHEDULED: + return "ATOM_ISOLATED_COMPILATION_SCHEDULED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_ISOLATED_COMPILATION_ENDED: + return "ATOM_ISOLATED_COMPILATION_ENDED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_ONS_OPPORTUNISTIC_ESIM_PROVISIONING_COMPLETE: + return "ATOM_ONS_OPPORTUNISTIC_ESIM_PROVISIONING_COMPLETE"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_TELEPHONY_ANOMALY_DETECTED: + return "ATOM_TELEPHONY_ANOMALY_DETECTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_LETTERBOX_POSITION_CHANGED: + return "ATOM_LETTERBOX_POSITION_CHANGED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_REMOTE_KEY_PROVISIONING_ATTEMPT: + return "ATOM_REMOTE_KEY_PROVISIONING_ATTEMPT"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_REMOTE_KEY_PROVISIONING_NETWORK_INFO: + return "ATOM_REMOTE_KEY_PROVISIONING_NETWORK_INFO"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_REMOTE_KEY_PROVISIONING_TIMING: + return "ATOM_REMOTE_KEY_PROVISIONING_TIMING"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_MEDIAOUTPUT_OP_INTERACTION_REPORT: + return "ATOM_MEDIAOUTPUT_OP_INTERACTION_REPORT"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_BACKGROUND_DEXOPT_JOB_ENDED: + return "ATOM_BACKGROUND_DEXOPT_JOB_ENDED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_SYNC_EXEMPTION_OCCURRED: + return "ATOM_SYNC_EXEMPTION_OCCURRED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_AUTOFILL_PRESENTATION_EVENT_REPORTED: + return "ATOM_AUTOFILL_PRESENTATION_EVENT_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_DOCK_STATE_CHANGED: + return "ATOM_DOCK_STATE_CHANGED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_BROADCAST_DELIVERY_EVENT_REPORTED: + return "ATOM_BROADCAST_DELIVERY_EVENT_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_SERVICE_REQUEST_EVENT_REPORTED: + return "ATOM_SERVICE_REQUEST_EVENT_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_PROVIDER_ACQUISITION_EVENT_REPORTED: + return "ATOM_PROVIDER_ACQUISITION_EVENT_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_BLUETOOTH_DEVICE_NAME_REPORTED: + return "ATOM_BLUETOOTH_DEVICE_NAME_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_VIBRATION_REPORTED: + return "ATOM_VIBRATION_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_UWB_RANGING_START: + return "ATOM_UWB_RANGING_START"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_DISPLAY_BRIGHTNESS_CHANGED: + return "ATOM_DISPLAY_BRIGHTNESS_CHANGED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_ACTIVITY_ACTION_BLOCKED: + return "ATOM_ACTIVITY_ACTION_BLOCKED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_NETWORK_DNS_SERVER_SUPPORT_REPORTED: + return "ATOM_NETWORK_DNS_SERVER_SUPPORT_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_VM_BOOTED: + return "ATOM_VM_BOOTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_VM_EXITED: + return "ATOM_VM_EXITED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_AMBIENT_BRIGHTNESS_STATS_REPORTED: + return "ATOM_AMBIENT_BRIGHTNESS_STATS_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_MEDIAMETRICS_SPATIALIZERCAPABILITIES_REPORTED: + return "ATOM_MEDIAMETRICS_SPATIALIZERCAPABILITIES_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_MEDIAMETRICS_SPATIALIZERDEVICEENABLED_REPORTED: + return "ATOM_MEDIAMETRICS_SPATIALIZERDEVICEENABLED_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_MEDIAMETRICS_HEADTRACKERDEVICEENABLED_REPORTED: + return "ATOM_MEDIAMETRICS_HEADTRACKERDEVICEENABLED_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_MEDIAMETRICS_HEADTRACKERDEVICESUPPORTED_REPORTED: + return "ATOM_MEDIAMETRICS_HEADTRACKERDEVICESUPPORTED_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_HEARING_AID_INFO_REPORTED: + return "ATOM_HEARING_AID_INFO_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_DEVICE_WIDE_JOB_CONSTRAINT_CHANGED: + return "ATOM_DEVICE_WIDE_JOB_CONSTRAINT_CHANGED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_IWLAN_SETUP_DATA_CALL_RESULT_REPORTED: + return "ATOM_IWLAN_SETUP_DATA_CALL_RESULT_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_IWLAN_PDN_DISCONNECTED_REASON_REPORTED: + return "ATOM_IWLAN_PDN_DISCONNECTED_REASON_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_AIRPLANE_MODE_SESSION_REPORTED: + return "ATOM_AIRPLANE_MODE_SESSION_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_VM_CPU_STATUS_REPORTED: + return "ATOM_VM_CPU_STATUS_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_VM_MEM_STATUS_REPORTED: + return "ATOM_VM_MEM_STATUS_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_DEFAULT_NETWORK_REMATCH_INFO: + return "ATOM_DEFAULT_NETWORK_REMATCH_INFO"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_NETWORK_SELECTION_PERFORMANCE: + return "ATOM_NETWORK_SELECTION_PERFORMANCE"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_NETWORK_NSD_REPORTED: + return "ATOM_NETWORK_NSD_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_BLUETOOTH_DISCONNECTION_REASON_REPORTED: + return "ATOM_BLUETOOTH_DISCONNECTION_REASON_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_BLUETOOTH_LOCAL_VERSIONS_REPORTED: + return "ATOM_BLUETOOTH_LOCAL_VERSIONS_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_BLUETOOTH_REMOTE_SUPPORTED_FEATURES_REPORTED: + return "ATOM_BLUETOOTH_REMOTE_SUPPORTED_FEATURES_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_BLUETOOTH_LOCAL_SUPPORTED_FEATURES_REPORTED: + return "ATOM_BLUETOOTH_LOCAL_SUPPORTED_FEATURES_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_BLUETOOTH_GATT_APP_INFO: + return "ATOM_BLUETOOTH_GATT_APP_INFO"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_BRIGHTNESS_CONFIGURATION_UPDATED: + return "ATOM_BRIGHTNESS_CONFIGURATION_UPDATED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_LAUNCHER_IMPRESSION_EVENT: + return "ATOM_LAUNCHER_IMPRESSION_EVENT"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_ODSIGN_REPORTED: + return "ATOM_ODSIGN_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_ART_DEVICE_DATUM_REPORTED: + return "ATOM_ART_DEVICE_DATUM_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_NETWORK_SLICE_SESSION_ENDED: + return "ATOM_NETWORK_SLICE_SESSION_ENDED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_NETWORK_SLICE_DAILY_DATA_USAGE_REPORTED: + return "ATOM_NETWORK_SLICE_DAILY_DATA_USAGE_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_NFC_TAG_TYPE_OCCURRED: + return "ATOM_NFC_TAG_TYPE_OCCURRED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_NFC_AID_CONFLICT_OCCURRED: + return "ATOM_NFC_AID_CONFLICT_OCCURRED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_NFC_READER_CONFLICT_OCCURRED: + return "ATOM_NFC_READER_CONFLICT_OCCURRED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_ART_DATUM_DELTA_REPORTED: + return "ATOM_ART_DATUM_DELTA_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_MEDIA_DRM_CREATED: + return "ATOM_MEDIA_DRM_CREATED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_MEDIA_DRM_ERRORED: + return "ATOM_MEDIA_DRM_ERRORED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_MEDIA_DRM_SESSION_OPENED: + return "ATOM_MEDIA_DRM_SESSION_OPENED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_MEDIA_DRM_SESSION_CLOSED: + return "ATOM_MEDIA_DRM_SESSION_CLOSED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_PERFORMANCE_HINT_SESSION_REPORTED: + return "ATOM_PERFORMANCE_HINT_SESSION_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_HOTWORD_AUDIO_EGRESS_EVENT_REPORTED: + return "ATOM_HOTWORD_AUDIO_EGRESS_EVENT_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_NETWORK_VALIDATION_FAILURE_STATS_DAILY_REPORTED: + return "ATOM_NETWORK_VALIDATION_FAILURE_STATS_DAILY_REPORTED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_WIFI_BYTES_TRANSFER: + return "ATOM_WIFI_BYTES_TRANSFER"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_WIFI_BYTES_TRANSFER_BY_FG_BG: + return "ATOM_WIFI_BYTES_TRANSFER_BY_FG_BG"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_MOBILE_BYTES_TRANSFER: + return "ATOM_MOBILE_BYTES_TRANSFER"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_MOBILE_BYTES_TRANSFER_BY_FG_BG: + return "ATOM_MOBILE_BYTES_TRANSFER_BY_FG_BG"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_BLUETOOTH_BYTES_TRANSFER: + return "ATOM_BLUETOOTH_BYTES_TRANSFER"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_KERNEL_WAKELOCK: + return "ATOM_KERNEL_WAKELOCK"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_SUBSYSTEM_SLEEP_STATE: + return "ATOM_SUBSYSTEM_SLEEP_STATE"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_CPU_TIME_PER_UID: + return "ATOM_CPU_TIME_PER_UID"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_CPU_TIME_PER_UID_FREQ: + return "ATOM_CPU_TIME_PER_UID_FREQ"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_WIFI_ACTIVITY_INFO: + return "ATOM_WIFI_ACTIVITY_INFO"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_MODEM_ACTIVITY_INFO: + return "ATOM_MODEM_ACTIVITY_INFO"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_BLUETOOTH_ACTIVITY_INFO: + return "ATOM_BLUETOOTH_ACTIVITY_INFO"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_PROCESS_MEMORY_STATE: + return "ATOM_PROCESS_MEMORY_STATE"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_SYSTEM_ELAPSED_REALTIME: + return "ATOM_SYSTEM_ELAPSED_REALTIME"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_SYSTEM_UPTIME: + return "ATOM_SYSTEM_UPTIME"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_CPU_ACTIVE_TIME: + return "ATOM_CPU_ACTIVE_TIME"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_CPU_CLUSTER_TIME: + return "ATOM_CPU_CLUSTER_TIME"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_DISK_SPACE: + return "ATOM_DISK_SPACE"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_REMAINING_BATTERY_CAPACITY: + return "ATOM_REMAINING_BATTERY_CAPACITY"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_FULL_BATTERY_CAPACITY: + return "ATOM_FULL_BATTERY_CAPACITY"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_TEMPERATURE: + return "ATOM_TEMPERATURE"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_BINDER_CALLS: + return "ATOM_BINDER_CALLS"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_BINDER_CALLS_EXCEPTIONS: + return "ATOM_BINDER_CALLS_EXCEPTIONS"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_LOOPER_STATS: + return "ATOM_LOOPER_STATS"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_DISK_STATS: + return "ATOM_DISK_STATS"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_DIRECTORY_USAGE: + return "ATOM_DIRECTORY_USAGE"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_APP_SIZE: + return "ATOM_APP_SIZE"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_CATEGORY_SIZE: + return "ATOM_CATEGORY_SIZE"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_PROC_STATS: + return "ATOM_PROC_STATS"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_BATTERY_VOLTAGE: + return "ATOM_BATTERY_VOLTAGE"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_NUM_FINGERPRINTS_ENROLLED: + return "ATOM_NUM_FINGERPRINTS_ENROLLED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_DISK_IO: + return "ATOM_DISK_IO"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_POWER_PROFILE: + return "ATOM_POWER_PROFILE"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_PROC_STATS_PKG_PROC: + return "ATOM_PROC_STATS_PKG_PROC"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_PROCESS_CPU_TIME: + return "ATOM_PROCESS_CPU_TIME"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_CPU_TIME_PER_THREAD_FREQ: + return "ATOM_CPU_TIME_PER_THREAD_FREQ"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_ON_DEVICE_POWER_MEASUREMENT: + return "ATOM_ON_DEVICE_POWER_MEASUREMENT"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_DEVICE_CALCULATED_POWER_USE: + return "ATOM_DEVICE_CALCULATED_POWER_USE"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_PROCESS_MEMORY_HIGH_WATER_MARK: + return "ATOM_PROCESS_MEMORY_HIGH_WATER_MARK"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_BATTERY_LEVEL: + return "ATOM_BATTERY_LEVEL"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_BUILD_INFORMATION: + return "ATOM_BUILD_INFORMATION"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_BATTERY_CYCLE_COUNT: + return "ATOM_BATTERY_CYCLE_COUNT"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_DEBUG_ELAPSED_CLOCK: + return "ATOM_DEBUG_ELAPSED_CLOCK"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_DEBUG_FAILING_ELAPSED_CLOCK: + return "ATOM_DEBUG_FAILING_ELAPSED_CLOCK"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_NUM_FACES_ENROLLED: + return "ATOM_NUM_FACES_ENROLLED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_ROLE_HOLDER: + return "ATOM_ROLE_HOLDER"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_DANGEROUS_PERMISSION_STATE: + return "ATOM_DANGEROUS_PERMISSION_STATE"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_TRAIN_INFO: + return "ATOM_TRAIN_INFO"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_TIME_ZONE_DATA_INFO: + return "ATOM_TIME_ZONE_DATA_INFO"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_EXTERNAL_STORAGE_INFO: + return "ATOM_EXTERNAL_STORAGE_INFO"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_GPU_STATS_GLOBAL_INFO: + return "ATOM_GPU_STATS_GLOBAL_INFO"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_GPU_STATS_APP_INFO: + return "ATOM_GPU_STATS_APP_INFO"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_SYSTEM_ION_HEAP_SIZE: + return "ATOM_SYSTEM_ION_HEAP_SIZE"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_APPS_ON_EXTERNAL_STORAGE_INFO: + return "ATOM_APPS_ON_EXTERNAL_STORAGE_INFO"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_FACE_SETTINGS: + return "ATOM_FACE_SETTINGS"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_COOLING_DEVICE: + return "ATOM_COOLING_DEVICE"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_APP_OPS: + return "ATOM_APP_OPS"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_PROCESS_SYSTEM_ION_HEAP_SIZE: + return "ATOM_PROCESS_SYSTEM_ION_HEAP_SIZE"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_SURFACEFLINGER_STATS_GLOBAL_INFO: + return "ATOM_SURFACEFLINGER_STATS_GLOBAL_INFO"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_SURFACEFLINGER_STATS_LAYER_INFO: + return "ATOM_SURFACEFLINGER_STATS_LAYER_INFO"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_PROCESS_MEMORY_SNAPSHOT: + return "ATOM_PROCESS_MEMORY_SNAPSHOT"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_VMS_CLIENT_STATS: + return "ATOM_VMS_CLIENT_STATS"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_NOTIFICATION_REMOTE_VIEWS: + return "ATOM_NOTIFICATION_REMOTE_VIEWS"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_DANGEROUS_PERMISSION_STATE_SAMPLED: + return "ATOM_DANGEROUS_PERMISSION_STATE_SAMPLED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_GRAPHICS_STATS: + return "ATOM_GRAPHICS_STATS"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_RUNTIME_APP_OP_ACCESS: + return "ATOM_RUNTIME_APP_OP_ACCESS"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_ION_HEAP_SIZE: + return "ATOM_ION_HEAP_SIZE"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_PACKAGE_NOTIFICATION_PREFERENCES: + return "ATOM_PACKAGE_NOTIFICATION_PREFERENCES"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_PACKAGE_NOTIFICATION_CHANNEL_PREFERENCES: + return "ATOM_PACKAGE_NOTIFICATION_CHANNEL_PREFERENCES"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_PACKAGE_NOTIFICATION_CHANNEL_GROUP_PREFERENCES: + return "ATOM_PACKAGE_NOTIFICATION_CHANNEL_GROUP_PREFERENCES"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_GNSS_STATS: + return "ATOM_GNSS_STATS"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_ATTRIBUTED_APP_OPS: + return "ATOM_ATTRIBUTED_APP_OPS"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_VOICE_CALL_SESSION: + return "ATOM_VOICE_CALL_SESSION"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_VOICE_CALL_RAT_USAGE: + return "ATOM_VOICE_CALL_RAT_USAGE"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_SIM_SLOT_STATE: + return "ATOM_SIM_SLOT_STATE"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_SUPPORTED_RADIO_ACCESS_FAMILY: + return "ATOM_SUPPORTED_RADIO_ACCESS_FAMILY"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_SETTING_SNAPSHOT: + return "ATOM_SETTING_SNAPSHOT"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_BLOB_INFO: + return "ATOM_BLOB_INFO"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_DATA_USAGE_BYTES_TRANSFER: + return "ATOM_DATA_USAGE_BYTES_TRANSFER"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_BYTES_TRANSFER_BY_TAG_AND_METERED: + return "ATOM_BYTES_TRANSFER_BY_TAG_AND_METERED"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_DND_MODE_RULE: + return "ATOM_DND_MODE_RULE"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_GENERAL_EXTERNAL_STORAGE_ACCESS_STATS: + return "ATOM_GENERAL_EXTERNAL_STORAGE_ACCESS_STATS"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_INCOMING_SMS: + return "ATOM_INCOMING_SMS"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_OUTGOING_SMS: + return "ATOM_OUTGOING_SMS"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_CARRIER_ID_TABLE_VERSION: + return "ATOM_CARRIER_ID_TABLE_VERSION"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_DATA_CALL_SESSION: + return "ATOM_DATA_CALL_SESSION"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_CELLULAR_SERVICE_STATE: + return "ATOM_CELLULAR_SERVICE_STATE"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_CELLULAR_DATA_SERVICE_SWITCH: + return "ATOM_CELLULAR_DATA_SERVICE_SWITCH"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_SYSTEM_MEMORY: + return "ATOM_SYSTEM_MEMORY"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_IMS_REGISTRATION_TERMINATION: + return "ATOM_IMS_REGISTRATION_TERMINATION"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_IMS_REGISTRATION_STATS: + return "ATOM_IMS_REGISTRATION_STATS"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_CPU_TIME_PER_CLUSTER_FREQ: + return "ATOM_CPU_TIME_PER_CLUSTER_FREQ"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_CPU_CYCLES_PER_UID_CLUSTER: + return "ATOM_CPU_CYCLES_PER_UID_CLUSTER"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_DEVICE_ROTATED_DATA: + return "ATOM_DEVICE_ROTATED_DATA"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_CPU_CYCLES_PER_THREAD_GROUP_CLUSTER: + return "ATOM_CPU_CYCLES_PER_THREAD_GROUP_CLUSTER"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_MEDIA_DRM_ACTIVITY_INFO: + return "ATOM_MEDIA_DRM_ACTIVITY_INFO"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_OEM_MANAGED_BYTES_TRANSFER: + return "ATOM_OEM_MANAGED_BYTES_TRANSFER"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_GNSS_POWER_STATS: + return "ATOM_GNSS_POWER_STATS"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_TIME_ZONE_DETECTOR_STATE: + return "ATOM_TIME_ZONE_DETECTOR_STATE"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_KEYSTORE2_STORAGE_STATS: + return "ATOM_KEYSTORE2_STORAGE_STATS"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_RKP_POOL_STATS: + return "ATOM_RKP_POOL_STATS"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_PROCESS_DMABUF_MEMORY: + return "ATOM_PROCESS_DMABUF_MEMORY"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_PENDING_ALARM_INFO: + return "ATOM_PENDING_ALARM_INFO"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_USER_LEVEL_HIBERNATED_APPS: + return "ATOM_USER_LEVEL_HIBERNATED_APPS"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_LAUNCHER_LAYOUT_SNAPSHOT: + return "ATOM_LAUNCHER_LAYOUT_SNAPSHOT"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_GLOBAL_HIBERNATED_APPS: + return "ATOM_GLOBAL_HIBERNATED_APPS"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_INPUT_EVENT_LATENCY_SKETCH: + return "ATOM_INPUT_EVENT_LATENCY_SKETCH"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_BATTERY_USAGE_STATS_BEFORE_RESET: + return "ATOM_BATTERY_USAGE_STATS_BEFORE_RESET"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_BATTERY_USAGE_STATS_SINCE_RESET: + return "ATOM_BATTERY_USAGE_STATS_SINCE_RESET"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_BATTERY_USAGE_STATS_SINCE_RESET_USING_POWER_PROFILE_MODEL: + return "ATOM_BATTERY_USAGE_STATS_SINCE_RESET_USING_POWER_PROFILE_MODEL"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_INSTALLED_INCREMENTAL_PACKAGE: + return "ATOM_INSTALLED_INCREMENTAL_PACKAGE"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_TELEPHONY_NETWORK_REQUESTS: + return "ATOM_TELEPHONY_NETWORK_REQUESTS"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_APP_SEARCH_STORAGE_INFO: + return "ATOM_APP_SEARCH_STORAGE_INFO"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_VMSTAT: + return "ATOM_VMSTAT"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_KEYSTORE2_KEY_CREATION_WITH_GENERAL_INFO: + return "ATOM_KEYSTORE2_KEY_CREATION_WITH_GENERAL_INFO"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_KEYSTORE2_KEY_CREATION_WITH_AUTH_INFO: + return "ATOM_KEYSTORE2_KEY_CREATION_WITH_AUTH_INFO"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_KEYSTORE2_KEY_CREATION_WITH_PURPOSE_AND_MODES_INFO: + return "ATOM_KEYSTORE2_KEY_CREATION_WITH_PURPOSE_AND_MODES_INFO"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_KEYSTORE2_ATOM_WITH_OVERFLOW: + return "ATOM_KEYSTORE2_ATOM_WITH_OVERFLOW"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_KEYSTORE2_KEY_OPERATION_WITH_PURPOSE_AND_MODES_INFO: + return "ATOM_KEYSTORE2_KEY_OPERATION_WITH_PURPOSE_AND_MODES_INFO"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_KEYSTORE2_KEY_OPERATION_WITH_GENERAL_INFO: + return "ATOM_KEYSTORE2_KEY_OPERATION_WITH_GENERAL_INFO"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_RKP_ERROR_STATS: + return "ATOM_RKP_ERROR_STATS"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_KEYSTORE2_CRASH_STATS: + return "ATOM_KEYSTORE2_CRASH_STATS"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_VENDOR_APEX_INFO: + return "ATOM_VENDOR_APEX_INFO"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_ACCESSIBILITY_SHORTCUT_STATS: + return "ATOM_ACCESSIBILITY_SHORTCUT_STATS"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_ACCESSIBILITY_FLOATING_MENU_STATS: + return "ATOM_ACCESSIBILITY_FLOATING_MENU_STATS"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_DATA_USAGE_BYTES_TRANSFER_V2: + return "ATOM_DATA_USAGE_BYTES_TRANSFER_V2"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_MEDIA_CAPABILITIES: + return "ATOM_MEDIA_CAPABILITIES"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_CAR_WATCHDOG_SYSTEM_IO_USAGE_SUMMARY: + return "ATOM_CAR_WATCHDOG_SYSTEM_IO_USAGE_SUMMARY"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_CAR_WATCHDOG_UID_IO_USAGE_SUMMARY: + return "ATOM_CAR_WATCHDOG_UID_IO_USAGE_SUMMARY"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_IMS_REGISTRATION_FEATURE_TAG_STATS: + return "ATOM_IMS_REGISTRATION_FEATURE_TAG_STATS"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_RCS_CLIENT_PROVISIONING_STATS: + return "ATOM_RCS_CLIENT_PROVISIONING_STATS"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_RCS_ACS_PROVISIONING_STATS: + return "ATOM_RCS_ACS_PROVISIONING_STATS"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_SIP_DELEGATE_STATS: + return "ATOM_SIP_DELEGATE_STATS"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_SIP_TRANSPORT_FEATURE_TAG_STATS: + return "ATOM_SIP_TRANSPORT_FEATURE_TAG_STATS"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_SIP_MESSAGE_RESPONSE: + return "ATOM_SIP_MESSAGE_RESPONSE"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_SIP_TRANSPORT_SESSION: + return "ATOM_SIP_TRANSPORT_SESSION"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_IMS_DEDICATED_BEARER_LISTENER_EVENT: + return "ATOM_IMS_DEDICATED_BEARER_LISTENER_EVENT"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_IMS_DEDICATED_BEARER_EVENT: + return "ATOM_IMS_DEDICATED_BEARER_EVENT"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_IMS_REGISTRATION_SERVICE_DESC_STATS: + return "ATOM_IMS_REGISTRATION_SERVICE_DESC_STATS"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_UCE_EVENT_STATS: + return "ATOM_UCE_EVENT_STATS"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_PRESENCE_NOTIFY_EVENT: + return "ATOM_PRESENCE_NOTIFY_EVENT"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_GBA_EVENT: + return "ATOM_GBA_EVENT"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_PER_SIM_STATUS: + return "ATOM_PER_SIM_STATUS"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_GPU_WORK_PER_UID: + return "ATOM_GPU_WORK_PER_UID"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_PERSISTENT_URI_PERMISSIONS_AMOUNT_PER_PACKAGE: + return "ATOM_PERSISTENT_URI_PERMISSIONS_AMOUNT_PER_PACKAGE"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_SIGNED_PARTITION_INFO: + return "ATOM_SIGNED_PARTITION_INFO"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_PINNED_FILE_SIZES_PER_PACKAGE: + return "ATOM_PINNED_FILE_SIZES_PER_PACKAGE"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_PENDING_INTENTS_PER_PACKAGE: + return "ATOM_PENDING_INTENTS_PER_PACKAGE"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_USER_INFO: + return "ATOM_USER_INFO"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_TELEPHONY_NETWORK_REQUESTS_V2: + return "ATOM_TELEPHONY_NETWORK_REQUESTS_V2"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_DEVICE_TELEPHONY_PROPERTIES: + return "ATOM_DEVICE_TELEPHONY_PROPERTIES"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_REMOTE_KEY_PROVISIONING_ERROR_COUNTS: + return "ATOM_REMOTE_KEY_PROVISIONING_ERROR_COUNTS"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_INCOMING_MMS: + return "ATOM_INCOMING_MMS"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_OUTGOING_MMS: + return "ATOM_OUTGOING_MMS"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_MULTI_USER_INFO: + return "ATOM_MULTI_USER_INFO"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_NETWORK_BPF_MAP_INFO: + return "ATOM_NETWORK_BPF_MAP_INFO"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_CONNECTIVITY_STATE_SAMPLE: + return "ATOM_CONNECTIVITY_STATE_SAMPLE"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_NETWORK_SELECTION_REMATCH_REASONS_INFO: + return "ATOM_NETWORK_SELECTION_REMATCH_REASONS_INFO"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_NETWORK_SLICE_REQUEST_COUNT: + return "ATOM_NETWORK_SLICE_REQUEST_COUNT"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_ADPF_SYSTEM_COMPONENT_INFO: + return "ATOM_ADPF_SYSTEM_COMPONENT_INFO"; + + case ::perfetto::protos::pbzero::AtomId::ATOM_NOTIFICATION_MEMORY_USE: + return "ATOM_NOTIFICATION_MEMORY_USE"; + } + return "PBZERO_UNKNOWN_ENUM_VALUE"; +} + +} // Namespace. +} // Namespace. +} // Namespace. +#endif // Include guard. +// gen_amalgamated begin header: gen/protos/perfetto/config/statsd/statsd_tracing_config.pbzero.h +// Autogenerated by the ProtoZero compiler plugin. DO NOT EDIT. + +#ifndef PERFETTO_PROTOS_PROTOS_PERFETTO_CONFIG_STATSD_STATSD_TRACING_CONFIG_PROTO_H_ +#define PERFETTO_PROTOS_PROTOS_PERFETTO_CONFIG_STATSD_STATSD_TRACING_CONFIG_PROTO_H_ + +#include +#include + +// gen_amalgamated expanded: #include "perfetto/protozero/field_writer.h" +// gen_amalgamated expanded: #include "perfetto/protozero/message.h" +// gen_amalgamated expanded: #include "perfetto/protozero/packed_repeated_fields.h" +// gen_amalgamated expanded: #include "perfetto/protozero/proto_decoder.h" +// gen_amalgamated expanded: #include "perfetto/protozero/proto_utils.h" + +namespace perfetto { +namespace protos { +namespace pbzero { + +class StatsdPullAtomConfig; +enum AtomId : int32_t; + +class StatsdPullAtomConfig_Decoder : public ::protozero::TypedProtoDecoder { + public: + StatsdPullAtomConfig_Decoder(const uint8_t* data, size_t len) : TypedProtoDecoder(data, len) {} + explicit StatsdPullAtomConfig_Decoder(const std::string& raw) : TypedProtoDecoder(reinterpret_cast(raw.data()), raw.size()) {} + explicit StatsdPullAtomConfig_Decoder(const ::protozero::ConstBytes& raw) : TypedProtoDecoder(raw.data, raw.size) {} + bool has_pull_atom_id() const { return at<1>().valid(); } + ::protozero::RepeatedFieldIterator pull_atom_id() const { return GetRepeated(1); } + bool has_raw_pull_atom_id() const { return at<2>().valid(); } + ::protozero::RepeatedFieldIterator raw_pull_atom_id() const { return GetRepeated(2); } + bool has_pull_frequency_ms() const { return at<3>().valid(); } + int32_t pull_frequency_ms() const { return at<3>().as_int32(); } + bool has_packages() const { return at<4>().valid(); } + ::protozero::RepeatedFieldIterator<::protozero::ConstChars> packages() const { return GetRepeated<::protozero::ConstChars>(4); } +}; + +class StatsdPullAtomConfig : public ::protozero::Message { + public: + using Decoder = StatsdPullAtomConfig_Decoder; + enum : int32_t { + kPullAtomIdFieldNumber = 1, + kRawPullAtomIdFieldNumber = 2, + kPullFrequencyMsFieldNumber = 3, + kPackagesFieldNumber = 4, + }; + static constexpr const char* GetName() { return ".perfetto.protos.StatsdPullAtomConfig"; } + + + using FieldMetadata_PullAtomId = + ::protozero::proto_utils::FieldMetadata< + 1, + ::protozero::proto_utils::RepetitionType::kRepeatedNotPacked, + ::protozero::proto_utils::ProtoSchemaType::kEnum, + ::perfetto::protos::pbzero::AtomId, + StatsdPullAtomConfig>; + + static constexpr FieldMetadata_PullAtomId kPullAtomId{}; + void add_pull_atom_id(::perfetto::protos::pbzero::AtomId value) { + static constexpr uint32_t field_id = FieldMetadata_PullAtomId::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kEnum> + ::Append(*this, field_id, value); + } + + using FieldMetadata_RawPullAtomId = + ::protozero::proto_utils::FieldMetadata< + 2, + ::protozero::proto_utils::RepetitionType::kRepeatedNotPacked, + ::protozero::proto_utils::ProtoSchemaType::kInt32, + int32_t, + StatsdPullAtomConfig>; + + static constexpr FieldMetadata_RawPullAtomId kRawPullAtomId{}; + void add_raw_pull_atom_id(int32_t value) { + static constexpr uint32_t field_id = FieldMetadata_RawPullAtomId::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kInt32> + ::Append(*this, field_id, value); + } + + using FieldMetadata_PullFrequencyMs = + ::protozero::proto_utils::FieldMetadata< + 3, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kInt32, + int32_t, + StatsdPullAtomConfig>; + + static constexpr FieldMetadata_PullFrequencyMs kPullFrequencyMs{}; + void set_pull_frequency_ms(int32_t value) { + static constexpr uint32_t field_id = FieldMetadata_PullFrequencyMs::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kInt32> + ::Append(*this, field_id, value); + } + + using FieldMetadata_Packages = + ::protozero::proto_utils::FieldMetadata< + 4, + ::protozero::proto_utils::RepetitionType::kRepeatedNotPacked, + ::protozero::proto_utils::ProtoSchemaType::kString, + std::string, + StatsdPullAtomConfig>; + + static constexpr FieldMetadata_Packages kPackages{}; + void add_packages(const char* data, size_t size) { + AppendBytes(FieldMetadata_Packages::kFieldId, data, size); + } + void add_packages(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Packages::kFieldId, chars.data, chars.size); + } + void add_packages(std::string value) { + static constexpr uint32_t field_id = FieldMetadata_Packages::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kString> + ::Append(*this, field_id, value); + } +}; + +class StatsdTracingConfig_Decoder : public ::protozero::TypedProtoDecoder { + public: + StatsdTracingConfig_Decoder(const uint8_t* data, size_t len) : TypedProtoDecoder(data, len) {} + explicit StatsdTracingConfig_Decoder(const std::string& raw) : TypedProtoDecoder(reinterpret_cast(raw.data()), raw.size()) {} + explicit StatsdTracingConfig_Decoder(const ::protozero::ConstBytes& raw) : TypedProtoDecoder(raw.data, raw.size) {} + bool has_push_atom_id() const { return at<1>().valid(); } + ::protozero::RepeatedFieldIterator push_atom_id() const { return GetRepeated(1); } + bool has_raw_push_atom_id() const { return at<2>().valid(); } + ::protozero::RepeatedFieldIterator raw_push_atom_id() const { return GetRepeated(2); } + bool has_pull_config() const { return at<3>().valid(); } + ::protozero::RepeatedFieldIterator<::protozero::ConstBytes> pull_config() const { return GetRepeated<::protozero::ConstBytes>(3); } +}; + +class StatsdTracingConfig : public ::protozero::Message { + public: + using Decoder = StatsdTracingConfig_Decoder; + enum : int32_t { + kPushAtomIdFieldNumber = 1, + kRawPushAtomIdFieldNumber = 2, + kPullConfigFieldNumber = 3, + }; + static constexpr const char* GetName() { return ".perfetto.protos.StatsdTracingConfig"; } + + + using FieldMetadata_PushAtomId = + ::protozero::proto_utils::FieldMetadata< + 1, + ::protozero::proto_utils::RepetitionType::kRepeatedNotPacked, + ::protozero::proto_utils::ProtoSchemaType::kEnum, + ::perfetto::protos::pbzero::AtomId, + StatsdTracingConfig>; + + static constexpr FieldMetadata_PushAtomId kPushAtomId{}; + void add_push_atom_id(::perfetto::protos::pbzero::AtomId value) { + static constexpr uint32_t field_id = FieldMetadata_PushAtomId::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kEnum> + ::Append(*this, field_id, value); + } + + using FieldMetadata_RawPushAtomId = + ::protozero::proto_utils::FieldMetadata< + 2, + ::protozero::proto_utils::RepetitionType::kRepeatedNotPacked, + ::protozero::proto_utils::ProtoSchemaType::kInt32, + int32_t, + StatsdTracingConfig>; + + static constexpr FieldMetadata_RawPushAtomId kRawPushAtomId{}; + void add_raw_push_atom_id(int32_t value) { + static constexpr uint32_t field_id = FieldMetadata_RawPushAtomId::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kInt32> + ::Append(*this, field_id, value); + } + + using FieldMetadata_PullConfig = + ::protozero::proto_utils::FieldMetadata< + 3, + ::protozero::proto_utils::RepetitionType::kRepeatedNotPacked, + ::protozero::proto_utils::ProtoSchemaType::kMessage, + StatsdPullAtomConfig, + StatsdTracingConfig>; + + static constexpr FieldMetadata_PullConfig kPullConfig{}; + template T* add_pull_config() { + return BeginNestedMessage(3); + } + +}; + } // Namespace. } // Namespace. } // Namespace. @@ -32527,21 +36662,50 @@ namespace protos { namespace pbzero { enum MeminfoCounters : int32_t; -enum SysStatsConfig_StatCounters : int32_t; +namespace perfetto_pbzero_enum_SysStatsConfig { +enum StatCounters : int32_t; +} // namespace perfetto_pbzero_enum_SysStatsConfig +using SysStatsConfig_StatCounters = perfetto_pbzero_enum_SysStatsConfig::StatCounters; enum VmstatCounters : int32_t; -enum SysStatsConfig_StatCounters : int32_t { - SysStatsConfig_StatCounters_STAT_UNSPECIFIED = 0, - SysStatsConfig_StatCounters_STAT_CPU_TIMES = 1, - SysStatsConfig_StatCounters_STAT_IRQ_COUNTS = 2, - SysStatsConfig_StatCounters_STAT_SOFTIRQ_COUNTS = 3, - SysStatsConfig_StatCounters_STAT_FORK_COUNT = 4, +namespace perfetto_pbzero_enum_SysStatsConfig { +enum StatCounters : int32_t { + STAT_UNSPECIFIED = 0, + STAT_CPU_TIMES = 1, + STAT_IRQ_COUNTS = 2, + STAT_SOFTIRQ_COUNTS = 3, + STAT_FORK_COUNT = 4, }; +} // namespace perfetto_pbzero_enum_SysStatsConfig +using SysStatsConfig_StatCounters = perfetto_pbzero_enum_SysStatsConfig::StatCounters; -const SysStatsConfig_StatCounters SysStatsConfig_StatCounters_MIN = SysStatsConfig_StatCounters_STAT_UNSPECIFIED; -const SysStatsConfig_StatCounters SysStatsConfig_StatCounters_MAX = SysStatsConfig_StatCounters_STAT_FORK_COUNT; -class SysStatsConfig_Decoder : public ::protozero::TypedProtoDecoder { +constexpr SysStatsConfig_StatCounters SysStatsConfig_StatCounters_MIN = SysStatsConfig_StatCounters::STAT_UNSPECIFIED; +constexpr SysStatsConfig_StatCounters SysStatsConfig_StatCounters_MAX = SysStatsConfig_StatCounters::STAT_FORK_COUNT; + + +PERFETTO_PROTOZERO_CONSTEXPR14_OR_INLINE +const char* SysStatsConfig_StatCounters_Name(::perfetto::protos::pbzero::SysStatsConfig_StatCounters value) { + switch (value) { + case ::perfetto::protos::pbzero::SysStatsConfig_StatCounters::STAT_UNSPECIFIED: + return "STAT_UNSPECIFIED"; + + case ::perfetto::protos::pbzero::SysStatsConfig_StatCounters::STAT_CPU_TIMES: + return "STAT_CPU_TIMES"; + + case ::perfetto::protos::pbzero::SysStatsConfig_StatCounters::STAT_IRQ_COUNTS: + return "STAT_IRQ_COUNTS"; + + case ::perfetto::protos::pbzero::SysStatsConfig_StatCounters::STAT_SOFTIRQ_COUNTS: + return "STAT_SOFTIRQ_COUNTS"; + + case ::perfetto::protos::pbzero::SysStatsConfig_StatCounters::STAT_FORK_COUNT: + return "STAT_FORK_COUNT"; + } + return "PBZERO_UNKNOWN_ENUM_VALUE"; +} + +class SysStatsConfig_Decoder : public ::protozero::TypedProtoDecoder { public: SysStatsConfig_Decoder(const uint8_t* data, size_t len) : TypedProtoDecoder(data, len) {} explicit SysStatsConfig_Decoder(const std::string& raw) : TypedProtoDecoder(reinterpret_cast(raw.data()), raw.size()) {} @@ -32562,6 +36726,10 @@ class SysStatsConfig_Decoder : public ::protozero::TypedProtoDecoder().as_uint32(); } bool has_cpufreq_period_ms() const { return at<8>().valid(); } uint32_t cpufreq_period_ms() const { return at<8>().as_uint32(); } + bool has_buddyinfo_period_ms() const { return at<9>().valid(); } + uint32_t buddyinfo_period_ms() const { return at<9>().as_uint32(); } + bool has_diskstat_period_ms() const { return at<10>().valid(); } + uint32_t diskstat_period_ms() const { return at<10>().as_uint32(); } }; class SysStatsConfig : public ::protozero::Message { @@ -32576,15 +36744,21 @@ class SysStatsConfig : public ::protozero::Message { kStatCountersFieldNumber = 6, kDevfreqPeriodMsFieldNumber = 7, kCpufreqPeriodMsFieldNumber = 8, + kBuddyinfoPeriodMsFieldNumber = 9, + kDiskstatPeriodMsFieldNumber = 10, }; static constexpr const char* GetName() { return ".perfetto.protos.SysStatsConfig"; } + using StatCounters = ::perfetto::protos::pbzero::SysStatsConfig_StatCounters; - static const StatCounters STAT_UNSPECIFIED = SysStatsConfig_StatCounters_STAT_UNSPECIFIED; - static const StatCounters STAT_CPU_TIMES = SysStatsConfig_StatCounters_STAT_CPU_TIMES; - static const StatCounters STAT_IRQ_COUNTS = SysStatsConfig_StatCounters_STAT_IRQ_COUNTS; - static const StatCounters STAT_SOFTIRQ_COUNTS = SysStatsConfig_StatCounters_STAT_SOFTIRQ_COUNTS; - static const StatCounters STAT_FORK_COUNT = SysStatsConfig_StatCounters_STAT_FORK_COUNT; + static inline const char* StatCounters_Name(StatCounters value) { + return ::perfetto::protos::pbzero::SysStatsConfig_StatCounters_Name(value); + } + static const StatCounters STAT_UNSPECIFIED = StatCounters::STAT_UNSPECIFIED; + static const StatCounters STAT_CPU_TIMES = StatCounters::STAT_CPU_TIMES; + static const StatCounters STAT_IRQ_COUNTS = StatCounters::STAT_IRQ_COUNTS; + static const StatCounters STAT_SOFTIRQ_COUNTS = StatCounters::STAT_SOFTIRQ_COUNTS; + static const StatCounters STAT_FORK_COUNT = StatCounters::STAT_FORK_COUNT; using FieldMetadata_MeminfoPeriodMs = ::protozero::proto_utils::FieldMetadata< @@ -32594,14 +36768,7 @@ class SysStatsConfig : public ::protozero::Message { uint32_t, SysStatsConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_MeminfoPeriodMs kMeminfoPeriodMs() { return {}; } + static constexpr FieldMetadata_MeminfoPeriodMs kMeminfoPeriodMs{}; void set_meminfo_period_ms(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_MeminfoPeriodMs::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -32619,14 +36786,7 @@ class SysStatsConfig : public ::protozero::Message { ::perfetto::protos::pbzero::MeminfoCounters, SysStatsConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_MeminfoCounters kMeminfoCounters() { return {}; } + static constexpr FieldMetadata_MeminfoCounters kMeminfoCounters{}; void add_meminfo_counters(::perfetto::protos::pbzero::MeminfoCounters value) { static constexpr uint32_t field_id = FieldMetadata_MeminfoCounters::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -32644,14 +36804,7 @@ class SysStatsConfig : public ::protozero::Message { uint32_t, SysStatsConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_VmstatPeriodMs kVmstatPeriodMs() { return {}; } + static constexpr FieldMetadata_VmstatPeriodMs kVmstatPeriodMs{}; void set_vmstat_period_ms(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_VmstatPeriodMs::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -32669,14 +36822,7 @@ class SysStatsConfig : public ::protozero::Message { ::perfetto::protos::pbzero::VmstatCounters, SysStatsConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_VmstatCounters kVmstatCounters() { return {}; } + static constexpr FieldMetadata_VmstatCounters kVmstatCounters{}; void add_vmstat_counters(::perfetto::protos::pbzero::VmstatCounters value) { static constexpr uint32_t field_id = FieldMetadata_VmstatCounters::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -32694,14 +36840,7 @@ class SysStatsConfig : public ::protozero::Message { uint32_t, SysStatsConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_StatPeriodMs kStatPeriodMs() { return {}; } + static constexpr FieldMetadata_StatPeriodMs kStatPeriodMs{}; void set_stat_period_ms(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_StatPeriodMs::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -32719,14 +36858,7 @@ class SysStatsConfig : public ::protozero::Message { ::perfetto::protos::pbzero::SysStatsConfig_StatCounters, SysStatsConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_StatCounters kStatCounters() { return {}; } + static constexpr FieldMetadata_StatCounters kStatCounters{}; void add_stat_counters(::perfetto::protos::pbzero::SysStatsConfig_StatCounters value) { static constexpr uint32_t field_id = FieldMetadata_StatCounters::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -32744,14 +36876,7 @@ class SysStatsConfig : public ::protozero::Message { uint32_t, SysStatsConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_DevfreqPeriodMs kDevfreqPeriodMs() { return {}; } + static constexpr FieldMetadata_DevfreqPeriodMs kDevfreqPeriodMs{}; void set_devfreq_period_ms(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_DevfreqPeriodMs::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -32769,14 +36894,7 @@ class SysStatsConfig : public ::protozero::Message { uint32_t, SysStatsConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_CpufreqPeriodMs kCpufreqPeriodMs() { return {}; } + static constexpr FieldMetadata_CpufreqPeriodMs kCpufreqPeriodMs{}; void set_cpufreq_period_ms(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_CpufreqPeriodMs::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -32785,6 +36903,80 @@ class SysStatsConfig : public ::protozero::Message { ::protozero::proto_utils::ProtoSchemaType::kUint32> ::Append(*this, field_id, value); } + + using FieldMetadata_BuddyinfoPeriodMs = + ::protozero::proto_utils::FieldMetadata< + 9, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint32, + uint32_t, + SysStatsConfig>; + + static constexpr FieldMetadata_BuddyinfoPeriodMs kBuddyinfoPeriodMs{}; + void set_buddyinfo_period_ms(uint32_t value) { + static constexpr uint32_t field_id = FieldMetadata_BuddyinfoPeriodMs::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint32> + ::Append(*this, field_id, value); + } + + using FieldMetadata_DiskstatPeriodMs = + ::protozero::proto_utils::FieldMetadata< + 10, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint32, + uint32_t, + SysStatsConfig>; + + static constexpr FieldMetadata_DiskstatPeriodMs kDiskstatPeriodMs{}; + void set_diskstat_period_ms(uint32_t value) { + static constexpr uint32_t field_id = FieldMetadata_DiskstatPeriodMs::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint32> + ::Append(*this, field_id, value); + } +}; + +} // Namespace. +} // Namespace. +} // Namespace. +#endif // Include guard. +// gen_amalgamated begin header: gen/protos/perfetto/config/system_info/system_info.pbzero.h +// Autogenerated by the ProtoZero compiler plugin. DO NOT EDIT. + +#ifndef PERFETTO_PROTOS_PROTOS_PERFETTO_CONFIG_SYSTEM_INFO_SYSTEM_INFO_PROTO_H_ +#define PERFETTO_PROTOS_PROTOS_PERFETTO_CONFIG_SYSTEM_INFO_SYSTEM_INFO_PROTO_H_ + +#include +#include + +// gen_amalgamated expanded: #include "perfetto/protozero/field_writer.h" +// gen_amalgamated expanded: #include "perfetto/protozero/message.h" +// gen_amalgamated expanded: #include "perfetto/protozero/packed_repeated_fields.h" +// gen_amalgamated expanded: #include "perfetto/protozero/proto_decoder.h" +// gen_amalgamated expanded: #include "perfetto/protozero/proto_utils.h" + +namespace perfetto { +namespace protos { +namespace pbzero { + + +class SystemInfoConfig_Decoder : public ::protozero::TypedProtoDecoder { + public: + SystemInfoConfig_Decoder(const uint8_t* data, size_t len) : TypedProtoDecoder(data, len) {} + explicit SystemInfoConfig_Decoder(const std::string& raw) : TypedProtoDecoder(reinterpret_cast(raw.data()), raw.size()) {} + explicit SystemInfoConfig_Decoder(const ::protozero::ConstBytes& raw) : TypedProtoDecoder(raw.data, raw.size) {} +}; + +class SystemInfoConfig : public ::protozero::Message { + public: + using Decoder = SystemInfoConfig_Decoder; + static constexpr const char* GetName() { return ".perfetto.protos.SystemInfoConfig"; } + }; } // Namespace. @@ -32861,17 +37053,13 @@ class TrackEventConfig : public ::protozero::Message { std::string, TrackEventConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_DisabledCategories kDisabledCategories() { return {}; } + static constexpr FieldMetadata_DisabledCategories kDisabledCategories{}; void add_disabled_categories(const char* data, size_t size) { AppendBytes(FieldMetadata_DisabledCategories::kFieldId, data, size); } + void add_disabled_categories(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_DisabledCategories::kFieldId, chars.data, chars.size); + } void add_disabled_categories(std::string value) { static constexpr uint32_t field_id = FieldMetadata_DisabledCategories::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -32889,17 +37077,13 @@ class TrackEventConfig : public ::protozero::Message { std::string, TrackEventConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_EnabledCategories kEnabledCategories() { return {}; } + static constexpr FieldMetadata_EnabledCategories kEnabledCategories{}; void add_enabled_categories(const char* data, size_t size) { AppendBytes(FieldMetadata_EnabledCategories::kFieldId, data, size); } + void add_enabled_categories(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_EnabledCategories::kFieldId, chars.data, chars.size); + } void add_enabled_categories(std::string value) { static constexpr uint32_t field_id = FieldMetadata_EnabledCategories::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -32917,17 +37101,13 @@ class TrackEventConfig : public ::protozero::Message { std::string, TrackEventConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_DisabledTags kDisabledTags() { return {}; } + static constexpr FieldMetadata_DisabledTags kDisabledTags{}; void add_disabled_tags(const char* data, size_t size) { AppendBytes(FieldMetadata_DisabledTags::kFieldId, data, size); } + void add_disabled_tags(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_DisabledTags::kFieldId, chars.data, chars.size); + } void add_disabled_tags(std::string value) { static constexpr uint32_t field_id = FieldMetadata_DisabledTags::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -32945,17 +37125,13 @@ class TrackEventConfig : public ::protozero::Message { std::string, TrackEventConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_EnabledTags kEnabledTags() { return {}; } + static constexpr FieldMetadata_EnabledTags kEnabledTags{}; void add_enabled_tags(const char* data, size_t size) { AppendBytes(FieldMetadata_EnabledTags::kFieldId, data, size); } + void add_enabled_tags(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_EnabledTags::kFieldId, chars.data, chars.size); + } void add_enabled_tags(std::string value) { static constexpr uint32_t field_id = FieldMetadata_EnabledTags::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -32973,14 +37149,7 @@ class TrackEventConfig : public ::protozero::Message { bool, TrackEventConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_DisableIncrementalTimestamps kDisableIncrementalTimestamps() { return {}; } + static constexpr FieldMetadata_DisableIncrementalTimestamps kDisableIncrementalTimestamps{}; void set_disable_incremental_timestamps(bool value) { static constexpr uint32_t field_id = FieldMetadata_DisableIncrementalTimestamps::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -32998,14 +37167,7 @@ class TrackEventConfig : public ::protozero::Message { uint64_t, TrackEventConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_TimestampUnitMultiplier kTimestampUnitMultiplier() { return {}; } + static constexpr FieldMetadata_TimestampUnitMultiplier kTimestampUnitMultiplier{}; void set_timestamp_unit_multiplier(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_TimestampUnitMultiplier::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -33023,14 +37185,7 @@ class TrackEventConfig : public ::protozero::Message { bool, TrackEventConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_FilterDebugAnnotations kFilterDebugAnnotations() { return {}; } + static constexpr FieldMetadata_FilterDebugAnnotations kFilterDebugAnnotations{}; void set_filter_debug_annotations(bool value) { static constexpr uint32_t field_id = FieldMetadata_FilterDebugAnnotations::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -33048,14 +37203,7 @@ class TrackEventConfig : public ::protozero::Message { bool, TrackEventConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_EnableThreadTimeSampling kEnableThreadTimeSampling() { return {}; } + static constexpr FieldMetadata_EnableThreadTimeSampling kEnableThreadTimeSampling{}; void set_enable_thread_time_sampling(bool value) { static constexpr uint32_t field_id = FieldMetadata_EnableThreadTimeSampling::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -33073,14 +37221,7 @@ class TrackEventConfig : public ::protozero::Message { bool, TrackEventConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_FilterDynamicEventNames kFilterDynamicEventNames() { return {}; } + static constexpr FieldMetadata_FilterDynamicEventNames kFilterDynamicEventNames{}; void set_filter_dynamic_event_names(bool value) { static constexpr uint32_t field_id = FieldMetadata_FilterDynamicEventNames::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -33114,16 +37255,39 @@ namespace perfetto { namespace protos { namespace pbzero { -enum ChromeConfig_ClientPriority : int32_t; +namespace perfetto_pbzero_enum_ChromeConfig { +enum ClientPriority : int32_t; +} // namespace perfetto_pbzero_enum_ChromeConfig +using ChromeConfig_ClientPriority = perfetto_pbzero_enum_ChromeConfig::ClientPriority; -enum ChromeConfig_ClientPriority : int32_t { - ChromeConfig_ClientPriority_UNKNOWN = 0, - ChromeConfig_ClientPriority_BACKGROUND = 1, - ChromeConfig_ClientPriority_USER_INITIATED = 2, +namespace perfetto_pbzero_enum_ChromeConfig { +enum ClientPriority : int32_t { + UNKNOWN = 0, + BACKGROUND = 1, + USER_INITIATED = 2, }; +} // namespace perfetto_pbzero_enum_ChromeConfig +using ChromeConfig_ClientPriority = perfetto_pbzero_enum_ChromeConfig::ClientPriority; -const ChromeConfig_ClientPriority ChromeConfig_ClientPriority_MIN = ChromeConfig_ClientPriority_UNKNOWN; -const ChromeConfig_ClientPriority ChromeConfig_ClientPriority_MAX = ChromeConfig_ClientPriority_USER_INITIATED; + +constexpr ChromeConfig_ClientPriority ChromeConfig_ClientPriority_MIN = ChromeConfig_ClientPriority::UNKNOWN; +constexpr ChromeConfig_ClientPriority ChromeConfig_ClientPriority_MAX = ChromeConfig_ClientPriority::USER_INITIATED; + + +PERFETTO_PROTOZERO_CONSTEXPR14_OR_INLINE +const char* ChromeConfig_ClientPriority_Name(::perfetto::protos::pbzero::ChromeConfig_ClientPriority value) { + switch (value) { + case ::perfetto::protos::pbzero::ChromeConfig_ClientPriority::UNKNOWN: + return "UNKNOWN"; + + case ::perfetto::protos::pbzero::ChromeConfig_ClientPriority::BACKGROUND: + return "BACKGROUND"; + + case ::perfetto::protos::pbzero::ChromeConfig_ClientPriority::USER_INITIATED: + return "USER_INITIATED"; + } + return "PBZERO_UNKNOWN_ENUM_VALUE"; +} class ChromeConfig_Decoder : public ::protozero::TypedProtoDecoder { public: @@ -33154,10 +37318,14 @@ class ChromeConfig : public ::protozero::Message { }; static constexpr const char* GetName() { return ".perfetto.protos.ChromeConfig"; } + using ClientPriority = ::perfetto::protos::pbzero::ChromeConfig_ClientPriority; - static const ClientPriority UNKNOWN = ChromeConfig_ClientPriority_UNKNOWN; - static const ClientPriority BACKGROUND = ChromeConfig_ClientPriority_BACKGROUND; - static const ClientPriority USER_INITIATED = ChromeConfig_ClientPriority_USER_INITIATED; + static inline const char* ClientPriority_Name(ClientPriority value) { + return ::perfetto::protos::pbzero::ChromeConfig_ClientPriority_Name(value); + } + static const ClientPriority UNKNOWN = ClientPriority::UNKNOWN; + static const ClientPriority BACKGROUND = ClientPriority::BACKGROUND; + static const ClientPriority USER_INITIATED = ClientPriority::USER_INITIATED; using FieldMetadata_TraceConfig = ::protozero::proto_utils::FieldMetadata< @@ -33167,17 +37335,13 @@ class ChromeConfig : public ::protozero::Message { std::string, ChromeConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_TraceConfig kTraceConfig() { return {}; } + static constexpr FieldMetadata_TraceConfig kTraceConfig{}; void set_trace_config(const char* data, size_t size) { AppendBytes(FieldMetadata_TraceConfig::kFieldId, data, size); } + void set_trace_config(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_TraceConfig::kFieldId, chars.data, chars.size); + } void set_trace_config(std::string value) { static constexpr uint32_t field_id = FieldMetadata_TraceConfig::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -33195,14 +37359,7 @@ class ChromeConfig : public ::protozero::Message { bool, ChromeConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_PrivacyFilteringEnabled kPrivacyFilteringEnabled() { return {}; } + static constexpr FieldMetadata_PrivacyFilteringEnabled kPrivacyFilteringEnabled{}; void set_privacy_filtering_enabled(bool value) { static constexpr uint32_t field_id = FieldMetadata_PrivacyFilteringEnabled::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -33220,14 +37377,7 @@ class ChromeConfig : public ::protozero::Message { bool, ChromeConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ConvertToLegacyJson kConvertToLegacyJson() { return {}; } + static constexpr FieldMetadata_ConvertToLegacyJson kConvertToLegacyJson{}; void set_convert_to_legacy_json(bool value) { static constexpr uint32_t field_id = FieldMetadata_ConvertToLegacyJson::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -33245,14 +37395,7 @@ class ChromeConfig : public ::protozero::Message { ::perfetto::protos::pbzero::ChromeConfig_ClientPriority, ChromeConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ClientPriority kClientPriority() { return {}; } + static constexpr FieldMetadata_ClientPriority kClientPriority{}; void set_client_priority(::perfetto::protos::pbzero::ChromeConfig_ClientPriority value) { static constexpr uint32_t field_id = FieldMetadata_ClientPriority::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -33270,17 +37413,13 @@ class ChromeConfig : public ::protozero::Message { std::string, ChromeConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_JsonAgentLabelFilter kJsonAgentLabelFilter() { return {}; } + static constexpr FieldMetadata_JsonAgentLabelFilter kJsonAgentLabelFilter{}; void set_json_agent_label_filter(const char* data, size_t size) { AppendBytes(FieldMetadata_JsonAgentLabelFilter::kFieldId, data, size); } + void set_json_agent_label_filter(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_JsonAgentLabelFilter::kFieldId, chars.data, chars.size); + } void set_json_agent_label_filter(std::string value) { static constexpr uint32_t field_id = FieldMetadata_JsonAgentLabelFilter::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -33291,6 +37430,599 @@ class ChromeConfig : public ::protozero::Message { } }; +} // Namespace. +} // Namespace. +} // Namespace. +#endif // Include guard. +// gen_amalgamated begin header: gen/protos/perfetto/config/chrome/scenario_config.pbzero.h +// Autogenerated by the ProtoZero compiler plugin. DO NOT EDIT. + +#ifndef PERFETTO_PROTOS_PROTOS_PERFETTO_CONFIG_CHROME_SCENARIO_CONFIG_PROTO_H_ +#define PERFETTO_PROTOS_PROTOS_PERFETTO_CONFIG_CHROME_SCENARIO_CONFIG_PROTO_H_ + +#include +#include + +// gen_amalgamated expanded: #include "perfetto/protozero/field_writer.h" +// gen_amalgamated expanded: #include "perfetto/protozero/message.h" +// gen_amalgamated expanded: #include "perfetto/protozero/packed_repeated_fields.h" +// gen_amalgamated expanded: #include "perfetto/protozero/proto_decoder.h" +// gen_amalgamated expanded: #include "perfetto/protozero/proto_utils.h" + +namespace perfetto { +namespace protos { +namespace pbzero { + +class NestedScenarioConfig; +class ScenarioConfig; +class TraceConfig; +class TriggerRule; +class TriggerRule_HistogramTrigger; +class TriggerRule_RepeatingInterval; + +class ChromeFieldTracingConfig_Decoder : public ::protozero::TypedProtoDecoder { + public: + ChromeFieldTracingConfig_Decoder(const uint8_t* data, size_t len) : TypedProtoDecoder(data, len) {} + explicit ChromeFieldTracingConfig_Decoder(const std::string& raw) : TypedProtoDecoder(reinterpret_cast(raw.data()), raw.size()) {} + explicit ChromeFieldTracingConfig_Decoder(const ::protozero::ConstBytes& raw) : TypedProtoDecoder(raw.data, raw.size) {} + bool has_scenarios() const { return at<1>().valid(); } + ::protozero::RepeatedFieldIterator<::protozero::ConstBytes> scenarios() const { return GetRepeated<::protozero::ConstBytes>(1); } +}; + +class ChromeFieldTracingConfig : public ::protozero::Message { + public: + using Decoder = ChromeFieldTracingConfig_Decoder; + enum : int32_t { + kScenariosFieldNumber = 1, + }; + static constexpr const char* GetName() { return ".perfetto.protos.ChromeFieldTracingConfig"; } + + + using FieldMetadata_Scenarios = + ::protozero::proto_utils::FieldMetadata< + 1, + ::protozero::proto_utils::RepetitionType::kRepeatedNotPacked, + ::protozero::proto_utils::ProtoSchemaType::kMessage, + ScenarioConfig, + ChromeFieldTracingConfig>; + + static constexpr FieldMetadata_Scenarios kScenarios{}; + template T* add_scenarios() { + return BeginNestedMessage(1); + } + +}; + +class ScenarioConfig_Decoder : public ::protozero::TypedProtoDecoder { + public: + ScenarioConfig_Decoder(const uint8_t* data, size_t len) : TypedProtoDecoder(data, len) {} + explicit ScenarioConfig_Decoder(const std::string& raw) : TypedProtoDecoder(reinterpret_cast(raw.data()), raw.size()) {} + explicit ScenarioConfig_Decoder(const ::protozero::ConstBytes& raw) : TypedProtoDecoder(raw.data, raw.size) {} + bool has_scenario_name() const { return at<1>().valid(); } + ::protozero::ConstChars scenario_name() const { return at<1>().as_string(); } + bool has_start_rules() const { return at<2>().valid(); } + ::protozero::RepeatedFieldIterator<::protozero::ConstBytes> start_rules() const { return GetRepeated<::protozero::ConstBytes>(2); } + bool has_stop_rules() const { return at<3>().valid(); } + ::protozero::RepeatedFieldIterator<::protozero::ConstBytes> stop_rules() const { return GetRepeated<::protozero::ConstBytes>(3); } + bool has_upload_rules() const { return at<4>().valid(); } + ::protozero::RepeatedFieldIterator<::protozero::ConstBytes> upload_rules() const { return GetRepeated<::protozero::ConstBytes>(4); } + bool has_setup_rules() const { return at<5>().valid(); } + ::protozero::RepeatedFieldIterator<::protozero::ConstBytes> setup_rules() const { return GetRepeated<::protozero::ConstBytes>(5); } + bool has_trace_config() const { return at<6>().valid(); } + ::protozero::ConstBytes trace_config() const { return at<6>().as_bytes(); } + bool has_nested_scenarios() const { return at<7>().valid(); } + ::protozero::RepeatedFieldIterator<::protozero::ConstBytes> nested_scenarios() const { return GetRepeated<::protozero::ConstBytes>(7); } +}; + +class ScenarioConfig : public ::protozero::Message { + public: + using Decoder = ScenarioConfig_Decoder; + enum : int32_t { + kScenarioNameFieldNumber = 1, + kStartRulesFieldNumber = 2, + kStopRulesFieldNumber = 3, + kUploadRulesFieldNumber = 4, + kSetupRulesFieldNumber = 5, + kTraceConfigFieldNumber = 6, + kNestedScenariosFieldNumber = 7, + }; + static constexpr const char* GetName() { return ".perfetto.protos.ScenarioConfig"; } + + + using FieldMetadata_ScenarioName = + ::protozero::proto_utils::FieldMetadata< + 1, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kString, + std::string, + ScenarioConfig>; + + static constexpr FieldMetadata_ScenarioName kScenarioName{}; + void set_scenario_name(const char* data, size_t size) { + AppendBytes(FieldMetadata_ScenarioName::kFieldId, data, size); + } + void set_scenario_name(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_ScenarioName::kFieldId, chars.data, chars.size); + } + void set_scenario_name(std::string value) { + static constexpr uint32_t field_id = FieldMetadata_ScenarioName::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kString> + ::Append(*this, field_id, value); + } + + using FieldMetadata_StartRules = + ::protozero::proto_utils::FieldMetadata< + 2, + ::protozero::proto_utils::RepetitionType::kRepeatedNotPacked, + ::protozero::proto_utils::ProtoSchemaType::kMessage, + TriggerRule, + ScenarioConfig>; + + static constexpr FieldMetadata_StartRules kStartRules{}; + template T* add_start_rules() { + return BeginNestedMessage(2); + } + + + using FieldMetadata_StopRules = + ::protozero::proto_utils::FieldMetadata< + 3, + ::protozero::proto_utils::RepetitionType::kRepeatedNotPacked, + ::protozero::proto_utils::ProtoSchemaType::kMessage, + TriggerRule, + ScenarioConfig>; + + static constexpr FieldMetadata_StopRules kStopRules{}; + template T* add_stop_rules() { + return BeginNestedMessage(3); + } + + + using FieldMetadata_UploadRules = + ::protozero::proto_utils::FieldMetadata< + 4, + ::protozero::proto_utils::RepetitionType::kRepeatedNotPacked, + ::protozero::proto_utils::ProtoSchemaType::kMessage, + TriggerRule, + ScenarioConfig>; + + static constexpr FieldMetadata_UploadRules kUploadRules{}; + template T* add_upload_rules() { + return BeginNestedMessage(4); + } + + + using FieldMetadata_SetupRules = + ::protozero::proto_utils::FieldMetadata< + 5, + ::protozero::proto_utils::RepetitionType::kRepeatedNotPacked, + ::protozero::proto_utils::ProtoSchemaType::kMessage, + TriggerRule, + ScenarioConfig>; + + static constexpr FieldMetadata_SetupRules kSetupRules{}; + template T* add_setup_rules() { + return BeginNestedMessage(5); + } + + + using FieldMetadata_TraceConfig = + ::protozero::proto_utils::FieldMetadata< + 6, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kMessage, + TraceConfig, + ScenarioConfig>; + + static constexpr FieldMetadata_TraceConfig kTraceConfig{}; + template T* set_trace_config() { + return BeginNestedMessage(6); + } + + + using FieldMetadata_NestedScenarios = + ::protozero::proto_utils::FieldMetadata< + 7, + ::protozero::proto_utils::RepetitionType::kRepeatedNotPacked, + ::protozero::proto_utils::ProtoSchemaType::kMessage, + NestedScenarioConfig, + ScenarioConfig>; + + static constexpr FieldMetadata_NestedScenarios kNestedScenarios{}; + template T* add_nested_scenarios() { + return BeginNestedMessage(7); + } + +}; + +class NestedScenarioConfig_Decoder : public ::protozero::TypedProtoDecoder { + public: + NestedScenarioConfig_Decoder(const uint8_t* data, size_t len) : TypedProtoDecoder(data, len) {} + explicit NestedScenarioConfig_Decoder(const std::string& raw) : TypedProtoDecoder(reinterpret_cast(raw.data()), raw.size()) {} + explicit NestedScenarioConfig_Decoder(const ::protozero::ConstBytes& raw) : TypedProtoDecoder(raw.data, raw.size) {} + bool has_scenario_name() const { return at<1>().valid(); } + ::protozero::ConstChars scenario_name() const { return at<1>().as_string(); } + bool has_start_rules() const { return at<2>().valid(); } + ::protozero::RepeatedFieldIterator<::protozero::ConstBytes> start_rules() const { return GetRepeated<::protozero::ConstBytes>(2); } + bool has_stop_rules() const { return at<3>().valid(); } + ::protozero::RepeatedFieldIterator<::protozero::ConstBytes> stop_rules() const { return GetRepeated<::protozero::ConstBytes>(3); } + bool has_upload_rules() const { return at<4>().valid(); } + ::protozero::RepeatedFieldIterator<::protozero::ConstBytes> upload_rules() const { return GetRepeated<::protozero::ConstBytes>(4); } +}; + +class NestedScenarioConfig : public ::protozero::Message { + public: + using Decoder = NestedScenarioConfig_Decoder; + enum : int32_t { + kScenarioNameFieldNumber = 1, + kStartRulesFieldNumber = 2, + kStopRulesFieldNumber = 3, + kUploadRulesFieldNumber = 4, + }; + static constexpr const char* GetName() { return ".perfetto.protos.NestedScenarioConfig"; } + + + using FieldMetadata_ScenarioName = + ::protozero::proto_utils::FieldMetadata< + 1, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kString, + std::string, + NestedScenarioConfig>; + + static constexpr FieldMetadata_ScenarioName kScenarioName{}; + void set_scenario_name(const char* data, size_t size) { + AppendBytes(FieldMetadata_ScenarioName::kFieldId, data, size); + } + void set_scenario_name(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_ScenarioName::kFieldId, chars.data, chars.size); + } + void set_scenario_name(std::string value) { + static constexpr uint32_t field_id = FieldMetadata_ScenarioName::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kString> + ::Append(*this, field_id, value); + } + + using FieldMetadata_StartRules = + ::protozero::proto_utils::FieldMetadata< + 2, + ::protozero::proto_utils::RepetitionType::kRepeatedNotPacked, + ::protozero::proto_utils::ProtoSchemaType::kMessage, + TriggerRule, + NestedScenarioConfig>; + + static constexpr FieldMetadata_StartRules kStartRules{}; + template T* add_start_rules() { + return BeginNestedMessage(2); + } + + + using FieldMetadata_StopRules = + ::protozero::proto_utils::FieldMetadata< + 3, + ::protozero::proto_utils::RepetitionType::kRepeatedNotPacked, + ::protozero::proto_utils::ProtoSchemaType::kMessage, + TriggerRule, + NestedScenarioConfig>; + + static constexpr FieldMetadata_StopRules kStopRules{}; + template T* add_stop_rules() { + return BeginNestedMessage(3); + } + + + using FieldMetadata_UploadRules = + ::protozero::proto_utils::FieldMetadata< + 4, + ::protozero::proto_utils::RepetitionType::kRepeatedNotPacked, + ::protozero::proto_utils::ProtoSchemaType::kMessage, + TriggerRule, + NestedScenarioConfig>; + + static constexpr FieldMetadata_UploadRules kUploadRules{}; + template T* add_upload_rules() { + return BeginNestedMessage(4); + } + +}; + +class TriggerRule_Decoder : public ::protozero::TypedProtoDecoder { + public: + TriggerRule_Decoder(const uint8_t* data, size_t len) : TypedProtoDecoder(data, len) {} + explicit TriggerRule_Decoder(const std::string& raw) : TypedProtoDecoder(reinterpret_cast(raw.data()), raw.size()) {} + explicit TriggerRule_Decoder(const ::protozero::ConstBytes& raw) : TypedProtoDecoder(raw.data, raw.size) {} + bool has_name() const { return at<1>().valid(); } + ::protozero::ConstChars name() const { return at<1>().as_string(); } + bool has_trigger_chance() const { return at<2>().valid(); } + float trigger_chance() const { return at<2>().as_float(); } + bool has_delay_ms() const { return at<3>().valid(); } + uint64_t delay_ms() const { return at<3>().as_uint64(); } + bool has_manual_trigger_name() const { return at<4>().valid(); } + ::protozero::ConstChars manual_trigger_name() const { return at<4>().as_string(); } + bool has_histogram() const { return at<5>().valid(); } + ::protozero::ConstBytes histogram() const { return at<5>().as_bytes(); } + bool has_repeating_interval() const { return at<6>().valid(); } + ::protozero::ConstBytes repeating_interval() const { return at<6>().as_bytes(); } +}; + +class TriggerRule : public ::protozero::Message { + public: + using Decoder = TriggerRule_Decoder; + enum : int32_t { + kNameFieldNumber = 1, + kTriggerChanceFieldNumber = 2, + kDelayMsFieldNumber = 3, + kManualTriggerNameFieldNumber = 4, + kHistogramFieldNumber = 5, + kRepeatingIntervalFieldNumber = 6, + }; + static constexpr const char* GetName() { return ".perfetto.protos.TriggerRule"; } + + using HistogramTrigger = ::perfetto::protos::pbzero::TriggerRule_HistogramTrigger; + using RepeatingInterval = ::perfetto::protos::pbzero::TriggerRule_RepeatingInterval; + + using FieldMetadata_Name = + ::protozero::proto_utils::FieldMetadata< + 1, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kString, + std::string, + TriggerRule>; + + static constexpr FieldMetadata_Name kName{}; + void set_name(const char* data, size_t size) { + AppendBytes(FieldMetadata_Name::kFieldId, data, size); + } + void set_name(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Name::kFieldId, chars.data, chars.size); + } + void set_name(std::string value) { + static constexpr uint32_t field_id = FieldMetadata_Name::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kString> + ::Append(*this, field_id, value); + } + + using FieldMetadata_TriggerChance = + ::protozero::proto_utils::FieldMetadata< + 2, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kFloat, + float, + TriggerRule>; + + static constexpr FieldMetadata_TriggerChance kTriggerChance{}; + void set_trigger_chance(float value) { + static constexpr uint32_t field_id = FieldMetadata_TriggerChance::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kFloat> + ::Append(*this, field_id, value); + } + + using FieldMetadata_DelayMs = + ::protozero::proto_utils::FieldMetadata< + 3, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint64, + uint64_t, + TriggerRule>; + + static constexpr FieldMetadata_DelayMs kDelayMs{}; + void set_delay_ms(uint64_t value) { + static constexpr uint32_t field_id = FieldMetadata_DelayMs::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint64> + ::Append(*this, field_id, value); + } + + using FieldMetadata_ManualTriggerName = + ::protozero::proto_utils::FieldMetadata< + 4, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kString, + std::string, + TriggerRule>; + + static constexpr FieldMetadata_ManualTriggerName kManualTriggerName{}; + void set_manual_trigger_name(const char* data, size_t size) { + AppendBytes(FieldMetadata_ManualTriggerName::kFieldId, data, size); + } + void set_manual_trigger_name(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_ManualTriggerName::kFieldId, chars.data, chars.size); + } + void set_manual_trigger_name(std::string value) { + static constexpr uint32_t field_id = FieldMetadata_ManualTriggerName::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kString> + ::Append(*this, field_id, value); + } + + using FieldMetadata_Histogram = + ::protozero::proto_utils::FieldMetadata< + 5, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kMessage, + TriggerRule_HistogramTrigger, + TriggerRule>; + + static constexpr FieldMetadata_Histogram kHistogram{}; + template T* set_histogram() { + return BeginNestedMessage(5); + } + + + using FieldMetadata_RepeatingInterval = + ::protozero::proto_utils::FieldMetadata< + 6, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kMessage, + TriggerRule_RepeatingInterval, + TriggerRule>; + + static constexpr FieldMetadata_RepeatingInterval kRepeatingInterval{}; + template T* set_repeating_interval() { + return BeginNestedMessage(6); + } + +}; + +class TriggerRule_RepeatingInterval_Decoder : public ::protozero::TypedProtoDecoder { + public: + TriggerRule_RepeatingInterval_Decoder(const uint8_t* data, size_t len) : TypedProtoDecoder(data, len) {} + explicit TriggerRule_RepeatingInterval_Decoder(const std::string& raw) : TypedProtoDecoder(reinterpret_cast(raw.data()), raw.size()) {} + explicit TriggerRule_RepeatingInterval_Decoder(const ::protozero::ConstBytes& raw) : TypedProtoDecoder(raw.data, raw.size) {} + bool has_period_ms() const { return at<1>().valid(); } + uint64_t period_ms() const { return at<1>().as_uint64(); } + bool has_randomized() const { return at<2>().valid(); } + bool randomized() const { return at<2>().as_bool(); } +}; + +class TriggerRule_RepeatingInterval : public ::protozero::Message { + public: + using Decoder = TriggerRule_RepeatingInterval_Decoder; + enum : int32_t { + kPeriodMsFieldNumber = 1, + kRandomizedFieldNumber = 2, + }; + static constexpr const char* GetName() { return ".perfetto.protos.TriggerRule.RepeatingInterval"; } + + + using FieldMetadata_PeriodMs = + ::protozero::proto_utils::FieldMetadata< + 1, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint64, + uint64_t, + TriggerRule_RepeatingInterval>; + + static constexpr FieldMetadata_PeriodMs kPeriodMs{}; + void set_period_ms(uint64_t value) { + static constexpr uint32_t field_id = FieldMetadata_PeriodMs::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint64> + ::Append(*this, field_id, value); + } + + using FieldMetadata_Randomized = + ::protozero::proto_utils::FieldMetadata< + 2, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kBool, + bool, + TriggerRule_RepeatingInterval>; + + static constexpr FieldMetadata_Randomized kRandomized{}; + void set_randomized(bool value) { + static constexpr uint32_t field_id = FieldMetadata_Randomized::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kBool> + ::Append(*this, field_id, value); + } +}; + +class TriggerRule_HistogramTrigger_Decoder : public ::protozero::TypedProtoDecoder { + public: + TriggerRule_HistogramTrigger_Decoder(const uint8_t* data, size_t len) : TypedProtoDecoder(data, len) {} + explicit TriggerRule_HistogramTrigger_Decoder(const std::string& raw) : TypedProtoDecoder(reinterpret_cast(raw.data()), raw.size()) {} + explicit TriggerRule_HistogramTrigger_Decoder(const ::protozero::ConstBytes& raw) : TypedProtoDecoder(raw.data, raw.size) {} + bool has_histogram_name() const { return at<1>().valid(); } + ::protozero::ConstChars histogram_name() const { return at<1>().as_string(); } + bool has_min_value() const { return at<2>().valid(); } + int64_t min_value() const { return at<2>().as_int64(); } + bool has_max_value() const { return at<3>().valid(); } + int64_t max_value() const { return at<3>().as_int64(); } +}; + +class TriggerRule_HistogramTrigger : public ::protozero::Message { + public: + using Decoder = TriggerRule_HistogramTrigger_Decoder; + enum : int32_t { + kHistogramNameFieldNumber = 1, + kMinValueFieldNumber = 2, + kMaxValueFieldNumber = 3, + }; + static constexpr const char* GetName() { return ".perfetto.protos.TriggerRule.HistogramTrigger"; } + + + using FieldMetadata_HistogramName = + ::protozero::proto_utils::FieldMetadata< + 1, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kString, + std::string, + TriggerRule_HistogramTrigger>; + + static constexpr FieldMetadata_HistogramName kHistogramName{}; + void set_histogram_name(const char* data, size_t size) { + AppendBytes(FieldMetadata_HistogramName::kFieldId, data, size); + } + void set_histogram_name(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_HistogramName::kFieldId, chars.data, chars.size); + } + void set_histogram_name(std::string value) { + static constexpr uint32_t field_id = FieldMetadata_HistogramName::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kString> + ::Append(*this, field_id, value); + } + + using FieldMetadata_MinValue = + ::protozero::proto_utils::FieldMetadata< + 2, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kInt64, + int64_t, + TriggerRule_HistogramTrigger>; + + static constexpr FieldMetadata_MinValue kMinValue{}; + void set_min_value(int64_t value) { + static constexpr uint32_t field_id = FieldMetadata_MinValue::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kInt64> + ::Append(*this, field_id, value); + } + + using FieldMetadata_MaxValue = + ::protozero::proto_utils::FieldMetadata< + 3, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kInt64, + int64_t, + TriggerRule_HistogramTrigger>; + + static constexpr FieldMetadata_MaxValue kMaxValue{}; + void set_max_value(int64_t value) { + static constexpr uint32_t field_id = FieldMetadata_MaxValue::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kInt64> + ::Append(*this, field_id, value); + } +}; + } // Namespace. } // Namespace. } // Namespace. @@ -33318,6 +38050,7 @@ class AndroidGameInterventionListConfig; class AndroidLogConfig; class AndroidPolledStateConfig; class AndroidPowerConfig; +class AndroidSystemPropertyConfig; class ChromeConfig; class FtraceConfig; class GpuCounterConfig; @@ -33325,24 +38058,47 @@ class HeapprofdConfig; class InodeFileConfig; class InterceptorConfig; class JavaHprofConfig; +class NetworkPacketTraceConfig; class PackagesListConfig; class PerfEventConfig; class ProcessStatsConfig; +class StatsdTracingConfig; class SysStatsConfig; +class SystemInfoConfig; class TestConfig; class TrackEventConfig; class VulkanMemoryConfig; -enum DataSourceConfig_SessionInitiator : int32_t; +namespace perfetto_pbzero_enum_DataSourceConfig { +enum SessionInitiator : int32_t; +} // namespace perfetto_pbzero_enum_DataSourceConfig +using DataSourceConfig_SessionInitiator = perfetto_pbzero_enum_DataSourceConfig::SessionInitiator; -enum DataSourceConfig_SessionInitiator : int32_t { - DataSourceConfig_SessionInitiator_SESSION_INITIATOR_UNSPECIFIED = 0, - DataSourceConfig_SessionInitiator_SESSION_INITIATOR_TRUSTED_SYSTEM = 1, +namespace perfetto_pbzero_enum_DataSourceConfig { +enum SessionInitiator : int32_t { + SESSION_INITIATOR_UNSPECIFIED = 0, + SESSION_INITIATOR_TRUSTED_SYSTEM = 1, }; +} // namespace perfetto_pbzero_enum_DataSourceConfig +using DataSourceConfig_SessionInitiator = perfetto_pbzero_enum_DataSourceConfig::SessionInitiator; -const DataSourceConfig_SessionInitiator DataSourceConfig_SessionInitiator_MIN = DataSourceConfig_SessionInitiator_SESSION_INITIATOR_UNSPECIFIED; -const DataSourceConfig_SessionInitiator DataSourceConfig_SessionInitiator_MAX = DataSourceConfig_SessionInitiator_SESSION_INITIATOR_TRUSTED_SYSTEM; -class DataSourceConfig_Decoder : public ::protozero::TypedProtoDecoder { +constexpr DataSourceConfig_SessionInitiator DataSourceConfig_SessionInitiator_MIN = DataSourceConfig_SessionInitiator::SESSION_INITIATOR_UNSPECIFIED; +constexpr DataSourceConfig_SessionInitiator DataSourceConfig_SessionInitiator_MAX = DataSourceConfig_SessionInitiator::SESSION_INITIATOR_TRUSTED_SYSTEM; + + +PERFETTO_PROTOZERO_CONSTEXPR14_OR_INLINE +const char* DataSourceConfig_SessionInitiator_Name(::perfetto::protos::pbzero::DataSourceConfig_SessionInitiator value) { + switch (value) { + case ::perfetto::protos::pbzero::DataSourceConfig_SessionInitiator::SESSION_INITIATOR_UNSPECIFIED: + return "SESSION_INITIATOR_UNSPECIFIED"; + + case ::perfetto::protos::pbzero::DataSourceConfig_SessionInitiator::SESSION_INITIATOR_TRUSTED_SYSTEM: + return "SESSION_INITIATOR_TRUSTED_SYSTEM"; + } + return "PBZERO_UNKNOWN_ENUM_VALUE"; +} + +class DataSourceConfig_Decoder : public ::protozero::TypedProtoDecoder { public: DataSourceConfig_Decoder(const uint8_t* data, size_t len) : TypedProtoDecoder(data, len) {} explicit DataSourceConfig_Decoder(const std::string& raw) : TypedProtoDecoder(reinterpret_cast(raw.data()), raw.size()) {} @@ -33353,6 +38109,8 @@ class DataSourceConfig_Decoder : public ::protozero::TypedProtoDecoder().as_uint32(); } bool has_trace_duration_ms() const { return at<3>().valid(); } uint32_t trace_duration_ms() const { return at<3>().as_uint32(); } + bool has_prefer_suspend_clock_for_duration() const { return at<122>().valid(); } + bool prefer_suspend_clock_for_duration() const { return at<122>().as_bool(); } bool has_stop_timeout_ms() const { return at<7>().valid(); } uint32_t stop_timeout_ms() const { return at<7>().as_uint32(); } bool has_enable_extra_guardrails() const { return at<6>().valid(); } @@ -33391,10 +38149,18 @@ class DataSourceConfig_Decoder : public ::protozero::TypedProtoDecoder().as_bytes(); } bool has_android_polled_state_config() const { return at<114>().valid(); } ::protozero::ConstBytes android_polled_state_config() const { return at<114>().as_bytes(); } + bool has_android_system_property_config() const { return at<118>().valid(); } + ::protozero::ConstBytes android_system_property_config() const { return at<118>().as_bytes(); } + bool has_statsd_tracing_config() const { return at<117>().valid(); } + ::protozero::ConstBytes statsd_tracing_config() const { return at<117>().as_bytes(); } + bool has_system_info_config() const { return at<119>().valid(); } + ::protozero::ConstBytes system_info_config() const { return at<119>().as_bytes(); } bool has_chrome_config() const { return at<101>().valid(); } ::protozero::ConstBytes chrome_config() const { return at<101>().as_bytes(); } bool has_interceptor_config() const { return at<115>().valid(); } ::protozero::ConstBytes interceptor_config() const { return at<115>().as_bytes(); } + bool has_network_packet_trace_config() const { return at<120>().valid(); } + ::protozero::ConstBytes network_packet_trace_config() const { return at<120>().as_bytes(); } // field legacy_config omitted because its id is too high // field for_testing omitted because its id is too high }; @@ -33406,6 +38172,7 @@ class DataSourceConfig : public ::protozero::Message { kNameFieldNumber = 1, kTargetBufferFieldNumber = 2, kTraceDurationMsFieldNumber = 3, + kPreferSuspendClockForDurationFieldNumber = 122, kStopTimeoutMsFieldNumber = 7, kEnableExtraGuardrailsFieldNumber = 6, kSessionInitiatorFieldNumber = 8, @@ -33425,16 +38192,24 @@ class DataSourceConfig : public ::protozero::Message { kVulkanMemoryConfigFieldNumber = 112, kTrackEventConfigFieldNumber = 113, kAndroidPolledStateConfigFieldNumber = 114, + kAndroidSystemPropertyConfigFieldNumber = 118, + kStatsdTracingConfigFieldNumber = 117, + kSystemInfoConfigFieldNumber = 119, kChromeConfigFieldNumber = 101, kInterceptorConfigFieldNumber = 115, + kNetworkPacketTraceConfigFieldNumber = 120, kLegacyConfigFieldNumber = 1000, kForTestingFieldNumber = 1001, }; static constexpr const char* GetName() { return ".perfetto.protos.DataSourceConfig"; } + using SessionInitiator = ::perfetto::protos::pbzero::DataSourceConfig_SessionInitiator; - static const SessionInitiator SESSION_INITIATOR_UNSPECIFIED = DataSourceConfig_SessionInitiator_SESSION_INITIATOR_UNSPECIFIED; - static const SessionInitiator SESSION_INITIATOR_TRUSTED_SYSTEM = DataSourceConfig_SessionInitiator_SESSION_INITIATOR_TRUSTED_SYSTEM; + static inline const char* SessionInitiator_Name(SessionInitiator value) { + return ::perfetto::protos::pbzero::DataSourceConfig_SessionInitiator_Name(value); + } + static const SessionInitiator SESSION_INITIATOR_UNSPECIFIED = SessionInitiator::SESSION_INITIATOR_UNSPECIFIED; + static const SessionInitiator SESSION_INITIATOR_TRUSTED_SYSTEM = SessionInitiator::SESSION_INITIATOR_TRUSTED_SYSTEM; using FieldMetadata_Name = ::protozero::proto_utils::FieldMetadata< @@ -33444,17 +38219,13 @@ class DataSourceConfig : public ::protozero::Message { std::string, DataSourceConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Name kName() { return {}; } + static constexpr FieldMetadata_Name kName{}; void set_name(const char* data, size_t size) { AppendBytes(FieldMetadata_Name::kFieldId, data, size); } + void set_name(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Name::kFieldId, chars.data, chars.size); + } void set_name(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Name::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -33472,14 +38243,7 @@ class DataSourceConfig : public ::protozero::Message { uint32_t, DataSourceConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_TargetBuffer kTargetBuffer() { return {}; } + static constexpr FieldMetadata_TargetBuffer kTargetBuffer{}; void set_target_buffer(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_TargetBuffer::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -33497,14 +38261,7 @@ class DataSourceConfig : public ::protozero::Message { uint32_t, DataSourceConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_TraceDurationMs kTraceDurationMs() { return {}; } + static constexpr FieldMetadata_TraceDurationMs kTraceDurationMs{}; void set_trace_duration_ms(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_TraceDurationMs::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -33514,6 +38271,24 @@ class DataSourceConfig : public ::protozero::Message { ::Append(*this, field_id, value); } + using FieldMetadata_PreferSuspendClockForDuration = + ::protozero::proto_utils::FieldMetadata< + 122, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kBool, + bool, + DataSourceConfig>; + + static constexpr FieldMetadata_PreferSuspendClockForDuration kPreferSuspendClockForDuration{}; + void set_prefer_suspend_clock_for_duration(bool value) { + static constexpr uint32_t field_id = FieldMetadata_PreferSuspendClockForDuration::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kBool> + ::Append(*this, field_id, value); + } + using FieldMetadata_StopTimeoutMs = ::protozero::proto_utils::FieldMetadata< 7, @@ -33522,14 +38297,7 @@ class DataSourceConfig : public ::protozero::Message { uint32_t, DataSourceConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_StopTimeoutMs kStopTimeoutMs() { return {}; } + static constexpr FieldMetadata_StopTimeoutMs kStopTimeoutMs{}; void set_stop_timeout_ms(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_StopTimeoutMs::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -33547,14 +38315,7 @@ class DataSourceConfig : public ::protozero::Message { bool, DataSourceConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_EnableExtraGuardrails kEnableExtraGuardrails() { return {}; } + static constexpr FieldMetadata_EnableExtraGuardrails kEnableExtraGuardrails{}; void set_enable_extra_guardrails(bool value) { static constexpr uint32_t field_id = FieldMetadata_EnableExtraGuardrails::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -33572,14 +38333,7 @@ class DataSourceConfig : public ::protozero::Message { ::perfetto::protos::pbzero::DataSourceConfig_SessionInitiator, DataSourceConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_SessionInitiator kSessionInitiator() { return {}; } + static constexpr FieldMetadata_SessionInitiator kSessionInitiator{}; void set_session_initiator(::perfetto::protos::pbzero::DataSourceConfig_SessionInitiator value) { static constexpr uint32_t field_id = FieldMetadata_SessionInitiator::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -33597,14 +38351,7 @@ class DataSourceConfig : public ::protozero::Message { uint64_t, DataSourceConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_TracingSessionId kTracingSessionId() { return {}; } + static constexpr FieldMetadata_TracingSessionId kTracingSessionId{}; void set_tracing_session_id(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_TracingSessionId::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -33622,14 +38369,7 @@ class DataSourceConfig : public ::protozero::Message { FtraceConfig, DataSourceConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_FtraceConfig kFtraceConfig() { return {}; } + static constexpr FieldMetadata_FtraceConfig kFtraceConfig{}; template T* set_ftrace_config() { return BeginNestedMessage(100); } @@ -33647,14 +38387,7 @@ class DataSourceConfig : public ::protozero::Message { InodeFileConfig, DataSourceConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_InodeFileConfig kInodeFileConfig() { return {}; } + static constexpr FieldMetadata_InodeFileConfig kInodeFileConfig{}; template T* set_inode_file_config() { return BeginNestedMessage(102); } @@ -33672,14 +38405,7 @@ class DataSourceConfig : public ::protozero::Message { ProcessStatsConfig, DataSourceConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ProcessStatsConfig kProcessStatsConfig() { return {}; } + static constexpr FieldMetadata_ProcessStatsConfig kProcessStatsConfig{}; template T* set_process_stats_config() { return BeginNestedMessage(103); } @@ -33697,14 +38423,7 @@ class DataSourceConfig : public ::protozero::Message { SysStatsConfig, DataSourceConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_SysStatsConfig kSysStatsConfig() { return {}; } + static constexpr FieldMetadata_SysStatsConfig kSysStatsConfig{}; template T* set_sys_stats_config() { return BeginNestedMessage(104); } @@ -33722,14 +38441,7 @@ class DataSourceConfig : public ::protozero::Message { HeapprofdConfig, DataSourceConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_HeapprofdConfig kHeapprofdConfig() { return {}; } + static constexpr FieldMetadata_HeapprofdConfig kHeapprofdConfig{}; template T* set_heapprofd_config() { return BeginNestedMessage(105); } @@ -33747,14 +38459,7 @@ class DataSourceConfig : public ::protozero::Message { JavaHprofConfig, DataSourceConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_JavaHprofConfig kJavaHprofConfig() { return {}; } + static constexpr FieldMetadata_JavaHprofConfig kJavaHprofConfig{}; template T* set_java_hprof_config() { return BeginNestedMessage(110); } @@ -33772,14 +38477,7 @@ class DataSourceConfig : public ::protozero::Message { AndroidPowerConfig, DataSourceConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_AndroidPowerConfig kAndroidPowerConfig() { return {}; } + static constexpr FieldMetadata_AndroidPowerConfig kAndroidPowerConfig{}; template T* set_android_power_config() { return BeginNestedMessage(106); } @@ -33797,14 +38495,7 @@ class DataSourceConfig : public ::protozero::Message { AndroidLogConfig, DataSourceConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_AndroidLogConfig kAndroidLogConfig() { return {}; } + static constexpr FieldMetadata_AndroidLogConfig kAndroidLogConfig{}; template T* set_android_log_config() { return BeginNestedMessage(107); } @@ -33822,14 +38513,7 @@ class DataSourceConfig : public ::protozero::Message { GpuCounterConfig, DataSourceConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_GpuCounterConfig kGpuCounterConfig() { return {}; } + static constexpr FieldMetadata_GpuCounterConfig kGpuCounterConfig{}; template T* set_gpu_counter_config() { return BeginNestedMessage(108); } @@ -33847,14 +38531,7 @@ class DataSourceConfig : public ::protozero::Message { AndroidGameInterventionListConfig, DataSourceConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_AndroidGameInterventionListConfig kAndroidGameInterventionListConfig() { return {}; } + static constexpr FieldMetadata_AndroidGameInterventionListConfig kAndroidGameInterventionListConfig{}; template T* set_android_game_intervention_list_config() { return BeginNestedMessage(116); } @@ -33872,14 +38549,7 @@ class DataSourceConfig : public ::protozero::Message { PackagesListConfig, DataSourceConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_PackagesListConfig kPackagesListConfig() { return {}; } + static constexpr FieldMetadata_PackagesListConfig kPackagesListConfig{}; template T* set_packages_list_config() { return BeginNestedMessage(109); } @@ -33897,14 +38567,7 @@ class DataSourceConfig : public ::protozero::Message { PerfEventConfig, DataSourceConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_PerfEventConfig kPerfEventConfig() { return {}; } + static constexpr FieldMetadata_PerfEventConfig kPerfEventConfig{}; template T* set_perf_event_config() { return BeginNestedMessage(111); } @@ -33922,14 +38585,7 @@ class DataSourceConfig : public ::protozero::Message { VulkanMemoryConfig, DataSourceConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_VulkanMemoryConfig kVulkanMemoryConfig() { return {}; } + static constexpr FieldMetadata_VulkanMemoryConfig kVulkanMemoryConfig{}; template T* set_vulkan_memory_config() { return BeginNestedMessage(112); } @@ -33947,14 +38603,7 @@ class DataSourceConfig : public ::protozero::Message { TrackEventConfig, DataSourceConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_TrackEventConfig kTrackEventConfig() { return {}; } + static constexpr FieldMetadata_TrackEventConfig kTrackEventConfig{}; template T* set_track_event_config() { return BeginNestedMessage(113); } @@ -33972,14 +38621,7 @@ class DataSourceConfig : public ::protozero::Message { AndroidPolledStateConfig, DataSourceConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_AndroidPolledStateConfig kAndroidPolledStateConfig() { return {}; } + static constexpr FieldMetadata_AndroidPolledStateConfig kAndroidPolledStateConfig{}; template T* set_android_polled_state_config() { return BeginNestedMessage(114); } @@ -33989,6 +38631,56 @@ class DataSourceConfig : public ::protozero::Message { } + using FieldMetadata_AndroidSystemPropertyConfig = + ::protozero::proto_utils::FieldMetadata< + 118, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kMessage, + AndroidSystemPropertyConfig, + DataSourceConfig>; + + static constexpr FieldMetadata_AndroidSystemPropertyConfig kAndroidSystemPropertyConfig{}; + template T* set_android_system_property_config() { + return BeginNestedMessage(118); + } + + void set_android_system_property_config_raw(const std::string& raw) { + return AppendBytes(118, raw.data(), raw.size()); + } + + + using FieldMetadata_StatsdTracingConfig = + ::protozero::proto_utils::FieldMetadata< + 117, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kMessage, + StatsdTracingConfig, + DataSourceConfig>; + + static constexpr FieldMetadata_StatsdTracingConfig kStatsdTracingConfig{}; + template T* set_statsd_tracing_config() { + return BeginNestedMessage(117); + } + + void set_statsd_tracing_config_raw(const std::string& raw) { + return AppendBytes(117, raw.data(), raw.size()); + } + + + using FieldMetadata_SystemInfoConfig = + ::protozero::proto_utils::FieldMetadata< + 119, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kMessage, + SystemInfoConfig, + DataSourceConfig>; + + static constexpr FieldMetadata_SystemInfoConfig kSystemInfoConfig{}; + template T* set_system_info_config() { + return BeginNestedMessage(119); + } + + using FieldMetadata_ChromeConfig = ::protozero::proto_utils::FieldMetadata< 101, @@ -33997,14 +38689,7 @@ class DataSourceConfig : public ::protozero::Message { ChromeConfig, DataSourceConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ChromeConfig kChromeConfig() { return {}; } + static constexpr FieldMetadata_ChromeConfig kChromeConfig{}; template T* set_chrome_config() { return BeginNestedMessage(101); } @@ -34018,19 +38703,30 @@ class DataSourceConfig : public ::protozero::Message { InterceptorConfig, DataSourceConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_InterceptorConfig kInterceptorConfig() { return {}; } + static constexpr FieldMetadata_InterceptorConfig kInterceptorConfig{}; template T* set_interceptor_config() { return BeginNestedMessage(115); } + using FieldMetadata_NetworkPacketTraceConfig = + ::protozero::proto_utils::FieldMetadata< + 120, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kMessage, + NetworkPacketTraceConfig, + DataSourceConfig>; + + static constexpr FieldMetadata_NetworkPacketTraceConfig kNetworkPacketTraceConfig{}; + template T* set_network_packet_trace_config() { + return BeginNestedMessage(120); + } + + void set_network_packet_trace_config_raw(const std::string& raw) { + return AppendBytes(120, raw.data(), raw.size()); + } + + using FieldMetadata_LegacyConfig = ::protozero::proto_utils::FieldMetadata< 1000, @@ -34039,17 +38735,13 @@ class DataSourceConfig : public ::protozero::Message { std::string, DataSourceConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_LegacyConfig kLegacyConfig() { return {}; } + static constexpr FieldMetadata_LegacyConfig kLegacyConfig{}; void set_legacy_config(const char* data, size_t size) { AppendBytes(FieldMetadata_LegacyConfig::kFieldId, data, size); } + void set_legacy_config(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_LegacyConfig::kFieldId, chars.data, chars.size); + } void set_legacy_config(std::string value) { static constexpr uint32_t field_id = FieldMetadata_LegacyConfig::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -34067,14 +38759,7 @@ class DataSourceConfig : public ::protozero::Message { TestConfig, DataSourceConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ForTesting kForTesting() { return {}; } + static constexpr FieldMetadata_ForTesting kForTesting{}; template T* set_for_testing() { return BeginNestedMessage(1001); } @@ -34135,17 +38820,13 @@ class InterceptorConfig : public ::protozero::Message { std::string, InterceptorConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Name kName() { return {}; } + static constexpr FieldMetadata_Name kName{}; void set_name(const char* data, size_t size) { AppendBytes(FieldMetadata_Name::kFieldId, data, size); } + void set_name(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Name::kFieldId, chars.data, chars.size); + } void set_name(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Name::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -34163,14 +38844,7 @@ class InterceptorConfig : public ::protozero::Message { ConsoleConfig, InterceptorConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ConsoleConfig kConsoleConfig() { return {}; } + static constexpr FieldMetadata_ConsoleConfig kConsoleConfig{}; template T* set_console_config() { return BeginNestedMessage(100); } @@ -34264,14 +38938,7 @@ class StressTestConfig : public ::protozero::Message { TraceConfig, StressTestConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_TraceConfig kTraceConfig() { return {}; } + static constexpr FieldMetadata_TraceConfig kTraceConfig{}; template T* set_trace_config() { return BeginNestedMessage(1); } @@ -34285,14 +38952,7 @@ class StressTestConfig : public ::protozero::Message { uint32_t, StressTestConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ShmemSizeKb kShmemSizeKb() { return {}; } + static constexpr FieldMetadata_ShmemSizeKb kShmemSizeKb{}; void set_shmem_size_kb(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_ShmemSizeKb::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -34310,14 +38970,7 @@ class StressTestConfig : public ::protozero::Message { uint32_t, StressTestConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ShmemPageSizeKb kShmemPageSizeKb() { return {}; } + static constexpr FieldMetadata_ShmemPageSizeKb kShmemPageSizeKb{}; void set_shmem_page_size_kb(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_ShmemPageSizeKb::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -34335,14 +38988,7 @@ class StressTestConfig : public ::protozero::Message { uint32_t, StressTestConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_NumProcesses kNumProcesses() { return {}; } + static constexpr FieldMetadata_NumProcesses kNumProcesses{}; void set_num_processes(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_NumProcesses::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -34360,14 +39006,7 @@ class StressTestConfig : public ::protozero::Message { uint32_t, StressTestConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_NumThreads kNumThreads() { return {}; } + static constexpr FieldMetadata_NumThreads kNumThreads{}; void set_num_threads(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_NumThreads::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -34385,14 +39024,7 @@ class StressTestConfig : public ::protozero::Message { uint32_t, StressTestConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_MaxEvents kMaxEvents() { return {}; } + static constexpr FieldMetadata_MaxEvents kMaxEvents{}; void set_max_events(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_MaxEvents::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -34410,14 +39042,7 @@ class StressTestConfig : public ::protozero::Message { uint32_t, StressTestConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Nesting kNesting() { return {}; } + static constexpr FieldMetadata_Nesting kNesting{}; void set_nesting(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Nesting::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -34435,14 +39060,7 @@ class StressTestConfig : public ::protozero::Message { StressTestConfig_WriterTiming, StressTestConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_SteadyStateTimings kSteadyStateTimings() { return {}; } + static constexpr FieldMetadata_SteadyStateTimings kSteadyStateTimings{}; template T* set_steady_state_timings() { return BeginNestedMessage(8); } @@ -34456,14 +39074,7 @@ class StressTestConfig : public ::protozero::Message { uint32_t, StressTestConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_BurstPeriodMs kBurstPeriodMs() { return {}; } + static constexpr FieldMetadata_BurstPeriodMs kBurstPeriodMs{}; void set_burst_period_ms(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_BurstPeriodMs::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -34481,14 +39092,7 @@ class StressTestConfig : public ::protozero::Message { uint32_t, StressTestConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_BurstDurationMs kBurstDurationMs() { return {}; } + static constexpr FieldMetadata_BurstDurationMs kBurstDurationMs{}; void set_burst_duration_ms(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_BurstDurationMs::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -34506,14 +39110,7 @@ class StressTestConfig : public ::protozero::Message { StressTestConfig_WriterTiming, StressTestConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_BurstTimings kBurstTimings() { return {}; } + static constexpr FieldMetadata_BurstTimings kBurstTimings{}; template T* set_burst_timings() { return BeginNestedMessage(11); } @@ -34558,14 +39155,7 @@ class StressTestConfig_WriterTiming : public ::protozero::Message { double, StressTestConfig_WriterTiming>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_PayloadMean kPayloadMean() { return {}; } + static constexpr FieldMetadata_PayloadMean kPayloadMean{}; void set_payload_mean(double value) { static constexpr uint32_t field_id = FieldMetadata_PayloadMean::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -34583,14 +39173,7 @@ class StressTestConfig_WriterTiming : public ::protozero::Message { double, StressTestConfig_WriterTiming>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_PayloadStddev kPayloadStddev() { return {}; } + static constexpr FieldMetadata_PayloadStddev kPayloadStddev{}; void set_payload_stddev(double value) { static constexpr uint32_t field_id = FieldMetadata_PayloadStddev::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -34608,14 +39191,7 @@ class StressTestConfig_WriterTiming : public ::protozero::Message { double, StressTestConfig_WriterTiming>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_RateMean kRateMean() { return {}; } + static constexpr FieldMetadata_RateMean kRateMean{}; void set_rate_mean(double value) { static constexpr uint32_t field_id = FieldMetadata_RateMean::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -34633,14 +39209,7 @@ class StressTestConfig_WriterTiming : public ::protozero::Message { double, StressTestConfig_WriterTiming>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_RateStddev kRateStddev() { return {}; } + static constexpr FieldMetadata_RateStddev kRateStddev{}; void set_rate_stddev(double value) { static constexpr uint32_t field_id = FieldMetadata_RateStddev::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -34658,14 +39227,7 @@ class StressTestConfig_WriterTiming : public ::protozero::Message { uint32_t, StressTestConfig_WriterTiming>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_PayloadWriteTimeMs kPayloadWriteTimeMs() { return {}; } + static constexpr FieldMetadata_PayloadWriteTimeMs kPayloadWriteTimeMs{}; void set_payload_write_time_ms(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_PayloadWriteTimeMs::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -34743,14 +39305,7 @@ class TestConfig : public ::protozero::Message { uint32_t, TestConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_MessageCount kMessageCount() { return {}; } + static constexpr FieldMetadata_MessageCount kMessageCount{}; void set_message_count(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_MessageCount::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -34768,14 +39323,7 @@ class TestConfig : public ::protozero::Message { uint32_t, TestConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_MaxMessagesPerSecond kMaxMessagesPerSecond() { return {}; } + static constexpr FieldMetadata_MaxMessagesPerSecond kMaxMessagesPerSecond{}; void set_max_messages_per_second(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_MaxMessagesPerSecond::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -34793,14 +39341,7 @@ class TestConfig : public ::protozero::Message { uint32_t, TestConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Seed kSeed() { return {}; } + static constexpr FieldMetadata_Seed kSeed{}; void set_seed(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Seed::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -34818,14 +39359,7 @@ class TestConfig : public ::protozero::Message { uint32_t, TestConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_MessageSize kMessageSize() { return {}; } + static constexpr FieldMetadata_MessageSize kMessageSize{}; void set_message_size(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_MessageSize::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -34843,14 +39377,7 @@ class TestConfig : public ::protozero::Message { bool, TestConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_SendBatchOnRegister kSendBatchOnRegister() { return {}; } + static constexpr FieldMetadata_SendBatchOnRegister kSendBatchOnRegister{}; void set_send_batch_on_register(bool value) { static constexpr uint32_t field_id = FieldMetadata_SendBatchOnRegister::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -34868,14 +39395,7 @@ class TestConfig : public ::protozero::Message { TestConfig_DummyFields, TestConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_DummyFields kDummyFields() { return {}; } + static constexpr FieldMetadata_DummyFields kDummyFields{}; template T* set_dummy_fields() { return BeginNestedMessage(6); } @@ -34947,14 +39467,7 @@ class TestConfig_DummyFields : public ::protozero::Message { uint32_t, TestConfig_DummyFields>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_FieldUint32 kFieldUint32() { return {}; } + static constexpr FieldMetadata_FieldUint32 kFieldUint32{}; void set_field_uint32(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_FieldUint32::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -34972,14 +39485,7 @@ class TestConfig_DummyFields : public ::protozero::Message { int32_t, TestConfig_DummyFields>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_FieldInt32 kFieldInt32() { return {}; } + static constexpr FieldMetadata_FieldInt32 kFieldInt32{}; void set_field_int32(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_FieldInt32::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -34997,14 +39503,7 @@ class TestConfig_DummyFields : public ::protozero::Message { uint64_t, TestConfig_DummyFields>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_FieldUint64 kFieldUint64() { return {}; } + static constexpr FieldMetadata_FieldUint64 kFieldUint64{}; void set_field_uint64(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_FieldUint64::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -35022,14 +39521,7 @@ class TestConfig_DummyFields : public ::protozero::Message { int64_t, TestConfig_DummyFields>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_FieldInt64 kFieldInt64() { return {}; } + static constexpr FieldMetadata_FieldInt64 kFieldInt64{}; void set_field_int64(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_FieldInt64::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -35047,14 +39539,7 @@ class TestConfig_DummyFields : public ::protozero::Message { uint64_t, TestConfig_DummyFields>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_FieldFixed64 kFieldFixed64() { return {}; } + static constexpr FieldMetadata_FieldFixed64 kFieldFixed64{}; void set_field_fixed64(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_FieldFixed64::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -35072,14 +39557,7 @@ class TestConfig_DummyFields : public ::protozero::Message { int64_t, TestConfig_DummyFields>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_FieldSfixed64 kFieldSfixed64() { return {}; } + static constexpr FieldMetadata_FieldSfixed64 kFieldSfixed64{}; void set_field_sfixed64(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_FieldSfixed64::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -35097,14 +39575,7 @@ class TestConfig_DummyFields : public ::protozero::Message { uint32_t, TestConfig_DummyFields>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_FieldFixed32 kFieldFixed32() { return {}; } + static constexpr FieldMetadata_FieldFixed32 kFieldFixed32{}; void set_field_fixed32(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_FieldFixed32::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -35122,14 +39593,7 @@ class TestConfig_DummyFields : public ::protozero::Message { int32_t, TestConfig_DummyFields>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_FieldSfixed32 kFieldSfixed32() { return {}; } + static constexpr FieldMetadata_FieldSfixed32 kFieldSfixed32{}; void set_field_sfixed32(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_FieldSfixed32::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -35147,14 +39611,7 @@ class TestConfig_DummyFields : public ::protozero::Message { double, TestConfig_DummyFields>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_FieldDouble kFieldDouble() { return {}; } + static constexpr FieldMetadata_FieldDouble kFieldDouble{}; void set_field_double(double value) { static constexpr uint32_t field_id = FieldMetadata_FieldDouble::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -35172,14 +39629,7 @@ class TestConfig_DummyFields : public ::protozero::Message { float, TestConfig_DummyFields>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_FieldFloat kFieldFloat() { return {}; } + static constexpr FieldMetadata_FieldFloat kFieldFloat{}; void set_field_float(float value) { static constexpr uint32_t field_id = FieldMetadata_FieldFloat::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -35197,14 +39647,7 @@ class TestConfig_DummyFields : public ::protozero::Message { int64_t, TestConfig_DummyFields>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_FieldSint64 kFieldSint64() { return {}; } + static constexpr FieldMetadata_FieldSint64 kFieldSint64{}; void set_field_sint64(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_FieldSint64::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -35222,14 +39665,7 @@ class TestConfig_DummyFields : public ::protozero::Message { int32_t, TestConfig_DummyFields>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_FieldSint32 kFieldSint32() { return {}; } + static constexpr FieldMetadata_FieldSint32 kFieldSint32{}; void set_field_sint32(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_FieldSint32::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -35247,17 +39683,13 @@ class TestConfig_DummyFields : public ::protozero::Message { std::string, TestConfig_DummyFields>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_FieldString kFieldString() { return {}; } + static constexpr FieldMetadata_FieldString kFieldString{}; void set_field_string(const char* data, size_t size) { AppendBytes(FieldMetadata_FieldString::kFieldId, data, size); } + void set_field_string(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_FieldString::kFieldId, chars.data, chars.size); + } void set_field_string(std::string value) { static constexpr uint32_t field_id = FieldMetadata_FieldString::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -35275,17 +39707,13 @@ class TestConfig_DummyFields : public ::protozero::Message { std::string, TestConfig_DummyFields>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_FieldBytes kFieldBytes() { return {}; } + static constexpr FieldMetadata_FieldBytes kFieldBytes{}; void set_field_bytes(const uint8_t* data, size_t size) { AppendBytes(FieldMetadata_FieldBytes::kFieldId, data, size); } + void set_field_bytes(::protozero::ConstBytes bytes) { + AppendBytes(FieldMetadata_FieldBytes::kFieldId, bytes.data, bytes.size); + } void set_field_bytes(std::string value) { static constexpr uint32_t field_id = FieldMetadata_FieldBytes::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -35334,57 +39762,169 @@ class TraceConfig_TraceFilter; class TraceConfig_TriggerConfig; class TraceConfig_TriggerConfig_Trigger; enum BuiltinClock : int32_t; -enum TraceConfig_BufferConfig_FillPolicy : int32_t; -enum TraceConfig_CompressionType : int32_t; -enum TraceConfig_LockdownModeOperation : int32_t; -enum TraceConfig_StatsdLogging : int32_t; -enum TraceConfig_TriggerConfig_TriggerMode : int32_t; +namespace perfetto_pbzero_enum_TraceConfig_BufferConfig { +enum FillPolicy : int32_t; +} // namespace perfetto_pbzero_enum_TraceConfig_BufferConfig +using TraceConfig_BufferConfig_FillPolicy = perfetto_pbzero_enum_TraceConfig_BufferConfig::FillPolicy; +namespace perfetto_pbzero_enum_TraceConfig { +enum CompressionType : int32_t; +} // namespace perfetto_pbzero_enum_TraceConfig +using TraceConfig_CompressionType = perfetto_pbzero_enum_TraceConfig::CompressionType; +namespace perfetto_pbzero_enum_TraceConfig { +enum LockdownModeOperation : int32_t; +} // namespace perfetto_pbzero_enum_TraceConfig +using TraceConfig_LockdownModeOperation = perfetto_pbzero_enum_TraceConfig::LockdownModeOperation; +namespace perfetto_pbzero_enum_TraceConfig { +enum StatsdLogging : int32_t; +} // namespace perfetto_pbzero_enum_TraceConfig +using TraceConfig_StatsdLogging = perfetto_pbzero_enum_TraceConfig::StatsdLogging; +namespace perfetto_pbzero_enum_TraceConfig_TriggerConfig { +enum TriggerMode : int32_t; +} // namespace perfetto_pbzero_enum_TraceConfig_TriggerConfig +using TraceConfig_TriggerConfig_TriggerMode = perfetto_pbzero_enum_TraceConfig_TriggerConfig::TriggerMode; -enum TraceConfig_LockdownModeOperation : int32_t { - TraceConfig_LockdownModeOperation_LOCKDOWN_UNCHANGED = 0, - TraceConfig_LockdownModeOperation_LOCKDOWN_CLEAR = 1, - TraceConfig_LockdownModeOperation_LOCKDOWN_SET = 2, +namespace perfetto_pbzero_enum_TraceConfig { +enum LockdownModeOperation : int32_t { + LOCKDOWN_UNCHANGED = 0, + LOCKDOWN_CLEAR = 1, + LOCKDOWN_SET = 2, }; +} // namespace perfetto_pbzero_enum_TraceConfig +using TraceConfig_LockdownModeOperation = perfetto_pbzero_enum_TraceConfig::LockdownModeOperation; -const TraceConfig_LockdownModeOperation TraceConfig_LockdownModeOperation_MIN = TraceConfig_LockdownModeOperation_LOCKDOWN_UNCHANGED; -const TraceConfig_LockdownModeOperation TraceConfig_LockdownModeOperation_MAX = TraceConfig_LockdownModeOperation_LOCKDOWN_SET; -enum TraceConfig_CompressionType : int32_t { - TraceConfig_CompressionType_COMPRESSION_TYPE_UNSPECIFIED = 0, - TraceConfig_CompressionType_COMPRESSION_TYPE_DEFLATE = 1, +constexpr TraceConfig_LockdownModeOperation TraceConfig_LockdownModeOperation_MIN = TraceConfig_LockdownModeOperation::LOCKDOWN_UNCHANGED; +constexpr TraceConfig_LockdownModeOperation TraceConfig_LockdownModeOperation_MAX = TraceConfig_LockdownModeOperation::LOCKDOWN_SET; + + +PERFETTO_PROTOZERO_CONSTEXPR14_OR_INLINE +const char* TraceConfig_LockdownModeOperation_Name(::perfetto::protos::pbzero::TraceConfig_LockdownModeOperation value) { + switch (value) { + case ::perfetto::protos::pbzero::TraceConfig_LockdownModeOperation::LOCKDOWN_UNCHANGED: + return "LOCKDOWN_UNCHANGED"; + + case ::perfetto::protos::pbzero::TraceConfig_LockdownModeOperation::LOCKDOWN_CLEAR: + return "LOCKDOWN_CLEAR"; + + case ::perfetto::protos::pbzero::TraceConfig_LockdownModeOperation::LOCKDOWN_SET: + return "LOCKDOWN_SET"; + } + return "PBZERO_UNKNOWN_ENUM_VALUE"; +} + +namespace perfetto_pbzero_enum_TraceConfig { +enum CompressionType : int32_t { + COMPRESSION_TYPE_UNSPECIFIED = 0, + COMPRESSION_TYPE_DEFLATE = 1, }; +} // namespace perfetto_pbzero_enum_TraceConfig +using TraceConfig_CompressionType = perfetto_pbzero_enum_TraceConfig::CompressionType; -const TraceConfig_CompressionType TraceConfig_CompressionType_MIN = TraceConfig_CompressionType_COMPRESSION_TYPE_UNSPECIFIED; -const TraceConfig_CompressionType TraceConfig_CompressionType_MAX = TraceConfig_CompressionType_COMPRESSION_TYPE_DEFLATE; -enum TraceConfig_StatsdLogging : int32_t { - TraceConfig_StatsdLogging_STATSD_LOGGING_UNSPECIFIED = 0, - TraceConfig_StatsdLogging_STATSD_LOGGING_ENABLED = 1, - TraceConfig_StatsdLogging_STATSD_LOGGING_DISABLED = 2, +constexpr TraceConfig_CompressionType TraceConfig_CompressionType_MIN = TraceConfig_CompressionType::COMPRESSION_TYPE_UNSPECIFIED; +constexpr TraceConfig_CompressionType TraceConfig_CompressionType_MAX = TraceConfig_CompressionType::COMPRESSION_TYPE_DEFLATE; + + +PERFETTO_PROTOZERO_CONSTEXPR14_OR_INLINE +const char* TraceConfig_CompressionType_Name(::perfetto::protos::pbzero::TraceConfig_CompressionType value) { + switch (value) { + case ::perfetto::protos::pbzero::TraceConfig_CompressionType::COMPRESSION_TYPE_UNSPECIFIED: + return "COMPRESSION_TYPE_UNSPECIFIED"; + + case ::perfetto::protos::pbzero::TraceConfig_CompressionType::COMPRESSION_TYPE_DEFLATE: + return "COMPRESSION_TYPE_DEFLATE"; + } + return "PBZERO_UNKNOWN_ENUM_VALUE"; +} + +namespace perfetto_pbzero_enum_TraceConfig { +enum StatsdLogging : int32_t { + STATSD_LOGGING_UNSPECIFIED = 0, + STATSD_LOGGING_ENABLED = 1, + STATSD_LOGGING_DISABLED = 2, }; +} // namespace perfetto_pbzero_enum_TraceConfig +using TraceConfig_StatsdLogging = perfetto_pbzero_enum_TraceConfig::StatsdLogging; -const TraceConfig_StatsdLogging TraceConfig_StatsdLogging_MIN = TraceConfig_StatsdLogging_STATSD_LOGGING_UNSPECIFIED; -const TraceConfig_StatsdLogging TraceConfig_StatsdLogging_MAX = TraceConfig_StatsdLogging_STATSD_LOGGING_DISABLED; -enum TraceConfig_TriggerConfig_TriggerMode : int32_t { - TraceConfig_TriggerConfig_TriggerMode_UNSPECIFIED = 0, - TraceConfig_TriggerConfig_TriggerMode_START_TRACING = 1, - TraceConfig_TriggerConfig_TriggerMode_STOP_TRACING = 2, +constexpr TraceConfig_StatsdLogging TraceConfig_StatsdLogging_MIN = TraceConfig_StatsdLogging::STATSD_LOGGING_UNSPECIFIED; +constexpr TraceConfig_StatsdLogging TraceConfig_StatsdLogging_MAX = TraceConfig_StatsdLogging::STATSD_LOGGING_DISABLED; + + +PERFETTO_PROTOZERO_CONSTEXPR14_OR_INLINE +const char* TraceConfig_StatsdLogging_Name(::perfetto::protos::pbzero::TraceConfig_StatsdLogging value) { + switch (value) { + case ::perfetto::protos::pbzero::TraceConfig_StatsdLogging::STATSD_LOGGING_UNSPECIFIED: + return "STATSD_LOGGING_UNSPECIFIED"; + + case ::perfetto::protos::pbzero::TraceConfig_StatsdLogging::STATSD_LOGGING_ENABLED: + return "STATSD_LOGGING_ENABLED"; + + case ::perfetto::protos::pbzero::TraceConfig_StatsdLogging::STATSD_LOGGING_DISABLED: + return "STATSD_LOGGING_DISABLED"; + } + return "PBZERO_UNKNOWN_ENUM_VALUE"; +} + +namespace perfetto_pbzero_enum_TraceConfig_TriggerConfig { +enum TriggerMode : int32_t { + UNSPECIFIED = 0, + START_TRACING = 1, + STOP_TRACING = 2, }; +} // namespace perfetto_pbzero_enum_TraceConfig_TriggerConfig +using TraceConfig_TriggerConfig_TriggerMode = perfetto_pbzero_enum_TraceConfig_TriggerConfig::TriggerMode; -const TraceConfig_TriggerConfig_TriggerMode TraceConfig_TriggerConfig_TriggerMode_MIN = TraceConfig_TriggerConfig_TriggerMode_UNSPECIFIED; -const TraceConfig_TriggerConfig_TriggerMode TraceConfig_TriggerConfig_TriggerMode_MAX = TraceConfig_TriggerConfig_TriggerMode_STOP_TRACING; -enum TraceConfig_BufferConfig_FillPolicy : int32_t { - TraceConfig_BufferConfig_FillPolicy_UNSPECIFIED = 0, - TraceConfig_BufferConfig_FillPolicy_RING_BUFFER = 1, - TraceConfig_BufferConfig_FillPolicy_DISCARD = 2, +constexpr TraceConfig_TriggerConfig_TriggerMode TraceConfig_TriggerConfig_TriggerMode_MIN = TraceConfig_TriggerConfig_TriggerMode::UNSPECIFIED; +constexpr TraceConfig_TriggerConfig_TriggerMode TraceConfig_TriggerConfig_TriggerMode_MAX = TraceConfig_TriggerConfig_TriggerMode::STOP_TRACING; + + +PERFETTO_PROTOZERO_CONSTEXPR14_OR_INLINE +const char* TraceConfig_TriggerConfig_TriggerMode_Name(::perfetto::protos::pbzero::TraceConfig_TriggerConfig_TriggerMode value) { + switch (value) { + case ::perfetto::protos::pbzero::TraceConfig_TriggerConfig_TriggerMode::UNSPECIFIED: + return "UNSPECIFIED"; + + case ::perfetto::protos::pbzero::TraceConfig_TriggerConfig_TriggerMode::START_TRACING: + return "START_TRACING"; + + case ::perfetto::protos::pbzero::TraceConfig_TriggerConfig_TriggerMode::STOP_TRACING: + return "STOP_TRACING"; + } + return "PBZERO_UNKNOWN_ENUM_VALUE"; +} + +namespace perfetto_pbzero_enum_TraceConfig_BufferConfig { +enum FillPolicy : int32_t { + UNSPECIFIED = 0, + RING_BUFFER = 1, + DISCARD = 2, }; +} // namespace perfetto_pbzero_enum_TraceConfig_BufferConfig +using TraceConfig_BufferConfig_FillPolicy = perfetto_pbzero_enum_TraceConfig_BufferConfig::FillPolicy; -const TraceConfig_BufferConfig_FillPolicy TraceConfig_BufferConfig_FillPolicy_MIN = TraceConfig_BufferConfig_FillPolicy_UNSPECIFIED; -const TraceConfig_BufferConfig_FillPolicy TraceConfig_BufferConfig_FillPolicy_MAX = TraceConfig_BufferConfig_FillPolicy_DISCARD; -class TraceConfig_Decoder : public ::protozero::TypedProtoDecoder { +constexpr TraceConfig_BufferConfig_FillPolicy TraceConfig_BufferConfig_FillPolicy_MIN = TraceConfig_BufferConfig_FillPolicy::UNSPECIFIED; +constexpr TraceConfig_BufferConfig_FillPolicy TraceConfig_BufferConfig_FillPolicy_MAX = TraceConfig_BufferConfig_FillPolicy::DISCARD; + + +PERFETTO_PROTOZERO_CONSTEXPR14_OR_INLINE +const char* TraceConfig_BufferConfig_FillPolicy_Name(::perfetto::protos::pbzero::TraceConfig_BufferConfig_FillPolicy value) { + switch (value) { + case ::perfetto::protos::pbzero::TraceConfig_BufferConfig_FillPolicy::UNSPECIFIED: + return "UNSPECIFIED"; + + case ::perfetto::protos::pbzero::TraceConfig_BufferConfig_FillPolicy::RING_BUFFER: + return "RING_BUFFER"; + + case ::perfetto::protos::pbzero::TraceConfig_BufferConfig_FillPolicy::DISCARD: + return "DISCARD"; + } + return "PBZERO_UNKNOWN_ENUM_VALUE"; +} + +class TraceConfig_Decoder : public ::protozero::TypedProtoDecoder { public: TraceConfig_Decoder(const uint8_t* data, size_t len) : TypedProtoDecoder(data, len) {} explicit TraceConfig_Decoder(const std::string& raw) : TypedProtoDecoder(reinterpret_cast(raw.data()), raw.size()) {} @@ -35397,6 +39937,8 @@ class TraceConfig_Decoder : public ::protozero::TypedProtoDecoder().as_bytes(); } bool has_duration_ms() const { return at<3>().valid(); } uint32_t duration_ms() const { return at<3>().as_uint32(); } + bool has_prefer_suspend_clock_for_duration() const { return at<36>().valid(); } + bool prefer_suspend_clock_for_duration() const { return at<36>().as_bool(); } bool has_enable_extra_guardrails() const { return at<4>().valid(); } bool enable_extra_guardrails() const { return at<4>().as_bool(); } bool has_lockdown_mode() const { return at<5>().valid(); } @@ -35463,6 +40005,7 @@ class TraceConfig : public ::protozero::Message { kDataSourcesFieldNumber = 2, kBuiltinDataSourcesFieldNumber = 20, kDurationMsFieldNumber = 3, + kPreferSuspendClockForDurationFieldNumber = 36, kEnableExtraGuardrailsFieldNumber = 4, kLockdownModeFieldNumber = 5, kProducersFieldNumber = 6, @@ -35506,17 +40049,29 @@ class TraceConfig : public ::protozero::Message { using TraceFilter = ::perfetto::protos::pbzero::TraceConfig_TraceFilter; using AndroidReportConfig = ::perfetto::protos::pbzero::TraceConfig_AndroidReportConfig; using CmdTraceStartDelay = ::perfetto::protos::pbzero::TraceConfig_CmdTraceStartDelay; + using LockdownModeOperation = ::perfetto::protos::pbzero::TraceConfig_LockdownModeOperation; + static inline const char* LockdownModeOperation_Name(LockdownModeOperation value) { + return ::perfetto::protos::pbzero::TraceConfig_LockdownModeOperation_Name(value); + } + using CompressionType = ::perfetto::protos::pbzero::TraceConfig_CompressionType; + static inline const char* CompressionType_Name(CompressionType value) { + return ::perfetto::protos::pbzero::TraceConfig_CompressionType_Name(value); + } + using StatsdLogging = ::perfetto::protos::pbzero::TraceConfig_StatsdLogging; - static const LockdownModeOperation LOCKDOWN_UNCHANGED = TraceConfig_LockdownModeOperation_LOCKDOWN_UNCHANGED; - static const LockdownModeOperation LOCKDOWN_CLEAR = TraceConfig_LockdownModeOperation_LOCKDOWN_CLEAR; - static const LockdownModeOperation LOCKDOWN_SET = TraceConfig_LockdownModeOperation_LOCKDOWN_SET; - static const CompressionType COMPRESSION_TYPE_UNSPECIFIED = TraceConfig_CompressionType_COMPRESSION_TYPE_UNSPECIFIED; - static const CompressionType COMPRESSION_TYPE_DEFLATE = TraceConfig_CompressionType_COMPRESSION_TYPE_DEFLATE; - static const StatsdLogging STATSD_LOGGING_UNSPECIFIED = TraceConfig_StatsdLogging_STATSD_LOGGING_UNSPECIFIED; - static const StatsdLogging STATSD_LOGGING_ENABLED = TraceConfig_StatsdLogging_STATSD_LOGGING_ENABLED; - static const StatsdLogging STATSD_LOGGING_DISABLED = TraceConfig_StatsdLogging_STATSD_LOGGING_DISABLED; + static inline const char* StatsdLogging_Name(StatsdLogging value) { + return ::perfetto::protos::pbzero::TraceConfig_StatsdLogging_Name(value); + } + static const LockdownModeOperation LOCKDOWN_UNCHANGED = LockdownModeOperation::LOCKDOWN_UNCHANGED; + static const LockdownModeOperation LOCKDOWN_CLEAR = LockdownModeOperation::LOCKDOWN_CLEAR; + static const LockdownModeOperation LOCKDOWN_SET = LockdownModeOperation::LOCKDOWN_SET; + static const CompressionType COMPRESSION_TYPE_UNSPECIFIED = CompressionType::COMPRESSION_TYPE_UNSPECIFIED; + static const CompressionType COMPRESSION_TYPE_DEFLATE = CompressionType::COMPRESSION_TYPE_DEFLATE; + static const StatsdLogging STATSD_LOGGING_UNSPECIFIED = StatsdLogging::STATSD_LOGGING_UNSPECIFIED; + static const StatsdLogging STATSD_LOGGING_ENABLED = StatsdLogging::STATSD_LOGGING_ENABLED; + static const StatsdLogging STATSD_LOGGING_DISABLED = StatsdLogging::STATSD_LOGGING_DISABLED; using FieldMetadata_Buffers = ::protozero::proto_utils::FieldMetadata< @@ -35526,14 +40081,7 @@ class TraceConfig : public ::protozero::Message { TraceConfig_BufferConfig, TraceConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Buffers kBuffers() { return {}; } + static constexpr FieldMetadata_Buffers kBuffers{}; template T* add_buffers() { return BeginNestedMessage(1); } @@ -35547,14 +40095,7 @@ class TraceConfig : public ::protozero::Message { TraceConfig_DataSource, TraceConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_DataSources kDataSources() { return {}; } + static constexpr FieldMetadata_DataSources kDataSources{}; template T* add_data_sources() { return BeginNestedMessage(2); } @@ -35568,14 +40109,7 @@ class TraceConfig : public ::protozero::Message { TraceConfig_BuiltinDataSource, TraceConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_BuiltinDataSources kBuiltinDataSources() { return {}; } + static constexpr FieldMetadata_BuiltinDataSources kBuiltinDataSources{}; template T* set_builtin_data_sources() { return BeginNestedMessage(20); } @@ -35589,14 +40123,7 @@ class TraceConfig : public ::protozero::Message { uint32_t, TraceConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_DurationMs kDurationMs() { return {}; } + static constexpr FieldMetadata_DurationMs kDurationMs{}; void set_duration_ms(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_DurationMs::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -35606,6 +40133,24 @@ class TraceConfig : public ::protozero::Message { ::Append(*this, field_id, value); } + using FieldMetadata_PreferSuspendClockForDuration = + ::protozero::proto_utils::FieldMetadata< + 36, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kBool, + bool, + TraceConfig>; + + static constexpr FieldMetadata_PreferSuspendClockForDuration kPreferSuspendClockForDuration{}; + void set_prefer_suspend_clock_for_duration(bool value) { + static constexpr uint32_t field_id = FieldMetadata_PreferSuspendClockForDuration::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kBool> + ::Append(*this, field_id, value); + } + using FieldMetadata_EnableExtraGuardrails = ::protozero::proto_utils::FieldMetadata< 4, @@ -35614,14 +40159,7 @@ class TraceConfig : public ::protozero::Message { bool, TraceConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_EnableExtraGuardrails kEnableExtraGuardrails() { return {}; } + static constexpr FieldMetadata_EnableExtraGuardrails kEnableExtraGuardrails{}; void set_enable_extra_guardrails(bool value) { static constexpr uint32_t field_id = FieldMetadata_EnableExtraGuardrails::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -35639,14 +40177,7 @@ class TraceConfig : public ::protozero::Message { ::perfetto::protos::pbzero::TraceConfig_LockdownModeOperation, TraceConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_LockdownMode kLockdownMode() { return {}; } + static constexpr FieldMetadata_LockdownMode kLockdownMode{}; void set_lockdown_mode(::perfetto::protos::pbzero::TraceConfig_LockdownModeOperation value) { static constexpr uint32_t field_id = FieldMetadata_LockdownMode::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -35664,14 +40195,7 @@ class TraceConfig : public ::protozero::Message { TraceConfig_ProducerConfig, TraceConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Producers kProducers() { return {}; } + static constexpr FieldMetadata_Producers kProducers{}; template T* add_producers() { return BeginNestedMessage(6); } @@ -35685,14 +40209,7 @@ class TraceConfig : public ::protozero::Message { TraceConfig_StatsdMetadata, TraceConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_StatsdMetadata kStatsdMetadata() { return {}; } + static constexpr FieldMetadata_StatsdMetadata kStatsdMetadata{}; template T* set_statsd_metadata() { return BeginNestedMessage(7); } @@ -35706,14 +40223,7 @@ class TraceConfig : public ::protozero::Message { bool, TraceConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_WriteIntoFile kWriteIntoFile() { return {}; } + static constexpr FieldMetadata_WriteIntoFile kWriteIntoFile{}; void set_write_into_file(bool value) { static constexpr uint32_t field_id = FieldMetadata_WriteIntoFile::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -35731,17 +40241,13 @@ class TraceConfig : public ::protozero::Message { std::string, TraceConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_OutputPath kOutputPath() { return {}; } + static constexpr FieldMetadata_OutputPath kOutputPath{}; void set_output_path(const char* data, size_t size) { AppendBytes(FieldMetadata_OutputPath::kFieldId, data, size); } + void set_output_path(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_OutputPath::kFieldId, chars.data, chars.size); + } void set_output_path(std::string value) { static constexpr uint32_t field_id = FieldMetadata_OutputPath::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -35759,14 +40265,7 @@ class TraceConfig : public ::protozero::Message { uint32_t, TraceConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_FileWritePeriodMs kFileWritePeriodMs() { return {}; } + static constexpr FieldMetadata_FileWritePeriodMs kFileWritePeriodMs{}; void set_file_write_period_ms(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_FileWritePeriodMs::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -35784,14 +40283,7 @@ class TraceConfig : public ::protozero::Message { uint64_t, TraceConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_MaxFileSizeBytes kMaxFileSizeBytes() { return {}; } + static constexpr FieldMetadata_MaxFileSizeBytes kMaxFileSizeBytes{}; void set_max_file_size_bytes(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_MaxFileSizeBytes::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -35809,14 +40301,7 @@ class TraceConfig : public ::protozero::Message { TraceConfig_GuardrailOverrides, TraceConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_GuardrailOverrides kGuardrailOverrides() { return {}; } + static constexpr FieldMetadata_GuardrailOverrides kGuardrailOverrides{}; template T* set_guardrail_overrides() { return BeginNestedMessage(11); } @@ -35830,14 +40315,7 @@ class TraceConfig : public ::protozero::Message { bool, TraceConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_DeferredStart kDeferredStart() { return {}; } + static constexpr FieldMetadata_DeferredStart kDeferredStart{}; void set_deferred_start(bool value) { static constexpr uint32_t field_id = FieldMetadata_DeferredStart::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -35855,14 +40333,7 @@ class TraceConfig : public ::protozero::Message { uint32_t, TraceConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_FlushPeriodMs kFlushPeriodMs() { return {}; } + static constexpr FieldMetadata_FlushPeriodMs kFlushPeriodMs{}; void set_flush_period_ms(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_FlushPeriodMs::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -35880,14 +40351,7 @@ class TraceConfig : public ::protozero::Message { uint32_t, TraceConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_FlushTimeoutMs kFlushTimeoutMs() { return {}; } + static constexpr FieldMetadata_FlushTimeoutMs kFlushTimeoutMs{}; void set_flush_timeout_ms(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_FlushTimeoutMs::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -35905,14 +40369,7 @@ class TraceConfig : public ::protozero::Message { uint32_t, TraceConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_DataSourceStopTimeoutMs kDataSourceStopTimeoutMs() { return {}; } + static constexpr FieldMetadata_DataSourceStopTimeoutMs kDataSourceStopTimeoutMs{}; void set_data_source_stop_timeout_ms(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_DataSourceStopTimeoutMs::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -35930,14 +40387,7 @@ class TraceConfig : public ::protozero::Message { bool, TraceConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_NotifyTraceur kNotifyTraceur() { return {}; } + static constexpr FieldMetadata_NotifyTraceur kNotifyTraceur{}; void set_notify_traceur(bool value) { static constexpr uint32_t field_id = FieldMetadata_NotifyTraceur::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -35955,14 +40405,7 @@ class TraceConfig : public ::protozero::Message { int32_t, TraceConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_BugreportScore kBugreportScore() { return {}; } + static constexpr FieldMetadata_BugreportScore kBugreportScore{}; void set_bugreport_score(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_BugreportScore::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -35980,14 +40423,7 @@ class TraceConfig : public ::protozero::Message { TraceConfig_TriggerConfig, TraceConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_TriggerConfig kTriggerConfig() { return {}; } + static constexpr FieldMetadata_TriggerConfig kTriggerConfig{}; template T* set_trigger_config() { return BeginNestedMessage(17); } @@ -36001,17 +40437,13 @@ class TraceConfig : public ::protozero::Message { std::string, TraceConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ActivateTriggers kActivateTriggers() { return {}; } + static constexpr FieldMetadata_ActivateTriggers kActivateTriggers{}; void add_activate_triggers(const char* data, size_t size) { AppendBytes(FieldMetadata_ActivateTriggers::kFieldId, data, size); } + void add_activate_triggers(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_ActivateTriggers::kFieldId, chars.data, chars.size); + } void add_activate_triggers(std::string value) { static constexpr uint32_t field_id = FieldMetadata_ActivateTriggers::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -36029,14 +40461,7 @@ class TraceConfig : public ::protozero::Message { TraceConfig_IncrementalStateConfig, TraceConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_IncrementalStateConfig kIncrementalStateConfig() { return {}; } + static constexpr FieldMetadata_IncrementalStateConfig kIncrementalStateConfig{}; template T* set_incremental_state_config() { return BeginNestedMessage(21); } @@ -36050,14 +40475,7 @@ class TraceConfig : public ::protozero::Message { bool, TraceConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_AllowUserBuildTracing kAllowUserBuildTracing() { return {}; } + static constexpr FieldMetadata_AllowUserBuildTracing kAllowUserBuildTracing{}; void set_allow_user_build_tracing(bool value) { static constexpr uint32_t field_id = FieldMetadata_AllowUserBuildTracing::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -36075,17 +40493,13 @@ class TraceConfig : public ::protozero::Message { std::string, TraceConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_UniqueSessionName kUniqueSessionName() { return {}; } + static constexpr FieldMetadata_UniqueSessionName kUniqueSessionName{}; void set_unique_session_name(const char* data, size_t size) { AppendBytes(FieldMetadata_UniqueSessionName::kFieldId, data, size); } + void set_unique_session_name(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_UniqueSessionName::kFieldId, chars.data, chars.size); + } void set_unique_session_name(std::string value) { static constexpr uint32_t field_id = FieldMetadata_UniqueSessionName::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -36103,14 +40517,7 @@ class TraceConfig : public ::protozero::Message { ::perfetto::protos::pbzero::TraceConfig_CompressionType, TraceConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_CompressionType kCompressionType() { return {}; } + static constexpr FieldMetadata_CompressionType kCompressionType{}; void set_compression_type(::perfetto::protos::pbzero::TraceConfig_CompressionType value) { static constexpr uint32_t field_id = FieldMetadata_CompressionType::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -36128,14 +40535,7 @@ class TraceConfig : public ::protozero::Message { TraceConfig_IncidentReportConfig, TraceConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_IncidentReportConfig kIncidentReportConfig() { return {}; } + static constexpr FieldMetadata_IncidentReportConfig kIncidentReportConfig{}; template T* set_incident_report_config() { return BeginNestedMessage(25); } @@ -36149,14 +40549,7 @@ class TraceConfig : public ::protozero::Message { ::perfetto::protos::pbzero::TraceConfig_StatsdLogging, TraceConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_StatsdLogging kStatsdLogging() { return {}; } + static constexpr FieldMetadata_StatsdLogging kStatsdLogging{}; void set_statsd_logging(::perfetto::protos::pbzero::TraceConfig_StatsdLogging value) { static constexpr uint32_t field_id = FieldMetadata_StatsdLogging::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -36174,14 +40567,7 @@ class TraceConfig : public ::protozero::Message { int64_t, TraceConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_TraceUuidMsb kTraceUuidMsb() { return {}; } + static constexpr FieldMetadata_TraceUuidMsb kTraceUuidMsb{}; void set_trace_uuid_msb(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_TraceUuidMsb::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -36199,14 +40585,7 @@ class TraceConfig : public ::protozero::Message { int64_t, TraceConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_TraceUuidLsb kTraceUuidLsb() { return {}; } + static constexpr FieldMetadata_TraceUuidLsb kTraceUuidLsb{}; void set_trace_uuid_lsb(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_TraceUuidLsb::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -36224,14 +40603,7 @@ class TraceConfig : public ::protozero::Message { TraceConfig_TraceFilter, TraceConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_TraceFilter kTraceFilter() { return {}; } + static constexpr FieldMetadata_TraceFilter kTraceFilter{}; template T* set_trace_filter() { return BeginNestedMessage(33); } @@ -36245,14 +40617,7 @@ class TraceConfig : public ::protozero::Message { TraceConfig_AndroidReportConfig, TraceConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_AndroidReportConfig kAndroidReportConfig() { return {}; } + static constexpr FieldMetadata_AndroidReportConfig kAndroidReportConfig{}; template T* set_android_report_config() { return BeginNestedMessage(34); } @@ -36266,14 +40631,7 @@ class TraceConfig : public ::protozero::Message { TraceConfig_CmdTraceStartDelay, TraceConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_CmdTraceStartDelay kCmdTraceStartDelay() { return {}; } + static constexpr FieldMetadata_CmdTraceStartDelay kCmdTraceStartDelay{}; template T* set_cmd_trace_start_delay() { return BeginNestedMessage(35); } @@ -36309,14 +40667,7 @@ class TraceConfig_CmdTraceStartDelay : public ::protozero::Message { uint32_t, TraceConfig_CmdTraceStartDelay>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_MinDelayMs kMinDelayMs() { return {}; } + static constexpr FieldMetadata_MinDelayMs kMinDelayMs{}; void set_min_delay_ms(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_MinDelayMs::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -36334,14 +40685,7 @@ class TraceConfig_CmdTraceStartDelay : public ::protozero::Message { uint32_t, TraceConfig_CmdTraceStartDelay>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_MaxDelayMs kMaxDelayMs() { return {}; } + static constexpr FieldMetadata_MaxDelayMs kMaxDelayMs{}; void set_max_delay_ms(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_MaxDelayMs::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -36387,17 +40731,13 @@ class TraceConfig_AndroidReportConfig : public ::protozero::Message { std::string, TraceConfig_AndroidReportConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ReporterServicePackage kReporterServicePackage() { return {}; } + static constexpr FieldMetadata_ReporterServicePackage kReporterServicePackage{}; void set_reporter_service_package(const char* data, size_t size) { AppendBytes(FieldMetadata_ReporterServicePackage::kFieldId, data, size); } + void set_reporter_service_package(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_ReporterServicePackage::kFieldId, chars.data, chars.size); + } void set_reporter_service_package(std::string value) { static constexpr uint32_t field_id = FieldMetadata_ReporterServicePackage::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -36415,17 +40755,13 @@ class TraceConfig_AndroidReportConfig : public ::protozero::Message { std::string, TraceConfig_AndroidReportConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ReporterServiceClass kReporterServiceClass() { return {}; } + static constexpr FieldMetadata_ReporterServiceClass kReporterServiceClass{}; void set_reporter_service_class(const char* data, size_t size) { AppendBytes(FieldMetadata_ReporterServiceClass::kFieldId, data, size); } + void set_reporter_service_class(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_ReporterServiceClass::kFieldId, chars.data, chars.size); + } void set_reporter_service_class(std::string value) { static constexpr uint32_t field_id = FieldMetadata_ReporterServiceClass::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -36443,14 +40779,7 @@ class TraceConfig_AndroidReportConfig : public ::protozero::Message { bool, TraceConfig_AndroidReportConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_SkipReport kSkipReport() { return {}; } + static constexpr FieldMetadata_SkipReport kSkipReport{}; void set_skip_report(bool value) { static constexpr uint32_t field_id = FieldMetadata_SkipReport::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -36468,14 +40797,7 @@ class TraceConfig_AndroidReportConfig : public ::protozero::Message { bool, TraceConfig_AndroidReportConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_UsePipeInFrameworkForTesting kUsePipeInFrameworkForTesting() { return {}; } + static constexpr FieldMetadata_UsePipeInFrameworkForTesting kUsePipeInFrameworkForTesting{}; void set_use_pipe_in_framework_for_testing(bool value) { static constexpr uint32_t field_id = FieldMetadata_UsePipeInFrameworkForTesting::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -36512,17 +40834,13 @@ class TraceConfig_TraceFilter : public ::protozero::Message { std::string, TraceConfig_TraceFilter>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Bytecode kBytecode() { return {}; } + static constexpr FieldMetadata_Bytecode kBytecode{}; void set_bytecode(const uint8_t* data, size_t size) { AppendBytes(FieldMetadata_Bytecode::kFieldId, data, size); } + void set_bytecode(::protozero::ConstBytes bytes) { + AppendBytes(FieldMetadata_Bytecode::kFieldId, bytes.data, bytes.size); + } void set_bytecode(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Bytecode::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -36571,17 +40889,13 @@ class TraceConfig_IncidentReportConfig : public ::protozero::Message { std::string, TraceConfig_IncidentReportConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_DestinationPackage kDestinationPackage() { return {}; } + static constexpr FieldMetadata_DestinationPackage kDestinationPackage{}; void set_destination_package(const char* data, size_t size) { AppendBytes(FieldMetadata_DestinationPackage::kFieldId, data, size); } + void set_destination_package(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_DestinationPackage::kFieldId, chars.data, chars.size); + } void set_destination_package(std::string value) { static constexpr uint32_t field_id = FieldMetadata_DestinationPackage::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -36599,17 +40913,13 @@ class TraceConfig_IncidentReportConfig : public ::protozero::Message { std::string, TraceConfig_IncidentReportConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_DestinationClass kDestinationClass() { return {}; } + static constexpr FieldMetadata_DestinationClass kDestinationClass{}; void set_destination_class(const char* data, size_t size) { AppendBytes(FieldMetadata_DestinationClass::kFieldId, data, size); } + void set_destination_class(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_DestinationClass::kFieldId, chars.data, chars.size); + } void set_destination_class(std::string value) { static constexpr uint32_t field_id = FieldMetadata_DestinationClass::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -36627,14 +40937,7 @@ class TraceConfig_IncidentReportConfig : public ::protozero::Message { int32_t, TraceConfig_IncidentReportConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_PrivacyLevel kPrivacyLevel() { return {}; } + static constexpr FieldMetadata_PrivacyLevel kPrivacyLevel{}; void set_privacy_level(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_PrivacyLevel::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -36652,14 +40955,7 @@ class TraceConfig_IncidentReportConfig : public ::protozero::Message { bool, TraceConfig_IncidentReportConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_SkipIncidentd kSkipIncidentd() { return {}; } + static constexpr FieldMetadata_SkipIncidentd kSkipIncidentd{}; void set_skip_incidentd(bool value) { static constexpr uint32_t field_id = FieldMetadata_SkipIncidentd::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -36677,14 +40973,7 @@ class TraceConfig_IncidentReportConfig : public ::protozero::Message { bool, TraceConfig_IncidentReportConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_SkipDropbox kSkipDropbox() { return {}; } + static constexpr FieldMetadata_SkipDropbox kSkipDropbox{}; void set_skip_dropbox(bool value) { static constexpr uint32_t field_id = FieldMetadata_SkipDropbox::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -36721,14 +41010,7 @@ class TraceConfig_IncrementalStateConfig : public ::protozero::Message { uint32_t, TraceConfig_IncrementalStateConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ClearPeriodMs kClearPeriodMs() { return {}; } + static constexpr FieldMetadata_ClearPeriodMs kClearPeriodMs{}; void set_clear_period_ms(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_ClearPeriodMs::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -36763,10 +41045,14 @@ class TraceConfig_TriggerConfig : public ::protozero::Message { static constexpr const char* GetName() { return ".perfetto.protos.TraceConfig.TriggerConfig"; } using Trigger = ::perfetto::protos::pbzero::TraceConfig_TriggerConfig_Trigger; + using TriggerMode = ::perfetto::protos::pbzero::TraceConfig_TriggerConfig_TriggerMode; - static const TriggerMode UNSPECIFIED = TraceConfig_TriggerConfig_TriggerMode_UNSPECIFIED; - static const TriggerMode START_TRACING = TraceConfig_TriggerConfig_TriggerMode_START_TRACING; - static const TriggerMode STOP_TRACING = TraceConfig_TriggerConfig_TriggerMode_STOP_TRACING; + static inline const char* TriggerMode_Name(TriggerMode value) { + return ::perfetto::protos::pbzero::TraceConfig_TriggerConfig_TriggerMode_Name(value); + } + static const TriggerMode UNSPECIFIED = TriggerMode::UNSPECIFIED; + static const TriggerMode START_TRACING = TriggerMode::START_TRACING; + static const TriggerMode STOP_TRACING = TriggerMode::STOP_TRACING; using FieldMetadata_TriggerMode = ::protozero::proto_utils::FieldMetadata< @@ -36776,14 +41062,7 @@ class TraceConfig_TriggerConfig : public ::protozero::Message { ::perfetto::protos::pbzero::TraceConfig_TriggerConfig_TriggerMode, TraceConfig_TriggerConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_TriggerMode kTriggerMode() { return {}; } + static constexpr FieldMetadata_TriggerMode kTriggerMode{}; void set_trigger_mode(::perfetto::protos::pbzero::TraceConfig_TriggerConfig_TriggerMode value) { static constexpr uint32_t field_id = FieldMetadata_TriggerMode::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -36801,14 +41080,7 @@ class TraceConfig_TriggerConfig : public ::protozero::Message { TraceConfig_TriggerConfig_Trigger, TraceConfig_TriggerConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Triggers kTriggers() { return {}; } + static constexpr FieldMetadata_Triggers kTriggers{}; template T* add_triggers() { return BeginNestedMessage(2); } @@ -36822,14 +41094,7 @@ class TraceConfig_TriggerConfig : public ::protozero::Message { uint32_t, TraceConfig_TriggerConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_TriggerTimeoutMs kTriggerTimeoutMs() { return {}; } + static constexpr FieldMetadata_TriggerTimeoutMs kTriggerTimeoutMs{}; void set_trigger_timeout_ms(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_TriggerTimeoutMs::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -36878,17 +41143,13 @@ class TraceConfig_TriggerConfig_Trigger : public ::protozero::Message { std::string, TraceConfig_TriggerConfig_Trigger>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Name kName() { return {}; } + static constexpr FieldMetadata_Name kName{}; void set_name(const char* data, size_t size) { AppendBytes(FieldMetadata_Name::kFieldId, data, size); } + void set_name(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Name::kFieldId, chars.data, chars.size); + } void set_name(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Name::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -36906,17 +41167,13 @@ class TraceConfig_TriggerConfig_Trigger : public ::protozero::Message { std::string, TraceConfig_TriggerConfig_Trigger>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ProducerNameRegex kProducerNameRegex() { return {}; } + static constexpr FieldMetadata_ProducerNameRegex kProducerNameRegex{}; void set_producer_name_regex(const char* data, size_t size) { AppendBytes(FieldMetadata_ProducerNameRegex::kFieldId, data, size); } + void set_producer_name_regex(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_ProducerNameRegex::kFieldId, chars.data, chars.size); + } void set_producer_name_regex(std::string value) { static constexpr uint32_t field_id = FieldMetadata_ProducerNameRegex::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -36934,14 +41191,7 @@ class TraceConfig_TriggerConfig_Trigger : public ::protozero::Message { uint32_t, TraceConfig_TriggerConfig_Trigger>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_StopDelayMs kStopDelayMs() { return {}; } + static constexpr FieldMetadata_StopDelayMs kStopDelayMs{}; void set_stop_delay_ms(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_StopDelayMs::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -36959,14 +41209,7 @@ class TraceConfig_TriggerConfig_Trigger : public ::protozero::Message { uint32_t, TraceConfig_TriggerConfig_Trigger>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_MaxPer24H kMaxPer24H() { return {}; } + static constexpr FieldMetadata_MaxPer24H kMaxPer24H{}; void set_max_per_24_h(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_MaxPer24H::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -36984,14 +41227,7 @@ class TraceConfig_TriggerConfig_Trigger : public ::protozero::Message { double, TraceConfig_TriggerConfig_Trigger>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_SkipProbability kSkipProbability() { return {}; } + static constexpr FieldMetadata_SkipProbability kSkipProbability{}; void set_skip_probability(double value) { static constexpr uint32_t field_id = FieldMetadata_SkipProbability::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -37002,13 +41238,15 @@ class TraceConfig_TriggerConfig_Trigger : public ::protozero::Message { } }; -class TraceConfig_GuardrailOverrides_Decoder : public ::protozero::TypedProtoDecoder { +class TraceConfig_GuardrailOverrides_Decoder : public ::protozero::TypedProtoDecoder { public: TraceConfig_GuardrailOverrides_Decoder(const uint8_t* data, size_t len) : TypedProtoDecoder(data, len) {} explicit TraceConfig_GuardrailOverrides_Decoder(const std::string& raw) : TypedProtoDecoder(reinterpret_cast(raw.data()), raw.size()) {} explicit TraceConfig_GuardrailOverrides_Decoder(const ::protozero::ConstBytes& raw) : TypedProtoDecoder(raw.data, raw.size) {} bool has_max_upload_per_day_bytes() const { return at<1>().valid(); } uint64_t max_upload_per_day_bytes() const { return at<1>().as_uint64(); } + bool has_max_tracing_buffer_size_kb() const { return at<2>().valid(); } + uint32_t max_tracing_buffer_size_kb() const { return at<2>().as_uint32(); } }; class TraceConfig_GuardrailOverrides : public ::protozero::Message { @@ -37016,6 +41254,7 @@ class TraceConfig_GuardrailOverrides : public ::protozero::Message { using Decoder = TraceConfig_GuardrailOverrides_Decoder; enum : int32_t { kMaxUploadPerDayBytesFieldNumber = 1, + kMaxTracingBufferSizeKbFieldNumber = 2, }; static constexpr const char* GetName() { return ".perfetto.protos.TraceConfig.GuardrailOverrides"; } @@ -37028,14 +41267,7 @@ class TraceConfig_GuardrailOverrides : public ::protozero::Message { uint64_t, TraceConfig_GuardrailOverrides>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_MaxUploadPerDayBytes kMaxUploadPerDayBytes() { return {}; } + static constexpr FieldMetadata_MaxUploadPerDayBytes kMaxUploadPerDayBytes{}; void set_max_upload_per_day_bytes(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_MaxUploadPerDayBytes::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -37044,6 +41276,24 @@ class TraceConfig_GuardrailOverrides : public ::protozero::Message { ::protozero::proto_utils::ProtoSchemaType::kUint64> ::Append(*this, field_id, value); } + + using FieldMetadata_MaxTracingBufferSizeKb = + ::protozero::proto_utils::FieldMetadata< + 2, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint32, + uint32_t, + TraceConfig_GuardrailOverrides>; + + static constexpr FieldMetadata_MaxTracingBufferSizeKb kMaxTracingBufferSizeKb{}; + void set_max_tracing_buffer_size_kb(uint32_t value) { + static constexpr uint32_t field_id = FieldMetadata_MaxTracingBufferSizeKb::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint32> + ::Append(*this, field_id, value); + } }; class TraceConfig_StatsdMetadata_Decoder : public ::protozero::TypedProtoDecoder { @@ -37081,14 +41331,7 @@ class TraceConfig_StatsdMetadata : public ::protozero::Message { int64_t, TraceConfig_StatsdMetadata>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_TriggeringAlertId kTriggeringAlertId() { return {}; } + static constexpr FieldMetadata_TriggeringAlertId kTriggeringAlertId{}; void set_triggering_alert_id(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_TriggeringAlertId::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -37106,14 +41349,7 @@ class TraceConfig_StatsdMetadata : public ::protozero::Message { int32_t, TraceConfig_StatsdMetadata>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_TriggeringConfigUid kTriggeringConfigUid() { return {}; } + static constexpr FieldMetadata_TriggeringConfigUid kTriggeringConfigUid{}; void set_triggering_config_uid(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_TriggeringConfigUid::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -37131,14 +41367,7 @@ class TraceConfig_StatsdMetadata : public ::protozero::Message { int64_t, TraceConfig_StatsdMetadata>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_TriggeringConfigId kTriggeringConfigId() { return {}; } + static constexpr FieldMetadata_TriggeringConfigId kTriggeringConfigId{}; void set_triggering_config_id(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_TriggeringConfigId::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -37156,14 +41385,7 @@ class TraceConfig_StatsdMetadata : public ::protozero::Message { int64_t, TraceConfig_StatsdMetadata>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_TriggeringSubscriptionId kTriggeringSubscriptionId() { return {}; } + static constexpr FieldMetadata_TriggeringSubscriptionId kTriggeringSubscriptionId{}; void set_triggering_subscription_id(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_TriggeringSubscriptionId::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -37206,17 +41428,13 @@ class TraceConfig_ProducerConfig : public ::protozero::Message { std::string, TraceConfig_ProducerConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ProducerName kProducerName() { return {}; } + static constexpr FieldMetadata_ProducerName kProducerName{}; void set_producer_name(const char* data, size_t size) { AppendBytes(FieldMetadata_ProducerName::kFieldId, data, size); } + void set_producer_name(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_ProducerName::kFieldId, chars.data, chars.size); + } void set_producer_name(std::string value) { static constexpr uint32_t field_id = FieldMetadata_ProducerName::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -37234,14 +41452,7 @@ class TraceConfig_ProducerConfig : public ::protozero::Message { uint32_t, TraceConfig_ProducerConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ShmSizeKb kShmSizeKb() { return {}; } + static constexpr FieldMetadata_ShmSizeKb kShmSizeKb{}; void set_shm_size_kb(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_ShmSizeKb::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -37259,14 +41470,7 @@ class TraceConfig_ProducerConfig : public ::protozero::Message { uint32_t, TraceConfig_ProducerConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_PageSizeKb kPageSizeKb() { return {}; } + static constexpr FieldMetadata_PageSizeKb kPageSizeKb{}; void set_page_size_kb(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_PageSizeKb::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -37277,7 +41481,7 @@ class TraceConfig_ProducerConfig : public ::protozero::Message { } }; -class TraceConfig_BuiltinDataSource_Decoder : public ::protozero::TypedProtoDecoder { +class TraceConfig_BuiltinDataSource_Decoder : public ::protozero::TypedProtoDecoder { public: TraceConfig_BuiltinDataSource_Decoder(const uint8_t* data, size_t len) : TypedProtoDecoder(data, len) {} explicit TraceConfig_BuiltinDataSource_Decoder(const std::string& raw) : TypedProtoDecoder(reinterpret_cast(raw.data()), raw.size()) {} @@ -37296,6 +41500,8 @@ class TraceConfig_BuiltinDataSource_Decoder : public ::protozero::TypedProtoDeco uint32_t snapshot_interval_ms() const { return at<6>().as_uint32(); } bool has_prefer_suspend_clock_for_snapshot() const { return at<7>().valid(); } bool prefer_suspend_clock_for_snapshot() const { return at<7>().as_bool(); } + bool has_disable_chunk_usage_histograms() const { return at<8>().valid(); } + bool disable_chunk_usage_histograms() const { return at<8>().as_bool(); } }; class TraceConfig_BuiltinDataSource : public ::protozero::Message { @@ -37309,6 +41515,7 @@ class TraceConfig_BuiltinDataSource : public ::protozero::Message { kPrimaryTraceClockFieldNumber = 5, kSnapshotIntervalMsFieldNumber = 6, kPreferSuspendClockForSnapshotFieldNumber = 7, + kDisableChunkUsageHistogramsFieldNumber = 8, }; static constexpr const char* GetName() { return ".perfetto.protos.TraceConfig.BuiltinDataSource"; } @@ -37321,14 +41528,7 @@ class TraceConfig_BuiltinDataSource : public ::protozero::Message { bool, TraceConfig_BuiltinDataSource>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_DisableClockSnapshotting kDisableClockSnapshotting() { return {}; } + static constexpr FieldMetadata_DisableClockSnapshotting kDisableClockSnapshotting{}; void set_disable_clock_snapshotting(bool value) { static constexpr uint32_t field_id = FieldMetadata_DisableClockSnapshotting::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -37346,14 +41546,7 @@ class TraceConfig_BuiltinDataSource : public ::protozero::Message { bool, TraceConfig_BuiltinDataSource>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_DisableTraceConfig kDisableTraceConfig() { return {}; } + static constexpr FieldMetadata_DisableTraceConfig kDisableTraceConfig{}; void set_disable_trace_config(bool value) { static constexpr uint32_t field_id = FieldMetadata_DisableTraceConfig::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -37371,14 +41564,7 @@ class TraceConfig_BuiltinDataSource : public ::protozero::Message { bool, TraceConfig_BuiltinDataSource>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_DisableSystemInfo kDisableSystemInfo() { return {}; } + static constexpr FieldMetadata_DisableSystemInfo kDisableSystemInfo{}; void set_disable_system_info(bool value) { static constexpr uint32_t field_id = FieldMetadata_DisableSystemInfo::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -37396,14 +41582,7 @@ class TraceConfig_BuiltinDataSource : public ::protozero::Message { bool, TraceConfig_BuiltinDataSource>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_DisableServiceEvents kDisableServiceEvents() { return {}; } + static constexpr FieldMetadata_DisableServiceEvents kDisableServiceEvents{}; void set_disable_service_events(bool value) { static constexpr uint32_t field_id = FieldMetadata_DisableServiceEvents::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -37421,14 +41600,7 @@ class TraceConfig_BuiltinDataSource : public ::protozero::Message { ::perfetto::protos::pbzero::BuiltinClock, TraceConfig_BuiltinDataSource>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_PrimaryTraceClock kPrimaryTraceClock() { return {}; } + static constexpr FieldMetadata_PrimaryTraceClock kPrimaryTraceClock{}; void set_primary_trace_clock(::perfetto::protos::pbzero::BuiltinClock value) { static constexpr uint32_t field_id = FieldMetadata_PrimaryTraceClock::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -37446,14 +41618,7 @@ class TraceConfig_BuiltinDataSource : public ::protozero::Message { uint32_t, TraceConfig_BuiltinDataSource>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_SnapshotIntervalMs kSnapshotIntervalMs() { return {}; } + static constexpr FieldMetadata_SnapshotIntervalMs kSnapshotIntervalMs{}; void set_snapshot_interval_ms(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_SnapshotIntervalMs::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -37471,14 +41636,7 @@ class TraceConfig_BuiltinDataSource : public ::protozero::Message { bool, TraceConfig_BuiltinDataSource>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_PreferSuspendClockForSnapshot kPreferSuspendClockForSnapshot() { return {}; } + static constexpr FieldMetadata_PreferSuspendClockForSnapshot kPreferSuspendClockForSnapshot{}; void set_prefer_suspend_clock_for_snapshot(bool value) { static constexpr uint32_t field_id = FieldMetadata_PreferSuspendClockForSnapshot::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -37487,6 +41645,24 @@ class TraceConfig_BuiltinDataSource : public ::protozero::Message { ::protozero::proto_utils::ProtoSchemaType::kBool> ::Append(*this, field_id, value); } + + using FieldMetadata_DisableChunkUsageHistograms = + ::protozero::proto_utils::FieldMetadata< + 8, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kBool, + bool, + TraceConfig_BuiltinDataSource>; + + static constexpr FieldMetadata_DisableChunkUsageHistograms kDisableChunkUsageHistograms{}; + void set_disable_chunk_usage_histograms(bool value) { + static constexpr uint32_t field_id = FieldMetadata_DisableChunkUsageHistograms::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kBool> + ::Append(*this, field_id, value); + } }; class TraceConfig_DataSource_Decoder : public ::protozero::TypedProtoDecoder { @@ -37521,14 +41697,7 @@ class TraceConfig_DataSource : public ::protozero::Message { DataSourceConfig, TraceConfig_DataSource>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Config kConfig() { return {}; } + static constexpr FieldMetadata_Config kConfig{}; template T* set_config() { return BeginNestedMessage(1); } @@ -37542,17 +41711,13 @@ class TraceConfig_DataSource : public ::protozero::Message { std::string, TraceConfig_DataSource>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ProducerNameFilter kProducerNameFilter() { return {}; } + static constexpr FieldMetadata_ProducerNameFilter kProducerNameFilter{}; void add_producer_name_filter(const char* data, size_t size) { AppendBytes(FieldMetadata_ProducerNameFilter::kFieldId, data, size); } + void add_producer_name_filter(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_ProducerNameFilter::kFieldId, chars.data, chars.size); + } void add_producer_name_filter(std::string value) { static constexpr uint32_t field_id = FieldMetadata_ProducerNameFilter::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -37570,17 +41735,13 @@ class TraceConfig_DataSource : public ::protozero::Message { std::string, TraceConfig_DataSource>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ProducerNameRegexFilter kProducerNameRegexFilter() { return {}; } + static constexpr FieldMetadata_ProducerNameRegexFilter kProducerNameRegexFilter{}; void add_producer_name_regex_filter(const char* data, size_t size) { AppendBytes(FieldMetadata_ProducerNameRegexFilter::kFieldId, data, size); } + void add_producer_name_regex_filter(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_ProducerNameRegexFilter::kFieldId, chars.data, chars.size); + } void add_producer_name_regex_filter(std::string value) { static constexpr uint32_t field_id = FieldMetadata_ProducerNameRegexFilter::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -37611,10 +41772,14 @@ class TraceConfig_BufferConfig : public ::protozero::Message { }; static constexpr const char* GetName() { return ".perfetto.protos.TraceConfig.BufferConfig"; } + using FillPolicy = ::perfetto::protos::pbzero::TraceConfig_BufferConfig_FillPolicy; - static const FillPolicy UNSPECIFIED = TraceConfig_BufferConfig_FillPolicy_UNSPECIFIED; - static const FillPolicy RING_BUFFER = TraceConfig_BufferConfig_FillPolicy_RING_BUFFER; - static const FillPolicy DISCARD = TraceConfig_BufferConfig_FillPolicy_DISCARD; + static inline const char* FillPolicy_Name(FillPolicy value) { + return ::perfetto::protos::pbzero::TraceConfig_BufferConfig_FillPolicy_Name(value); + } + static const FillPolicy UNSPECIFIED = FillPolicy::UNSPECIFIED; + static const FillPolicy RING_BUFFER = FillPolicy::RING_BUFFER; + static const FillPolicy DISCARD = FillPolicy::DISCARD; using FieldMetadata_SizeKb = ::protozero::proto_utils::FieldMetadata< @@ -37624,14 +41789,7 @@ class TraceConfig_BufferConfig : public ::protozero::Message { uint32_t, TraceConfig_BufferConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_SizeKb kSizeKb() { return {}; } + static constexpr FieldMetadata_SizeKb kSizeKb{}; void set_size_kb(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_SizeKb::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -37649,14 +41807,7 @@ class TraceConfig_BufferConfig : public ::protozero::Message { ::perfetto::protos::pbzero::TraceConfig_BufferConfig_FillPolicy, TraceConfig_BufferConfig>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_FillPolicy kFillPolicy() { return {}; } + static constexpr FieldMetadata_FillPolicy kFillPolicy{}; void set_fill_policy(::perfetto::protos::pbzero::TraceConfig_BufferConfig_FillPolicy value) { static constexpr uint32_t field_id = FieldMetadata_FillPolicy::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -37693,19 +41844,54 @@ namespace pbzero { class ClockSnapshot_Clock; enum BuiltinClock : int32_t; -enum ClockSnapshot_Clock_BuiltinClocks : int32_t { - ClockSnapshot_Clock_BuiltinClocks_UNKNOWN = 0, - ClockSnapshot_Clock_BuiltinClocks_REALTIME = 1, - ClockSnapshot_Clock_BuiltinClocks_REALTIME_COARSE = 2, - ClockSnapshot_Clock_BuiltinClocks_MONOTONIC = 3, - ClockSnapshot_Clock_BuiltinClocks_MONOTONIC_COARSE = 4, - ClockSnapshot_Clock_BuiltinClocks_MONOTONIC_RAW = 5, - ClockSnapshot_Clock_BuiltinClocks_BOOTTIME = 6, - ClockSnapshot_Clock_BuiltinClocks_BUILTIN_CLOCK_MAX_ID = 63, +namespace perfetto_pbzero_enum_ClockSnapshot_Clock { +enum BuiltinClocks : int32_t { + UNKNOWN = 0, + REALTIME = 1, + REALTIME_COARSE = 2, + MONOTONIC = 3, + MONOTONIC_COARSE = 4, + MONOTONIC_RAW = 5, + BOOTTIME = 6, + BUILTIN_CLOCK_MAX_ID = 63, }; +} // namespace perfetto_pbzero_enum_ClockSnapshot_Clock +using ClockSnapshot_Clock_BuiltinClocks = perfetto_pbzero_enum_ClockSnapshot_Clock::BuiltinClocks; -const ClockSnapshot_Clock_BuiltinClocks ClockSnapshot_Clock_BuiltinClocks_MIN = ClockSnapshot_Clock_BuiltinClocks_UNKNOWN; -const ClockSnapshot_Clock_BuiltinClocks ClockSnapshot_Clock_BuiltinClocks_MAX = ClockSnapshot_Clock_BuiltinClocks_BUILTIN_CLOCK_MAX_ID; + +constexpr ClockSnapshot_Clock_BuiltinClocks ClockSnapshot_Clock_BuiltinClocks_MIN = ClockSnapshot_Clock_BuiltinClocks::UNKNOWN; +constexpr ClockSnapshot_Clock_BuiltinClocks ClockSnapshot_Clock_BuiltinClocks_MAX = ClockSnapshot_Clock_BuiltinClocks::BUILTIN_CLOCK_MAX_ID; + + +PERFETTO_PROTOZERO_CONSTEXPR14_OR_INLINE +const char* ClockSnapshot_Clock_BuiltinClocks_Name(::perfetto::protos::pbzero::ClockSnapshot_Clock_BuiltinClocks value) { + switch (value) { + case ::perfetto::protos::pbzero::ClockSnapshot_Clock_BuiltinClocks::UNKNOWN: + return "UNKNOWN"; + + case ::perfetto::protos::pbzero::ClockSnapshot_Clock_BuiltinClocks::REALTIME: + return "REALTIME"; + + case ::perfetto::protos::pbzero::ClockSnapshot_Clock_BuiltinClocks::REALTIME_COARSE: + return "REALTIME_COARSE"; + + case ::perfetto::protos::pbzero::ClockSnapshot_Clock_BuiltinClocks::MONOTONIC: + return "MONOTONIC"; + + case ::perfetto::protos::pbzero::ClockSnapshot_Clock_BuiltinClocks::MONOTONIC_COARSE: + return "MONOTONIC_COARSE"; + + case ::perfetto::protos::pbzero::ClockSnapshot_Clock_BuiltinClocks::MONOTONIC_RAW: + return "MONOTONIC_RAW"; + + case ::perfetto::protos::pbzero::ClockSnapshot_Clock_BuiltinClocks::BOOTTIME: + return "BOOTTIME"; + + case ::perfetto::protos::pbzero::ClockSnapshot_Clock_BuiltinClocks::BUILTIN_CLOCK_MAX_ID: + return "BUILTIN_CLOCK_MAX_ID"; + } + return "PBZERO_UNKNOWN_ENUM_VALUE"; +} class ClockSnapshot_Decoder : public ::protozero::TypedProtoDecoder { public: @@ -37737,14 +41923,7 @@ class ClockSnapshot : public ::protozero::Message { ClockSnapshot_Clock, ClockSnapshot>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Clocks kClocks() { return {}; } + static constexpr FieldMetadata_Clocks kClocks{}; template T* add_clocks() { return BeginNestedMessage(1); } @@ -37758,14 +41937,7 @@ class ClockSnapshot : public ::protozero::Message { ::perfetto::protos::pbzero::BuiltinClock, ClockSnapshot>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_PrimaryTraceClock kPrimaryTraceClock() { return {}; } + static constexpr FieldMetadata_PrimaryTraceClock kPrimaryTraceClock{}; void set_primary_trace_clock(::perfetto::protos::pbzero::BuiltinClock value) { static constexpr uint32_t field_id = FieldMetadata_PrimaryTraceClock::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -37802,15 +41974,19 @@ class ClockSnapshot_Clock : public ::protozero::Message { }; static constexpr const char* GetName() { return ".perfetto.protos.ClockSnapshot.Clock"; } + using BuiltinClocks = ::perfetto::protos::pbzero::ClockSnapshot_Clock_BuiltinClocks; - static const BuiltinClocks UNKNOWN = ClockSnapshot_Clock_BuiltinClocks_UNKNOWN; - static const BuiltinClocks REALTIME = ClockSnapshot_Clock_BuiltinClocks_REALTIME; - static const BuiltinClocks REALTIME_COARSE = ClockSnapshot_Clock_BuiltinClocks_REALTIME_COARSE; - static const BuiltinClocks MONOTONIC = ClockSnapshot_Clock_BuiltinClocks_MONOTONIC; - static const BuiltinClocks MONOTONIC_COARSE = ClockSnapshot_Clock_BuiltinClocks_MONOTONIC_COARSE; - static const BuiltinClocks MONOTONIC_RAW = ClockSnapshot_Clock_BuiltinClocks_MONOTONIC_RAW; - static const BuiltinClocks BOOTTIME = ClockSnapshot_Clock_BuiltinClocks_BOOTTIME; - static const BuiltinClocks BUILTIN_CLOCK_MAX_ID = ClockSnapshot_Clock_BuiltinClocks_BUILTIN_CLOCK_MAX_ID; + static inline const char* BuiltinClocks_Name(BuiltinClocks value) { + return ::perfetto::protos::pbzero::ClockSnapshot_Clock_BuiltinClocks_Name(value); + } + static const BuiltinClocks UNKNOWN = BuiltinClocks::UNKNOWN; + static const BuiltinClocks REALTIME = BuiltinClocks::REALTIME; + static const BuiltinClocks REALTIME_COARSE = BuiltinClocks::REALTIME_COARSE; + static const BuiltinClocks MONOTONIC = BuiltinClocks::MONOTONIC; + static const BuiltinClocks MONOTONIC_COARSE = BuiltinClocks::MONOTONIC_COARSE; + static const BuiltinClocks MONOTONIC_RAW = BuiltinClocks::MONOTONIC_RAW; + static const BuiltinClocks BOOTTIME = BuiltinClocks::BOOTTIME; + static const BuiltinClocks BUILTIN_CLOCK_MAX_ID = BuiltinClocks::BUILTIN_CLOCK_MAX_ID; using FieldMetadata_ClockId = ::protozero::proto_utils::FieldMetadata< @@ -37820,14 +41996,7 @@ class ClockSnapshot_Clock : public ::protozero::Message { uint32_t, ClockSnapshot_Clock>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ClockId kClockId() { return {}; } + static constexpr FieldMetadata_ClockId kClockId{}; void set_clock_id(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_ClockId::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -37845,14 +42014,7 @@ class ClockSnapshot_Clock : public ::protozero::Message { uint64_t, ClockSnapshot_Clock>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Timestamp kTimestamp() { return {}; } + static constexpr FieldMetadata_Timestamp kTimestamp{}; void set_timestamp(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Timestamp::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -37870,14 +42032,7 @@ class ClockSnapshot_Clock : public ::protozero::Message { bool, ClockSnapshot_Clock>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_IsIncremental kIsIncremental() { return {}; } + static constexpr FieldMetadata_IsIncremental kIsIncremental{}; void set_is_incremental(bool value) { static constexpr uint32_t field_id = FieldMetadata_IsIncremental::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -37895,14 +42050,7 @@ class ClockSnapshot_Clock : public ::protozero::Message { uint64_t, ClockSnapshot_Clock>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_UnitMultiplierNs kUnitMultiplierNs() { return {}; } + static constexpr FieldMetadata_UnitMultiplierNs kUnitMultiplierNs{}; void set_unit_multiplier_ns(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_UnitMultiplierNs::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -37913,6 +42061,88 @@ class ClockSnapshot_Clock : public ::protozero::Message { } }; +} // Namespace. +} // Namespace. +} // Namespace. +#endif // Include guard. +// gen_amalgamated begin header: gen/protos/perfetto/trace/trace_uuid.pbzero.h +// Autogenerated by the ProtoZero compiler plugin. DO NOT EDIT. + +#ifndef PERFETTO_PROTOS_PROTOS_PERFETTO_TRACE_TRACE_UUID_PROTO_H_ +#define PERFETTO_PROTOS_PROTOS_PERFETTO_TRACE_TRACE_UUID_PROTO_H_ + +#include +#include + +// gen_amalgamated expanded: #include "perfetto/protozero/field_writer.h" +// gen_amalgamated expanded: #include "perfetto/protozero/message.h" +// gen_amalgamated expanded: #include "perfetto/protozero/packed_repeated_fields.h" +// gen_amalgamated expanded: #include "perfetto/protozero/proto_decoder.h" +// gen_amalgamated expanded: #include "perfetto/protozero/proto_utils.h" + +namespace perfetto { +namespace protos { +namespace pbzero { + + +class TraceUuid_Decoder : public ::protozero::TypedProtoDecoder { + public: + TraceUuid_Decoder(const uint8_t* data, size_t len) : TypedProtoDecoder(data, len) {} + explicit TraceUuid_Decoder(const std::string& raw) : TypedProtoDecoder(reinterpret_cast(raw.data()), raw.size()) {} + explicit TraceUuid_Decoder(const ::protozero::ConstBytes& raw) : TypedProtoDecoder(raw.data, raw.size) {} + bool has_msb() const { return at<1>().valid(); } + int64_t msb() const { return at<1>().as_int64(); } + bool has_lsb() const { return at<2>().valid(); } + int64_t lsb() const { return at<2>().as_int64(); } +}; + +class TraceUuid : public ::protozero::Message { + public: + using Decoder = TraceUuid_Decoder; + enum : int32_t { + kMsbFieldNumber = 1, + kLsbFieldNumber = 2, + }; + static constexpr const char* GetName() { return ".perfetto.protos.TraceUuid"; } + + + using FieldMetadata_Msb = + ::protozero::proto_utils::FieldMetadata< + 1, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kInt64, + int64_t, + TraceUuid>; + + static constexpr FieldMetadata_Msb kMsb{}; + void set_msb(int64_t value) { + static constexpr uint32_t field_id = FieldMetadata_Msb::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kInt64> + ::Append(*this, field_id, value); + } + + using FieldMetadata_Lsb = + ::protozero::proto_utils::FieldMetadata< + 2, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kInt64, + int64_t, + TraceUuid>; + + static constexpr FieldMetadata_Lsb kLsb{}; + void set_lsb(int64_t value) { + static constexpr uint32_t field_id = FieldMetadata_Lsb::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kInt64> + ::Append(*this, field_id, value); + } +}; + } // Namespace. } // Namespace. } // Namespace. @@ -37969,17 +42199,13 @@ class Trigger : public ::protozero::Message { std::string, Trigger>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_TriggerName kTriggerName() { return {}; } + static constexpr FieldMetadata_TriggerName kTriggerName{}; void set_trigger_name(const char* data, size_t size) { AppendBytes(FieldMetadata_TriggerName::kFieldId, data, size); } + void set_trigger_name(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_TriggerName::kFieldId, chars.data, chars.size); + } void set_trigger_name(std::string value) { static constexpr uint32_t field_id = FieldMetadata_TriggerName::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -37997,17 +42223,13 @@ class Trigger : public ::protozero::Message { std::string, Trigger>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ProducerName kProducerName() { return {}; } + static constexpr FieldMetadata_ProducerName kProducerName{}; void set_producer_name(const char* data, size_t size) { AppendBytes(FieldMetadata_ProducerName::kFieldId, data, size); } + void set_producer_name(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_ProducerName::kFieldId, chars.data, chars.size); + } void set_producer_name(std::string value) { static constexpr uint32_t field_id = FieldMetadata_ProducerName::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -38025,14 +42247,7 @@ class Trigger : public ::protozero::Message { int32_t, Trigger>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_TrustedProducerUid kTrustedProducerUid() { return {}; } + static constexpr FieldMetadata_TrustedProducerUid kTrustedProducerUid{}; void set_trusted_producer_uid(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_TrustedProducerUid::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -38068,7 +42283,7 @@ namespace pbzero { class Utsname; -class SystemInfo_Decoder : public ::protozero::TypedProtoDecoder { +class SystemInfo_Decoder : public ::protozero::TypedProtoDecoder { public: SystemInfo_Decoder(const uint8_t* data, size_t len) : TypedProtoDecoder(data, len) {} explicit SystemInfo_Decoder(const std::string& raw) : TypedProtoDecoder(reinterpret_cast(raw.data()), raw.size()) {} @@ -38083,6 +42298,8 @@ class SystemInfo_Decoder : public ::protozero::TypedProtoDecoder().as_string(); } bool has_android_sdk_version() const { return at<5>().valid(); } uint64_t android_sdk_version() const { return at<5>().as_uint64(); } + bool has_page_size() const { return at<6>().valid(); } + uint32_t page_size() const { return at<6>().as_uint32(); } }; class SystemInfo : public ::protozero::Message { @@ -38094,6 +42311,7 @@ class SystemInfo : public ::protozero::Message { kHzFieldNumber = 3, kTracingServiceVersionFieldNumber = 4, kAndroidSdkVersionFieldNumber = 5, + kPageSizeFieldNumber = 6, }; static constexpr const char* GetName() { return ".perfetto.protos.SystemInfo"; } @@ -38106,14 +42324,7 @@ class SystemInfo : public ::protozero::Message { Utsname, SystemInfo>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Utsname kUtsname() { return {}; } + static constexpr FieldMetadata_Utsname kUtsname{}; template T* set_utsname() { return BeginNestedMessage(1); } @@ -38127,17 +42338,13 @@ class SystemInfo : public ::protozero::Message { std::string, SystemInfo>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_AndroidBuildFingerprint kAndroidBuildFingerprint() { return {}; } + static constexpr FieldMetadata_AndroidBuildFingerprint kAndroidBuildFingerprint{}; void set_android_build_fingerprint(const char* data, size_t size) { AppendBytes(FieldMetadata_AndroidBuildFingerprint::kFieldId, data, size); } + void set_android_build_fingerprint(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_AndroidBuildFingerprint::kFieldId, chars.data, chars.size); + } void set_android_build_fingerprint(std::string value) { static constexpr uint32_t field_id = FieldMetadata_AndroidBuildFingerprint::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -38155,14 +42362,7 @@ class SystemInfo : public ::protozero::Message { int64_t, SystemInfo>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Hz kHz() { return {}; } + static constexpr FieldMetadata_Hz kHz{}; void set_hz(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_Hz::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -38180,17 +42380,13 @@ class SystemInfo : public ::protozero::Message { std::string, SystemInfo>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_TracingServiceVersion kTracingServiceVersion() { return {}; } + static constexpr FieldMetadata_TracingServiceVersion kTracingServiceVersion{}; void set_tracing_service_version(const char* data, size_t size) { AppendBytes(FieldMetadata_TracingServiceVersion::kFieldId, data, size); } + void set_tracing_service_version(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_TracingServiceVersion::kFieldId, chars.data, chars.size); + } void set_tracing_service_version(std::string value) { static constexpr uint32_t field_id = FieldMetadata_TracingServiceVersion::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -38208,14 +42404,7 @@ class SystemInfo : public ::protozero::Message { uint64_t, SystemInfo>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_AndroidSdkVersion kAndroidSdkVersion() { return {}; } + static constexpr FieldMetadata_AndroidSdkVersion kAndroidSdkVersion{}; void set_android_sdk_version(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_AndroidSdkVersion::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -38224,6 +42413,24 @@ class SystemInfo : public ::protozero::Message { ::protozero::proto_utils::ProtoSchemaType::kUint64> ::Append(*this, field_id, value); } + + using FieldMetadata_PageSize = + ::protozero::proto_utils::FieldMetadata< + 6, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint32, + uint32_t, + SystemInfo>; + + static constexpr FieldMetadata_PageSize kPageSize{}; + void set_page_size(uint32_t value) { + static constexpr uint32_t field_id = FieldMetadata_PageSize::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint32> + ::Append(*this, field_id, value); + } }; class Utsname_Decoder : public ::protozero::TypedProtoDecoder { @@ -38261,17 +42468,13 @@ class Utsname : public ::protozero::Message { std::string, Utsname>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Sysname kSysname() { return {}; } + static constexpr FieldMetadata_Sysname kSysname{}; void set_sysname(const char* data, size_t size) { AppendBytes(FieldMetadata_Sysname::kFieldId, data, size); } + void set_sysname(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Sysname::kFieldId, chars.data, chars.size); + } void set_sysname(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Sysname::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -38289,17 +42492,13 @@ class Utsname : public ::protozero::Message { std::string, Utsname>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Version kVersion() { return {}; } + static constexpr FieldMetadata_Version kVersion{}; void set_version(const char* data, size_t size) { AppendBytes(FieldMetadata_Version::kFieldId, data, size); } + void set_version(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Version::kFieldId, chars.data, chars.size); + } void set_version(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Version::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -38317,17 +42516,13 @@ class Utsname : public ::protozero::Message { std::string, Utsname>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Release kRelease() { return {}; } + static constexpr FieldMetadata_Release kRelease{}; void set_release(const char* data, size_t size) { AppendBytes(FieldMetadata_Release::kFieldId, data, size); } + void set_release(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Release::kFieldId, chars.data, chars.size); + } void set_release(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Release::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -38345,17 +42540,13 @@ class Utsname : public ::protozero::Message { std::string, Utsname>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Machine kMachine() { return {}; } + static constexpr FieldMetadata_Machine kMachine{}; void set_machine(const char* data, size_t size) { AppendBytes(FieldMetadata_Machine::kFieldId, data, size); } + void set_machine(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Machine::kFieldId, chars.data, chars.size); + } void set_machine(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Machine::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -38426,14 +42617,7 @@ class AndroidGameInterventionList : public ::protozero::Message { AndroidGameInterventionList_GamePackageInfo, AndroidGameInterventionList>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_GamePackages kGamePackages() { return {}; } + static constexpr FieldMetadata_GamePackages kGamePackages{}; template T* add_game_packages() { return BeginNestedMessage(1); } @@ -38447,14 +42631,7 @@ class AndroidGameInterventionList : public ::protozero::Message { bool, AndroidGameInterventionList>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ParseError kParseError() { return {}; } + static constexpr FieldMetadata_ParseError kParseError{}; void set_parse_error(bool value) { static constexpr uint32_t field_id = FieldMetadata_ParseError::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -38472,14 +42649,7 @@ class AndroidGameInterventionList : public ::protozero::Message { bool, AndroidGameInterventionList>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ReadError kReadError() { return {}; } + static constexpr FieldMetadata_ReadError kReadError{}; void set_read_error(bool value) { static constexpr uint32_t field_id = FieldMetadata_ReadError::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -38525,17 +42695,13 @@ class AndroidGameInterventionList_GamePackageInfo : public ::protozero::Message std::string, AndroidGameInterventionList_GamePackageInfo>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Name kName() { return {}; } + static constexpr FieldMetadata_Name kName{}; void set_name(const char* data, size_t size) { AppendBytes(FieldMetadata_Name::kFieldId, data, size); } + void set_name(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Name::kFieldId, chars.data, chars.size); + } void set_name(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Name::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -38553,14 +42719,7 @@ class AndroidGameInterventionList_GamePackageInfo : public ::protozero::Message uint64_t, AndroidGameInterventionList_GamePackageInfo>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Uid kUid() { return {}; } + static constexpr FieldMetadata_Uid kUid{}; void set_uid(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Uid::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -38578,14 +42737,7 @@ class AndroidGameInterventionList_GamePackageInfo : public ::protozero::Message uint32_t, AndroidGameInterventionList_GamePackageInfo>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_CurrentMode kCurrentMode() { return {}; } + static constexpr FieldMetadata_CurrentMode kCurrentMode{}; void set_current_mode(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_CurrentMode::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -38603,14 +42755,7 @@ class AndroidGameInterventionList_GamePackageInfo : public ::protozero::Message AndroidGameInterventionList_GameModeInfo, AndroidGameInterventionList_GamePackageInfo>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_GameModeInfo kGameModeInfo() { return {}; } + static constexpr FieldMetadata_GameModeInfo kGameModeInfo{}; template T* add_game_mode_info() { return BeginNestedMessage(4); } @@ -38652,14 +42797,7 @@ class AndroidGameInterventionList_GameModeInfo : public ::protozero::Message { uint32_t, AndroidGameInterventionList_GameModeInfo>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Mode kMode() { return {}; } + static constexpr FieldMetadata_Mode kMode{}; void set_mode(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Mode::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -38677,14 +42815,7 @@ class AndroidGameInterventionList_GameModeInfo : public ::protozero::Message { bool, AndroidGameInterventionList_GameModeInfo>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_UseAngle kUseAngle() { return {}; } + static constexpr FieldMetadata_UseAngle kUseAngle{}; void set_use_angle(bool value) { static constexpr uint32_t field_id = FieldMetadata_UseAngle::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -38702,14 +42833,7 @@ class AndroidGameInterventionList_GameModeInfo : public ::protozero::Message { float, AndroidGameInterventionList_GameModeInfo>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ResolutionDownscale kResolutionDownscale() { return {}; } + static constexpr FieldMetadata_ResolutionDownscale kResolutionDownscale{}; void set_resolution_downscale(float value) { static constexpr uint32_t field_id = FieldMetadata_ResolutionDownscale::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -38727,14 +42851,7 @@ class AndroidGameInterventionList_GameModeInfo : public ::protozero::Message { float, AndroidGameInterventionList_GameModeInfo>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Fps kFps() { return {}; } + static constexpr FieldMetadata_Fps kFps{}; void set_fps(float value) { static constexpr uint32_t field_id = FieldMetadata_Fps::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -38805,14 +42922,7 @@ class AndroidLogPacket : public ::protozero::Message { AndroidLogPacket_LogEvent, AndroidLogPacket>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Events kEvents() { return {}; } + static constexpr FieldMetadata_Events kEvents{}; template T* add_events() { return BeginNestedMessage(1); } @@ -38826,14 +42936,7 @@ class AndroidLogPacket : public ::protozero::Message { AndroidLogPacket_Stats, AndroidLogPacket>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Stats kStats() { return {}; } + static constexpr FieldMetadata_Stats kStats{}; template T* set_stats() { return BeginNestedMessage(2); } @@ -38872,14 +42975,7 @@ class AndroidLogPacket_Stats : public ::protozero::Message { uint64_t, AndroidLogPacket_Stats>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_NumTotal kNumTotal() { return {}; } + static constexpr FieldMetadata_NumTotal kNumTotal{}; void set_num_total(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_NumTotal::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -38897,14 +42993,7 @@ class AndroidLogPacket_Stats : public ::protozero::Message { uint64_t, AndroidLogPacket_Stats>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_NumFailed kNumFailed() { return {}; } + static constexpr FieldMetadata_NumFailed kNumFailed{}; void set_num_failed(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_NumFailed::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -38922,14 +43011,7 @@ class AndroidLogPacket_Stats : public ::protozero::Message { uint64_t, AndroidLogPacket_Stats>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_NumSkipped kNumSkipped() { return {}; } + static constexpr FieldMetadata_NumSkipped kNumSkipped{}; void set_num_skipped(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_NumSkipped::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -38991,14 +43073,7 @@ class AndroidLogPacket_LogEvent : public ::protozero::Message { ::perfetto::protos::pbzero::AndroidLogId, AndroidLogPacket_LogEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_LogId kLogId() { return {}; } + static constexpr FieldMetadata_LogId kLogId{}; void set_log_id(::perfetto::protos::pbzero::AndroidLogId value) { static constexpr uint32_t field_id = FieldMetadata_LogId::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -39016,14 +43091,7 @@ class AndroidLogPacket_LogEvent : public ::protozero::Message { int32_t, AndroidLogPacket_LogEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Pid kPid() { return {}; } + static constexpr FieldMetadata_Pid kPid{}; void set_pid(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Pid::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -39041,14 +43109,7 @@ class AndroidLogPacket_LogEvent : public ::protozero::Message { int32_t, AndroidLogPacket_LogEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Tid kTid() { return {}; } + static constexpr FieldMetadata_Tid kTid{}; void set_tid(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Tid::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -39066,14 +43127,7 @@ class AndroidLogPacket_LogEvent : public ::protozero::Message { int32_t, AndroidLogPacket_LogEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Uid kUid() { return {}; } + static constexpr FieldMetadata_Uid kUid{}; void set_uid(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Uid::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -39091,14 +43145,7 @@ class AndroidLogPacket_LogEvent : public ::protozero::Message { uint64_t, AndroidLogPacket_LogEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Timestamp kTimestamp() { return {}; } + static constexpr FieldMetadata_Timestamp kTimestamp{}; void set_timestamp(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Timestamp::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -39116,17 +43163,13 @@ class AndroidLogPacket_LogEvent : public ::protozero::Message { std::string, AndroidLogPacket_LogEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Tag kTag() { return {}; } + static constexpr FieldMetadata_Tag kTag{}; void set_tag(const char* data, size_t size) { AppendBytes(FieldMetadata_Tag::kFieldId, data, size); } + void set_tag(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Tag::kFieldId, chars.data, chars.size); + } void set_tag(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Tag::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -39144,14 +43187,7 @@ class AndroidLogPacket_LogEvent : public ::protozero::Message { ::perfetto::protos::pbzero::AndroidLogPriority, AndroidLogPacket_LogEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Prio kPrio() { return {}; } + static constexpr FieldMetadata_Prio kPrio{}; void set_prio(::perfetto::protos::pbzero::AndroidLogPriority value) { static constexpr uint32_t field_id = FieldMetadata_Prio::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -39169,17 +43205,13 @@ class AndroidLogPacket_LogEvent : public ::protozero::Message { std::string, AndroidLogPacket_LogEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Message kMessage() { return {}; } + static constexpr FieldMetadata_Message kMessage{}; void set_message(const char* data, size_t size) { AppendBytes(FieldMetadata_Message::kFieldId, data, size); } + void set_message(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Message::kFieldId, chars.data, chars.size); + } void set_message(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Message::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -39197,14 +43229,7 @@ class AndroidLogPacket_LogEvent : public ::protozero::Message { AndroidLogPacket_LogEvent_Arg, AndroidLogPacket_LogEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Args kArgs() { return {}; } + static constexpr FieldMetadata_Args kArgs{}; template T* add_args() { return BeginNestedMessage(9); } @@ -39246,17 +43271,13 @@ class AndroidLogPacket_LogEvent_Arg : public ::protozero::Message { std::string, AndroidLogPacket_LogEvent_Arg>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Name kName() { return {}; } + static constexpr FieldMetadata_Name kName{}; void set_name(const char* data, size_t size) { AppendBytes(FieldMetadata_Name::kFieldId, data, size); } + void set_name(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Name::kFieldId, chars.data, chars.size); + } void set_name(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Name::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -39274,14 +43295,7 @@ class AndroidLogPacket_LogEvent_Arg : public ::protozero::Message { int64_t, AndroidLogPacket_LogEvent_Arg>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_IntValue kIntValue() { return {}; } + static constexpr FieldMetadata_IntValue kIntValue{}; void set_int_value(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_IntValue::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -39299,14 +43313,7 @@ class AndroidLogPacket_LogEvent_Arg : public ::protozero::Message { float, AndroidLogPacket_LogEvent_Arg>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_FloatValue kFloatValue() { return {}; } + static constexpr FieldMetadata_FloatValue kFloatValue{}; void set_float_value(float value) { static constexpr uint32_t field_id = FieldMetadata_FloatValue::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -39324,17 +43331,13 @@ class AndroidLogPacket_LogEvent_Arg : public ::protozero::Message { std::string, AndroidLogPacket_LogEvent_Arg>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_StringValue kStringValue() { return {}; } + static constexpr FieldMetadata_StringValue kStringValue{}; void set_string_value(const char* data, size_t size) { AppendBytes(FieldMetadata_StringValue::kFieldId, data, size); } + void set_string_value(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_StringValue::kFieldId, chars.data, chars.size); + } void set_string_value(std::string value) { static constexpr uint32_t field_id = FieldMetadata_StringValue::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -39345,6 +43348,135 @@ class AndroidLogPacket_LogEvent_Arg : public ::protozero::Message { } }; +} // Namespace. +} // Namespace. +} // Namespace. +#endif // Include guard. +// gen_amalgamated begin header: gen/protos/perfetto/trace/android/android_system_property.pbzero.h +// Autogenerated by the ProtoZero compiler plugin. DO NOT EDIT. + +#ifndef PERFETTO_PROTOS_PROTOS_PERFETTO_TRACE_ANDROID_ANDROID_SYSTEM_PROPERTY_PROTO_H_ +#define PERFETTO_PROTOS_PROTOS_PERFETTO_TRACE_ANDROID_ANDROID_SYSTEM_PROPERTY_PROTO_H_ + +#include +#include + +// gen_amalgamated expanded: #include "perfetto/protozero/field_writer.h" +// gen_amalgamated expanded: #include "perfetto/protozero/message.h" +// gen_amalgamated expanded: #include "perfetto/protozero/packed_repeated_fields.h" +// gen_amalgamated expanded: #include "perfetto/protozero/proto_decoder.h" +// gen_amalgamated expanded: #include "perfetto/protozero/proto_utils.h" + +namespace perfetto { +namespace protos { +namespace pbzero { + +class AndroidSystemProperty_PropertyValue; + +class AndroidSystemProperty_Decoder : public ::protozero::TypedProtoDecoder { + public: + AndroidSystemProperty_Decoder(const uint8_t* data, size_t len) : TypedProtoDecoder(data, len) {} + explicit AndroidSystemProperty_Decoder(const std::string& raw) : TypedProtoDecoder(reinterpret_cast(raw.data()), raw.size()) {} + explicit AndroidSystemProperty_Decoder(const ::protozero::ConstBytes& raw) : TypedProtoDecoder(raw.data, raw.size) {} + bool has_values() const { return at<1>().valid(); } + ::protozero::RepeatedFieldIterator<::protozero::ConstBytes> values() const { return GetRepeated<::protozero::ConstBytes>(1); } +}; + +class AndroidSystemProperty : public ::protozero::Message { + public: + using Decoder = AndroidSystemProperty_Decoder; + enum : int32_t { + kValuesFieldNumber = 1, + }; + static constexpr const char* GetName() { return ".perfetto.protos.AndroidSystemProperty"; } + + using PropertyValue = ::perfetto::protos::pbzero::AndroidSystemProperty_PropertyValue; + + using FieldMetadata_Values = + ::protozero::proto_utils::FieldMetadata< + 1, + ::protozero::proto_utils::RepetitionType::kRepeatedNotPacked, + ::protozero::proto_utils::ProtoSchemaType::kMessage, + AndroidSystemProperty_PropertyValue, + AndroidSystemProperty>; + + static constexpr FieldMetadata_Values kValues{}; + template T* add_values() { + return BeginNestedMessage(1); + } + +}; + +class AndroidSystemProperty_PropertyValue_Decoder : public ::protozero::TypedProtoDecoder { + public: + AndroidSystemProperty_PropertyValue_Decoder(const uint8_t* data, size_t len) : TypedProtoDecoder(data, len) {} + explicit AndroidSystemProperty_PropertyValue_Decoder(const std::string& raw) : TypedProtoDecoder(reinterpret_cast(raw.data()), raw.size()) {} + explicit AndroidSystemProperty_PropertyValue_Decoder(const ::protozero::ConstBytes& raw) : TypedProtoDecoder(raw.data, raw.size) {} + bool has_name() const { return at<1>().valid(); } + ::protozero::ConstChars name() const { return at<1>().as_string(); } + bool has_value() const { return at<2>().valid(); } + ::protozero::ConstChars value() const { return at<2>().as_string(); } +}; + +class AndroidSystemProperty_PropertyValue : public ::protozero::Message { + public: + using Decoder = AndroidSystemProperty_PropertyValue_Decoder; + enum : int32_t { + kNameFieldNumber = 1, + kValueFieldNumber = 2, + }; + static constexpr const char* GetName() { return ".perfetto.protos.AndroidSystemProperty.PropertyValue"; } + + + using FieldMetadata_Name = + ::protozero::proto_utils::FieldMetadata< + 1, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kString, + std::string, + AndroidSystemProperty_PropertyValue>; + + static constexpr FieldMetadata_Name kName{}; + void set_name(const char* data, size_t size) { + AppendBytes(FieldMetadata_Name::kFieldId, data, size); + } + void set_name(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Name::kFieldId, chars.data, chars.size); + } + void set_name(std::string value) { + static constexpr uint32_t field_id = FieldMetadata_Name::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kString> + ::Append(*this, field_id, value); + } + + using FieldMetadata_Value = + ::protozero::proto_utils::FieldMetadata< + 2, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kString, + std::string, + AndroidSystemProperty_PropertyValue>; + + static constexpr FieldMetadata_Value kValue{}; + void set_value(const char* data, size_t size) { + AppendBytes(FieldMetadata_Value::kFieldId, data, size); + } + void set_value(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Value::kFieldId, chars.data, chars.size); + } + void set_value(std::string value) { + static constexpr uint32_t field_id = FieldMetadata_Value::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kString> + ::Append(*this, field_id, value); + } +}; + } // Namespace. } // Namespace. } // Namespace. @@ -39372,19 +43504,51 @@ class AndroidCameraFrameEvent_CameraNodeProcessingDetails; class AndroidCameraSessionStats_CameraGraph; class AndroidCameraSessionStats_CameraGraph_CameraEdge; class AndroidCameraSessionStats_CameraGraph_CameraNode; -enum AndroidCameraFrameEvent_CaptureResultStatus : int32_t; +namespace perfetto_pbzero_enum_AndroidCameraFrameEvent { +enum CaptureResultStatus : int32_t; +} // namespace perfetto_pbzero_enum_AndroidCameraFrameEvent +using AndroidCameraFrameEvent_CaptureResultStatus = perfetto_pbzero_enum_AndroidCameraFrameEvent::CaptureResultStatus; -enum AndroidCameraFrameEvent_CaptureResultStatus : int32_t { - AndroidCameraFrameEvent_CaptureResultStatus_STATUS_UNSPECIFIED = 0, - AndroidCameraFrameEvent_CaptureResultStatus_STATUS_OK = 1, - AndroidCameraFrameEvent_CaptureResultStatus_STATUS_EARLY_METADATA_ERROR = 2, - AndroidCameraFrameEvent_CaptureResultStatus_STATUS_FINAL_METADATA_ERROR = 3, - AndroidCameraFrameEvent_CaptureResultStatus_STATUS_BUFFER_ERROR = 4, - AndroidCameraFrameEvent_CaptureResultStatus_STATUS_FLUSH_ERROR = 5, +namespace perfetto_pbzero_enum_AndroidCameraFrameEvent { +enum CaptureResultStatus : int32_t { + STATUS_UNSPECIFIED = 0, + STATUS_OK = 1, + STATUS_EARLY_METADATA_ERROR = 2, + STATUS_FINAL_METADATA_ERROR = 3, + STATUS_BUFFER_ERROR = 4, + STATUS_FLUSH_ERROR = 5, }; +} // namespace perfetto_pbzero_enum_AndroidCameraFrameEvent +using AndroidCameraFrameEvent_CaptureResultStatus = perfetto_pbzero_enum_AndroidCameraFrameEvent::CaptureResultStatus; -const AndroidCameraFrameEvent_CaptureResultStatus AndroidCameraFrameEvent_CaptureResultStatus_MIN = AndroidCameraFrameEvent_CaptureResultStatus_STATUS_UNSPECIFIED; -const AndroidCameraFrameEvent_CaptureResultStatus AndroidCameraFrameEvent_CaptureResultStatus_MAX = AndroidCameraFrameEvent_CaptureResultStatus_STATUS_FLUSH_ERROR; + +constexpr AndroidCameraFrameEvent_CaptureResultStatus AndroidCameraFrameEvent_CaptureResultStatus_MIN = AndroidCameraFrameEvent_CaptureResultStatus::STATUS_UNSPECIFIED; +constexpr AndroidCameraFrameEvent_CaptureResultStatus AndroidCameraFrameEvent_CaptureResultStatus_MAX = AndroidCameraFrameEvent_CaptureResultStatus::STATUS_FLUSH_ERROR; + + +PERFETTO_PROTOZERO_CONSTEXPR14_OR_INLINE +const char* AndroidCameraFrameEvent_CaptureResultStatus_Name(::perfetto::protos::pbzero::AndroidCameraFrameEvent_CaptureResultStatus value) { + switch (value) { + case ::perfetto::protos::pbzero::AndroidCameraFrameEvent_CaptureResultStatus::STATUS_UNSPECIFIED: + return "STATUS_UNSPECIFIED"; + + case ::perfetto::protos::pbzero::AndroidCameraFrameEvent_CaptureResultStatus::STATUS_OK: + return "STATUS_OK"; + + case ::perfetto::protos::pbzero::AndroidCameraFrameEvent_CaptureResultStatus::STATUS_EARLY_METADATA_ERROR: + return "STATUS_EARLY_METADATA_ERROR"; + + case ::perfetto::protos::pbzero::AndroidCameraFrameEvent_CaptureResultStatus::STATUS_FINAL_METADATA_ERROR: + return "STATUS_FINAL_METADATA_ERROR"; + + case ::perfetto::protos::pbzero::AndroidCameraFrameEvent_CaptureResultStatus::STATUS_BUFFER_ERROR: + return "STATUS_BUFFER_ERROR"; + + case ::perfetto::protos::pbzero::AndroidCameraFrameEvent_CaptureResultStatus::STATUS_FLUSH_ERROR: + return "STATUS_FLUSH_ERROR"; + } + return "PBZERO_UNKNOWN_ENUM_VALUE"; +} class AndroidCameraSessionStats_Decoder : public ::protozero::TypedProtoDecoder { public: @@ -39416,14 +43580,7 @@ class AndroidCameraSessionStats : public ::protozero::Message { uint64_t, AndroidCameraSessionStats>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_SessionId kSessionId() { return {}; } + static constexpr FieldMetadata_SessionId kSessionId{}; void set_session_id(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_SessionId::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -39441,14 +43598,7 @@ class AndroidCameraSessionStats : public ::protozero::Message { AndroidCameraSessionStats_CameraGraph, AndroidCameraSessionStats>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Graph kGraph() { return {}; } + static constexpr FieldMetadata_Graph kGraph{}; template T* set_graph() { return BeginNestedMessage(2); } @@ -39486,14 +43636,7 @@ class AndroidCameraSessionStats_CameraGraph : public ::protozero::Message { AndroidCameraSessionStats_CameraGraph_CameraNode, AndroidCameraSessionStats_CameraGraph>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Nodes kNodes() { return {}; } + static constexpr FieldMetadata_Nodes kNodes{}; template T* add_nodes() { return BeginNestedMessage(1); } @@ -39507,14 +43650,7 @@ class AndroidCameraSessionStats_CameraGraph : public ::protozero::Message { AndroidCameraSessionStats_CameraGraph_CameraEdge, AndroidCameraSessionStats_CameraGraph>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Edges kEdges() { return {}; } + static constexpr FieldMetadata_Edges kEdges{}; template T* add_edges() { return BeginNestedMessage(2); } @@ -39562,14 +43698,7 @@ class AndroidCameraSessionStats_CameraGraph_CameraEdge : public ::protozero::Mes int64_t, AndroidCameraSessionStats_CameraGraph_CameraEdge>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_OutputNodeId kOutputNodeId() { return {}; } + static constexpr FieldMetadata_OutputNodeId kOutputNodeId{}; void set_output_node_id(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_OutputNodeId::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -39587,14 +43716,7 @@ class AndroidCameraSessionStats_CameraGraph_CameraEdge : public ::protozero::Mes int64_t, AndroidCameraSessionStats_CameraGraph_CameraEdge>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_OutputId kOutputId() { return {}; } + static constexpr FieldMetadata_OutputId kOutputId{}; void set_output_id(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_OutputId::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -39612,14 +43734,7 @@ class AndroidCameraSessionStats_CameraGraph_CameraEdge : public ::protozero::Mes int64_t, AndroidCameraSessionStats_CameraGraph_CameraEdge>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_InputNodeId kInputNodeId() { return {}; } + static constexpr FieldMetadata_InputNodeId kInputNodeId{}; void set_input_node_id(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_InputNodeId::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -39637,14 +43752,7 @@ class AndroidCameraSessionStats_CameraGraph_CameraEdge : public ::protozero::Mes int64_t, AndroidCameraSessionStats_CameraGraph_CameraEdge>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_InputId kInputId() { return {}; } + static constexpr FieldMetadata_InputId kInputId{}; void set_input_id(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_InputId::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -39662,14 +43770,7 @@ class AndroidCameraSessionStats_CameraGraph_CameraEdge : public ::protozero::Mes int32_t, AndroidCameraSessionStats_CameraGraph_CameraEdge>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_VendorDataVersion kVendorDataVersion() { return {}; } + static constexpr FieldMetadata_VendorDataVersion kVendorDataVersion{}; void set_vendor_data_version(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_VendorDataVersion::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -39687,17 +43788,13 @@ class AndroidCameraSessionStats_CameraGraph_CameraEdge : public ::protozero::Mes std::string, AndroidCameraSessionStats_CameraGraph_CameraEdge>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_VendorData kVendorData() { return {}; } + static constexpr FieldMetadata_VendorData kVendorData{}; void set_vendor_data(const uint8_t* data, size_t size) { AppendBytes(FieldMetadata_VendorData::kFieldId, data, size); } + void set_vendor_data(::protozero::ConstBytes bytes) { + AppendBytes(FieldMetadata_VendorData::kFieldId, bytes.data, bytes.size); + } void set_vendor_data(std::string value) { static constexpr uint32_t field_id = FieldMetadata_VendorData::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -39746,14 +43843,7 @@ class AndroidCameraSessionStats_CameraGraph_CameraNode : public ::protozero::Mes int64_t, AndroidCameraSessionStats_CameraGraph_CameraNode>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_NodeId kNodeId() { return {}; } + static constexpr FieldMetadata_NodeId kNodeId{}; void set_node_id(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_NodeId::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -39771,14 +43861,7 @@ class AndroidCameraSessionStats_CameraGraph_CameraNode : public ::protozero::Mes int64_t, AndroidCameraSessionStats_CameraGraph_CameraNode>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_InputIds kInputIds() { return {}; } + static constexpr FieldMetadata_InputIds kInputIds{}; void add_input_ids(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_InputIds::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -39796,14 +43879,7 @@ class AndroidCameraSessionStats_CameraGraph_CameraNode : public ::protozero::Mes int64_t, AndroidCameraSessionStats_CameraGraph_CameraNode>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_OutputIds kOutputIds() { return {}; } + static constexpr FieldMetadata_OutputIds kOutputIds{}; void add_output_ids(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_OutputIds::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -39821,14 +43897,7 @@ class AndroidCameraSessionStats_CameraGraph_CameraNode : public ::protozero::Mes int32_t, AndroidCameraSessionStats_CameraGraph_CameraNode>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_VendorDataVersion kVendorDataVersion() { return {}; } + static constexpr FieldMetadata_VendorDataVersion kVendorDataVersion{}; void set_vendor_data_version(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_VendorDataVersion::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -39846,17 +43915,13 @@ class AndroidCameraSessionStats_CameraGraph_CameraNode : public ::protozero::Mes std::string, AndroidCameraSessionStats_CameraGraph_CameraNode>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_VendorData kVendorData() { return {}; } + static constexpr FieldMetadata_VendorData kVendorData{}; void set_vendor_data(const uint8_t* data, size_t size) { AppendBytes(FieldMetadata_VendorData::kFieldId, data, size); } + void set_vendor_data(::protozero::ConstBytes bytes) { + AppendBytes(FieldMetadata_VendorData::kFieldId, bytes.data, bytes.size); + } void set_vendor_data(std::string value) { static constexpr uint32_t field_id = FieldMetadata_VendorData::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -39930,13 +43995,17 @@ class AndroidCameraFrameEvent : public ::protozero::Message { static constexpr const char* GetName() { return ".perfetto.protos.AndroidCameraFrameEvent"; } using CameraNodeProcessingDetails = ::perfetto::protos::pbzero::AndroidCameraFrameEvent_CameraNodeProcessingDetails; + using CaptureResultStatus = ::perfetto::protos::pbzero::AndroidCameraFrameEvent_CaptureResultStatus; - static const CaptureResultStatus STATUS_UNSPECIFIED = AndroidCameraFrameEvent_CaptureResultStatus_STATUS_UNSPECIFIED; - static const CaptureResultStatus STATUS_OK = AndroidCameraFrameEvent_CaptureResultStatus_STATUS_OK; - static const CaptureResultStatus STATUS_EARLY_METADATA_ERROR = AndroidCameraFrameEvent_CaptureResultStatus_STATUS_EARLY_METADATA_ERROR; - static const CaptureResultStatus STATUS_FINAL_METADATA_ERROR = AndroidCameraFrameEvent_CaptureResultStatus_STATUS_FINAL_METADATA_ERROR; - static const CaptureResultStatus STATUS_BUFFER_ERROR = AndroidCameraFrameEvent_CaptureResultStatus_STATUS_BUFFER_ERROR; - static const CaptureResultStatus STATUS_FLUSH_ERROR = AndroidCameraFrameEvent_CaptureResultStatus_STATUS_FLUSH_ERROR; + static inline const char* CaptureResultStatus_Name(CaptureResultStatus value) { + return ::perfetto::protos::pbzero::AndroidCameraFrameEvent_CaptureResultStatus_Name(value); + } + static const CaptureResultStatus STATUS_UNSPECIFIED = CaptureResultStatus::STATUS_UNSPECIFIED; + static const CaptureResultStatus STATUS_OK = CaptureResultStatus::STATUS_OK; + static const CaptureResultStatus STATUS_EARLY_METADATA_ERROR = CaptureResultStatus::STATUS_EARLY_METADATA_ERROR; + static const CaptureResultStatus STATUS_FINAL_METADATA_ERROR = CaptureResultStatus::STATUS_FINAL_METADATA_ERROR; + static const CaptureResultStatus STATUS_BUFFER_ERROR = CaptureResultStatus::STATUS_BUFFER_ERROR; + static const CaptureResultStatus STATUS_FLUSH_ERROR = CaptureResultStatus::STATUS_FLUSH_ERROR; using FieldMetadata_SessionId = ::protozero::proto_utils::FieldMetadata< @@ -39946,14 +44015,7 @@ class AndroidCameraFrameEvent : public ::protozero::Message { uint64_t, AndroidCameraFrameEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_SessionId kSessionId() { return {}; } + static constexpr FieldMetadata_SessionId kSessionId{}; void set_session_id(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_SessionId::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -39971,14 +44033,7 @@ class AndroidCameraFrameEvent : public ::protozero::Message { uint32_t, AndroidCameraFrameEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_CameraId kCameraId() { return {}; } + static constexpr FieldMetadata_CameraId kCameraId{}; void set_camera_id(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_CameraId::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -39996,14 +44051,7 @@ class AndroidCameraFrameEvent : public ::protozero::Message { int64_t, AndroidCameraFrameEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_FrameNumber kFrameNumber() { return {}; } + static constexpr FieldMetadata_FrameNumber kFrameNumber{}; void set_frame_number(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_FrameNumber::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -40021,14 +44069,7 @@ class AndroidCameraFrameEvent : public ::protozero::Message { int64_t, AndroidCameraFrameEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_RequestId kRequestId() { return {}; } + static constexpr FieldMetadata_RequestId kRequestId{}; void set_request_id(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_RequestId::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -40046,14 +44087,7 @@ class AndroidCameraFrameEvent : public ::protozero::Message { int64_t, AndroidCameraFrameEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_RequestReceivedNs kRequestReceivedNs() { return {}; } + static constexpr FieldMetadata_RequestReceivedNs kRequestReceivedNs{}; void set_request_received_ns(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_RequestReceivedNs::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -40071,14 +44105,7 @@ class AndroidCameraFrameEvent : public ::protozero::Message { int64_t, AndroidCameraFrameEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_RequestProcessingStartedNs kRequestProcessingStartedNs() { return {}; } + static constexpr FieldMetadata_RequestProcessingStartedNs kRequestProcessingStartedNs{}; void set_request_processing_started_ns(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_RequestProcessingStartedNs::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -40096,14 +44123,7 @@ class AndroidCameraFrameEvent : public ::protozero::Message { int64_t, AndroidCameraFrameEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_StartOfExposureNs kStartOfExposureNs() { return {}; } + static constexpr FieldMetadata_StartOfExposureNs kStartOfExposureNs{}; void set_start_of_exposure_ns(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_StartOfExposureNs::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -40121,14 +44141,7 @@ class AndroidCameraFrameEvent : public ::protozero::Message { int64_t, AndroidCameraFrameEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_StartOfFrameNs kStartOfFrameNs() { return {}; } + static constexpr FieldMetadata_StartOfFrameNs kStartOfFrameNs{}; void set_start_of_frame_ns(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_StartOfFrameNs::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -40146,14 +44159,7 @@ class AndroidCameraFrameEvent : public ::protozero::Message { int64_t, AndroidCameraFrameEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ResponsesAllSentNs kResponsesAllSentNs() { return {}; } + static constexpr FieldMetadata_ResponsesAllSentNs kResponsesAllSentNs{}; void set_responses_all_sent_ns(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_ResponsesAllSentNs::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -40171,14 +44177,7 @@ class AndroidCameraFrameEvent : public ::protozero::Message { ::perfetto::protos::pbzero::AndroidCameraFrameEvent_CaptureResultStatus, AndroidCameraFrameEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_CaptureResultStatus kCaptureResultStatus() { return {}; } + static constexpr FieldMetadata_CaptureResultStatus kCaptureResultStatus{}; void set_capture_result_status(::perfetto::protos::pbzero::AndroidCameraFrameEvent_CaptureResultStatus value) { static constexpr uint32_t field_id = FieldMetadata_CaptureResultStatus::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -40196,14 +44195,7 @@ class AndroidCameraFrameEvent : public ::protozero::Message { int32_t, AndroidCameraFrameEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_SkippedSensorFrames kSkippedSensorFrames() { return {}; } + static constexpr FieldMetadata_SkippedSensorFrames kSkippedSensorFrames{}; void set_skipped_sensor_frames(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_SkippedSensorFrames::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -40221,14 +44213,7 @@ class AndroidCameraFrameEvent : public ::protozero::Message { int32_t, AndroidCameraFrameEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_CaptureIntent kCaptureIntent() { return {}; } + static constexpr FieldMetadata_CaptureIntent kCaptureIntent{}; void set_capture_intent(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_CaptureIntent::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -40246,14 +44231,7 @@ class AndroidCameraFrameEvent : public ::protozero::Message { int32_t, AndroidCameraFrameEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_NumStreams kNumStreams() { return {}; } + static constexpr FieldMetadata_NumStreams kNumStreams{}; void set_num_streams(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_NumStreams::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -40271,14 +44249,7 @@ class AndroidCameraFrameEvent : public ::protozero::Message { AndroidCameraFrameEvent_CameraNodeProcessingDetails, AndroidCameraFrameEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_NodeProcessingDetails kNodeProcessingDetails() { return {}; } + static constexpr FieldMetadata_NodeProcessingDetails kNodeProcessingDetails{}; template T* add_node_processing_details() { return BeginNestedMessage(14); } @@ -40292,14 +44263,7 @@ class AndroidCameraFrameEvent : public ::protozero::Message { int32_t, AndroidCameraFrameEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_VendorDataVersion kVendorDataVersion() { return {}; } + static constexpr FieldMetadata_VendorDataVersion kVendorDataVersion{}; void set_vendor_data_version(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_VendorDataVersion::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -40317,17 +44281,13 @@ class AndroidCameraFrameEvent : public ::protozero::Message { std::string, AndroidCameraFrameEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_VendorData kVendorData() { return {}; } + static constexpr FieldMetadata_VendorData kVendorData{}; void set_vendor_data(const uint8_t* data, size_t size) { AppendBytes(FieldMetadata_VendorData::kFieldId, data, size); } + void set_vendor_data(::protozero::ConstBytes bytes) { + AppendBytes(FieldMetadata_VendorData::kFieldId, bytes.data, bytes.size); + } void set_vendor_data(std::string value) { static constexpr uint32_t field_id = FieldMetadata_VendorData::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -40373,14 +44333,7 @@ class AndroidCameraFrameEvent_CameraNodeProcessingDetails : public ::protozero:: int64_t, AndroidCameraFrameEvent_CameraNodeProcessingDetails>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_NodeId kNodeId() { return {}; } + static constexpr FieldMetadata_NodeId kNodeId{}; void set_node_id(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_NodeId::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -40398,14 +44351,7 @@ class AndroidCameraFrameEvent_CameraNodeProcessingDetails : public ::protozero:: int64_t, AndroidCameraFrameEvent_CameraNodeProcessingDetails>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_StartProcessingNs kStartProcessingNs() { return {}; } + static constexpr FieldMetadata_StartProcessingNs kStartProcessingNs{}; void set_start_processing_ns(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_StartProcessingNs::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -40423,14 +44369,7 @@ class AndroidCameraFrameEvent_CameraNodeProcessingDetails : public ::protozero:: int64_t, AndroidCameraFrameEvent_CameraNodeProcessingDetails>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_EndProcessingNs kEndProcessingNs() { return {}; } + static constexpr FieldMetadata_EndProcessingNs kEndProcessingNs{}; void set_end_processing_ns(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_EndProcessingNs::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -40448,14 +44387,7 @@ class AndroidCameraFrameEvent_CameraNodeProcessingDetails : public ::protozero:: int64_t, AndroidCameraFrameEvent_CameraNodeProcessingDetails>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_SchedulingLatencyNs kSchedulingLatencyNs() { return {}; } + static constexpr FieldMetadata_SchedulingLatencyNs kSchedulingLatencyNs{}; void set_scheduling_latency_ns(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_SchedulingLatencyNs::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -40494,47 +44426,153 @@ class FrameTimelineEvent_ActualSurfaceFrameStart; class FrameTimelineEvent_ExpectedDisplayFrameStart; class FrameTimelineEvent_ExpectedSurfaceFrameStart; class FrameTimelineEvent_FrameEnd; -enum FrameTimelineEvent_PredictionType : int32_t; -enum FrameTimelineEvent_PresentType : int32_t; +namespace perfetto_pbzero_enum_FrameTimelineEvent { +enum PredictionType : int32_t; +} // namespace perfetto_pbzero_enum_FrameTimelineEvent +using FrameTimelineEvent_PredictionType = perfetto_pbzero_enum_FrameTimelineEvent::PredictionType; +namespace perfetto_pbzero_enum_FrameTimelineEvent { +enum PresentType : int32_t; +} // namespace perfetto_pbzero_enum_FrameTimelineEvent +using FrameTimelineEvent_PresentType = perfetto_pbzero_enum_FrameTimelineEvent::PresentType; -enum FrameTimelineEvent_JankType : int32_t { - FrameTimelineEvent_JankType_JANK_UNSPECIFIED = 0, - FrameTimelineEvent_JankType_JANK_NONE = 1, - FrameTimelineEvent_JankType_JANK_SF_SCHEDULING = 2, - FrameTimelineEvent_JankType_JANK_PREDICTION_ERROR = 4, - FrameTimelineEvent_JankType_JANK_DISPLAY_HAL = 8, - FrameTimelineEvent_JankType_JANK_SF_CPU_DEADLINE_MISSED = 16, - FrameTimelineEvent_JankType_JANK_SF_GPU_DEADLINE_MISSED = 32, - FrameTimelineEvent_JankType_JANK_APP_DEADLINE_MISSED = 64, - FrameTimelineEvent_JankType_JANK_BUFFER_STUFFING = 128, - FrameTimelineEvent_JankType_JANK_UNKNOWN = 256, - FrameTimelineEvent_JankType_JANK_SF_STUFFING = 512, +namespace perfetto_pbzero_enum_FrameTimelineEvent { +enum JankType : int32_t { + JANK_UNSPECIFIED = 0, + JANK_NONE = 1, + JANK_SF_SCHEDULING = 2, + JANK_PREDICTION_ERROR = 4, + JANK_DISPLAY_HAL = 8, + JANK_SF_CPU_DEADLINE_MISSED = 16, + JANK_SF_GPU_DEADLINE_MISSED = 32, + JANK_APP_DEADLINE_MISSED = 64, + JANK_BUFFER_STUFFING = 128, + JANK_UNKNOWN = 256, + JANK_SF_STUFFING = 512, + JANK_DROPPED = 1024, }; +} // namespace perfetto_pbzero_enum_FrameTimelineEvent +using FrameTimelineEvent_JankType = perfetto_pbzero_enum_FrameTimelineEvent::JankType; -const FrameTimelineEvent_JankType FrameTimelineEvent_JankType_MIN = FrameTimelineEvent_JankType_JANK_UNSPECIFIED; -const FrameTimelineEvent_JankType FrameTimelineEvent_JankType_MAX = FrameTimelineEvent_JankType_JANK_SF_STUFFING; -enum FrameTimelineEvent_PresentType : int32_t { - FrameTimelineEvent_PresentType_PRESENT_UNSPECIFIED = 0, - FrameTimelineEvent_PresentType_PRESENT_ON_TIME = 1, - FrameTimelineEvent_PresentType_PRESENT_LATE = 2, - FrameTimelineEvent_PresentType_PRESENT_EARLY = 3, - FrameTimelineEvent_PresentType_PRESENT_DROPPED = 4, - FrameTimelineEvent_PresentType_PRESENT_UNKNOWN = 5, +constexpr FrameTimelineEvent_JankType FrameTimelineEvent_JankType_MIN = FrameTimelineEvent_JankType::JANK_UNSPECIFIED; +constexpr FrameTimelineEvent_JankType FrameTimelineEvent_JankType_MAX = FrameTimelineEvent_JankType::JANK_DROPPED; + + +PERFETTO_PROTOZERO_CONSTEXPR14_OR_INLINE +const char* FrameTimelineEvent_JankType_Name(::perfetto::protos::pbzero::FrameTimelineEvent_JankType value) { + switch (value) { + case ::perfetto::protos::pbzero::FrameTimelineEvent_JankType::JANK_UNSPECIFIED: + return "JANK_UNSPECIFIED"; + + case ::perfetto::protos::pbzero::FrameTimelineEvent_JankType::JANK_NONE: + return "JANK_NONE"; + + case ::perfetto::protos::pbzero::FrameTimelineEvent_JankType::JANK_SF_SCHEDULING: + return "JANK_SF_SCHEDULING"; + + case ::perfetto::protos::pbzero::FrameTimelineEvent_JankType::JANK_PREDICTION_ERROR: + return "JANK_PREDICTION_ERROR"; + + case ::perfetto::protos::pbzero::FrameTimelineEvent_JankType::JANK_DISPLAY_HAL: + return "JANK_DISPLAY_HAL"; + + case ::perfetto::protos::pbzero::FrameTimelineEvent_JankType::JANK_SF_CPU_DEADLINE_MISSED: + return "JANK_SF_CPU_DEADLINE_MISSED"; + + case ::perfetto::protos::pbzero::FrameTimelineEvent_JankType::JANK_SF_GPU_DEADLINE_MISSED: + return "JANK_SF_GPU_DEADLINE_MISSED"; + + case ::perfetto::protos::pbzero::FrameTimelineEvent_JankType::JANK_APP_DEADLINE_MISSED: + return "JANK_APP_DEADLINE_MISSED"; + + case ::perfetto::protos::pbzero::FrameTimelineEvent_JankType::JANK_BUFFER_STUFFING: + return "JANK_BUFFER_STUFFING"; + + case ::perfetto::protos::pbzero::FrameTimelineEvent_JankType::JANK_UNKNOWN: + return "JANK_UNKNOWN"; + + case ::perfetto::protos::pbzero::FrameTimelineEvent_JankType::JANK_SF_STUFFING: + return "JANK_SF_STUFFING"; + + case ::perfetto::protos::pbzero::FrameTimelineEvent_JankType::JANK_DROPPED: + return "JANK_DROPPED"; + } + return "PBZERO_UNKNOWN_ENUM_VALUE"; +} + +namespace perfetto_pbzero_enum_FrameTimelineEvent { +enum PresentType : int32_t { + PRESENT_UNSPECIFIED = 0, + PRESENT_ON_TIME = 1, + PRESENT_LATE = 2, + PRESENT_EARLY = 3, + PRESENT_DROPPED = 4, + PRESENT_UNKNOWN = 5, }; +} // namespace perfetto_pbzero_enum_FrameTimelineEvent +using FrameTimelineEvent_PresentType = perfetto_pbzero_enum_FrameTimelineEvent::PresentType; -const FrameTimelineEvent_PresentType FrameTimelineEvent_PresentType_MIN = FrameTimelineEvent_PresentType_PRESENT_UNSPECIFIED; -const FrameTimelineEvent_PresentType FrameTimelineEvent_PresentType_MAX = FrameTimelineEvent_PresentType_PRESENT_UNKNOWN; -enum FrameTimelineEvent_PredictionType : int32_t { - FrameTimelineEvent_PredictionType_PREDICTION_UNSPECIFIED = 0, - FrameTimelineEvent_PredictionType_PREDICTION_VALID = 1, - FrameTimelineEvent_PredictionType_PREDICTION_EXPIRED = 2, - FrameTimelineEvent_PredictionType_PREDICTION_UNKNOWN = 3, +constexpr FrameTimelineEvent_PresentType FrameTimelineEvent_PresentType_MIN = FrameTimelineEvent_PresentType::PRESENT_UNSPECIFIED; +constexpr FrameTimelineEvent_PresentType FrameTimelineEvent_PresentType_MAX = FrameTimelineEvent_PresentType::PRESENT_UNKNOWN; + + +PERFETTO_PROTOZERO_CONSTEXPR14_OR_INLINE +const char* FrameTimelineEvent_PresentType_Name(::perfetto::protos::pbzero::FrameTimelineEvent_PresentType value) { + switch (value) { + case ::perfetto::protos::pbzero::FrameTimelineEvent_PresentType::PRESENT_UNSPECIFIED: + return "PRESENT_UNSPECIFIED"; + + case ::perfetto::protos::pbzero::FrameTimelineEvent_PresentType::PRESENT_ON_TIME: + return "PRESENT_ON_TIME"; + + case ::perfetto::protos::pbzero::FrameTimelineEvent_PresentType::PRESENT_LATE: + return "PRESENT_LATE"; + + case ::perfetto::protos::pbzero::FrameTimelineEvent_PresentType::PRESENT_EARLY: + return "PRESENT_EARLY"; + + case ::perfetto::protos::pbzero::FrameTimelineEvent_PresentType::PRESENT_DROPPED: + return "PRESENT_DROPPED"; + + case ::perfetto::protos::pbzero::FrameTimelineEvent_PresentType::PRESENT_UNKNOWN: + return "PRESENT_UNKNOWN"; + } + return "PBZERO_UNKNOWN_ENUM_VALUE"; +} + +namespace perfetto_pbzero_enum_FrameTimelineEvent { +enum PredictionType : int32_t { + PREDICTION_UNSPECIFIED = 0, + PREDICTION_VALID = 1, + PREDICTION_EXPIRED = 2, + PREDICTION_UNKNOWN = 3, }; +} // namespace perfetto_pbzero_enum_FrameTimelineEvent +using FrameTimelineEvent_PredictionType = perfetto_pbzero_enum_FrameTimelineEvent::PredictionType; -const FrameTimelineEvent_PredictionType FrameTimelineEvent_PredictionType_MIN = FrameTimelineEvent_PredictionType_PREDICTION_UNSPECIFIED; -const FrameTimelineEvent_PredictionType FrameTimelineEvent_PredictionType_MAX = FrameTimelineEvent_PredictionType_PREDICTION_UNKNOWN; + +constexpr FrameTimelineEvent_PredictionType FrameTimelineEvent_PredictionType_MIN = FrameTimelineEvent_PredictionType::PREDICTION_UNSPECIFIED; +constexpr FrameTimelineEvent_PredictionType FrameTimelineEvent_PredictionType_MAX = FrameTimelineEvent_PredictionType::PREDICTION_UNKNOWN; + + +PERFETTO_PROTOZERO_CONSTEXPR14_OR_INLINE +const char* FrameTimelineEvent_PredictionType_Name(::perfetto::protos::pbzero::FrameTimelineEvent_PredictionType value) { + switch (value) { + case ::perfetto::protos::pbzero::FrameTimelineEvent_PredictionType::PREDICTION_UNSPECIFIED: + return "PREDICTION_UNSPECIFIED"; + + case ::perfetto::protos::pbzero::FrameTimelineEvent_PredictionType::PREDICTION_VALID: + return "PREDICTION_VALID"; + + case ::perfetto::protos::pbzero::FrameTimelineEvent_PredictionType::PREDICTION_EXPIRED: + return "PREDICTION_EXPIRED"; + + case ::perfetto::protos::pbzero::FrameTimelineEvent_PredictionType::PREDICTION_UNKNOWN: + return "PREDICTION_UNKNOWN"; + } + return "PBZERO_UNKNOWN_ENUM_VALUE"; +} class FrameTimelineEvent_Decoder : public ::protozero::TypedProtoDecoder { public: @@ -40570,30 +44608,43 @@ class FrameTimelineEvent : public ::protozero::Message { using ExpectedDisplayFrameStart = ::perfetto::protos::pbzero::FrameTimelineEvent_ExpectedDisplayFrameStart; using ActualDisplayFrameStart = ::perfetto::protos::pbzero::FrameTimelineEvent_ActualDisplayFrameStart; using FrameEnd = ::perfetto::protos::pbzero::FrameTimelineEvent_FrameEnd; + using JankType = ::perfetto::protos::pbzero::FrameTimelineEvent_JankType; + static inline const char* JankType_Name(JankType value) { + return ::perfetto::protos::pbzero::FrameTimelineEvent_JankType_Name(value); + } + using PresentType = ::perfetto::protos::pbzero::FrameTimelineEvent_PresentType; + static inline const char* PresentType_Name(PresentType value) { + return ::perfetto::protos::pbzero::FrameTimelineEvent_PresentType_Name(value); + } + using PredictionType = ::perfetto::protos::pbzero::FrameTimelineEvent_PredictionType; - static const JankType JANK_UNSPECIFIED = FrameTimelineEvent_JankType_JANK_UNSPECIFIED; - static const JankType JANK_NONE = FrameTimelineEvent_JankType_JANK_NONE; - static const JankType JANK_SF_SCHEDULING = FrameTimelineEvent_JankType_JANK_SF_SCHEDULING; - static const JankType JANK_PREDICTION_ERROR = FrameTimelineEvent_JankType_JANK_PREDICTION_ERROR; - static const JankType JANK_DISPLAY_HAL = FrameTimelineEvent_JankType_JANK_DISPLAY_HAL; - static const JankType JANK_SF_CPU_DEADLINE_MISSED = FrameTimelineEvent_JankType_JANK_SF_CPU_DEADLINE_MISSED; - static const JankType JANK_SF_GPU_DEADLINE_MISSED = FrameTimelineEvent_JankType_JANK_SF_GPU_DEADLINE_MISSED; - static const JankType JANK_APP_DEADLINE_MISSED = FrameTimelineEvent_JankType_JANK_APP_DEADLINE_MISSED; - static const JankType JANK_BUFFER_STUFFING = FrameTimelineEvent_JankType_JANK_BUFFER_STUFFING; - static const JankType JANK_UNKNOWN = FrameTimelineEvent_JankType_JANK_UNKNOWN; - static const JankType JANK_SF_STUFFING = FrameTimelineEvent_JankType_JANK_SF_STUFFING; - static const PresentType PRESENT_UNSPECIFIED = FrameTimelineEvent_PresentType_PRESENT_UNSPECIFIED; - static const PresentType PRESENT_ON_TIME = FrameTimelineEvent_PresentType_PRESENT_ON_TIME; - static const PresentType PRESENT_LATE = FrameTimelineEvent_PresentType_PRESENT_LATE; - static const PresentType PRESENT_EARLY = FrameTimelineEvent_PresentType_PRESENT_EARLY; - static const PresentType PRESENT_DROPPED = FrameTimelineEvent_PresentType_PRESENT_DROPPED; - static const PresentType PRESENT_UNKNOWN = FrameTimelineEvent_PresentType_PRESENT_UNKNOWN; - static const PredictionType PREDICTION_UNSPECIFIED = FrameTimelineEvent_PredictionType_PREDICTION_UNSPECIFIED; - static const PredictionType PREDICTION_VALID = FrameTimelineEvent_PredictionType_PREDICTION_VALID; - static const PredictionType PREDICTION_EXPIRED = FrameTimelineEvent_PredictionType_PREDICTION_EXPIRED; - static const PredictionType PREDICTION_UNKNOWN = FrameTimelineEvent_PredictionType_PREDICTION_UNKNOWN; + static inline const char* PredictionType_Name(PredictionType value) { + return ::perfetto::protos::pbzero::FrameTimelineEvent_PredictionType_Name(value); + } + static const JankType JANK_UNSPECIFIED = JankType::JANK_UNSPECIFIED; + static const JankType JANK_NONE = JankType::JANK_NONE; + static const JankType JANK_SF_SCHEDULING = JankType::JANK_SF_SCHEDULING; + static const JankType JANK_PREDICTION_ERROR = JankType::JANK_PREDICTION_ERROR; + static const JankType JANK_DISPLAY_HAL = JankType::JANK_DISPLAY_HAL; + static const JankType JANK_SF_CPU_DEADLINE_MISSED = JankType::JANK_SF_CPU_DEADLINE_MISSED; + static const JankType JANK_SF_GPU_DEADLINE_MISSED = JankType::JANK_SF_GPU_DEADLINE_MISSED; + static const JankType JANK_APP_DEADLINE_MISSED = JankType::JANK_APP_DEADLINE_MISSED; + static const JankType JANK_BUFFER_STUFFING = JankType::JANK_BUFFER_STUFFING; + static const JankType JANK_UNKNOWN = JankType::JANK_UNKNOWN; + static const JankType JANK_SF_STUFFING = JankType::JANK_SF_STUFFING; + static const JankType JANK_DROPPED = JankType::JANK_DROPPED; + static const PresentType PRESENT_UNSPECIFIED = PresentType::PRESENT_UNSPECIFIED; + static const PresentType PRESENT_ON_TIME = PresentType::PRESENT_ON_TIME; + static const PresentType PRESENT_LATE = PresentType::PRESENT_LATE; + static const PresentType PRESENT_EARLY = PresentType::PRESENT_EARLY; + static const PresentType PRESENT_DROPPED = PresentType::PRESENT_DROPPED; + static const PresentType PRESENT_UNKNOWN = PresentType::PRESENT_UNKNOWN; + static const PredictionType PREDICTION_UNSPECIFIED = PredictionType::PREDICTION_UNSPECIFIED; + static const PredictionType PREDICTION_VALID = PredictionType::PREDICTION_VALID; + static const PredictionType PREDICTION_EXPIRED = PredictionType::PREDICTION_EXPIRED; + static const PredictionType PREDICTION_UNKNOWN = PredictionType::PREDICTION_UNKNOWN; using FieldMetadata_ExpectedDisplayFrameStart = ::protozero::proto_utils::FieldMetadata< @@ -40603,14 +44654,7 @@ class FrameTimelineEvent : public ::protozero::Message { FrameTimelineEvent_ExpectedDisplayFrameStart, FrameTimelineEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ExpectedDisplayFrameStart kExpectedDisplayFrameStart() { return {}; } + static constexpr FieldMetadata_ExpectedDisplayFrameStart kExpectedDisplayFrameStart{}; template T* set_expected_display_frame_start() { return BeginNestedMessage(1); } @@ -40624,14 +44668,7 @@ class FrameTimelineEvent : public ::protozero::Message { FrameTimelineEvent_ActualDisplayFrameStart, FrameTimelineEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ActualDisplayFrameStart kActualDisplayFrameStart() { return {}; } + static constexpr FieldMetadata_ActualDisplayFrameStart kActualDisplayFrameStart{}; template T* set_actual_display_frame_start() { return BeginNestedMessage(2); } @@ -40645,14 +44682,7 @@ class FrameTimelineEvent : public ::protozero::Message { FrameTimelineEvent_ExpectedSurfaceFrameStart, FrameTimelineEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ExpectedSurfaceFrameStart kExpectedSurfaceFrameStart() { return {}; } + static constexpr FieldMetadata_ExpectedSurfaceFrameStart kExpectedSurfaceFrameStart{}; template T* set_expected_surface_frame_start() { return BeginNestedMessage(3); } @@ -40666,14 +44696,7 @@ class FrameTimelineEvent : public ::protozero::Message { FrameTimelineEvent_ActualSurfaceFrameStart, FrameTimelineEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ActualSurfaceFrameStart kActualSurfaceFrameStart() { return {}; } + static constexpr FieldMetadata_ActualSurfaceFrameStart kActualSurfaceFrameStart{}; template T* set_actual_surface_frame_start() { return BeginNestedMessage(4); } @@ -40687,14 +44710,7 @@ class FrameTimelineEvent : public ::protozero::Message { FrameTimelineEvent_FrameEnd, FrameTimelineEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_FrameEnd kFrameEnd() { return {}; } + static constexpr FieldMetadata_FrameEnd kFrameEnd{}; template T* set_frame_end() { return BeginNestedMessage(5); } @@ -40727,14 +44743,7 @@ class FrameTimelineEvent_FrameEnd : public ::protozero::Message { int64_t, FrameTimelineEvent_FrameEnd>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Cookie kCookie() { return {}; } + static constexpr FieldMetadata_Cookie kCookie{}; void set_cookie(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_Cookie::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -40792,14 +44801,7 @@ class FrameTimelineEvent_ActualDisplayFrameStart : public ::protozero::Message { int64_t, FrameTimelineEvent_ActualDisplayFrameStart>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Cookie kCookie() { return {}; } + static constexpr FieldMetadata_Cookie kCookie{}; void set_cookie(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_Cookie::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -40817,14 +44819,7 @@ class FrameTimelineEvent_ActualDisplayFrameStart : public ::protozero::Message { int64_t, FrameTimelineEvent_ActualDisplayFrameStart>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Token kToken() { return {}; } + static constexpr FieldMetadata_Token kToken{}; void set_token(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_Token::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -40842,14 +44837,7 @@ class FrameTimelineEvent_ActualDisplayFrameStart : public ::protozero::Message { int32_t, FrameTimelineEvent_ActualDisplayFrameStart>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Pid kPid() { return {}; } + static constexpr FieldMetadata_Pid kPid{}; void set_pid(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Pid::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -40867,14 +44855,7 @@ class FrameTimelineEvent_ActualDisplayFrameStart : public ::protozero::Message { ::perfetto::protos::pbzero::FrameTimelineEvent_PresentType, FrameTimelineEvent_ActualDisplayFrameStart>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_PresentType kPresentType() { return {}; } + static constexpr FieldMetadata_PresentType kPresentType{}; void set_present_type(::perfetto::protos::pbzero::FrameTimelineEvent_PresentType value) { static constexpr uint32_t field_id = FieldMetadata_PresentType::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -40892,14 +44873,7 @@ class FrameTimelineEvent_ActualDisplayFrameStart : public ::protozero::Message { bool, FrameTimelineEvent_ActualDisplayFrameStart>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_OnTimeFinish kOnTimeFinish() { return {}; } + static constexpr FieldMetadata_OnTimeFinish kOnTimeFinish{}; void set_on_time_finish(bool value) { static constexpr uint32_t field_id = FieldMetadata_OnTimeFinish::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -40917,14 +44891,7 @@ class FrameTimelineEvent_ActualDisplayFrameStart : public ::protozero::Message { bool, FrameTimelineEvent_ActualDisplayFrameStart>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_GpuComposition kGpuComposition() { return {}; } + static constexpr FieldMetadata_GpuComposition kGpuComposition{}; void set_gpu_composition(bool value) { static constexpr uint32_t field_id = FieldMetadata_GpuComposition::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -40942,14 +44909,7 @@ class FrameTimelineEvent_ActualDisplayFrameStart : public ::protozero::Message { int32_t, FrameTimelineEvent_ActualDisplayFrameStart>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_JankType kJankType() { return {}; } + static constexpr FieldMetadata_JankType kJankType{}; void set_jank_type(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_JankType::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -40967,14 +44927,7 @@ class FrameTimelineEvent_ActualDisplayFrameStart : public ::protozero::Message { ::perfetto::protos::pbzero::FrameTimelineEvent_PredictionType, FrameTimelineEvent_ActualDisplayFrameStart>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_PredictionType kPredictionType() { return {}; } + static constexpr FieldMetadata_PredictionType kPredictionType{}; void set_prediction_type(::perfetto::protos::pbzero::FrameTimelineEvent_PredictionType value) { static constexpr uint32_t field_id = FieldMetadata_PredictionType::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -41017,14 +44970,7 @@ class FrameTimelineEvent_ExpectedDisplayFrameStart : public ::protozero::Message int64_t, FrameTimelineEvent_ExpectedDisplayFrameStart>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Cookie kCookie() { return {}; } + static constexpr FieldMetadata_Cookie kCookie{}; void set_cookie(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_Cookie::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -41042,14 +44988,7 @@ class FrameTimelineEvent_ExpectedDisplayFrameStart : public ::protozero::Message int64_t, FrameTimelineEvent_ExpectedDisplayFrameStart>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Token kToken() { return {}; } + static constexpr FieldMetadata_Token kToken{}; void set_token(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_Token::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -41067,14 +45006,7 @@ class FrameTimelineEvent_ExpectedDisplayFrameStart : public ::protozero::Message int32_t, FrameTimelineEvent_ExpectedDisplayFrameStart>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Pid kPid() { return {}; } + static constexpr FieldMetadata_Pid kPid{}; void set_pid(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Pid::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -41141,14 +45073,7 @@ class FrameTimelineEvent_ActualSurfaceFrameStart : public ::protozero::Message { int64_t, FrameTimelineEvent_ActualSurfaceFrameStart>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Cookie kCookie() { return {}; } + static constexpr FieldMetadata_Cookie kCookie{}; void set_cookie(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_Cookie::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -41166,14 +45091,7 @@ class FrameTimelineEvent_ActualSurfaceFrameStart : public ::protozero::Message { int64_t, FrameTimelineEvent_ActualSurfaceFrameStart>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Token kToken() { return {}; } + static constexpr FieldMetadata_Token kToken{}; void set_token(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_Token::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -41191,14 +45109,7 @@ class FrameTimelineEvent_ActualSurfaceFrameStart : public ::protozero::Message { int64_t, FrameTimelineEvent_ActualSurfaceFrameStart>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_DisplayFrameToken kDisplayFrameToken() { return {}; } + static constexpr FieldMetadata_DisplayFrameToken kDisplayFrameToken{}; void set_display_frame_token(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_DisplayFrameToken::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -41216,14 +45127,7 @@ class FrameTimelineEvent_ActualSurfaceFrameStart : public ::protozero::Message { int32_t, FrameTimelineEvent_ActualSurfaceFrameStart>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Pid kPid() { return {}; } + static constexpr FieldMetadata_Pid kPid{}; void set_pid(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Pid::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -41241,17 +45145,13 @@ class FrameTimelineEvent_ActualSurfaceFrameStart : public ::protozero::Message { std::string, FrameTimelineEvent_ActualSurfaceFrameStart>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_LayerName kLayerName() { return {}; } + static constexpr FieldMetadata_LayerName kLayerName{}; void set_layer_name(const char* data, size_t size) { AppendBytes(FieldMetadata_LayerName::kFieldId, data, size); } + void set_layer_name(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_LayerName::kFieldId, chars.data, chars.size); + } void set_layer_name(std::string value) { static constexpr uint32_t field_id = FieldMetadata_LayerName::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -41269,14 +45169,7 @@ class FrameTimelineEvent_ActualSurfaceFrameStart : public ::protozero::Message { ::perfetto::protos::pbzero::FrameTimelineEvent_PresentType, FrameTimelineEvent_ActualSurfaceFrameStart>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_PresentType kPresentType() { return {}; } + static constexpr FieldMetadata_PresentType kPresentType{}; void set_present_type(::perfetto::protos::pbzero::FrameTimelineEvent_PresentType value) { static constexpr uint32_t field_id = FieldMetadata_PresentType::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -41294,14 +45187,7 @@ class FrameTimelineEvent_ActualSurfaceFrameStart : public ::protozero::Message { bool, FrameTimelineEvent_ActualSurfaceFrameStart>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_OnTimeFinish kOnTimeFinish() { return {}; } + static constexpr FieldMetadata_OnTimeFinish kOnTimeFinish{}; void set_on_time_finish(bool value) { static constexpr uint32_t field_id = FieldMetadata_OnTimeFinish::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -41319,14 +45205,7 @@ class FrameTimelineEvent_ActualSurfaceFrameStart : public ::protozero::Message { bool, FrameTimelineEvent_ActualSurfaceFrameStart>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_GpuComposition kGpuComposition() { return {}; } + static constexpr FieldMetadata_GpuComposition kGpuComposition{}; void set_gpu_composition(bool value) { static constexpr uint32_t field_id = FieldMetadata_GpuComposition::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -41344,14 +45223,7 @@ class FrameTimelineEvent_ActualSurfaceFrameStart : public ::protozero::Message { int32_t, FrameTimelineEvent_ActualSurfaceFrameStart>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_JankType kJankType() { return {}; } + static constexpr FieldMetadata_JankType kJankType{}; void set_jank_type(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_JankType::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -41369,14 +45241,7 @@ class FrameTimelineEvent_ActualSurfaceFrameStart : public ::protozero::Message { ::perfetto::protos::pbzero::FrameTimelineEvent_PredictionType, FrameTimelineEvent_ActualSurfaceFrameStart>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_PredictionType kPredictionType() { return {}; } + static constexpr FieldMetadata_PredictionType kPredictionType{}; void set_prediction_type(::perfetto::protos::pbzero::FrameTimelineEvent_PredictionType value) { static constexpr uint32_t field_id = FieldMetadata_PredictionType::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -41394,14 +45259,7 @@ class FrameTimelineEvent_ActualSurfaceFrameStart : public ::protozero::Message { bool, FrameTimelineEvent_ActualSurfaceFrameStart>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_IsBuffer kIsBuffer() { return {}; } + static constexpr FieldMetadata_IsBuffer kIsBuffer{}; void set_is_buffer(bool value) { static constexpr uint32_t field_id = FieldMetadata_IsBuffer::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -41450,14 +45308,7 @@ class FrameTimelineEvent_ExpectedSurfaceFrameStart : public ::protozero::Message int64_t, FrameTimelineEvent_ExpectedSurfaceFrameStart>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Cookie kCookie() { return {}; } + static constexpr FieldMetadata_Cookie kCookie{}; void set_cookie(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_Cookie::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -41475,14 +45326,7 @@ class FrameTimelineEvent_ExpectedSurfaceFrameStart : public ::protozero::Message int64_t, FrameTimelineEvent_ExpectedSurfaceFrameStart>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Token kToken() { return {}; } + static constexpr FieldMetadata_Token kToken{}; void set_token(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_Token::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -41500,14 +45344,7 @@ class FrameTimelineEvent_ExpectedSurfaceFrameStart : public ::protozero::Message int64_t, FrameTimelineEvent_ExpectedSurfaceFrameStart>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_DisplayFrameToken kDisplayFrameToken() { return {}; } + static constexpr FieldMetadata_DisplayFrameToken kDisplayFrameToken{}; void set_display_frame_token(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_DisplayFrameToken::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -41525,14 +45362,7 @@ class FrameTimelineEvent_ExpectedSurfaceFrameStart : public ::protozero::Message int32_t, FrameTimelineEvent_ExpectedSurfaceFrameStart>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Pid kPid() { return {}; } + static constexpr FieldMetadata_Pid kPid{}; void set_pid(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Pid::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -41550,17 +45380,13 @@ class FrameTimelineEvent_ExpectedSurfaceFrameStart : public ::protozero::Message std::string, FrameTimelineEvent_ExpectedSurfaceFrameStart>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_LayerName kLayerName() { return {}; } + static constexpr FieldMetadata_LayerName kLayerName{}; void set_layer_name(const char* data, size_t size) { AppendBytes(FieldMetadata_LayerName::kFieldId, data, size); } + void set_layer_name(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_LayerName::kFieldId, chars.data, chars.size); + } void set_layer_name(std::string value) { static constexpr uint32_t field_id = FieldMetadata_LayerName::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -41627,14 +45453,7 @@ class GpuMemTotalEvent : public ::protozero::Message { uint32_t, GpuMemTotalEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_GpuId kGpuId() { return {}; } + static constexpr FieldMetadata_GpuId kGpuId{}; void set_gpu_id(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_GpuId::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -41652,14 +45471,7 @@ class GpuMemTotalEvent : public ::protozero::Message { uint32_t, GpuMemTotalEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Pid kPid() { return {}; } + static constexpr FieldMetadata_Pid kPid{}; void set_pid(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Pid::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -41677,14 +45489,7 @@ class GpuMemTotalEvent : public ::protozero::Message { uint64_t, GpuMemTotalEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Size kSize() { return {}; } + static constexpr FieldMetadata_Size kSize{}; void set_size(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Size::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -41719,27 +45524,83 @@ namespace protos { namespace pbzero { class GraphicsFrameEvent_BufferEvent; -enum GraphicsFrameEvent_BufferEventType : int32_t; +namespace perfetto_pbzero_enum_GraphicsFrameEvent { +enum BufferEventType : int32_t; +} // namespace perfetto_pbzero_enum_GraphicsFrameEvent +using GraphicsFrameEvent_BufferEventType = perfetto_pbzero_enum_GraphicsFrameEvent::BufferEventType; -enum GraphicsFrameEvent_BufferEventType : int32_t { - GraphicsFrameEvent_BufferEventType_UNSPECIFIED = 0, - GraphicsFrameEvent_BufferEventType_DEQUEUE = 1, - GraphicsFrameEvent_BufferEventType_QUEUE = 2, - GraphicsFrameEvent_BufferEventType_POST = 3, - GraphicsFrameEvent_BufferEventType_ACQUIRE_FENCE = 4, - GraphicsFrameEvent_BufferEventType_LATCH = 5, - GraphicsFrameEvent_BufferEventType_HWC_COMPOSITION_QUEUED = 6, - GraphicsFrameEvent_BufferEventType_FALLBACK_COMPOSITION = 7, - GraphicsFrameEvent_BufferEventType_PRESENT_FENCE = 8, - GraphicsFrameEvent_BufferEventType_RELEASE_FENCE = 9, - GraphicsFrameEvent_BufferEventType_MODIFY = 10, - GraphicsFrameEvent_BufferEventType_DETACH = 11, - GraphicsFrameEvent_BufferEventType_ATTACH = 12, - GraphicsFrameEvent_BufferEventType_CANCEL = 13, +namespace perfetto_pbzero_enum_GraphicsFrameEvent { +enum BufferEventType : int32_t { + UNSPECIFIED = 0, + DEQUEUE = 1, + QUEUE = 2, + POST = 3, + ACQUIRE_FENCE = 4, + LATCH = 5, + HWC_COMPOSITION_QUEUED = 6, + FALLBACK_COMPOSITION = 7, + PRESENT_FENCE = 8, + RELEASE_FENCE = 9, + MODIFY = 10, + DETACH = 11, + ATTACH = 12, + CANCEL = 13, }; +} // namespace perfetto_pbzero_enum_GraphicsFrameEvent +using GraphicsFrameEvent_BufferEventType = perfetto_pbzero_enum_GraphicsFrameEvent::BufferEventType; -const GraphicsFrameEvent_BufferEventType GraphicsFrameEvent_BufferEventType_MIN = GraphicsFrameEvent_BufferEventType_UNSPECIFIED; -const GraphicsFrameEvent_BufferEventType GraphicsFrameEvent_BufferEventType_MAX = GraphicsFrameEvent_BufferEventType_CANCEL; + +constexpr GraphicsFrameEvent_BufferEventType GraphicsFrameEvent_BufferEventType_MIN = GraphicsFrameEvent_BufferEventType::UNSPECIFIED; +constexpr GraphicsFrameEvent_BufferEventType GraphicsFrameEvent_BufferEventType_MAX = GraphicsFrameEvent_BufferEventType::CANCEL; + + +PERFETTO_PROTOZERO_CONSTEXPR14_OR_INLINE +const char* GraphicsFrameEvent_BufferEventType_Name(::perfetto::protos::pbzero::GraphicsFrameEvent_BufferEventType value) { + switch (value) { + case ::perfetto::protos::pbzero::GraphicsFrameEvent_BufferEventType::UNSPECIFIED: + return "UNSPECIFIED"; + + case ::perfetto::protos::pbzero::GraphicsFrameEvent_BufferEventType::DEQUEUE: + return "DEQUEUE"; + + case ::perfetto::protos::pbzero::GraphicsFrameEvent_BufferEventType::QUEUE: + return "QUEUE"; + + case ::perfetto::protos::pbzero::GraphicsFrameEvent_BufferEventType::POST: + return "POST"; + + case ::perfetto::protos::pbzero::GraphicsFrameEvent_BufferEventType::ACQUIRE_FENCE: + return "ACQUIRE_FENCE"; + + case ::perfetto::protos::pbzero::GraphicsFrameEvent_BufferEventType::LATCH: + return "LATCH"; + + case ::perfetto::protos::pbzero::GraphicsFrameEvent_BufferEventType::HWC_COMPOSITION_QUEUED: + return "HWC_COMPOSITION_QUEUED"; + + case ::perfetto::protos::pbzero::GraphicsFrameEvent_BufferEventType::FALLBACK_COMPOSITION: + return "FALLBACK_COMPOSITION"; + + case ::perfetto::protos::pbzero::GraphicsFrameEvent_BufferEventType::PRESENT_FENCE: + return "PRESENT_FENCE"; + + case ::perfetto::protos::pbzero::GraphicsFrameEvent_BufferEventType::RELEASE_FENCE: + return "RELEASE_FENCE"; + + case ::perfetto::protos::pbzero::GraphicsFrameEvent_BufferEventType::MODIFY: + return "MODIFY"; + + case ::perfetto::protos::pbzero::GraphicsFrameEvent_BufferEventType::DETACH: + return "DETACH"; + + case ::perfetto::protos::pbzero::GraphicsFrameEvent_BufferEventType::ATTACH: + return "ATTACH"; + + case ::perfetto::protos::pbzero::GraphicsFrameEvent_BufferEventType::CANCEL: + return "CANCEL"; + } + return "PBZERO_UNKNOWN_ENUM_VALUE"; +} class GraphicsFrameEvent_Decoder : public ::protozero::TypedProtoDecoder { public: @@ -41759,21 +45620,25 @@ class GraphicsFrameEvent : public ::protozero::Message { static constexpr const char* GetName() { return ".perfetto.protos.GraphicsFrameEvent"; } using BufferEvent = ::perfetto::protos::pbzero::GraphicsFrameEvent_BufferEvent; + using BufferEventType = ::perfetto::protos::pbzero::GraphicsFrameEvent_BufferEventType; - static const BufferEventType UNSPECIFIED = GraphicsFrameEvent_BufferEventType_UNSPECIFIED; - static const BufferEventType DEQUEUE = GraphicsFrameEvent_BufferEventType_DEQUEUE; - static const BufferEventType QUEUE = GraphicsFrameEvent_BufferEventType_QUEUE; - static const BufferEventType POST = GraphicsFrameEvent_BufferEventType_POST; - static const BufferEventType ACQUIRE_FENCE = GraphicsFrameEvent_BufferEventType_ACQUIRE_FENCE; - static const BufferEventType LATCH = GraphicsFrameEvent_BufferEventType_LATCH; - static const BufferEventType HWC_COMPOSITION_QUEUED = GraphicsFrameEvent_BufferEventType_HWC_COMPOSITION_QUEUED; - static const BufferEventType FALLBACK_COMPOSITION = GraphicsFrameEvent_BufferEventType_FALLBACK_COMPOSITION; - static const BufferEventType PRESENT_FENCE = GraphicsFrameEvent_BufferEventType_PRESENT_FENCE; - static const BufferEventType RELEASE_FENCE = GraphicsFrameEvent_BufferEventType_RELEASE_FENCE; - static const BufferEventType MODIFY = GraphicsFrameEvent_BufferEventType_MODIFY; - static const BufferEventType DETACH = GraphicsFrameEvent_BufferEventType_DETACH; - static const BufferEventType ATTACH = GraphicsFrameEvent_BufferEventType_ATTACH; - static const BufferEventType CANCEL = GraphicsFrameEvent_BufferEventType_CANCEL; + static inline const char* BufferEventType_Name(BufferEventType value) { + return ::perfetto::protos::pbzero::GraphicsFrameEvent_BufferEventType_Name(value); + } + static const BufferEventType UNSPECIFIED = BufferEventType::UNSPECIFIED; + static const BufferEventType DEQUEUE = BufferEventType::DEQUEUE; + static const BufferEventType QUEUE = BufferEventType::QUEUE; + static const BufferEventType POST = BufferEventType::POST; + static const BufferEventType ACQUIRE_FENCE = BufferEventType::ACQUIRE_FENCE; + static const BufferEventType LATCH = BufferEventType::LATCH; + static const BufferEventType HWC_COMPOSITION_QUEUED = BufferEventType::HWC_COMPOSITION_QUEUED; + static const BufferEventType FALLBACK_COMPOSITION = BufferEventType::FALLBACK_COMPOSITION; + static const BufferEventType PRESENT_FENCE = BufferEventType::PRESENT_FENCE; + static const BufferEventType RELEASE_FENCE = BufferEventType::RELEASE_FENCE; + static const BufferEventType MODIFY = BufferEventType::MODIFY; + static const BufferEventType DETACH = BufferEventType::DETACH; + static const BufferEventType ATTACH = BufferEventType::ATTACH; + static const BufferEventType CANCEL = BufferEventType::CANCEL; using FieldMetadata_BufferEvent = ::protozero::proto_utils::FieldMetadata< @@ -41783,14 +45648,7 @@ class GraphicsFrameEvent : public ::protozero::Message { GraphicsFrameEvent_BufferEvent, GraphicsFrameEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_BufferEvent kBufferEvent() { return {}; } + static constexpr FieldMetadata_BufferEvent kBufferEvent{}; template T* set_buffer_event() { return BeginNestedMessage(1); } @@ -41835,14 +45693,7 @@ class GraphicsFrameEvent_BufferEvent : public ::protozero::Message { uint32_t, GraphicsFrameEvent_BufferEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_FrameNumber kFrameNumber() { return {}; } + static constexpr FieldMetadata_FrameNumber kFrameNumber{}; void set_frame_number(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_FrameNumber::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -41860,14 +45711,7 @@ class GraphicsFrameEvent_BufferEvent : public ::protozero::Message { ::perfetto::protos::pbzero::GraphicsFrameEvent_BufferEventType, GraphicsFrameEvent_BufferEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Type kType() { return {}; } + static constexpr FieldMetadata_Type kType{}; void set_type(::perfetto::protos::pbzero::GraphicsFrameEvent_BufferEventType value) { static constexpr uint32_t field_id = FieldMetadata_Type::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -41885,17 +45729,13 @@ class GraphicsFrameEvent_BufferEvent : public ::protozero::Message { std::string, GraphicsFrameEvent_BufferEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_LayerName kLayerName() { return {}; } + static constexpr FieldMetadata_LayerName kLayerName{}; void set_layer_name(const char* data, size_t size) { AppendBytes(FieldMetadata_LayerName::kFieldId, data, size); } + void set_layer_name(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_LayerName::kFieldId, chars.data, chars.size); + } void set_layer_name(std::string value) { static constexpr uint32_t field_id = FieldMetadata_LayerName::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -41913,14 +45753,7 @@ class GraphicsFrameEvent_BufferEvent : public ::protozero::Message { uint64_t, GraphicsFrameEvent_BufferEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_DurationNs kDurationNs() { return {}; } + static constexpr FieldMetadata_DurationNs kDurationNs{}; void set_duration_ns(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_DurationNs::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -41938,14 +45771,7 @@ class GraphicsFrameEvent_BufferEvent : public ::protozero::Message { uint32_t, GraphicsFrameEvent_BufferEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_BufferId kBufferId() { return {}; } + static constexpr FieldMetadata_BufferId kBufferId{}; void set_buffer_id(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_BufferId::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -42009,14 +45835,7 @@ class InitialDisplayState : public ::protozero::Message { int32_t, InitialDisplayState>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_DisplayState kDisplayState() { return {}; } + static constexpr FieldMetadata_DisplayState kDisplayState{}; void set_display_state(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_DisplayState::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -42034,14 +45853,7 @@ class InitialDisplayState : public ::protozero::Message { double, InitialDisplayState>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Brightness kBrightness() { return {}; } + static constexpr FieldMetadata_Brightness kBrightness{}; void set_brightness(double value) { static constexpr uint32_t field_id = FieldMetadata_Brightness::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -42052,6 +45864,473 @@ class InitialDisplayState : public ::protozero::Message { } }; +} // Namespace. +} // Namespace. +} // Namespace. +#endif // Include guard. +// gen_amalgamated begin header: gen/protos/perfetto/trace/android/network_trace.pbzero.h +// Autogenerated by the ProtoZero compiler plugin. DO NOT EDIT. + +#ifndef PERFETTO_PROTOS_PROTOS_PERFETTO_TRACE_ANDROID_NETWORK_TRACE_PROTO_H_ +#define PERFETTO_PROTOS_PROTOS_PERFETTO_TRACE_ANDROID_NETWORK_TRACE_PROTO_H_ + +#include +#include + +// gen_amalgamated expanded: #include "perfetto/protozero/field_writer.h" +// gen_amalgamated expanded: #include "perfetto/protozero/message.h" +// gen_amalgamated expanded: #include "perfetto/protozero/packed_repeated_fields.h" +// gen_amalgamated expanded: #include "perfetto/protozero/proto_decoder.h" +// gen_amalgamated expanded: #include "perfetto/protozero/proto_utils.h" + +namespace perfetto { +namespace protos { +namespace pbzero { + +class NetworkPacketEvent; +enum TrafficDirection : int32_t; + +enum TrafficDirection : int32_t { + DIR_UNSPECIFIED = 0, + DIR_INGRESS = 1, + DIR_EGRESS = 2, +}; + +constexpr TrafficDirection TrafficDirection_MIN = TrafficDirection::DIR_UNSPECIFIED; +constexpr TrafficDirection TrafficDirection_MAX = TrafficDirection::DIR_EGRESS; + + +PERFETTO_PROTOZERO_CONSTEXPR14_OR_INLINE +const char* TrafficDirection_Name(::perfetto::protos::pbzero::TrafficDirection value) { + switch (value) { + case ::perfetto::protos::pbzero::TrafficDirection::DIR_UNSPECIFIED: + return "DIR_UNSPECIFIED"; + + case ::perfetto::protos::pbzero::TrafficDirection::DIR_INGRESS: + return "DIR_INGRESS"; + + case ::perfetto::protos::pbzero::TrafficDirection::DIR_EGRESS: + return "DIR_EGRESS"; + } + return "PBZERO_UNKNOWN_ENUM_VALUE"; +} + +class NetworkPacketContext_Decoder : public ::protozero::TypedProtoDecoder { + public: + NetworkPacketContext_Decoder(const uint8_t* data, size_t len) : TypedProtoDecoder(data, len) {} + explicit NetworkPacketContext_Decoder(const std::string& raw) : TypedProtoDecoder(reinterpret_cast(raw.data()), raw.size()) {} + explicit NetworkPacketContext_Decoder(const ::protozero::ConstBytes& raw) : TypedProtoDecoder(raw.data, raw.size) {} + bool has_iid() const { return at<1>().valid(); } + uint64_t iid() const { return at<1>().as_uint64(); } + bool has_ctx() const { return at<2>().valid(); } + ::protozero::ConstBytes ctx() const { return at<2>().as_bytes(); } +}; + +class NetworkPacketContext : public ::protozero::Message { + public: + using Decoder = NetworkPacketContext_Decoder; + enum : int32_t { + kIidFieldNumber = 1, + kCtxFieldNumber = 2, + }; + static constexpr const char* GetName() { return ".perfetto.protos.NetworkPacketContext"; } + + + using FieldMetadata_Iid = + ::protozero::proto_utils::FieldMetadata< + 1, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint64, + uint64_t, + NetworkPacketContext>; + + static constexpr FieldMetadata_Iid kIid{}; + void set_iid(uint64_t value) { + static constexpr uint32_t field_id = FieldMetadata_Iid::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint64> + ::Append(*this, field_id, value); + } + + using FieldMetadata_Ctx = + ::protozero::proto_utils::FieldMetadata< + 2, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kMessage, + NetworkPacketEvent, + NetworkPacketContext>; + + static constexpr FieldMetadata_Ctx kCtx{}; + template T* set_ctx() { + return BeginNestedMessage(2); + } + +}; + +class NetworkPacketBundle_Decoder : public ::protozero::TypedProtoDecoder { + public: + NetworkPacketBundle_Decoder(const uint8_t* data, size_t len) : TypedProtoDecoder(data, len) {} + explicit NetworkPacketBundle_Decoder(const std::string& raw) : TypedProtoDecoder(reinterpret_cast(raw.data()), raw.size()) {} + explicit NetworkPacketBundle_Decoder(const ::protozero::ConstBytes& raw) : TypedProtoDecoder(raw.data, raw.size) {} + bool has_iid() const { return at<1>().valid(); } + uint64_t iid() const { return at<1>().as_uint64(); } + bool has_ctx() const { return at<2>().valid(); } + ::protozero::ConstBytes ctx() const { return at<2>().as_bytes(); } + bool has_packet_timestamps() const { return at<3>().valid(); } + ::protozero::PackedRepeatedFieldIterator<::protozero::proto_utils::ProtoWireType::kVarInt, uint64_t> packet_timestamps(bool* parse_error_ptr) const { return GetPackedRepeated<::protozero::proto_utils::ProtoWireType::kVarInt, uint64_t>(3, parse_error_ptr); } + bool has_packet_lengths() const { return at<4>().valid(); } + ::protozero::PackedRepeatedFieldIterator<::protozero::proto_utils::ProtoWireType::kVarInt, uint32_t> packet_lengths(bool* parse_error_ptr) const { return GetPackedRepeated<::protozero::proto_utils::ProtoWireType::kVarInt, uint32_t>(4, parse_error_ptr); } + bool has_total_packets() const { return at<5>().valid(); } + uint32_t total_packets() const { return at<5>().as_uint32(); } + bool has_total_duration() const { return at<6>().valid(); } + uint64_t total_duration() const { return at<6>().as_uint64(); } + bool has_total_length() const { return at<7>().valid(); } + uint64_t total_length() const { return at<7>().as_uint64(); } +}; + +class NetworkPacketBundle : public ::protozero::Message { + public: + using Decoder = NetworkPacketBundle_Decoder; + enum : int32_t { + kIidFieldNumber = 1, + kCtxFieldNumber = 2, + kPacketTimestampsFieldNumber = 3, + kPacketLengthsFieldNumber = 4, + kTotalPacketsFieldNumber = 5, + kTotalDurationFieldNumber = 6, + kTotalLengthFieldNumber = 7, + }; + static constexpr const char* GetName() { return ".perfetto.protos.NetworkPacketBundle"; } + + + using FieldMetadata_Iid = + ::protozero::proto_utils::FieldMetadata< + 1, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint64, + uint64_t, + NetworkPacketBundle>; + + static constexpr FieldMetadata_Iid kIid{}; + void set_iid(uint64_t value) { + static constexpr uint32_t field_id = FieldMetadata_Iid::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint64> + ::Append(*this, field_id, value); + } + + using FieldMetadata_Ctx = + ::protozero::proto_utils::FieldMetadata< + 2, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kMessage, + NetworkPacketEvent, + NetworkPacketBundle>; + + static constexpr FieldMetadata_Ctx kCtx{}; + template T* set_ctx() { + return BeginNestedMessage(2); + } + + + using FieldMetadata_PacketTimestamps = + ::protozero::proto_utils::FieldMetadata< + 3, + ::protozero::proto_utils::RepetitionType::kRepeatedPacked, + ::protozero::proto_utils::ProtoSchemaType::kUint64, + uint64_t, + NetworkPacketBundle>; + + static constexpr FieldMetadata_PacketTimestamps kPacketTimestamps{}; + void set_packet_timestamps(const ::protozero::PackedVarInt& packed_buffer) { + AppendBytes(FieldMetadata_PacketTimestamps::kFieldId, packed_buffer.data(), + packed_buffer.size()); + } + + using FieldMetadata_PacketLengths = + ::protozero::proto_utils::FieldMetadata< + 4, + ::protozero::proto_utils::RepetitionType::kRepeatedPacked, + ::protozero::proto_utils::ProtoSchemaType::kUint32, + uint32_t, + NetworkPacketBundle>; + + static constexpr FieldMetadata_PacketLengths kPacketLengths{}; + void set_packet_lengths(const ::protozero::PackedVarInt& packed_buffer) { + AppendBytes(FieldMetadata_PacketLengths::kFieldId, packed_buffer.data(), + packed_buffer.size()); + } + + using FieldMetadata_TotalPackets = + ::protozero::proto_utils::FieldMetadata< + 5, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint32, + uint32_t, + NetworkPacketBundle>; + + static constexpr FieldMetadata_TotalPackets kTotalPackets{}; + void set_total_packets(uint32_t value) { + static constexpr uint32_t field_id = FieldMetadata_TotalPackets::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint32> + ::Append(*this, field_id, value); + } + + using FieldMetadata_TotalDuration = + ::protozero::proto_utils::FieldMetadata< + 6, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint64, + uint64_t, + NetworkPacketBundle>; + + static constexpr FieldMetadata_TotalDuration kTotalDuration{}; + void set_total_duration(uint64_t value) { + static constexpr uint32_t field_id = FieldMetadata_TotalDuration::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint64> + ::Append(*this, field_id, value); + } + + using FieldMetadata_TotalLength = + ::protozero::proto_utils::FieldMetadata< + 7, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint64, + uint64_t, + NetworkPacketBundle>; + + static constexpr FieldMetadata_TotalLength kTotalLength{}; + void set_total_length(uint64_t value) { + static constexpr uint32_t field_id = FieldMetadata_TotalLength::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint64> + ::Append(*this, field_id, value); + } +}; + +class NetworkPacketEvent_Decoder : public ::protozero::TypedProtoDecoder { + public: + NetworkPacketEvent_Decoder(const uint8_t* data, size_t len) : TypedProtoDecoder(data, len) {} + explicit NetworkPacketEvent_Decoder(const std::string& raw) : TypedProtoDecoder(reinterpret_cast(raw.data()), raw.size()) {} + explicit NetworkPacketEvent_Decoder(const ::protozero::ConstBytes& raw) : TypedProtoDecoder(raw.data, raw.size) {} + bool has_direction() const { return at<1>().valid(); } + int32_t direction() const { return at<1>().as_int32(); } + bool has_interface() const { return at<2>().valid(); } + ::protozero::ConstChars interface() const { return at<2>().as_string(); } + bool has_length() const { return at<3>().valid(); } + uint32_t length() const { return at<3>().as_uint32(); } + bool has_uid() const { return at<4>().valid(); } + uint32_t uid() const { return at<4>().as_uint32(); } + bool has_tag() const { return at<5>().valid(); } + uint32_t tag() const { return at<5>().as_uint32(); } + bool has_ip_proto() const { return at<6>().valid(); } + uint32_t ip_proto() const { return at<6>().as_uint32(); } + bool has_tcp_flags() const { return at<7>().valid(); } + uint32_t tcp_flags() const { return at<7>().as_uint32(); } + bool has_local_port() const { return at<8>().valid(); } + uint32_t local_port() const { return at<8>().as_uint32(); } + bool has_remote_port() const { return at<9>().valid(); } + uint32_t remote_port() const { return at<9>().as_uint32(); } +}; + +class NetworkPacketEvent : public ::protozero::Message { + public: + using Decoder = NetworkPacketEvent_Decoder; + enum : int32_t { + kDirectionFieldNumber = 1, + kInterfaceFieldNumber = 2, + kLengthFieldNumber = 3, + kUidFieldNumber = 4, + kTagFieldNumber = 5, + kIpProtoFieldNumber = 6, + kTcpFlagsFieldNumber = 7, + kLocalPortFieldNumber = 8, + kRemotePortFieldNumber = 9, + }; + static constexpr const char* GetName() { return ".perfetto.protos.NetworkPacketEvent"; } + + + using FieldMetadata_Direction = + ::protozero::proto_utils::FieldMetadata< + 1, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kEnum, + ::perfetto::protos::pbzero::TrafficDirection, + NetworkPacketEvent>; + + static constexpr FieldMetadata_Direction kDirection{}; + void set_direction(::perfetto::protos::pbzero::TrafficDirection value) { + static constexpr uint32_t field_id = FieldMetadata_Direction::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kEnum> + ::Append(*this, field_id, value); + } + + using FieldMetadata_Interface = + ::protozero::proto_utils::FieldMetadata< + 2, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kString, + std::string, + NetworkPacketEvent>; + + static constexpr FieldMetadata_Interface kInterface{}; + void set_interface(const char* data, size_t size) { + AppendBytes(FieldMetadata_Interface::kFieldId, data, size); + } + void set_interface(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Interface::kFieldId, chars.data, chars.size); + } + void set_interface(std::string value) { + static constexpr uint32_t field_id = FieldMetadata_Interface::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kString> + ::Append(*this, field_id, value); + } + + using FieldMetadata_Length = + ::protozero::proto_utils::FieldMetadata< + 3, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint32, + uint32_t, + NetworkPacketEvent>; + + static constexpr FieldMetadata_Length kLength{}; + void set_length(uint32_t value) { + static constexpr uint32_t field_id = FieldMetadata_Length::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint32> + ::Append(*this, field_id, value); + } + + using FieldMetadata_Uid = + ::protozero::proto_utils::FieldMetadata< + 4, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint32, + uint32_t, + NetworkPacketEvent>; + + static constexpr FieldMetadata_Uid kUid{}; + void set_uid(uint32_t value) { + static constexpr uint32_t field_id = FieldMetadata_Uid::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint32> + ::Append(*this, field_id, value); + } + + using FieldMetadata_Tag = + ::protozero::proto_utils::FieldMetadata< + 5, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint32, + uint32_t, + NetworkPacketEvent>; + + static constexpr FieldMetadata_Tag kTag{}; + void set_tag(uint32_t value) { + static constexpr uint32_t field_id = FieldMetadata_Tag::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint32> + ::Append(*this, field_id, value); + } + + using FieldMetadata_IpProto = + ::protozero::proto_utils::FieldMetadata< + 6, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint32, + uint32_t, + NetworkPacketEvent>; + + static constexpr FieldMetadata_IpProto kIpProto{}; + void set_ip_proto(uint32_t value) { + static constexpr uint32_t field_id = FieldMetadata_IpProto::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint32> + ::Append(*this, field_id, value); + } + + using FieldMetadata_TcpFlags = + ::protozero::proto_utils::FieldMetadata< + 7, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint32, + uint32_t, + NetworkPacketEvent>; + + static constexpr FieldMetadata_TcpFlags kTcpFlags{}; + void set_tcp_flags(uint32_t value) { + static constexpr uint32_t field_id = FieldMetadata_TcpFlags::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint32> + ::Append(*this, field_id, value); + } + + using FieldMetadata_LocalPort = + ::protozero::proto_utils::FieldMetadata< + 8, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint32, + uint32_t, + NetworkPacketEvent>; + + static constexpr FieldMetadata_LocalPort kLocalPort{}; + void set_local_port(uint32_t value) { + static constexpr uint32_t field_id = FieldMetadata_LocalPort::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint32> + ::Append(*this, field_id, value); + } + + using FieldMetadata_RemotePort = + ::protozero::proto_utils::FieldMetadata< + 9, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint32, + uint32_t, + NetworkPacketEvent>; + + static constexpr FieldMetadata_RemotePort kRemotePort{}; + void set_remote_port(uint32_t value) { + static constexpr uint32_t field_id = FieldMetadata_RemotePort::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint32> + ::Append(*this, field_id, value); + } +}; + } // Namespace. } // Namespace. } // Namespace. @@ -42110,14 +46389,7 @@ class PackagesList : public ::protozero::Message { PackagesList_PackageInfo, PackagesList>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Packages kPackages() { return {}; } + static constexpr FieldMetadata_Packages kPackages{}; template T* add_packages() { return BeginNestedMessage(1); } @@ -42131,14 +46403,7 @@ class PackagesList : public ::protozero::Message { bool, PackagesList>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ParseError kParseError() { return {}; } + static constexpr FieldMetadata_ParseError kParseError{}; void set_parse_error(bool value) { static constexpr uint32_t field_id = FieldMetadata_ParseError::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -42156,14 +46421,7 @@ class PackagesList : public ::protozero::Message { bool, PackagesList>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ReadError kReadError() { return {}; } + static constexpr FieldMetadata_ReadError kReadError{}; void set_read_error(bool value) { static constexpr uint32_t field_id = FieldMetadata_ReadError::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -42212,17 +46470,13 @@ class PackagesList_PackageInfo : public ::protozero::Message { std::string, PackagesList_PackageInfo>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Name kName() { return {}; } + static constexpr FieldMetadata_Name kName{}; void set_name(const char* data, size_t size) { AppendBytes(FieldMetadata_Name::kFieldId, data, size); } + void set_name(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Name::kFieldId, chars.data, chars.size); + } void set_name(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Name::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -42240,14 +46494,7 @@ class PackagesList_PackageInfo : public ::protozero::Message { uint64_t, PackagesList_PackageInfo>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Uid kUid() { return {}; } + static constexpr FieldMetadata_Uid kUid{}; void set_uid(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Uid::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -42265,14 +46512,7 @@ class PackagesList_PackageInfo : public ::protozero::Message { bool, PackagesList_PackageInfo>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Debuggable kDebuggable() { return {}; } + static constexpr FieldMetadata_Debuggable kDebuggable{}; void set_debuggable(bool value) { static constexpr uint32_t field_id = FieldMetadata_Debuggable::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -42290,14 +46530,7 @@ class PackagesList_PackageInfo : public ::protozero::Message { bool, PackagesList_PackageInfo>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ProfileableFromShell kProfileableFromShell() { return {}; } + static constexpr FieldMetadata_ProfileableFromShell kProfileableFromShell{}; void set_profileable_from_shell(bool value) { static constexpr uint32_t field_id = FieldMetadata_ProfileableFromShell::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -42315,14 +46548,7 @@ class PackagesList_PackageInfo : public ::protozero::Message { int64_t, PackagesList_PackageInfo>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_VersionCode kVersionCode() { return {}; } + static constexpr FieldMetadata_VersionCode kVersionCode{}; void set_version_code(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_VersionCode::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -42407,14 +46633,7 @@ class ChromeBenchmarkMetadata : public ::protozero::Message { int64_t, ChromeBenchmarkMetadata>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_BenchmarkStartTimeUs kBenchmarkStartTimeUs() { return {}; } + static constexpr FieldMetadata_BenchmarkStartTimeUs kBenchmarkStartTimeUs{}; void set_benchmark_start_time_us(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_BenchmarkStartTimeUs::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -42432,14 +46651,7 @@ class ChromeBenchmarkMetadata : public ::protozero::Message { int64_t, ChromeBenchmarkMetadata>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_StoryRunTimeUs kStoryRunTimeUs() { return {}; } + static constexpr FieldMetadata_StoryRunTimeUs kStoryRunTimeUs{}; void set_story_run_time_us(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_StoryRunTimeUs::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -42457,17 +46669,13 @@ class ChromeBenchmarkMetadata : public ::protozero::Message { std::string, ChromeBenchmarkMetadata>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_BenchmarkName kBenchmarkName() { return {}; } + static constexpr FieldMetadata_BenchmarkName kBenchmarkName{}; void set_benchmark_name(const char* data, size_t size) { AppendBytes(FieldMetadata_BenchmarkName::kFieldId, data, size); } + void set_benchmark_name(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_BenchmarkName::kFieldId, chars.data, chars.size); + } void set_benchmark_name(std::string value) { static constexpr uint32_t field_id = FieldMetadata_BenchmarkName::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -42485,17 +46693,13 @@ class ChromeBenchmarkMetadata : public ::protozero::Message { std::string, ChromeBenchmarkMetadata>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_BenchmarkDescription kBenchmarkDescription() { return {}; } + static constexpr FieldMetadata_BenchmarkDescription kBenchmarkDescription{}; void set_benchmark_description(const char* data, size_t size) { AppendBytes(FieldMetadata_BenchmarkDescription::kFieldId, data, size); } + void set_benchmark_description(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_BenchmarkDescription::kFieldId, chars.data, chars.size); + } void set_benchmark_description(std::string value) { static constexpr uint32_t field_id = FieldMetadata_BenchmarkDescription::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -42513,17 +46717,13 @@ class ChromeBenchmarkMetadata : public ::protozero::Message { std::string, ChromeBenchmarkMetadata>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Label kLabel() { return {}; } + static constexpr FieldMetadata_Label kLabel{}; void set_label(const char* data, size_t size) { AppendBytes(FieldMetadata_Label::kFieldId, data, size); } + void set_label(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Label::kFieldId, chars.data, chars.size); + } void set_label(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Label::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -42541,17 +46741,13 @@ class ChromeBenchmarkMetadata : public ::protozero::Message { std::string, ChromeBenchmarkMetadata>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_StoryName kStoryName() { return {}; } + static constexpr FieldMetadata_StoryName kStoryName{}; void set_story_name(const char* data, size_t size) { AppendBytes(FieldMetadata_StoryName::kFieldId, data, size); } + void set_story_name(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_StoryName::kFieldId, chars.data, chars.size); + } void set_story_name(std::string value) { static constexpr uint32_t field_id = FieldMetadata_StoryName::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -42569,17 +46765,13 @@ class ChromeBenchmarkMetadata : public ::protozero::Message { std::string, ChromeBenchmarkMetadata>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_StoryTags kStoryTags() { return {}; } + static constexpr FieldMetadata_StoryTags kStoryTags{}; void add_story_tags(const char* data, size_t size) { AppendBytes(FieldMetadata_StoryTags::kFieldId, data, size); } + void add_story_tags(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_StoryTags::kFieldId, chars.data, chars.size); + } void add_story_tags(std::string value) { static constexpr uint32_t field_id = FieldMetadata_StoryTags::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -42597,14 +46789,7 @@ class ChromeBenchmarkMetadata : public ::protozero::Message { int32_t, ChromeBenchmarkMetadata>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_StoryRunIndex kStoryRunIndex() { return {}; } + static constexpr FieldMetadata_StoryRunIndex kStoryRunIndex{}; void set_story_run_index(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_StoryRunIndex::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -42622,14 +46807,7 @@ class ChromeBenchmarkMetadata : public ::protozero::Message { bool, ChromeBenchmarkMetadata>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_HadFailures kHadFailures() { return {}; } + static constexpr FieldMetadata_HadFailures kHadFailures{}; void set_had_failures(bool value) { static constexpr uint32_t field_id = FieldMetadata_HadFailures::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -42667,32 +46845,90 @@ class BackgroundTracingMetadata; class BackgroundTracingMetadata_TriggerRule; class BackgroundTracingMetadata_TriggerRule_HistogramRule; class BackgroundTracingMetadata_TriggerRule_NamedRule; -enum BackgroundTracingMetadata_TriggerRule_NamedRule_EventType : int32_t; -enum BackgroundTracingMetadata_TriggerRule_TriggerType : int32_t; +namespace perfetto_pbzero_enum_BackgroundTracingMetadata_TriggerRule_NamedRule { +enum EventType : int32_t; +} // namespace perfetto_pbzero_enum_BackgroundTracingMetadata_TriggerRule_NamedRule +using BackgroundTracingMetadata_TriggerRule_NamedRule_EventType = perfetto_pbzero_enum_BackgroundTracingMetadata_TriggerRule_NamedRule::EventType; +namespace perfetto_pbzero_enum_BackgroundTracingMetadata_TriggerRule { +enum TriggerType : int32_t; +} // namespace perfetto_pbzero_enum_BackgroundTracingMetadata_TriggerRule +using BackgroundTracingMetadata_TriggerRule_TriggerType = perfetto_pbzero_enum_BackgroundTracingMetadata_TriggerRule::TriggerType; -enum BackgroundTracingMetadata_TriggerRule_TriggerType : int32_t { - BackgroundTracingMetadata_TriggerRule_TriggerType_TRIGGER_UNSPECIFIED = 0, - BackgroundTracingMetadata_TriggerRule_TriggerType_MONITOR_AND_DUMP_WHEN_SPECIFIC_HISTOGRAM_AND_VALUE = 1, - BackgroundTracingMetadata_TriggerRule_TriggerType_MONITOR_AND_DUMP_WHEN_TRIGGER_NAMED = 2, +namespace perfetto_pbzero_enum_BackgroundTracingMetadata_TriggerRule { +enum TriggerType : int32_t { + TRIGGER_UNSPECIFIED = 0, + MONITOR_AND_DUMP_WHEN_SPECIFIC_HISTOGRAM_AND_VALUE = 1, + MONITOR_AND_DUMP_WHEN_TRIGGER_NAMED = 2, }; +} // namespace perfetto_pbzero_enum_BackgroundTracingMetadata_TriggerRule +using BackgroundTracingMetadata_TriggerRule_TriggerType = perfetto_pbzero_enum_BackgroundTracingMetadata_TriggerRule::TriggerType; -const BackgroundTracingMetadata_TriggerRule_TriggerType BackgroundTracingMetadata_TriggerRule_TriggerType_MIN = BackgroundTracingMetadata_TriggerRule_TriggerType_TRIGGER_UNSPECIFIED; -const BackgroundTracingMetadata_TriggerRule_TriggerType BackgroundTracingMetadata_TriggerRule_TriggerType_MAX = BackgroundTracingMetadata_TriggerRule_TriggerType_MONITOR_AND_DUMP_WHEN_TRIGGER_NAMED; -enum BackgroundTracingMetadata_TriggerRule_NamedRule_EventType : int32_t { - BackgroundTracingMetadata_TriggerRule_NamedRule_EventType_UNSPECIFIED = 0, - BackgroundTracingMetadata_TriggerRule_NamedRule_EventType_SESSION_RESTORE = 1, - BackgroundTracingMetadata_TriggerRule_NamedRule_EventType_NAVIGATION = 2, - BackgroundTracingMetadata_TriggerRule_NamedRule_EventType_STARTUP = 3, - BackgroundTracingMetadata_TriggerRule_NamedRule_EventType_REACHED_CODE = 4, - BackgroundTracingMetadata_TriggerRule_NamedRule_EventType_CONTENT_TRIGGER = 5, - BackgroundTracingMetadata_TriggerRule_NamedRule_EventType_TEST_RULE = 1000, +constexpr BackgroundTracingMetadata_TriggerRule_TriggerType BackgroundTracingMetadata_TriggerRule_TriggerType_MIN = BackgroundTracingMetadata_TriggerRule_TriggerType::TRIGGER_UNSPECIFIED; +constexpr BackgroundTracingMetadata_TriggerRule_TriggerType BackgroundTracingMetadata_TriggerRule_TriggerType_MAX = BackgroundTracingMetadata_TriggerRule_TriggerType::MONITOR_AND_DUMP_WHEN_TRIGGER_NAMED; + + +PERFETTO_PROTOZERO_CONSTEXPR14_OR_INLINE +const char* BackgroundTracingMetadata_TriggerRule_TriggerType_Name(::perfetto::protos::pbzero::BackgroundTracingMetadata_TriggerRule_TriggerType value) { + switch (value) { + case ::perfetto::protos::pbzero::BackgroundTracingMetadata_TriggerRule_TriggerType::TRIGGER_UNSPECIFIED: + return "TRIGGER_UNSPECIFIED"; + + case ::perfetto::protos::pbzero::BackgroundTracingMetadata_TriggerRule_TriggerType::MONITOR_AND_DUMP_WHEN_SPECIFIC_HISTOGRAM_AND_VALUE: + return "MONITOR_AND_DUMP_WHEN_SPECIFIC_HISTOGRAM_AND_VALUE"; + + case ::perfetto::protos::pbzero::BackgroundTracingMetadata_TriggerRule_TriggerType::MONITOR_AND_DUMP_WHEN_TRIGGER_NAMED: + return "MONITOR_AND_DUMP_WHEN_TRIGGER_NAMED"; + } + return "PBZERO_UNKNOWN_ENUM_VALUE"; +} + +namespace perfetto_pbzero_enum_BackgroundTracingMetadata_TriggerRule_NamedRule { +enum EventType : int32_t { + UNSPECIFIED = 0, + SESSION_RESTORE = 1, + NAVIGATION = 2, + STARTUP = 3, + REACHED_CODE = 4, + CONTENT_TRIGGER = 5, + TEST_RULE = 1000, }; +} // namespace perfetto_pbzero_enum_BackgroundTracingMetadata_TriggerRule_NamedRule +using BackgroundTracingMetadata_TriggerRule_NamedRule_EventType = perfetto_pbzero_enum_BackgroundTracingMetadata_TriggerRule_NamedRule::EventType; -const BackgroundTracingMetadata_TriggerRule_NamedRule_EventType BackgroundTracingMetadata_TriggerRule_NamedRule_EventType_MIN = BackgroundTracingMetadata_TriggerRule_NamedRule_EventType_UNSPECIFIED; -const BackgroundTracingMetadata_TriggerRule_NamedRule_EventType BackgroundTracingMetadata_TriggerRule_NamedRule_EventType_MAX = BackgroundTracingMetadata_TriggerRule_NamedRule_EventType_TEST_RULE; -class BackgroundTracingMetadata_Decoder : public ::protozero::TypedProtoDecoder { +constexpr BackgroundTracingMetadata_TriggerRule_NamedRule_EventType BackgroundTracingMetadata_TriggerRule_NamedRule_EventType_MIN = BackgroundTracingMetadata_TriggerRule_NamedRule_EventType::UNSPECIFIED; +constexpr BackgroundTracingMetadata_TriggerRule_NamedRule_EventType BackgroundTracingMetadata_TriggerRule_NamedRule_EventType_MAX = BackgroundTracingMetadata_TriggerRule_NamedRule_EventType::TEST_RULE; + + +PERFETTO_PROTOZERO_CONSTEXPR14_OR_INLINE +const char* BackgroundTracingMetadata_TriggerRule_NamedRule_EventType_Name(::perfetto::protos::pbzero::BackgroundTracingMetadata_TriggerRule_NamedRule_EventType value) { + switch (value) { + case ::perfetto::protos::pbzero::BackgroundTracingMetadata_TriggerRule_NamedRule_EventType::UNSPECIFIED: + return "UNSPECIFIED"; + + case ::perfetto::protos::pbzero::BackgroundTracingMetadata_TriggerRule_NamedRule_EventType::SESSION_RESTORE: + return "SESSION_RESTORE"; + + case ::perfetto::protos::pbzero::BackgroundTracingMetadata_TriggerRule_NamedRule_EventType::NAVIGATION: + return "NAVIGATION"; + + case ::perfetto::protos::pbzero::BackgroundTracingMetadata_TriggerRule_NamedRule_EventType::STARTUP: + return "STARTUP"; + + case ::perfetto::protos::pbzero::BackgroundTracingMetadata_TriggerRule_NamedRule_EventType::REACHED_CODE: + return "REACHED_CODE"; + + case ::perfetto::protos::pbzero::BackgroundTracingMetadata_TriggerRule_NamedRule_EventType::CONTENT_TRIGGER: + return "CONTENT_TRIGGER"; + + case ::perfetto::protos::pbzero::BackgroundTracingMetadata_TriggerRule_NamedRule_EventType::TEST_RULE: + return "TEST_RULE"; + } + return "PBZERO_UNKNOWN_ENUM_VALUE"; +} + +class BackgroundTracingMetadata_Decoder : public ::protozero::TypedProtoDecoder { public: BackgroundTracingMetadata_Decoder(const uint8_t* data, size_t len) : TypedProtoDecoder(data, len) {} explicit BackgroundTracingMetadata_Decoder(const std::string& raw) : TypedProtoDecoder(reinterpret_cast(raw.data()), raw.size()) {} @@ -42701,6 +46937,8 @@ class BackgroundTracingMetadata_Decoder : public ::protozero::TypedProtoDecoder< ::protozero::ConstBytes triggered_rule() const { return at<1>().as_bytes(); } bool has_active_rules() const { return at<2>().valid(); } ::protozero::RepeatedFieldIterator<::protozero::ConstBytes> active_rules() const { return GetRepeated<::protozero::ConstBytes>(2); } + bool has_scenario_name_hash() const { return at<3>().valid(); } + uint32_t scenario_name_hash() const { return at<3>().as_uint32(); } }; class BackgroundTracingMetadata : public ::protozero::Message { @@ -42709,6 +46947,7 @@ class BackgroundTracingMetadata : public ::protozero::Message { enum : int32_t { kTriggeredRuleFieldNumber = 1, kActiveRulesFieldNumber = 2, + kScenarioNameHashFieldNumber = 3, }; static constexpr const char* GetName() { return ".perfetto.protos.BackgroundTracingMetadata"; } @@ -42722,14 +46961,7 @@ class BackgroundTracingMetadata : public ::protozero::Message { BackgroundTracingMetadata_TriggerRule, BackgroundTracingMetadata>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_TriggeredRule kTriggeredRule() { return {}; } + static constexpr FieldMetadata_TriggeredRule kTriggeredRule{}; template T* set_triggered_rule() { return BeginNestedMessage(1); } @@ -42743,21 +46975,32 @@ class BackgroundTracingMetadata : public ::protozero::Message { BackgroundTracingMetadata_TriggerRule, BackgroundTracingMetadata>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ActiveRules kActiveRules() { return {}; } + static constexpr FieldMetadata_ActiveRules kActiveRules{}; template T* add_active_rules() { return BeginNestedMessage(2); } + + using FieldMetadata_ScenarioNameHash = + ::protozero::proto_utils::FieldMetadata< + 3, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kFixed32, + uint32_t, + BackgroundTracingMetadata>; + + static constexpr FieldMetadata_ScenarioNameHash kScenarioNameHash{}; + void set_scenario_name_hash(uint32_t value) { + static constexpr uint32_t field_id = FieldMetadata_ScenarioNameHash::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kFixed32> + ::Append(*this, field_id, value); + } }; -class BackgroundTracingMetadata_TriggerRule_Decoder : public ::protozero::TypedProtoDecoder { +class BackgroundTracingMetadata_TriggerRule_Decoder : public ::protozero::TypedProtoDecoder { public: BackgroundTracingMetadata_TriggerRule_Decoder(const uint8_t* data, size_t len) : TypedProtoDecoder(data, len) {} explicit BackgroundTracingMetadata_TriggerRule_Decoder(const std::string& raw) : TypedProtoDecoder(reinterpret_cast(raw.data()), raw.size()) {} @@ -42768,6 +47011,8 @@ class BackgroundTracingMetadata_TriggerRule_Decoder : public ::protozero::TypedP ::protozero::ConstBytes histogram_rule() const { return at<2>().as_bytes(); } bool has_named_rule() const { return at<3>().valid(); } ::protozero::ConstBytes named_rule() const { return at<3>().as_bytes(); } + bool has_name_hash() const { return at<4>().valid(); } + uint32_t name_hash() const { return at<4>().as_uint32(); } }; class BackgroundTracingMetadata_TriggerRule : public ::protozero::Message { @@ -42777,15 +47022,20 @@ class BackgroundTracingMetadata_TriggerRule : public ::protozero::Message { kTriggerTypeFieldNumber = 1, kHistogramRuleFieldNumber = 2, kNamedRuleFieldNumber = 3, + kNameHashFieldNumber = 4, }; static constexpr const char* GetName() { return ".perfetto.protos.BackgroundTracingMetadata.TriggerRule"; } using HistogramRule = ::perfetto::protos::pbzero::BackgroundTracingMetadata_TriggerRule_HistogramRule; using NamedRule = ::perfetto::protos::pbzero::BackgroundTracingMetadata_TriggerRule_NamedRule; + using TriggerType = ::perfetto::protos::pbzero::BackgroundTracingMetadata_TriggerRule_TriggerType; - static const TriggerType TRIGGER_UNSPECIFIED = BackgroundTracingMetadata_TriggerRule_TriggerType_TRIGGER_UNSPECIFIED; - static const TriggerType MONITOR_AND_DUMP_WHEN_SPECIFIC_HISTOGRAM_AND_VALUE = BackgroundTracingMetadata_TriggerRule_TriggerType_MONITOR_AND_DUMP_WHEN_SPECIFIC_HISTOGRAM_AND_VALUE; - static const TriggerType MONITOR_AND_DUMP_WHEN_TRIGGER_NAMED = BackgroundTracingMetadata_TriggerRule_TriggerType_MONITOR_AND_DUMP_WHEN_TRIGGER_NAMED; + static inline const char* TriggerType_Name(TriggerType value) { + return ::perfetto::protos::pbzero::BackgroundTracingMetadata_TriggerRule_TriggerType_Name(value); + } + static const TriggerType TRIGGER_UNSPECIFIED = TriggerType::TRIGGER_UNSPECIFIED; + static const TriggerType MONITOR_AND_DUMP_WHEN_SPECIFIC_HISTOGRAM_AND_VALUE = TriggerType::MONITOR_AND_DUMP_WHEN_SPECIFIC_HISTOGRAM_AND_VALUE; + static const TriggerType MONITOR_AND_DUMP_WHEN_TRIGGER_NAMED = TriggerType::MONITOR_AND_DUMP_WHEN_TRIGGER_NAMED; using FieldMetadata_TriggerType = ::protozero::proto_utils::FieldMetadata< @@ -42795,14 +47045,7 @@ class BackgroundTracingMetadata_TriggerRule : public ::protozero::Message { ::perfetto::protos::pbzero::BackgroundTracingMetadata_TriggerRule_TriggerType, BackgroundTracingMetadata_TriggerRule>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_TriggerType kTriggerType() { return {}; } + static constexpr FieldMetadata_TriggerType kTriggerType{}; void set_trigger_type(::perfetto::protos::pbzero::BackgroundTracingMetadata_TriggerRule_TriggerType value) { static constexpr uint32_t field_id = FieldMetadata_TriggerType::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -42820,14 +47063,7 @@ class BackgroundTracingMetadata_TriggerRule : public ::protozero::Message { BackgroundTracingMetadata_TriggerRule_HistogramRule, BackgroundTracingMetadata_TriggerRule>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_HistogramRule kHistogramRule() { return {}; } + static constexpr FieldMetadata_HistogramRule kHistogramRule{}; template T* set_histogram_rule() { return BeginNestedMessage(2); } @@ -42841,18 +47077,29 @@ class BackgroundTracingMetadata_TriggerRule : public ::protozero::Message { BackgroundTracingMetadata_TriggerRule_NamedRule, BackgroundTracingMetadata_TriggerRule>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_NamedRule kNamedRule() { return {}; } + static constexpr FieldMetadata_NamedRule kNamedRule{}; template T* set_named_rule() { return BeginNestedMessage(3); } + + using FieldMetadata_NameHash = + ::protozero::proto_utils::FieldMetadata< + 4, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kFixed32, + uint32_t, + BackgroundTracingMetadata_TriggerRule>; + + static constexpr FieldMetadata_NameHash kNameHash{}; + void set_name_hash(uint32_t value) { + static constexpr uint32_t field_id = FieldMetadata_NameHash::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kFixed32> + ::Append(*this, field_id, value); + } }; class BackgroundTracingMetadata_TriggerRule_NamedRule_Decoder : public ::protozero::TypedProtoDecoder { @@ -42875,14 +47122,18 @@ class BackgroundTracingMetadata_TriggerRule_NamedRule : public ::protozero::Mess }; static constexpr const char* GetName() { return ".perfetto.protos.BackgroundTracingMetadata.TriggerRule.NamedRule"; } + using EventType = ::perfetto::protos::pbzero::BackgroundTracingMetadata_TriggerRule_NamedRule_EventType; - static const EventType UNSPECIFIED = BackgroundTracingMetadata_TriggerRule_NamedRule_EventType_UNSPECIFIED; - static const EventType SESSION_RESTORE = BackgroundTracingMetadata_TriggerRule_NamedRule_EventType_SESSION_RESTORE; - static const EventType NAVIGATION = BackgroundTracingMetadata_TriggerRule_NamedRule_EventType_NAVIGATION; - static const EventType STARTUP = BackgroundTracingMetadata_TriggerRule_NamedRule_EventType_STARTUP; - static const EventType REACHED_CODE = BackgroundTracingMetadata_TriggerRule_NamedRule_EventType_REACHED_CODE; - static const EventType CONTENT_TRIGGER = BackgroundTracingMetadata_TriggerRule_NamedRule_EventType_CONTENT_TRIGGER; - static const EventType TEST_RULE = BackgroundTracingMetadata_TriggerRule_NamedRule_EventType_TEST_RULE; + static inline const char* EventType_Name(EventType value) { + return ::perfetto::protos::pbzero::BackgroundTracingMetadata_TriggerRule_NamedRule_EventType_Name(value); + } + static const EventType UNSPECIFIED = EventType::UNSPECIFIED; + static const EventType SESSION_RESTORE = EventType::SESSION_RESTORE; + static const EventType NAVIGATION = EventType::NAVIGATION; + static const EventType STARTUP = EventType::STARTUP; + static const EventType REACHED_CODE = EventType::REACHED_CODE; + static const EventType CONTENT_TRIGGER = EventType::CONTENT_TRIGGER; + static const EventType TEST_RULE = EventType::TEST_RULE; using FieldMetadata_EventType = ::protozero::proto_utils::FieldMetadata< @@ -42892,14 +47143,7 @@ class BackgroundTracingMetadata_TriggerRule_NamedRule : public ::protozero::Mess ::perfetto::protos::pbzero::BackgroundTracingMetadata_TriggerRule_NamedRule_EventType, BackgroundTracingMetadata_TriggerRule_NamedRule>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_EventType kEventType() { return {}; } + static constexpr FieldMetadata_EventType kEventType{}; void set_event_type(::perfetto::protos::pbzero::BackgroundTracingMetadata_TriggerRule_NamedRule_EventType value) { static constexpr uint32_t field_id = FieldMetadata_EventType::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -42917,14 +47161,7 @@ class BackgroundTracingMetadata_TriggerRule_NamedRule : public ::protozero::Mess uint64_t, BackgroundTracingMetadata_TriggerRule_NamedRule>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ContentTriggerNameHash kContentTriggerNameHash() { return {}; } + static constexpr FieldMetadata_ContentTriggerNameHash kContentTriggerNameHash{}; void set_content_trigger_name_hash(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_ContentTriggerNameHash::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -42967,14 +47204,7 @@ class BackgroundTracingMetadata_TriggerRule_HistogramRule : public ::protozero:: uint64_t, BackgroundTracingMetadata_TriggerRule_HistogramRule>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_HistogramNameHash kHistogramNameHash() { return {}; } + static constexpr FieldMetadata_HistogramNameHash kHistogramNameHash{}; void set_histogram_name_hash(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_HistogramNameHash::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -42992,14 +47222,7 @@ class BackgroundTracingMetadata_TriggerRule_HistogramRule : public ::protozero:: int64_t, BackgroundTracingMetadata_TriggerRule_HistogramRule>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_HistogramMinTrigger kHistogramMinTrigger() { return {}; } + static constexpr FieldMetadata_HistogramMinTrigger kHistogramMinTrigger{}; void set_histogram_min_trigger(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_HistogramMinTrigger::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -43017,14 +47240,7 @@ class BackgroundTracingMetadata_TriggerRule_HistogramRule : public ::protozero:: int64_t, BackgroundTracingMetadata_TriggerRule_HistogramRule>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_HistogramMaxTrigger kHistogramMaxTrigger() { return {}; } + static constexpr FieldMetadata_HistogramMaxTrigger kHistogramMaxTrigger{}; void set_histogram_max_trigger(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_HistogramMaxTrigger::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -43067,14 +47283,7 @@ class ChromeMetadataPacket : public ::protozero::Message { BackgroundTracingMetadata, ChromeMetadataPacket>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_BackgroundTracingMetadata kBackgroundTracingMetadata() { return {}; } + static constexpr FieldMetadata_BackgroundTracingMetadata kBackgroundTracingMetadata{}; template T* set_background_tracing_metadata() { return BeginNestedMessage(1); } @@ -43088,14 +47297,7 @@ class ChromeMetadataPacket : public ::protozero::Message { int32_t, ChromeMetadataPacket>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ChromeVersionCode kChromeVersionCode() { return {}; } + static constexpr FieldMetadata_ChromeVersionCode kChromeVersionCode{}; void set_chrome_version_code(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_ChromeVersionCode::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -43113,17 +47315,13 @@ class ChromeMetadataPacket : public ::protozero::Message { std::string, ChromeMetadataPacket>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_EnabledCategories kEnabledCategories() { return {}; } + static constexpr FieldMetadata_EnabledCategories kEnabledCategories{}; void set_enabled_categories(const char* data, size_t size) { AppendBytes(FieldMetadata_EnabledCategories::kFieldId, data, size); } + void set_enabled_categories(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_EnabledCategories::kFieldId, chars.data, chars.size); + } void set_enabled_categories(std::string value) { static constexpr uint32_t field_id = FieldMetadata_EnabledCategories::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -43163,24 +47361,64 @@ class ChromeStringTableEntry; class ChromeTraceEvent; class ChromeTraceEvent_Arg; class ChromeTracedValue; -enum ChromeLegacyJsonTrace_TraceType : int32_t; -enum ChromeTracedValue_NestedType : int32_t; +namespace perfetto_pbzero_enum_ChromeLegacyJsonTrace { +enum TraceType : int32_t; +} // namespace perfetto_pbzero_enum_ChromeLegacyJsonTrace +using ChromeLegacyJsonTrace_TraceType = perfetto_pbzero_enum_ChromeLegacyJsonTrace::TraceType; +namespace perfetto_pbzero_enum_ChromeTracedValue { +enum NestedType : int32_t; +} // namespace perfetto_pbzero_enum_ChromeTracedValue +using ChromeTracedValue_NestedType = perfetto_pbzero_enum_ChromeTracedValue::NestedType; -enum ChromeLegacyJsonTrace_TraceType : int32_t { - ChromeLegacyJsonTrace_TraceType_USER_TRACE = 0, - ChromeLegacyJsonTrace_TraceType_SYSTEM_TRACE = 1, +namespace perfetto_pbzero_enum_ChromeLegacyJsonTrace { +enum TraceType : int32_t { + USER_TRACE = 0, + SYSTEM_TRACE = 1, }; +} // namespace perfetto_pbzero_enum_ChromeLegacyJsonTrace +using ChromeLegacyJsonTrace_TraceType = perfetto_pbzero_enum_ChromeLegacyJsonTrace::TraceType; -const ChromeLegacyJsonTrace_TraceType ChromeLegacyJsonTrace_TraceType_MIN = ChromeLegacyJsonTrace_TraceType_USER_TRACE; -const ChromeLegacyJsonTrace_TraceType ChromeLegacyJsonTrace_TraceType_MAX = ChromeLegacyJsonTrace_TraceType_SYSTEM_TRACE; -enum ChromeTracedValue_NestedType : int32_t { - ChromeTracedValue_NestedType_DICT = 0, - ChromeTracedValue_NestedType_ARRAY = 1, +constexpr ChromeLegacyJsonTrace_TraceType ChromeLegacyJsonTrace_TraceType_MIN = ChromeLegacyJsonTrace_TraceType::USER_TRACE; +constexpr ChromeLegacyJsonTrace_TraceType ChromeLegacyJsonTrace_TraceType_MAX = ChromeLegacyJsonTrace_TraceType::SYSTEM_TRACE; + + +PERFETTO_PROTOZERO_CONSTEXPR14_OR_INLINE +const char* ChromeLegacyJsonTrace_TraceType_Name(::perfetto::protos::pbzero::ChromeLegacyJsonTrace_TraceType value) { + switch (value) { + case ::perfetto::protos::pbzero::ChromeLegacyJsonTrace_TraceType::USER_TRACE: + return "USER_TRACE"; + + case ::perfetto::protos::pbzero::ChromeLegacyJsonTrace_TraceType::SYSTEM_TRACE: + return "SYSTEM_TRACE"; + } + return "PBZERO_UNKNOWN_ENUM_VALUE"; +} + +namespace perfetto_pbzero_enum_ChromeTracedValue { +enum NestedType : int32_t { + DICT = 0, + ARRAY = 1, }; +} // namespace perfetto_pbzero_enum_ChromeTracedValue +using ChromeTracedValue_NestedType = perfetto_pbzero_enum_ChromeTracedValue::NestedType; -const ChromeTracedValue_NestedType ChromeTracedValue_NestedType_MIN = ChromeTracedValue_NestedType_DICT; -const ChromeTracedValue_NestedType ChromeTracedValue_NestedType_MAX = ChromeTracedValue_NestedType_ARRAY; + +constexpr ChromeTracedValue_NestedType ChromeTracedValue_NestedType_MIN = ChromeTracedValue_NestedType::DICT; +constexpr ChromeTracedValue_NestedType ChromeTracedValue_NestedType_MAX = ChromeTracedValue_NestedType::ARRAY; + + +PERFETTO_PROTOZERO_CONSTEXPR14_OR_INLINE +const char* ChromeTracedValue_NestedType_Name(::perfetto::protos::pbzero::ChromeTracedValue_NestedType value) { + switch (value) { + case ::perfetto::protos::pbzero::ChromeTracedValue_NestedType::DICT: + return "DICT"; + + case ::perfetto::protos::pbzero::ChromeTracedValue_NestedType::ARRAY: + return "ARRAY"; + } + return "PBZERO_UNKNOWN_ENUM_VALUE"; +} class ChromeEventBundle_Decoder : public ::protozero::TypedProtoDecoder { public: @@ -43220,14 +47458,7 @@ class ChromeEventBundle : public ::protozero::Message { ChromeTraceEvent, ChromeEventBundle>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_TraceEvents kTraceEvents() { return {}; } + static constexpr FieldMetadata_TraceEvents kTraceEvents{}; template T* add_trace_events() { return BeginNestedMessage(1); } @@ -43241,14 +47472,7 @@ class ChromeEventBundle : public ::protozero::Message { ChromeMetadata, ChromeEventBundle>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Metadata kMetadata() { return {}; } + static constexpr FieldMetadata_Metadata kMetadata{}; template T* add_metadata() { return BeginNestedMessage(2); } @@ -43262,17 +47486,13 @@ class ChromeEventBundle : public ::protozero::Message { std::string, ChromeEventBundle>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_LegacyFtraceOutput kLegacyFtraceOutput() { return {}; } + static constexpr FieldMetadata_LegacyFtraceOutput kLegacyFtraceOutput{}; void add_legacy_ftrace_output(const char* data, size_t size) { AppendBytes(FieldMetadata_LegacyFtraceOutput::kFieldId, data, size); } + void add_legacy_ftrace_output(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_LegacyFtraceOutput::kFieldId, chars.data, chars.size); + } void add_legacy_ftrace_output(std::string value) { static constexpr uint32_t field_id = FieldMetadata_LegacyFtraceOutput::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -43290,14 +47510,7 @@ class ChromeEventBundle : public ::protozero::Message { ChromeLegacyJsonTrace, ChromeEventBundle>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_LegacyJsonTrace kLegacyJsonTrace() { return {}; } + static constexpr FieldMetadata_LegacyJsonTrace kLegacyJsonTrace{}; template T* add_legacy_json_trace() { return BeginNestedMessage(5); } @@ -43311,14 +47524,7 @@ class ChromeEventBundle : public ::protozero::Message { ChromeStringTableEntry, ChromeEventBundle>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_StringTable kStringTable() { return {}; } + static constexpr FieldMetadata_StringTable kStringTable{}; template T* add_string_table() { return BeginNestedMessage(3); } @@ -43345,9 +47551,13 @@ class ChromeLegacyJsonTrace : public ::protozero::Message { }; static constexpr const char* GetName() { return ".perfetto.protos.ChromeLegacyJsonTrace"; } + using TraceType = ::perfetto::protos::pbzero::ChromeLegacyJsonTrace_TraceType; - static const TraceType USER_TRACE = ChromeLegacyJsonTrace_TraceType_USER_TRACE; - static const TraceType SYSTEM_TRACE = ChromeLegacyJsonTrace_TraceType_SYSTEM_TRACE; + static inline const char* TraceType_Name(TraceType value) { + return ::perfetto::protos::pbzero::ChromeLegacyJsonTrace_TraceType_Name(value); + } + static const TraceType USER_TRACE = TraceType::USER_TRACE; + static const TraceType SYSTEM_TRACE = TraceType::SYSTEM_TRACE; using FieldMetadata_Type = ::protozero::proto_utils::FieldMetadata< @@ -43357,14 +47567,7 @@ class ChromeLegacyJsonTrace : public ::protozero::Message { ::perfetto::protos::pbzero::ChromeLegacyJsonTrace_TraceType, ChromeLegacyJsonTrace>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Type kType() { return {}; } + static constexpr FieldMetadata_Type kType{}; void set_type(::perfetto::protos::pbzero::ChromeLegacyJsonTrace_TraceType value) { static constexpr uint32_t field_id = FieldMetadata_Type::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -43382,17 +47585,13 @@ class ChromeLegacyJsonTrace : public ::protozero::Message { std::string, ChromeLegacyJsonTrace>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Data kData() { return {}; } + static constexpr FieldMetadata_Data kData{}; void set_data(const char* data, size_t size) { AppendBytes(FieldMetadata_Data::kFieldId, data, size); } + void set_data(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Data::kFieldId, chars.data, chars.size); + } void set_data(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Data::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -43441,17 +47640,13 @@ class ChromeMetadata : public ::protozero::Message { std::string, ChromeMetadata>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Name kName() { return {}; } + static constexpr FieldMetadata_Name kName{}; void set_name(const char* data, size_t size) { AppendBytes(FieldMetadata_Name::kFieldId, data, size); } + void set_name(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Name::kFieldId, chars.data, chars.size); + } void set_name(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Name::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -43469,17 +47664,13 @@ class ChromeMetadata : public ::protozero::Message { std::string, ChromeMetadata>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_StringValue kStringValue() { return {}; } + static constexpr FieldMetadata_StringValue kStringValue{}; void set_string_value(const char* data, size_t size) { AppendBytes(FieldMetadata_StringValue::kFieldId, data, size); } + void set_string_value(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_StringValue::kFieldId, chars.data, chars.size); + } void set_string_value(std::string value) { static constexpr uint32_t field_id = FieldMetadata_StringValue::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -43497,14 +47688,7 @@ class ChromeMetadata : public ::protozero::Message { bool, ChromeMetadata>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_BoolValue kBoolValue() { return {}; } + static constexpr FieldMetadata_BoolValue kBoolValue{}; void set_bool_value(bool value) { static constexpr uint32_t field_id = FieldMetadata_BoolValue::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -43522,14 +47706,7 @@ class ChromeMetadata : public ::protozero::Message { int64_t, ChromeMetadata>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_IntValue kIntValue() { return {}; } + static constexpr FieldMetadata_IntValue kIntValue{}; void set_int_value(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_IntValue::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -43547,17 +47724,13 @@ class ChromeMetadata : public ::protozero::Message { std::string, ChromeMetadata>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_JsonValue kJsonValue() { return {}; } + static constexpr FieldMetadata_JsonValue kJsonValue{}; void set_json_value(const char* data, size_t size) { AppendBytes(FieldMetadata_JsonValue::kFieldId, data, size); } + void set_json_value(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_JsonValue::kFieldId, chars.data, chars.size); + } void set_json_value(std::string value) { static constexpr uint32_t field_id = FieldMetadata_JsonValue::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -43640,17 +47813,13 @@ class ChromeTraceEvent : public ::protozero::Message { std::string, ChromeTraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Name kName() { return {}; } + static constexpr FieldMetadata_Name kName{}; void set_name(const char* data, size_t size) { AppendBytes(FieldMetadata_Name::kFieldId, data, size); } + void set_name(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Name::kFieldId, chars.data, chars.size); + } void set_name(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Name::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -43668,14 +47837,7 @@ class ChromeTraceEvent : public ::protozero::Message { int64_t, ChromeTraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Timestamp kTimestamp() { return {}; } + static constexpr FieldMetadata_Timestamp kTimestamp{}; void set_timestamp(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_Timestamp::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -43693,14 +47855,7 @@ class ChromeTraceEvent : public ::protozero::Message { int32_t, ChromeTraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Phase kPhase() { return {}; } + static constexpr FieldMetadata_Phase kPhase{}; void set_phase(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Phase::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -43718,14 +47873,7 @@ class ChromeTraceEvent : public ::protozero::Message { int32_t, ChromeTraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ThreadId kThreadId() { return {}; } + static constexpr FieldMetadata_ThreadId kThreadId{}; void set_thread_id(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_ThreadId::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -43743,14 +47891,7 @@ class ChromeTraceEvent : public ::protozero::Message { int64_t, ChromeTraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Duration kDuration() { return {}; } + static constexpr FieldMetadata_Duration kDuration{}; void set_duration(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_Duration::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -43768,14 +47909,7 @@ class ChromeTraceEvent : public ::protozero::Message { int64_t, ChromeTraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ThreadDuration kThreadDuration() { return {}; } + static constexpr FieldMetadata_ThreadDuration kThreadDuration{}; void set_thread_duration(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_ThreadDuration::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -43793,17 +47927,13 @@ class ChromeTraceEvent : public ::protozero::Message { std::string, ChromeTraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Scope kScope() { return {}; } + static constexpr FieldMetadata_Scope kScope{}; void set_scope(const char* data, size_t size) { AppendBytes(FieldMetadata_Scope::kFieldId, data, size); } + void set_scope(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Scope::kFieldId, chars.data, chars.size); + } void set_scope(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Scope::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -43821,14 +47951,7 @@ class ChromeTraceEvent : public ::protozero::Message { uint64_t, ChromeTraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Id kId() { return {}; } + static constexpr FieldMetadata_Id kId{}; void set_id(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Id::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -43846,14 +47969,7 @@ class ChromeTraceEvent : public ::protozero::Message { uint32_t, ChromeTraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Flags kFlags() { return {}; } + static constexpr FieldMetadata_Flags kFlags{}; void set_flags(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Flags::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -43871,17 +47987,13 @@ class ChromeTraceEvent : public ::protozero::Message { std::string, ChromeTraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_CategoryGroupName kCategoryGroupName() { return {}; } + static constexpr FieldMetadata_CategoryGroupName kCategoryGroupName{}; void set_category_group_name(const char* data, size_t size) { AppendBytes(FieldMetadata_CategoryGroupName::kFieldId, data, size); } + void set_category_group_name(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_CategoryGroupName::kFieldId, chars.data, chars.size); + } void set_category_group_name(std::string value) { static constexpr uint32_t field_id = FieldMetadata_CategoryGroupName::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -43899,14 +48011,7 @@ class ChromeTraceEvent : public ::protozero::Message { int32_t, ChromeTraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ProcessId kProcessId() { return {}; } + static constexpr FieldMetadata_ProcessId kProcessId{}; void set_process_id(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_ProcessId::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -43924,14 +48029,7 @@ class ChromeTraceEvent : public ::protozero::Message { int64_t, ChromeTraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ThreadTimestamp kThreadTimestamp() { return {}; } + static constexpr FieldMetadata_ThreadTimestamp kThreadTimestamp{}; void set_thread_timestamp(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_ThreadTimestamp::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -43949,14 +48047,7 @@ class ChromeTraceEvent : public ::protozero::Message { uint64_t, ChromeTraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_BindId kBindId() { return {}; } + static constexpr FieldMetadata_BindId kBindId{}; void set_bind_id(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_BindId::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -43974,14 +48065,7 @@ class ChromeTraceEvent : public ::protozero::Message { ChromeTraceEvent_Arg, ChromeTraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Args kArgs() { return {}; } + static constexpr FieldMetadata_Args kArgs{}; template T* add_args() { return BeginNestedMessage(14); } @@ -43995,14 +48079,7 @@ class ChromeTraceEvent : public ::protozero::Message { uint32_t, ChromeTraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_NameIndex kNameIndex() { return {}; } + static constexpr FieldMetadata_NameIndex kNameIndex{}; void set_name_index(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_NameIndex::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -44020,14 +48097,7 @@ class ChromeTraceEvent : public ::protozero::Message { uint32_t, ChromeTraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_CategoryGroupNameIndex kCategoryGroupNameIndex() { return {}; } + static constexpr FieldMetadata_CategoryGroupNameIndex kCategoryGroupNameIndex{}; void set_category_group_name_index(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_CategoryGroupNameIndex::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -44091,17 +48161,13 @@ class ChromeTraceEvent_Arg : public ::protozero::Message { std::string, ChromeTraceEvent_Arg>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Name kName() { return {}; } + static constexpr FieldMetadata_Name kName{}; void set_name(const char* data, size_t size) { AppendBytes(FieldMetadata_Name::kFieldId, data, size); } + void set_name(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Name::kFieldId, chars.data, chars.size); + } void set_name(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Name::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -44119,14 +48185,7 @@ class ChromeTraceEvent_Arg : public ::protozero::Message { bool, ChromeTraceEvent_Arg>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_BoolValue kBoolValue() { return {}; } + static constexpr FieldMetadata_BoolValue kBoolValue{}; void set_bool_value(bool value) { static constexpr uint32_t field_id = FieldMetadata_BoolValue::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -44144,14 +48203,7 @@ class ChromeTraceEvent_Arg : public ::protozero::Message { uint64_t, ChromeTraceEvent_Arg>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_UintValue kUintValue() { return {}; } + static constexpr FieldMetadata_UintValue kUintValue{}; void set_uint_value(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_UintValue::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -44169,14 +48221,7 @@ class ChromeTraceEvent_Arg : public ::protozero::Message { int64_t, ChromeTraceEvent_Arg>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_IntValue kIntValue() { return {}; } + static constexpr FieldMetadata_IntValue kIntValue{}; void set_int_value(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_IntValue::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -44194,14 +48239,7 @@ class ChromeTraceEvent_Arg : public ::protozero::Message { double, ChromeTraceEvent_Arg>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_DoubleValue kDoubleValue() { return {}; } + static constexpr FieldMetadata_DoubleValue kDoubleValue{}; void set_double_value(double value) { static constexpr uint32_t field_id = FieldMetadata_DoubleValue::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -44219,17 +48257,13 @@ class ChromeTraceEvent_Arg : public ::protozero::Message { std::string, ChromeTraceEvent_Arg>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_StringValue kStringValue() { return {}; } + static constexpr FieldMetadata_StringValue kStringValue{}; void set_string_value(const char* data, size_t size) { AppendBytes(FieldMetadata_StringValue::kFieldId, data, size); } + void set_string_value(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_StringValue::kFieldId, chars.data, chars.size); + } void set_string_value(std::string value) { static constexpr uint32_t field_id = FieldMetadata_StringValue::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -44247,14 +48281,7 @@ class ChromeTraceEvent_Arg : public ::protozero::Message { uint64_t, ChromeTraceEvent_Arg>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_PointerValue kPointerValue() { return {}; } + static constexpr FieldMetadata_PointerValue kPointerValue{}; void set_pointer_value(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_PointerValue::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -44272,17 +48299,13 @@ class ChromeTraceEvent_Arg : public ::protozero::Message { std::string, ChromeTraceEvent_Arg>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_JsonValue kJsonValue() { return {}; } + static constexpr FieldMetadata_JsonValue kJsonValue{}; void set_json_value(const char* data, size_t size) { AppendBytes(FieldMetadata_JsonValue::kFieldId, data, size); } + void set_json_value(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_JsonValue::kFieldId, chars.data, chars.size); + } void set_json_value(std::string value) { static constexpr uint32_t field_id = FieldMetadata_JsonValue::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -44300,14 +48323,7 @@ class ChromeTraceEvent_Arg : public ::protozero::Message { ChromeTracedValue, ChromeTraceEvent_Arg>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_TracedValue kTracedValue() { return {}; } + static constexpr FieldMetadata_TracedValue kTracedValue{}; template T* set_traced_value() { return BeginNestedMessage(10); } @@ -44321,14 +48337,7 @@ class ChromeTraceEvent_Arg : public ::protozero::Message { uint32_t, ChromeTraceEvent_Arg>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_NameIndex kNameIndex() { return {}; } + static constexpr FieldMetadata_NameIndex kNameIndex{}; void set_name_index(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_NameIndex::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -44368,17 +48377,13 @@ class ChromeStringTableEntry : public ::protozero::Message { std::string, ChromeStringTableEntry>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Value kValue() { return {}; } + static constexpr FieldMetadata_Value kValue{}; void set_value(const char* data, size_t size) { AppendBytes(FieldMetadata_Value::kFieldId, data, size); } + void set_value(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Value::kFieldId, chars.data, chars.size); + } void set_value(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Value::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -44396,14 +48401,7 @@ class ChromeStringTableEntry : public ::protozero::Message { int32_t, ChromeStringTableEntry>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Index kIndex() { return {}; } + static constexpr FieldMetadata_Index kIndex{}; void set_index(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Index::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -44452,9 +48450,13 @@ class ChromeTracedValue : public ::protozero::Message { }; static constexpr const char* GetName() { return ".perfetto.protos.ChromeTracedValue"; } + using NestedType = ::perfetto::protos::pbzero::ChromeTracedValue_NestedType; - static const NestedType DICT = ChromeTracedValue_NestedType_DICT; - static const NestedType ARRAY = ChromeTracedValue_NestedType_ARRAY; + static inline const char* NestedType_Name(NestedType value) { + return ::perfetto::protos::pbzero::ChromeTracedValue_NestedType_Name(value); + } + static const NestedType DICT = NestedType::DICT; + static const NestedType ARRAY = NestedType::ARRAY; using FieldMetadata_NestedType = ::protozero::proto_utils::FieldMetadata< @@ -44464,14 +48466,7 @@ class ChromeTracedValue : public ::protozero::Message { ::perfetto::protos::pbzero::ChromeTracedValue_NestedType, ChromeTracedValue>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_NestedType kNestedType() { return {}; } + static constexpr FieldMetadata_NestedType kNestedType{}; void set_nested_type(::perfetto::protos::pbzero::ChromeTracedValue_NestedType value) { static constexpr uint32_t field_id = FieldMetadata_NestedType::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -44489,17 +48484,13 @@ class ChromeTracedValue : public ::protozero::Message { std::string, ChromeTracedValue>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_DictKeys kDictKeys() { return {}; } + static constexpr FieldMetadata_DictKeys kDictKeys{}; void add_dict_keys(const char* data, size_t size) { AppendBytes(FieldMetadata_DictKeys::kFieldId, data, size); } + void add_dict_keys(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_DictKeys::kFieldId, chars.data, chars.size); + } void add_dict_keys(std::string value) { static constexpr uint32_t field_id = FieldMetadata_DictKeys::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -44517,14 +48508,7 @@ class ChromeTracedValue : public ::protozero::Message { ChromeTracedValue, ChromeTracedValue>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_DictValues kDictValues() { return {}; } + static constexpr FieldMetadata_DictValues kDictValues{}; template T* add_dict_values() { return BeginNestedMessage(3); } @@ -44538,14 +48522,7 @@ class ChromeTracedValue : public ::protozero::Message { ChromeTracedValue, ChromeTracedValue>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ArrayValues kArrayValues() { return {}; } + static constexpr FieldMetadata_ArrayValues kArrayValues{}; template T* add_array_values() { return BeginNestedMessage(4); } @@ -44559,14 +48536,7 @@ class ChromeTracedValue : public ::protozero::Message { int32_t, ChromeTracedValue>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_IntValue kIntValue() { return {}; } + static constexpr FieldMetadata_IntValue kIntValue{}; void set_int_value(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_IntValue::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -44584,14 +48554,7 @@ class ChromeTracedValue : public ::protozero::Message { double, ChromeTracedValue>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_DoubleValue kDoubleValue() { return {}; } + static constexpr FieldMetadata_DoubleValue kDoubleValue{}; void set_double_value(double value) { static constexpr uint32_t field_id = FieldMetadata_DoubleValue::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -44609,14 +48572,7 @@ class ChromeTracedValue : public ::protozero::Message { bool, ChromeTracedValue>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_BoolValue kBoolValue() { return {}; } + static constexpr FieldMetadata_BoolValue kBoolValue{}; void set_bool_value(bool value) { static constexpr uint32_t field_id = FieldMetadata_BoolValue::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -44634,17 +48590,13 @@ class ChromeTracedValue : public ::protozero::Message { std::string, ChromeTracedValue>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_StringValue kStringValue() { return {}; } + static constexpr FieldMetadata_StringValue kStringValue{}; void set_string_value(const char* data, size_t size) { AppendBytes(FieldMetadata_StringValue::kFieldId, data, size); } + void set_string_value(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_StringValue::kFieldId, chars.data, chars.size); + } void set_string_value(std::string value) { static constexpr uint32_t field_id = FieldMetadata_StringValue::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -44679,16 +48631,39 @@ namespace protos { namespace pbzero { class InodeFileMap_Entry; -enum InodeFileMap_Entry_Type : int32_t; +namespace perfetto_pbzero_enum_InodeFileMap_Entry { +enum Type : int32_t; +} // namespace perfetto_pbzero_enum_InodeFileMap_Entry +using InodeFileMap_Entry_Type = perfetto_pbzero_enum_InodeFileMap_Entry::Type; -enum InodeFileMap_Entry_Type : int32_t { - InodeFileMap_Entry_Type_UNKNOWN = 0, - InodeFileMap_Entry_Type_FILE = 1, - InodeFileMap_Entry_Type_DIRECTORY = 2, +namespace perfetto_pbzero_enum_InodeFileMap_Entry { +enum Type : int32_t { + UNKNOWN = 0, + FILE = 1, + DIRECTORY = 2, }; +} // namespace perfetto_pbzero_enum_InodeFileMap_Entry +using InodeFileMap_Entry_Type = perfetto_pbzero_enum_InodeFileMap_Entry::Type; -const InodeFileMap_Entry_Type InodeFileMap_Entry_Type_MIN = InodeFileMap_Entry_Type_UNKNOWN; -const InodeFileMap_Entry_Type InodeFileMap_Entry_Type_MAX = InodeFileMap_Entry_Type_DIRECTORY; + +constexpr InodeFileMap_Entry_Type InodeFileMap_Entry_Type_MIN = InodeFileMap_Entry_Type::UNKNOWN; +constexpr InodeFileMap_Entry_Type InodeFileMap_Entry_Type_MAX = InodeFileMap_Entry_Type::DIRECTORY; + + +PERFETTO_PROTOZERO_CONSTEXPR14_OR_INLINE +const char* InodeFileMap_Entry_Type_Name(::perfetto::protos::pbzero::InodeFileMap_Entry_Type value) { + switch (value) { + case ::perfetto::protos::pbzero::InodeFileMap_Entry_Type::UNKNOWN: + return "UNKNOWN"; + + case ::perfetto::protos::pbzero::InodeFileMap_Entry_Type::FILE: + return "FILE"; + + case ::perfetto::protos::pbzero::InodeFileMap_Entry_Type::DIRECTORY: + return "DIRECTORY"; + } + return "PBZERO_UNKNOWN_ENUM_VALUE"; +} class InodeFileMap_Decoder : public ::protozero::TypedProtoDecoder { public: @@ -44723,14 +48698,7 @@ class InodeFileMap : public ::protozero::Message { uint64_t, InodeFileMap>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_BlockDeviceId kBlockDeviceId() { return {}; } + static constexpr FieldMetadata_BlockDeviceId kBlockDeviceId{}; void set_block_device_id(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_BlockDeviceId::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -44748,17 +48716,13 @@ class InodeFileMap : public ::protozero::Message { std::string, InodeFileMap>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_MountPoints kMountPoints() { return {}; } + static constexpr FieldMetadata_MountPoints kMountPoints{}; void add_mount_points(const char* data, size_t size) { AppendBytes(FieldMetadata_MountPoints::kFieldId, data, size); } + void add_mount_points(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_MountPoints::kFieldId, chars.data, chars.size); + } void add_mount_points(std::string value) { static constexpr uint32_t field_id = FieldMetadata_MountPoints::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -44776,14 +48740,7 @@ class InodeFileMap : public ::protozero::Message { InodeFileMap_Entry, InodeFileMap>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Entries kEntries() { return {}; } + static constexpr FieldMetadata_Entries kEntries{}; template T* add_entries() { return BeginNestedMessage(3); } @@ -44813,10 +48770,14 @@ class InodeFileMap_Entry : public ::protozero::Message { }; static constexpr const char* GetName() { return ".perfetto.protos.InodeFileMap.Entry"; } + using Type = ::perfetto::protos::pbzero::InodeFileMap_Entry_Type; - static const Type UNKNOWN = InodeFileMap_Entry_Type_UNKNOWN; - static const Type FILE = InodeFileMap_Entry_Type_FILE; - static const Type DIRECTORY = InodeFileMap_Entry_Type_DIRECTORY; + static inline const char* Type_Name(Type value) { + return ::perfetto::protos::pbzero::InodeFileMap_Entry_Type_Name(value); + } + static const Type UNKNOWN = Type::UNKNOWN; + static const Type FILE = Type::FILE; + static const Type DIRECTORY = Type::DIRECTORY; using FieldMetadata_InodeNumber = ::protozero::proto_utils::FieldMetadata< @@ -44826,14 +48787,7 @@ class InodeFileMap_Entry : public ::protozero::Message { uint64_t, InodeFileMap_Entry>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_InodeNumber kInodeNumber() { return {}; } + static constexpr FieldMetadata_InodeNumber kInodeNumber{}; void set_inode_number(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_InodeNumber::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -44851,17 +48805,13 @@ class InodeFileMap_Entry : public ::protozero::Message { std::string, InodeFileMap_Entry>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Paths kPaths() { return {}; } + static constexpr FieldMetadata_Paths kPaths{}; void add_paths(const char* data, size_t size) { AppendBytes(FieldMetadata_Paths::kFieldId, data, size); } + void add_paths(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Paths::kFieldId, chars.data, chars.size); + } void add_paths(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Paths::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -44879,14 +48829,7 @@ class InodeFileMap_Entry : public ::protozero::Message { ::perfetto::protos::pbzero::InodeFileMap_Entry_Type, InodeFileMap_Entry>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Type kType() { return {}; } + static constexpr FieldMetadata_Type kType{}; void set_type(::perfetto::protos::pbzero::InodeFileMap_Entry_Type value) { static constexpr uint32_t field_id = FieldMetadata_Type::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -44926,6 +48869,12 @@ class AllocPagesIommuStartFtraceEvent; class AllocPagesSysEndFtraceEvent; class AllocPagesSysFailFtraceEvent; class AllocPagesSysStartFtraceEvent; +class AndroidFsDatareadEndFtraceEvent; +class AndroidFsDatareadStartFtraceEvent; +class AndroidFsDatawriteEndFtraceEvent; +class AndroidFsDatawriteStartFtraceEvent; +class AndroidFsFsyncEndFtraceEvent; +class AndroidFsFsyncStartFtraceEvent; class BinderLockFtraceEvent; class BinderLockedFtraceEvent; class BinderSetPriorityFtraceEvent; @@ -44968,6 +48917,8 @@ class ClkSetRateFtraceEvent; class ClockDisableFtraceEvent; class ClockEnableFtraceEvent; class ClockSetRateFtraceEvent; +class CmaAllocInfoFtraceEvent; +class CmaAllocStartFtraceEvent; class ConsoleFtraceEvent; class CpuFrequencyFtraceEvent; class CpuFrequencyLimitsFtraceEvent; @@ -44991,6 +48942,9 @@ class DrmSchedJobFtraceEvent; class DrmSchedProcessJobFtraceEvent; class DrmVblankEventDeliveredFtraceEvent; class DrmVblankEventFtraceEvent; +class DsiCmdFifoStatusFtraceEvent; +class DsiRxFtraceEvent; +class DsiTxFtraceEvent; class Ext4AllocDaBlocksFtraceEvent; class Ext4AllocateBlocksFtraceEvent; class Ext4AllocateInodeFtraceEvent; @@ -45124,10 +49078,17 @@ class FenceDestroyFtraceEvent; class FenceEnableSignalFtraceEvent; class FenceInitFtraceEvent; class FenceSignaledFtraceEvent; +class FuncgraphEntryFtraceEvent; +class FuncgraphExitFtraceEvent; class G2dTracingMarkWriteFtraceEvent; class GenericFtraceEvent; class GpuFrequencyFtraceEvent; class GpuMemTotalFtraceEvent; +class HostHcallFtraceEvent; +class HostMemAbortFtraceEvent; +class HostSmcFtraceEvent; +class HypEnterFtraceEvent; +class HypExitFtraceEvent; class I2cReadFtraceEvent; class I2cReplyFtraceEvent; class I2cResultFtraceEvent; @@ -45202,6 +49163,15 @@ class KvmUserspaceExitFtraceEvent; class KvmVcpuWakeupFtraceEvent; class KvmWfxArm64FtraceEvent; class LowmemoryKillFtraceEvent; +class LwisTracingMarkWriteFtraceEvent; +class MaliMaliCSFINTERRUPTENDFtraceEvent; +class MaliMaliCSFINTERRUPTSTARTFtraceEvent; +class MaliMaliKCPUCQSSETFtraceEvent; +class MaliMaliKCPUCQSWAITENDFtraceEvent; +class MaliMaliKCPUCQSWAITSTARTFtraceEvent; +class MaliMaliKCPUFENCESIGNALFtraceEvent; +class MaliMaliKCPUFENCEWAITENDFtraceEvent; +class MaliMaliKCPUFENCEWAITSTARTFtraceEvent; class MaliTracingMarkWriteFtraceEvent; class MarkVictimFtraceEvent; class MdpCmdKickoffFtraceEvent; @@ -45249,6 +49219,8 @@ class MmPageAllocZoneLockedFtraceEvent; class MmPageFreeBatchedFtraceEvent; class MmPageFreeFtraceEvent; class MmPagePcpuDrainFtraceEvent; +class MmShrinkSlabEndFtraceEvent; +class MmShrinkSlabStartFtraceEvent; class MmVmscanDirectReclaimBeginFtraceEvent; class MmVmscanDirectReclaimEndFtraceEvent; class MmVmscanKswapdSleepFtraceEvent; @@ -45271,6 +49243,7 @@ class RssStatFtraceEvent; class RssStatThrottledFtraceEvent; class SchedBlockedReasonFtraceEvent; class SchedCpuHotplugFtraceEvent; +class SchedCpuUtilCfsFtraceEvent; class SchedPiSetprioFtraceEvent; class SchedProcessExecFtraceEvent; class SchedProcessExitFtraceEvent; @@ -45300,6 +49273,7 @@ class SoftirqEntryFtraceEvent; class SoftirqExitFtraceEvent; class SoftirqRaiseFtraceEvent; class SuspendResumeFtraceEvent; +class SuspendResumeMinimalFtraceEvent; class SyncPtFtraceEvent; class SyncTimelineFtraceEvent; class SyncWaitFtraceEvent; @@ -45311,9 +49285,39 @@ class TcpRetransmitSkbFtraceEvent; class ThermalTemperatureFtraceEvent; class TracingMarkWriteFtraceEvent; class TrapRegFtraceEvent; +class TrustyEnqueueNopFtraceEvent; +class TrustyIpcConnectEndFtraceEvent; +class TrustyIpcConnectFtraceEvent; +class TrustyIpcHandleEventFtraceEvent; +class TrustyIpcPollFtraceEvent; +class TrustyIpcReadEndFtraceEvent; +class TrustyIpcReadFtraceEvent; +class TrustyIpcRxFtraceEvent; +class TrustyIpcWriteFtraceEvent; +class TrustyIrqFtraceEvent; +class TrustyReclaimMemoryDoneFtraceEvent; +class TrustyReclaimMemoryFtraceEvent; +class TrustyShareMemoryDoneFtraceEvent; +class TrustyShareMemoryFtraceEvent; +class TrustySmcDoneFtraceEvent; +class TrustySmcFtraceEvent; +class TrustyStdCall32DoneFtraceEvent; +class TrustyStdCall32FtraceEvent; class UfshcdClkGatingFtraceEvent; class UfshcdCommandFtraceEvent; +class V4l2DqbufFtraceEvent; +class V4l2QbufFtraceEvent; +class Vb2V4l2BufDoneFtraceEvent; +class Vb2V4l2BufQueueFtraceEvent; +class Vb2V4l2DqbufFtraceEvent; +class Vb2V4l2QbufFtraceEvent; class VgicUpdateIrqPendingFtraceEvent; +class VirtioGpuCmdQueueFtraceEvent; +class VirtioGpuCmdResponseFtraceEvent; +class VirtioVideoCmdDoneFtraceEvent; +class VirtioVideoCmdFtraceEvent; +class VirtioVideoResourceQueueDoneFtraceEvent; +class VirtioVideoResourceQueueFtraceEvent; class WakeupSourceActivateFtraceEvent; class WakeupSourceDeactivateFtraceEvent; class WorkqueueActivateWorkFtraceEvent; @@ -45322,7 +49326,7 @@ class WorkqueueExecuteStartFtraceEvent; class WorkqueueQueueWorkFtraceEvent; class ZeroFtraceEvent; -class FtraceEvent_Decoder : public ::protozero::TypedProtoDecoder { +class FtraceEvent_Decoder : public ::protozero::TypedProtoDecoder { public: FtraceEvent_Decoder(const uint8_t* data, size_t len) : TypedProtoDecoder(data, len) {} explicit FtraceEvent_Decoder(const std::string& raw) : TypedProtoDecoder(reinterpret_cast(raw.data()), raw.size()) {} @@ -45331,6 +49335,8 @@ class FtraceEvent_Decoder : public ::protozero::TypedProtoDecoder().as_uint64(); } bool has_pid() const { return at<2>().valid(); } uint32_t pid() const { return at<2>().as_uint32(); } + bool has_common_flags() const { return at<5>().valid(); } + uint32_t common_flags() const { return at<5>().as_uint32(); } bool has_print() const { return at<3>().valid(); } ::protozero::ConstBytes print() const { return at<3>().as_bytes(); } bool has_sched_switch() const { return at<4>().valid(); } @@ -46133,6 +50139,128 @@ class FtraceEvent_Decoder : public ::protozero::TypedProtoDecoder().as_bytes(); } bool has_f2fs_iostat_latency() const { return at<420>().valid(); } ::protozero::ConstBytes f2fs_iostat_latency() const { return at<420>().as_bytes(); } + bool has_sched_cpu_util_cfs() const { return at<421>().valid(); } + ::protozero::ConstBytes sched_cpu_util_cfs() const { return at<421>().as_bytes(); } + bool has_v4l2_qbuf() const { return at<422>().valid(); } + ::protozero::ConstBytes v4l2_qbuf() const { return at<422>().as_bytes(); } + bool has_v4l2_dqbuf() const { return at<423>().valid(); } + ::protozero::ConstBytes v4l2_dqbuf() const { return at<423>().as_bytes(); } + bool has_vb2_v4l2_buf_queue() const { return at<424>().valid(); } + ::protozero::ConstBytes vb2_v4l2_buf_queue() const { return at<424>().as_bytes(); } + bool has_vb2_v4l2_buf_done() const { return at<425>().valid(); } + ::protozero::ConstBytes vb2_v4l2_buf_done() const { return at<425>().as_bytes(); } + bool has_vb2_v4l2_qbuf() const { return at<426>().valid(); } + ::protozero::ConstBytes vb2_v4l2_qbuf() const { return at<426>().as_bytes(); } + bool has_vb2_v4l2_dqbuf() const { return at<427>().valid(); } + ::protozero::ConstBytes vb2_v4l2_dqbuf() const { return at<427>().as_bytes(); } + bool has_dsi_cmd_fifo_status() const { return at<428>().valid(); } + ::protozero::ConstBytes dsi_cmd_fifo_status() const { return at<428>().as_bytes(); } + bool has_dsi_rx() const { return at<429>().valid(); } + ::protozero::ConstBytes dsi_rx() const { return at<429>().as_bytes(); } + bool has_dsi_tx() const { return at<430>().valid(); } + ::protozero::ConstBytes dsi_tx() const { return at<430>().as_bytes(); } + bool has_android_fs_dataread_end() const { return at<431>().valid(); } + ::protozero::ConstBytes android_fs_dataread_end() const { return at<431>().as_bytes(); } + bool has_android_fs_dataread_start() const { return at<432>().valid(); } + ::protozero::ConstBytes android_fs_dataread_start() const { return at<432>().as_bytes(); } + bool has_android_fs_datawrite_end() const { return at<433>().valid(); } + ::protozero::ConstBytes android_fs_datawrite_end() const { return at<433>().as_bytes(); } + bool has_android_fs_datawrite_start() const { return at<434>().valid(); } + ::protozero::ConstBytes android_fs_datawrite_start() const { return at<434>().as_bytes(); } + bool has_android_fs_fsync_end() const { return at<435>().valid(); } + ::protozero::ConstBytes android_fs_fsync_end() const { return at<435>().as_bytes(); } + bool has_android_fs_fsync_start() const { return at<436>().valid(); } + ::protozero::ConstBytes android_fs_fsync_start() const { return at<436>().as_bytes(); } + bool has_funcgraph_entry() const { return at<437>().valid(); } + ::protozero::ConstBytes funcgraph_entry() const { return at<437>().as_bytes(); } + bool has_funcgraph_exit() const { return at<438>().valid(); } + ::protozero::ConstBytes funcgraph_exit() const { return at<438>().as_bytes(); } + bool has_virtio_video_cmd() const { return at<439>().valid(); } + ::protozero::ConstBytes virtio_video_cmd() const { return at<439>().as_bytes(); } + bool has_virtio_video_cmd_done() const { return at<440>().valid(); } + ::protozero::ConstBytes virtio_video_cmd_done() const { return at<440>().as_bytes(); } + bool has_virtio_video_resource_queue() const { return at<441>().valid(); } + ::protozero::ConstBytes virtio_video_resource_queue() const { return at<441>().as_bytes(); } + bool has_virtio_video_resource_queue_done() const { return at<442>().valid(); } + ::protozero::ConstBytes virtio_video_resource_queue_done() const { return at<442>().as_bytes(); } + bool has_mm_shrink_slab_start() const { return at<443>().valid(); } + ::protozero::ConstBytes mm_shrink_slab_start() const { return at<443>().as_bytes(); } + bool has_mm_shrink_slab_end() const { return at<444>().valid(); } + ::protozero::ConstBytes mm_shrink_slab_end() const { return at<444>().as_bytes(); } + bool has_trusty_smc() const { return at<445>().valid(); } + ::protozero::ConstBytes trusty_smc() const { return at<445>().as_bytes(); } + bool has_trusty_smc_done() const { return at<446>().valid(); } + ::protozero::ConstBytes trusty_smc_done() const { return at<446>().as_bytes(); } + bool has_trusty_std_call32() const { return at<447>().valid(); } + ::protozero::ConstBytes trusty_std_call32() const { return at<447>().as_bytes(); } + bool has_trusty_std_call32_done() const { return at<448>().valid(); } + ::protozero::ConstBytes trusty_std_call32_done() const { return at<448>().as_bytes(); } + bool has_trusty_share_memory() const { return at<449>().valid(); } + ::protozero::ConstBytes trusty_share_memory() const { return at<449>().as_bytes(); } + bool has_trusty_share_memory_done() const { return at<450>().valid(); } + ::protozero::ConstBytes trusty_share_memory_done() const { return at<450>().as_bytes(); } + bool has_trusty_reclaim_memory() const { return at<451>().valid(); } + ::protozero::ConstBytes trusty_reclaim_memory() const { return at<451>().as_bytes(); } + bool has_trusty_reclaim_memory_done() const { return at<452>().valid(); } + ::protozero::ConstBytes trusty_reclaim_memory_done() const { return at<452>().as_bytes(); } + bool has_trusty_irq() const { return at<453>().valid(); } + ::protozero::ConstBytes trusty_irq() const { return at<453>().as_bytes(); } + bool has_trusty_ipc_handle_event() const { return at<454>().valid(); } + ::protozero::ConstBytes trusty_ipc_handle_event() const { return at<454>().as_bytes(); } + bool has_trusty_ipc_connect() const { return at<455>().valid(); } + ::protozero::ConstBytes trusty_ipc_connect() const { return at<455>().as_bytes(); } + bool has_trusty_ipc_connect_end() const { return at<456>().valid(); } + ::protozero::ConstBytes trusty_ipc_connect_end() const { return at<456>().as_bytes(); } + bool has_trusty_ipc_write() const { return at<457>().valid(); } + ::protozero::ConstBytes trusty_ipc_write() const { return at<457>().as_bytes(); } + bool has_trusty_ipc_poll() const { return at<458>().valid(); } + ::protozero::ConstBytes trusty_ipc_poll() const { return at<458>().as_bytes(); } + bool has_trusty_ipc_read() const { return at<460>().valid(); } + ::protozero::ConstBytes trusty_ipc_read() const { return at<460>().as_bytes(); } + bool has_trusty_ipc_read_end() const { return at<461>().valid(); } + ::protozero::ConstBytes trusty_ipc_read_end() const { return at<461>().as_bytes(); } + bool has_trusty_ipc_rx() const { return at<462>().valid(); } + ::protozero::ConstBytes trusty_ipc_rx() const { return at<462>().as_bytes(); } + bool has_trusty_enqueue_nop() const { return at<464>().valid(); } + ::protozero::ConstBytes trusty_enqueue_nop() const { return at<464>().as_bytes(); } + bool has_cma_alloc_start() const { return at<465>().valid(); } + ::protozero::ConstBytes cma_alloc_start() const { return at<465>().as_bytes(); } + bool has_cma_alloc_info() const { return at<466>().valid(); } + ::protozero::ConstBytes cma_alloc_info() const { return at<466>().as_bytes(); } + bool has_lwis_tracing_mark_write() const { return at<467>().valid(); } + ::protozero::ConstBytes lwis_tracing_mark_write() const { return at<467>().as_bytes(); } + bool has_virtio_gpu_cmd_queue() const { return at<468>().valid(); } + ::protozero::ConstBytes virtio_gpu_cmd_queue() const { return at<468>().as_bytes(); } + bool has_virtio_gpu_cmd_response() const { return at<469>().valid(); } + ::protozero::ConstBytes virtio_gpu_cmd_response() const { return at<469>().as_bytes(); } + bool has_mali_mali_kcpu_cqs_set() const { return at<470>().valid(); } + ::protozero::ConstBytes mali_mali_kcpu_cqs_set() const { return at<470>().as_bytes(); } + bool has_mali_mali_kcpu_cqs_wait_start() const { return at<471>().valid(); } + ::protozero::ConstBytes mali_mali_kcpu_cqs_wait_start() const { return at<471>().as_bytes(); } + bool has_mali_mali_kcpu_cqs_wait_end() const { return at<472>().valid(); } + ::protozero::ConstBytes mali_mali_kcpu_cqs_wait_end() const { return at<472>().as_bytes(); } + bool has_mali_mali_kcpu_fence_signal() const { return at<473>().valid(); } + ::protozero::ConstBytes mali_mali_kcpu_fence_signal() const { return at<473>().as_bytes(); } + bool has_mali_mali_kcpu_fence_wait_start() const { return at<474>().valid(); } + ::protozero::ConstBytes mali_mali_kcpu_fence_wait_start() const { return at<474>().as_bytes(); } + bool has_mali_mali_kcpu_fence_wait_end() const { return at<475>().valid(); } + ::protozero::ConstBytes mali_mali_kcpu_fence_wait_end() const { return at<475>().as_bytes(); } + bool has_hyp_enter() const { return at<476>().valid(); } + ::protozero::ConstBytes hyp_enter() const { return at<476>().as_bytes(); } + bool has_hyp_exit() const { return at<477>().valid(); } + ::protozero::ConstBytes hyp_exit() const { return at<477>().as_bytes(); } + bool has_host_hcall() const { return at<478>().valid(); } + ::protozero::ConstBytes host_hcall() const { return at<478>().as_bytes(); } + bool has_host_smc() const { return at<479>().valid(); } + ::protozero::ConstBytes host_smc() const { return at<479>().as_bytes(); } + bool has_host_mem_abort() const { return at<480>().valid(); } + ::protozero::ConstBytes host_mem_abort() const { return at<480>().as_bytes(); } + bool has_suspend_resume_minimal() const { return at<481>().valid(); } + ::protozero::ConstBytes suspend_resume_minimal() const { return at<481>().as_bytes(); } + bool has_mali_mali_csf_interrupt_start() const { return at<482>().valid(); } + ::protozero::ConstBytes mali_mali_csf_interrupt_start() const { return at<482>().as_bytes(); } + bool has_mali_mali_csf_interrupt_end() const { return at<483>().valid(); } + ::protozero::ConstBytes mali_mali_csf_interrupt_end() const { return at<483>().as_bytes(); } }; class FtraceEvent : public ::protozero::Message { @@ -46141,6 +50269,7 @@ class FtraceEvent : public ::protozero::Message { enum : int32_t { kTimestampFieldNumber = 1, kPidFieldNumber = 2, + kCommonFlagsFieldNumber = 5, kPrintFieldNumber = 3, kSchedSwitchFieldNumber = 4, kCpuFrequencyFieldNumber = 11, @@ -46542,6 +50671,67 @@ class FtraceEvent : public ::protozero::Message { kDmaFenceWaitEndFieldNumber = 418, kF2fsIostatFieldNumber = 419, kF2fsIostatLatencyFieldNumber = 420, + kSchedCpuUtilCfsFieldNumber = 421, + kV4l2QbufFieldNumber = 422, + kV4l2DqbufFieldNumber = 423, + kVb2V4l2BufQueueFieldNumber = 424, + kVb2V4l2BufDoneFieldNumber = 425, + kVb2V4l2QbufFieldNumber = 426, + kVb2V4l2DqbufFieldNumber = 427, + kDsiCmdFifoStatusFieldNumber = 428, + kDsiRxFieldNumber = 429, + kDsiTxFieldNumber = 430, + kAndroidFsDatareadEndFieldNumber = 431, + kAndroidFsDatareadStartFieldNumber = 432, + kAndroidFsDatawriteEndFieldNumber = 433, + kAndroidFsDatawriteStartFieldNumber = 434, + kAndroidFsFsyncEndFieldNumber = 435, + kAndroidFsFsyncStartFieldNumber = 436, + kFuncgraphEntryFieldNumber = 437, + kFuncgraphExitFieldNumber = 438, + kVirtioVideoCmdFieldNumber = 439, + kVirtioVideoCmdDoneFieldNumber = 440, + kVirtioVideoResourceQueueFieldNumber = 441, + kVirtioVideoResourceQueueDoneFieldNumber = 442, + kMmShrinkSlabStartFieldNumber = 443, + kMmShrinkSlabEndFieldNumber = 444, + kTrustySmcFieldNumber = 445, + kTrustySmcDoneFieldNumber = 446, + kTrustyStdCall32FieldNumber = 447, + kTrustyStdCall32DoneFieldNumber = 448, + kTrustyShareMemoryFieldNumber = 449, + kTrustyShareMemoryDoneFieldNumber = 450, + kTrustyReclaimMemoryFieldNumber = 451, + kTrustyReclaimMemoryDoneFieldNumber = 452, + kTrustyIrqFieldNumber = 453, + kTrustyIpcHandleEventFieldNumber = 454, + kTrustyIpcConnectFieldNumber = 455, + kTrustyIpcConnectEndFieldNumber = 456, + kTrustyIpcWriteFieldNumber = 457, + kTrustyIpcPollFieldNumber = 458, + kTrustyIpcReadFieldNumber = 460, + kTrustyIpcReadEndFieldNumber = 461, + kTrustyIpcRxFieldNumber = 462, + kTrustyEnqueueNopFieldNumber = 464, + kCmaAllocStartFieldNumber = 465, + kCmaAllocInfoFieldNumber = 466, + kLwisTracingMarkWriteFieldNumber = 467, + kVirtioGpuCmdQueueFieldNumber = 468, + kVirtioGpuCmdResponseFieldNumber = 469, + kMaliMaliKCPUCQSSETFieldNumber = 470, + kMaliMaliKCPUCQSWAITSTARTFieldNumber = 471, + kMaliMaliKCPUCQSWAITENDFieldNumber = 472, + kMaliMaliKCPUFENCESIGNALFieldNumber = 473, + kMaliMaliKCPUFENCEWAITSTARTFieldNumber = 474, + kMaliMaliKCPUFENCEWAITENDFieldNumber = 475, + kHypEnterFieldNumber = 476, + kHypExitFieldNumber = 477, + kHostHcallFieldNumber = 478, + kHostSmcFieldNumber = 479, + kHostMemAbortFieldNumber = 480, + kSuspendResumeMinimalFieldNumber = 481, + kMaliMaliCSFINTERRUPTSTARTFieldNumber = 482, + kMaliMaliCSFINTERRUPTENDFieldNumber = 483, }; static constexpr const char* GetName() { return ".perfetto.protos.FtraceEvent"; } @@ -46554,14 +50744,7 @@ class FtraceEvent : public ::protozero::Message { uint64_t, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Timestamp kTimestamp() { return {}; } + static constexpr FieldMetadata_Timestamp kTimestamp{}; void set_timestamp(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Timestamp::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -46579,14 +50762,7 @@ class FtraceEvent : public ::protozero::Message { uint32_t, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Pid kPid() { return {}; } + static constexpr FieldMetadata_Pid kPid{}; void set_pid(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Pid::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -46596,6 +50772,24 @@ class FtraceEvent : public ::protozero::Message { ::Append(*this, field_id, value); } + using FieldMetadata_CommonFlags = + ::protozero::proto_utils::FieldMetadata< + 5, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint32, + uint32_t, + FtraceEvent>; + + static constexpr FieldMetadata_CommonFlags kCommonFlags{}; + void set_common_flags(uint32_t value) { + static constexpr uint32_t field_id = FieldMetadata_CommonFlags::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint32> + ::Append(*this, field_id, value); + } + using FieldMetadata_Print = ::protozero::proto_utils::FieldMetadata< 3, @@ -46604,14 +50798,7 @@ class FtraceEvent : public ::protozero::Message { PrintFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Print kPrint() { return {}; } + static constexpr FieldMetadata_Print kPrint{}; template T* set_print() { return BeginNestedMessage(3); } @@ -46625,14 +50812,7 @@ class FtraceEvent : public ::protozero::Message { SchedSwitchFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_SchedSwitch kSchedSwitch() { return {}; } + static constexpr FieldMetadata_SchedSwitch kSchedSwitch{}; template T* set_sched_switch() { return BeginNestedMessage(4); } @@ -46646,14 +50826,7 @@ class FtraceEvent : public ::protozero::Message { CpuFrequencyFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_CpuFrequency kCpuFrequency() { return {}; } + static constexpr FieldMetadata_CpuFrequency kCpuFrequency{}; template T* set_cpu_frequency() { return BeginNestedMessage(11); } @@ -46667,14 +50840,7 @@ class FtraceEvent : public ::protozero::Message { CpuFrequencyLimitsFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_CpuFrequencyLimits kCpuFrequencyLimits() { return {}; } + static constexpr FieldMetadata_CpuFrequencyLimits kCpuFrequencyLimits{}; template T* set_cpu_frequency_limits() { return BeginNestedMessage(12); } @@ -46688,14 +50854,7 @@ class FtraceEvent : public ::protozero::Message { CpuIdleFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_CpuIdle kCpuIdle() { return {}; } + static constexpr FieldMetadata_CpuIdle kCpuIdle{}; template T* set_cpu_idle() { return BeginNestedMessage(13); } @@ -46709,14 +50868,7 @@ class FtraceEvent : public ::protozero::Message { ClockEnableFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ClockEnable kClockEnable() { return {}; } + static constexpr FieldMetadata_ClockEnable kClockEnable{}; template T* set_clock_enable() { return BeginNestedMessage(14); } @@ -46730,14 +50882,7 @@ class FtraceEvent : public ::protozero::Message { ClockDisableFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ClockDisable kClockDisable() { return {}; } + static constexpr FieldMetadata_ClockDisable kClockDisable{}; template T* set_clock_disable() { return BeginNestedMessage(15); } @@ -46751,14 +50896,7 @@ class FtraceEvent : public ::protozero::Message { ClockSetRateFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ClockSetRate kClockSetRate() { return {}; } + static constexpr FieldMetadata_ClockSetRate kClockSetRate{}; template T* set_clock_set_rate() { return BeginNestedMessage(16); } @@ -46772,14 +50910,7 @@ class FtraceEvent : public ::protozero::Message { SchedWakeupFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_SchedWakeup kSchedWakeup() { return {}; } + static constexpr FieldMetadata_SchedWakeup kSchedWakeup{}; template T* set_sched_wakeup() { return BeginNestedMessage(17); } @@ -46793,14 +50924,7 @@ class FtraceEvent : public ::protozero::Message { SchedBlockedReasonFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_SchedBlockedReason kSchedBlockedReason() { return {}; } + static constexpr FieldMetadata_SchedBlockedReason kSchedBlockedReason{}; template T* set_sched_blocked_reason() { return BeginNestedMessage(18); } @@ -46814,14 +50938,7 @@ class FtraceEvent : public ::protozero::Message { SchedCpuHotplugFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_SchedCpuHotplug kSchedCpuHotplug() { return {}; } + static constexpr FieldMetadata_SchedCpuHotplug kSchedCpuHotplug{}; template T* set_sched_cpu_hotplug() { return BeginNestedMessage(19); } @@ -46835,14 +50952,7 @@ class FtraceEvent : public ::protozero::Message { SchedWakingFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_SchedWaking kSchedWaking() { return {}; } + static constexpr FieldMetadata_SchedWaking kSchedWaking{}; template T* set_sched_waking() { return BeginNestedMessage(20); } @@ -46856,14 +50966,7 @@ class FtraceEvent : public ::protozero::Message { IpiEntryFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_IpiEntry kIpiEntry() { return {}; } + static constexpr FieldMetadata_IpiEntry kIpiEntry{}; template T* set_ipi_entry() { return BeginNestedMessage(21); } @@ -46877,14 +50980,7 @@ class FtraceEvent : public ::protozero::Message { IpiExitFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_IpiExit kIpiExit() { return {}; } + static constexpr FieldMetadata_IpiExit kIpiExit{}; template T* set_ipi_exit() { return BeginNestedMessage(22); } @@ -46898,14 +50994,7 @@ class FtraceEvent : public ::protozero::Message { IpiRaiseFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_IpiRaise kIpiRaise() { return {}; } + static constexpr FieldMetadata_IpiRaise kIpiRaise{}; template T* set_ipi_raise() { return BeginNestedMessage(23); } @@ -46919,14 +51008,7 @@ class FtraceEvent : public ::protozero::Message { SoftirqEntryFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_SoftirqEntry kSoftirqEntry() { return {}; } + static constexpr FieldMetadata_SoftirqEntry kSoftirqEntry{}; template T* set_softirq_entry() { return BeginNestedMessage(24); } @@ -46940,14 +51022,7 @@ class FtraceEvent : public ::protozero::Message { SoftirqExitFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_SoftirqExit kSoftirqExit() { return {}; } + static constexpr FieldMetadata_SoftirqExit kSoftirqExit{}; template T* set_softirq_exit() { return BeginNestedMessage(25); } @@ -46961,14 +51036,7 @@ class FtraceEvent : public ::protozero::Message { SoftirqRaiseFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_SoftirqRaise kSoftirqRaise() { return {}; } + static constexpr FieldMetadata_SoftirqRaise kSoftirqRaise{}; template T* set_softirq_raise() { return BeginNestedMessage(26); } @@ -46982,14 +51050,7 @@ class FtraceEvent : public ::protozero::Message { I2cReadFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_I2cRead kI2cRead() { return {}; } + static constexpr FieldMetadata_I2cRead kI2cRead{}; template T* set_i2c_read() { return BeginNestedMessage(27); } @@ -47003,14 +51064,7 @@ class FtraceEvent : public ::protozero::Message { I2cWriteFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_I2cWrite kI2cWrite() { return {}; } + static constexpr FieldMetadata_I2cWrite kI2cWrite{}; template T* set_i2c_write() { return BeginNestedMessage(28); } @@ -47024,14 +51078,7 @@ class FtraceEvent : public ::protozero::Message { I2cResultFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_I2cResult kI2cResult() { return {}; } + static constexpr FieldMetadata_I2cResult kI2cResult{}; template T* set_i2c_result() { return BeginNestedMessage(29); } @@ -47045,14 +51092,7 @@ class FtraceEvent : public ::protozero::Message { I2cReplyFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_I2cReply kI2cReply() { return {}; } + static constexpr FieldMetadata_I2cReply kI2cReply{}; template T* set_i2c_reply() { return BeginNestedMessage(30); } @@ -47066,14 +51106,7 @@ class FtraceEvent : public ::protozero::Message { SmbusReadFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_SmbusRead kSmbusRead() { return {}; } + static constexpr FieldMetadata_SmbusRead kSmbusRead{}; template T* set_smbus_read() { return BeginNestedMessage(31); } @@ -47087,14 +51120,7 @@ class FtraceEvent : public ::protozero::Message { SmbusWriteFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_SmbusWrite kSmbusWrite() { return {}; } + static constexpr FieldMetadata_SmbusWrite kSmbusWrite{}; template T* set_smbus_write() { return BeginNestedMessage(32); } @@ -47108,14 +51134,7 @@ class FtraceEvent : public ::protozero::Message { SmbusResultFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_SmbusResult kSmbusResult() { return {}; } + static constexpr FieldMetadata_SmbusResult kSmbusResult{}; template T* set_smbus_result() { return BeginNestedMessage(33); } @@ -47129,14 +51148,7 @@ class FtraceEvent : public ::protozero::Message { SmbusReplyFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_SmbusReply kSmbusReply() { return {}; } + static constexpr FieldMetadata_SmbusReply kSmbusReply{}; template T* set_smbus_reply() { return BeginNestedMessage(34); } @@ -47150,14 +51162,7 @@ class FtraceEvent : public ::protozero::Message { LowmemoryKillFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_LowmemoryKill kLowmemoryKill() { return {}; } + static constexpr FieldMetadata_LowmemoryKill kLowmemoryKill{}; template T* set_lowmemory_kill() { return BeginNestedMessage(35); } @@ -47171,14 +51176,7 @@ class FtraceEvent : public ::protozero::Message { IrqHandlerEntryFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_IrqHandlerEntry kIrqHandlerEntry() { return {}; } + static constexpr FieldMetadata_IrqHandlerEntry kIrqHandlerEntry{}; template T* set_irq_handler_entry() { return BeginNestedMessage(36); } @@ -47192,14 +51190,7 @@ class FtraceEvent : public ::protozero::Message { IrqHandlerExitFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_IrqHandlerExit kIrqHandlerExit() { return {}; } + static constexpr FieldMetadata_IrqHandlerExit kIrqHandlerExit{}; template T* set_irq_handler_exit() { return BeginNestedMessage(37); } @@ -47213,14 +51204,7 @@ class FtraceEvent : public ::protozero::Message { SyncPtFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_SyncPt kSyncPt() { return {}; } + static constexpr FieldMetadata_SyncPt kSyncPt{}; template T* set_sync_pt() { return BeginNestedMessage(38); } @@ -47234,14 +51218,7 @@ class FtraceEvent : public ::protozero::Message { SyncTimelineFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_SyncTimeline kSyncTimeline() { return {}; } + static constexpr FieldMetadata_SyncTimeline kSyncTimeline{}; template T* set_sync_timeline() { return BeginNestedMessage(39); } @@ -47255,14 +51232,7 @@ class FtraceEvent : public ::protozero::Message { SyncWaitFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_SyncWait kSyncWait() { return {}; } + static constexpr FieldMetadata_SyncWait kSyncWait{}; template T* set_sync_wait() { return BeginNestedMessage(40); } @@ -47276,14 +51246,7 @@ class FtraceEvent : public ::protozero::Message { Ext4DaWriteBeginFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ext4DaWriteBegin kExt4DaWriteBegin() { return {}; } + static constexpr FieldMetadata_Ext4DaWriteBegin kExt4DaWriteBegin{}; template T* set_ext4_da_write_begin() { return BeginNestedMessage(41); } @@ -47297,14 +51260,7 @@ class FtraceEvent : public ::protozero::Message { Ext4DaWriteEndFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ext4DaWriteEnd kExt4DaWriteEnd() { return {}; } + static constexpr FieldMetadata_Ext4DaWriteEnd kExt4DaWriteEnd{}; template T* set_ext4_da_write_end() { return BeginNestedMessage(42); } @@ -47318,14 +51274,7 @@ class FtraceEvent : public ::protozero::Message { Ext4SyncFileEnterFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ext4SyncFileEnter kExt4SyncFileEnter() { return {}; } + static constexpr FieldMetadata_Ext4SyncFileEnter kExt4SyncFileEnter{}; template T* set_ext4_sync_file_enter() { return BeginNestedMessage(43); } @@ -47339,14 +51288,7 @@ class FtraceEvent : public ::protozero::Message { Ext4SyncFileExitFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ext4SyncFileExit kExt4SyncFileExit() { return {}; } + static constexpr FieldMetadata_Ext4SyncFileExit kExt4SyncFileExit{}; template T* set_ext4_sync_file_exit() { return BeginNestedMessage(44); } @@ -47360,14 +51302,7 @@ class FtraceEvent : public ::protozero::Message { BlockRqIssueFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_BlockRqIssue kBlockRqIssue() { return {}; } + static constexpr FieldMetadata_BlockRqIssue kBlockRqIssue{}; template T* set_block_rq_issue() { return BeginNestedMessage(45); } @@ -47381,14 +51316,7 @@ class FtraceEvent : public ::protozero::Message { MmVmscanDirectReclaimBeginFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_MmVmscanDirectReclaimBegin kMmVmscanDirectReclaimBegin() { return {}; } + static constexpr FieldMetadata_MmVmscanDirectReclaimBegin kMmVmscanDirectReclaimBegin{}; template T* set_mm_vmscan_direct_reclaim_begin() { return BeginNestedMessage(46); } @@ -47402,14 +51330,7 @@ class FtraceEvent : public ::protozero::Message { MmVmscanDirectReclaimEndFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_MmVmscanDirectReclaimEnd kMmVmscanDirectReclaimEnd() { return {}; } + static constexpr FieldMetadata_MmVmscanDirectReclaimEnd kMmVmscanDirectReclaimEnd{}; template T* set_mm_vmscan_direct_reclaim_end() { return BeginNestedMessage(47); } @@ -47423,14 +51344,7 @@ class FtraceEvent : public ::protozero::Message { MmVmscanKswapdWakeFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_MmVmscanKswapdWake kMmVmscanKswapdWake() { return {}; } + static constexpr FieldMetadata_MmVmscanKswapdWake kMmVmscanKswapdWake{}; template T* set_mm_vmscan_kswapd_wake() { return BeginNestedMessage(48); } @@ -47444,14 +51358,7 @@ class FtraceEvent : public ::protozero::Message { MmVmscanKswapdSleepFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_MmVmscanKswapdSleep kMmVmscanKswapdSleep() { return {}; } + static constexpr FieldMetadata_MmVmscanKswapdSleep kMmVmscanKswapdSleep{}; template T* set_mm_vmscan_kswapd_sleep() { return BeginNestedMessage(49); } @@ -47465,14 +51372,7 @@ class FtraceEvent : public ::protozero::Message { BinderTransactionFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_BinderTransaction kBinderTransaction() { return {}; } + static constexpr FieldMetadata_BinderTransaction kBinderTransaction{}; template T* set_binder_transaction() { return BeginNestedMessage(50); } @@ -47486,14 +51386,7 @@ class FtraceEvent : public ::protozero::Message { BinderTransactionReceivedFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_BinderTransactionReceived kBinderTransactionReceived() { return {}; } + static constexpr FieldMetadata_BinderTransactionReceived kBinderTransactionReceived{}; template T* set_binder_transaction_received() { return BeginNestedMessage(51); } @@ -47507,14 +51400,7 @@ class FtraceEvent : public ::protozero::Message { BinderSetPriorityFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_BinderSetPriority kBinderSetPriority() { return {}; } + static constexpr FieldMetadata_BinderSetPriority kBinderSetPriority{}; template T* set_binder_set_priority() { return BeginNestedMessage(52); } @@ -47528,14 +51414,7 @@ class FtraceEvent : public ::protozero::Message { BinderLockFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_BinderLock kBinderLock() { return {}; } + static constexpr FieldMetadata_BinderLock kBinderLock{}; template T* set_binder_lock() { return BeginNestedMessage(53); } @@ -47549,14 +51428,7 @@ class FtraceEvent : public ::protozero::Message { BinderLockedFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_BinderLocked kBinderLocked() { return {}; } + static constexpr FieldMetadata_BinderLocked kBinderLocked{}; template T* set_binder_locked() { return BeginNestedMessage(54); } @@ -47570,14 +51442,7 @@ class FtraceEvent : public ::protozero::Message { BinderUnlockFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_BinderUnlock kBinderUnlock() { return {}; } + static constexpr FieldMetadata_BinderUnlock kBinderUnlock{}; template T* set_binder_unlock() { return BeginNestedMessage(55); } @@ -47591,14 +51456,7 @@ class FtraceEvent : public ::protozero::Message { WorkqueueActivateWorkFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_WorkqueueActivateWork kWorkqueueActivateWork() { return {}; } + static constexpr FieldMetadata_WorkqueueActivateWork kWorkqueueActivateWork{}; template T* set_workqueue_activate_work() { return BeginNestedMessage(56); } @@ -47612,14 +51470,7 @@ class FtraceEvent : public ::protozero::Message { WorkqueueExecuteEndFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_WorkqueueExecuteEnd kWorkqueueExecuteEnd() { return {}; } + static constexpr FieldMetadata_WorkqueueExecuteEnd kWorkqueueExecuteEnd{}; template T* set_workqueue_execute_end() { return BeginNestedMessage(57); } @@ -47633,14 +51484,7 @@ class FtraceEvent : public ::protozero::Message { WorkqueueExecuteStartFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_WorkqueueExecuteStart kWorkqueueExecuteStart() { return {}; } + static constexpr FieldMetadata_WorkqueueExecuteStart kWorkqueueExecuteStart{}; template T* set_workqueue_execute_start() { return BeginNestedMessage(58); } @@ -47654,14 +51498,7 @@ class FtraceEvent : public ::protozero::Message { WorkqueueQueueWorkFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_WorkqueueQueueWork kWorkqueueQueueWork() { return {}; } + static constexpr FieldMetadata_WorkqueueQueueWork kWorkqueueQueueWork{}; template T* set_workqueue_queue_work() { return BeginNestedMessage(59); } @@ -47675,14 +51512,7 @@ class FtraceEvent : public ::protozero::Message { RegulatorDisableFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_RegulatorDisable kRegulatorDisable() { return {}; } + static constexpr FieldMetadata_RegulatorDisable kRegulatorDisable{}; template T* set_regulator_disable() { return BeginNestedMessage(60); } @@ -47696,14 +51526,7 @@ class FtraceEvent : public ::protozero::Message { RegulatorDisableCompleteFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_RegulatorDisableComplete kRegulatorDisableComplete() { return {}; } + static constexpr FieldMetadata_RegulatorDisableComplete kRegulatorDisableComplete{}; template T* set_regulator_disable_complete() { return BeginNestedMessage(61); } @@ -47717,14 +51540,7 @@ class FtraceEvent : public ::protozero::Message { RegulatorEnableFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_RegulatorEnable kRegulatorEnable() { return {}; } + static constexpr FieldMetadata_RegulatorEnable kRegulatorEnable{}; template T* set_regulator_enable() { return BeginNestedMessage(62); } @@ -47738,14 +51554,7 @@ class FtraceEvent : public ::protozero::Message { RegulatorEnableCompleteFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_RegulatorEnableComplete kRegulatorEnableComplete() { return {}; } + static constexpr FieldMetadata_RegulatorEnableComplete kRegulatorEnableComplete{}; template T* set_regulator_enable_complete() { return BeginNestedMessage(63); } @@ -47759,14 +51568,7 @@ class FtraceEvent : public ::protozero::Message { RegulatorEnableDelayFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_RegulatorEnableDelay kRegulatorEnableDelay() { return {}; } + static constexpr FieldMetadata_RegulatorEnableDelay kRegulatorEnableDelay{}; template T* set_regulator_enable_delay() { return BeginNestedMessage(64); } @@ -47780,14 +51582,7 @@ class FtraceEvent : public ::protozero::Message { RegulatorSetVoltageFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_RegulatorSetVoltage kRegulatorSetVoltage() { return {}; } + static constexpr FieldMetadata_RegulatorSetVoltage kRegulatorSetVoltage{}; template T* set_regulator_set_voltage() { return BeginNestedMessage(65); } @@ -47801,14 +51596,7 @@ class FtraceEvent : public ::protozero::Message { RegulatorSetVoltageCompleteFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_RegulatorSetVoltageComplete kRegulatorSetVoltageComplete() { return {}; } + static constexpr FieldMetadata_RegulatorSetVoltageComplete kRegulatorSetVoltageComplete{}; template T* set_regulator_set_voltage_complete() { return BeginNestedMessage(66); } @@ -47822,14 +51610,7 @@ class FtraceEvent : public ::protozero::Message { CgroupAttachTaskFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_CgroupAttachTask kCgroupAttachTask() { return {}; } + static constexpr FieldMetadata_CgroupAttachTask kCgroupAttachTask{}; template T* set_cgroup_attach_task() { return BeginNestedMessage(67); } @@ -47843,14 +51624,7 @@ class FtraceEvent : public ::protozero::Message { CgroupMkdirFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_CgroupMkdir kCgroupMkdir() { return {}; } + static constexpr FieldMetadata_CgroupMkdir kCgroupMkdir{}; template T* set_cgroup_mkdir() { return BeginNestedMessage(68); } @@ -47864,14 +51638,7 @@ class FtraceEvent : public ::protozero::Message { CgroupRemountFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_CgroupRemount kCgroupRemount() { return {}; } + static constexpr FieldMetadata_CgroupRemount kCgroupRemount{}; template T* set_cgroup_remount() { return BeginNestedMessage(69); } @@ -47885,14 +51652,7 @@ class FtraceEvent : public ::protozero::Message { CgroupRmdirFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_CgroupRmdir kCgroupRmdir() { return {}; } + static constexpr FieldMetadata_CgroupRmdir kCgroupRmdir{}; template T* set_cgroup_rmdir() { return BeginNestedMessage(70); } @@ -47906,14 +51666,7 @@ class FtraceEvent : public ::protozero::Message { CgroupTransferTasksFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_CgroupTransferTasks kCgroupTransferTasks() { return {}; } + static constexpr FieldMetadata_CgroupTransferTasks kCgroupTransferTasks{}; template T* set_cgroup_transfer_tasks() { return BeginNestedMessage(71); } @@ -47927,14 +51680,7 @@ class FtraceEvent : public ::protozero::Message { CgroupDestroyRootFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_CgroupDestroyRoot kCgroupDestroyRoot() { return {}; } + static constexpr FieldMetadata_CgroupDestroyRoot kCgroupDestroyRoot{}; template T* set_cgroup_destroy_root() { return BeginNestedMessage(72); } @@ -47948,14 +51694,7 @@ class FtraceEvent : public ::protozero::Message { CgroupReleaseFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_CgroupRelease kCgroupRelease() { return {}; } + static constexpr FieldMetadata_CgroupRelease kCgroupRelease{}; template T* set_cgroup_release() { return BeginNestedMessage(73); } @@ -47969,14 +51708,7 @@ class FtraceEvent : public ::protozero::Message { CgroupRenameFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_CgroupRename kCgroupRename() { return {}; } + static constexpr FieldMetadata_CgroupRename kCgroupRename{}; template T* set_cgroup_rename() { return BeginNestedMessage(74); } @@ -47990,14 +51722,7 @@ class FtraceEvent : public ::protozero::Message { CgroupSetupRootFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_CgroupSetupRoot kCgroupSetupRoot() { return {}; } + static constexpr FieldMetadata_CgroupSetupRoot kCgroupSetupRoot{}; template T* set_cgroup_setup_root() { return BeginNestedMessage(75); } @@ -48011,14 +51736,7 @@ class FtraceEvent : public ::protozero::Message { MdpCmdKickoffFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_MdpCmdKickoff kMdpCmdKickoff() { return {}; } + static constexpr FieldMetadata_MdpCmdKickoff kMdpCmdKickoff{}; template T* set_mdp_cmd_kickoff() { return BeginNestedMessage(76); } @@ -48032,14 +51750,7 @@ class FtraceEvent : public ::protozero::Message { MdpCommitFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_MdpCommit kMdpCommit() { return {}; } + static constexpr FieldMetadata_MdpCommit kMdpCommit{}; template T* set_mdp_commit() { return BeginNestedMessage(77); } @@ -48053,14 +51764,7 @@ class FtraceEvent : public ::protozero::Message { MdpPerfSetOtFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_MdpPerfSetOt kMdpPerfSetOt() { return {}; } + static constexpr FieldMetadata_MdpPerfSetOt kMdpPerfSetOt{}; template T* set_mdp_perf_set_ot() { return BeginNestedMessage(78); } @@ -48074,14 +51778,7 @@ class FtraceEvent : public ::protozero::Message { MdpSsppChangeFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_MdpSsppChange kMdpSsppChange() { return {}; } + static constexpr FieldMetadata_MdpSsppChange kMdpSsppChange{}; template T* set_mdp_sspp_change() { return BeginNestedMessage(79); } @@ -48095,14 +51792,7 @@ class FtraceEvent : public ::protozero::Message { TracingMarkWriteFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_TracingMarkWrite kTracingMarkWrite() { return {}; } + static constexpr FieldMetadata_TracingMarkWrite kTracingMarkWrite{}; template T* set_tracing_mark_write() { return BeginNestedMessage(80); } @@ -48116,14 +51806,7 @@ class FtraceEvent : public ::protozero::Message { MdpCmdPingpongDoneFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_MdpCmdPingpongDone kMdpCmdPingpongDone() { return {}; } + static constexpr FieldMetadata_MdpCmdPingpongDone kMdpCmdPingpongDone{}; template T* set_mdp_cmd_pingpong_done() { return BeginNestedMessage(81); } @@ -48137,14 +51820,7 @@ class FtraceEvent : public ::protozero::Message { MdpCompareBwFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_MdpCompareBw kMdpCompareBw() { return {}; } + static constexpr FieldMetadata_MdpCompareBw kMdpCompareBw{}; template T* set_mdp_compare_bw() { return BeginNestedMessage(82); } @@ -48158,14 +51834,7 @@ class FtraceEvent : public ::protozero::Message { MdpPerfSetPanicLutsFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_MdpPerfSetPanicLuts kMdpPerfSetPanicLuts() { return {}; } + static constexpr FieldMetadata_MdpPerfSetPanicLuts kMdpPerfSetPanicLuts{}; template T* set_mdp_perf_set_panic_luts() { return BeginNestedMessage(83); } @@ -48179,14 +51848,7 @@ class FtraceEvent : public ::protozero::Message { MdpSsppSetFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_MdpSsppSet kMdpSsppSet() { return {}; } + static constexpr FieldMetadata_MdpSsppSet kMdpSsppSet{}; template T* set_mdp_sspp_set() { return BeginNestedMessage(84); } @@ -48200,14 +51862,7 @@ class FtraceEvent : public ::protozero::Message { MdpCmdReadptrDoneFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_MdpCmdReadptrDone kMdpCmdReadptrDone() { return {}; } + static constexpr FieldMetadata_MdpCmdReadptrDone kMdpCmdReadptrDone{}; template T* set_mdp_cmd_readptr_done() { return BeginNestedMessage(85); } @@ -48221,14 +51876,7 @@ class FtraceEvent : public ::protozero::Message { MdpMisrCrcFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_MdpMisrCrc kMdpMisrCrc() { return {}; } + static constexpr FieldMetadata_MdpMisrCrc kMdpMisrCrc{}; template T* set_mdp_misr_crc() { return BeginNestedMessage(86); } @@ -48242,14 +51890,7 @@ class FtraceEvent : public ::protozero::Message { MdpPerfSetQosLutsFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_MdpPerfSetQosLuts kMdpPerfSetQosLuts() { return {}; } + static constexpr FieldMetadata_MdpPerfSetQosLuts kMdpPerfSetQosLuts{}; template T* set_mdp_perf_set_qos_luts() { return BeginNestedMessage(87); } @@ -48263,14 +51904,7 @@ class FtraceEvent : public ::protozero::Message { MdpTraceCounterFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_MdpTraceCounter kMdpTraceCounter() { return {}; } + static constexpr FieldMetadata_MdpTraceCounter kMdpTraceCounter{}; template T* set_mdp_trace_counter() { return BeginNestedMessage(88); } @@ -48284,14 +51918,7 @@ class FtraceEvent : public ::protozero::Message { MdpCmdReleaseBwFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_MdpCmdReleaseBw kMdpCmdReleaseBw() { return {}; } + static constexpr FieldMetadata_MdpCmdReleaseBw kMdpCmdReleaseBw{}; template T* set_mdp_cmd_release_bw() { return BeginNestedMessage(89); } @@ -48305,14 +51932,7 @@ class FtraceEvent : public ::protozero::Message { MdpMixerUpdateFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_MdpMixerUpdate kMdpMixerUpdate() { return {}; } + static constexpr FieldMetadata_MdpMixerUpdate kMdpMixerUpdate{}; template T* set_mdp_mixer_update() { return BeginNestedMessage(90); } @@ -48326,14 +51946,7 @@ class FtraceEvent : public ::protozero::Message { MdpPerfSetWmLevelsFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_MdpPerfSetWmLevels kMdpPerfSetWmLevels() { return {}; } + static constexpr FieldMetadata_MdpPerfSetWmLevels kMdpPerfSetWmLevels{}; template T* set_mdp_perf_set_wm_levels() { return BeginNestedMessage(91); } @@ -48347,14 +51960,7 @@ class FtraceEvent : public ::protozero::Message { MdpVideoUnderrunDoneFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_MdpVideoUnderrunDone kMdpVideoUnderrunDone() { return {}; } + static constexpr FieldMetadata_MdpVideoUnderrunDone kMdpVideoUnderrunDone{}; template T* set_mdp_video_underrun_done() { return BeginNestedMessage(92); } @@ -48368,14 +51974,7 @@ class FtraceEvent : public ::protozero::Message { MdpCmdWaitPingpongFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_MdpCmdWaitPingpong kMdpCmdWaitPingpong() { return {}; } + static constexpr FieldMetadata_MdpCmdWaitPingpong kMdpCmdWaitPingpong{}; template T* set_mdp_cmd_wait_pingpong() { return BeginNestedMessage(93); } @@ -48389,14 +51988,7 @@ class FtraceEvent : public ::protozero::Message { MdpPerfPrefillCalcFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_MdpPerfPrefillCalc kMdpPerfPrefillCalc() { return {}; } + static constexpr FieldMetadata_MdpPerfPrefillCalc kMdpPerfPrefillCalc{}; template T* set_mdp_perf_prefill_calc() { return BeginNestedMessage(94); } @@ -48410,14 +52002,7 @@ class FtraceEvent : public ::protozero::Message { MdpPerfUpdateBusFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_MdpPerfUpdateBus kMdpPerfUpdateBus() { return {}; } + static constexpr FieldMetadata_MdpPerfUpdateBus kMdpPerfUpdateBus{}; template T* set_mdp_perf_update_bus() { return BeginNestedMessage(95); } @@ -48431,14 +52016,7 @@ class FtraceEvent : public ::protozero::Message { RotatorBwAoAsContextFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_RotatorBwAoAsContext kRotatorBwAoAsContext() { return {}; } + static constexpr FieldMetadata_RotatorBwAoAsContext kRotatorBwAoAsContext{}; template T* set_rotator_bw_ao_as_context() { return BeginNestedMessage(96); } @@ -48452,14 +52030,7 @@ class FtraceEvent : public ::protozero::Message { MmFilemapAddToPageCacheFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_MmFilemapAddToPageCache kMmFilemapAddToPageCache() { return {}; } + static constexpr FieldMetadata_MmFilemapAddToPageCache kMmFilemapAddToPageCache{}; template T* set_mm_filemap_add_to_page_cache() { return BeginNestedMessage(97); } @@ -48473,14 +52044,7 @@ class FtraceEvent : public ::protozero::Message { MmFilemapDeleteFromPageCacheFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_MmFilemapDeleteFromPageCache kMmFilemapDeleteFromPageCache() { return {}; } + static constexpr FieldMetadata_MmFilemapDeleteFromPageCache kMmFilemapDeleteFromPageCache{}; template T* set_mm_filemap_delete_from_page_cache() { return BeginNestedMessage(98); } @@ -48494,14 +52058,7 @@ class FtraceEvent : public ::protozero::Message { MmCompactionBeginFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_MmCompactionBegin kMmCompactionBegin() { return {}; } + static constexpr FieldMetadata_MmCompactionBegin kMmCompactionBegin{}; template T* set_mm_compaction_begin() { return BeginNestedMessage(99); } @@ -48515,14 +52072,7 @@ class FtraceEvent : public ::protozero::Message { MmCompactionDeferCompactionFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_MmCompactionDeferCompaction kMmCompactionDeferCompaction() { return {}; } + static constexpr FieldMetadata_MmCompactionDeferCompaction kMmCompactionDeferCompaction{}; template T* set_mm_compaction_defer_compaction() { return BeginNestedMessage(100); } @@ -48536,14 +52086,7 @@ class FtraceEvent : public ::protozero::Message { MmCompactionDeferredFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_MmCompactionDeferred kMmCompactionDeferred() { return {}; } + static constexpr FieldMetadata_MmCompactionDeferred kMmCompactionDeferred{}; template T* set_mm_compaction_deferred() { return BeginNestedMessage(101); } @@ -48557,14 +52100,7 @@ class FtraceEvent : public ::protozero::Message { MmCompactionDeferResetFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_MmCompactionDeferReset kMmCompactionDeferReset() { return {}; } + static constexpr FieldMetadata_MmCompactionDeferReset kMmCompactionDeferReset{}; template T* set_mm_compaction_defer_reset() { return BeginNestedMessage(102); } @@ -48578,14 +52114,7 @@ class FtraceEvent : public ::protozero::Message { MmCompactionEndFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_MmCompactionEnd kMmCompactionEnd() { return {}; } + static constexpr FieldMetadata_MmCompactionEnd kMmCompactionEnd{}; template T* set_mm_compaction_end() { return BeginNestedMessage(103); } @@ -48599,14 +52128,7 @@ class FtraceEvent : public ::protozero::Message { MmCompactionFinishedFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_MmCompactionFinished kMmCompactionFinished() { return {}; } + static constexpr FieldMetadata_MmCompactionFinished kMmCompactionFinished{}; template T* set_mm_compaction_finished() { return BeginNestedMessage(104); } @@ -48620,14 +52142,7 @@ class FtraceEvent : public ::protozero::Message { MmCompactionIsolateFreepagesFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_MmCompactionIsolateFreepages kMmCompactionIsolateFreepages() { return {}; } + static constexpr FieldMetadata_MmCompactionIsolateFreepages kMmCompactionIsolateFreepages{}; template T* set_mm_compaction_isolate_freepages() { return BeginNestedMessage(105); } @@ -48641,14 +52156,7 @@ class FtraceEvent : public ::protozero::Message { MmCompactionIsolateMigratepagesFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_MmCompactionIsolateMigratepages kMmCompactionIsolateMigratepages() { return {}; } + static constexpr FieldMetadata_MmCompactionIsolateMigratepages kMmCompactionIsolateMigratepages{}; template T* set_mm_compaction_isolate_migratepages() { return BeginNestedMessage(106); } @@ -48662,14 +52170,7 @@ class FtraceEvent : public ::protozero::Message { MmCompactionKcompactdSleepFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_MmCompactionKcompactdSleep kMmCompactionKcompactdSleep() { return {}; } + static constexpr FieldMetadata_MmCompactionKcompactdSleep kMmCompactionKcompactdSleep{}; template T* set_mm_compaction_kcompactd_sleep() { return BeginNestedMessage(107); } @@ -48683,14 +52184,7 @@ class FtraceEvent : public ::protozero::Message { MmCompactionKcompactdWakeFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_MmCompactionKcompactdWake kMmCompactionKcompactdWake() { return {}; } + static constexpr FieldMetadata_MmCompactionKcompactdWake kMmCompactionKcompactdWake{}; template T* set_mm_compaction_kcompactd_wake() { return BeginNestedMessage(108); } @@ -48704,14 +52198,7 @@ class FtraceEvent : public ::protozero::Message { MmCompactionMigratepagesFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_MmCompactionMigratepages kMmCompactionMigratepages() { return {}; } + static constexpr FieldMetadata_MmCompactionMigratepages kMmCompactionMigratepages{}; template T* set_mm_compaction_migratepages() { return BeginNestedMessage(109); } @@ -48725,14 +52212,7 @@ class FtraceEvent : public ::protozero::Message { MmCompactionSuitableFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_MmCompactionSuitable kMmCompactionSuitable() { return {}; } + static constexpr FieldMetadata_MmCompactionSuitable kMmCompactionSuitable{}; template T* set_mm_compaction_suitable() { return BeginNestedMessage(110); } @@ -48746,14 +52226,7 @@ class FtraceEvent : public ::protozero::Message { MmCompactionTryToCompactPagesFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_MmCompactionTryToCompactPages kMmCompactionTryToCompactPages() { return {}; } + static constexpr FieldMetadata_MmCompactionTryToCompactPages kMmCompactionTryToCompactPages{}; template T* set_mm_compaction_try_to_compact_pages() { return BeginNestedMessage(111); } @@ -48767,14 +52240,7 @@ class FtraceEvent : public ::protozero::Message { MmCompactionWakeupKcompactdFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_MmCompactionWakeupKcompactd kMmCompactionWakeupKcompactd() { return {}; } + static constexpr FieldMetadata_MmCompactionWakeupKcompactd kMmCompactionWakeupKcompactd{}; template T* set_mm_compaction_wakeup_kcompactd() { return BeginNestedMessage(112); } @@ -48788,14 +52254,7 @@ class FtraceEvent : public ::protozero::Message { SuspendResumeFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_SuspendResume kSuspendResume() { return {}; } + static constexpr FieldMetadata_SuspendResume kSuspendResume{}; template T* set_suspend_resume() { return BeginNestedMessage(113); } @@ -48809,14 +52268,7 @@ class FtraceEvent : public ::protozero::Message { SchedWakeupNewFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_SchedWakeupNew kSchedWakeupNew() { return {}; } + static constexpr FieldMetadata_SchedWakeupNew kSchedWakeupNew{}; template T* set_sched_wakeup_new() { return BeginNestedMessage(114); } @@ -48830,14 +52282,7 @@ class FtraceEvent : public ::protozero::Message { BlockBioBackmergeFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_BlockBioBackmerge kBlockBioBackmerge() { return {}; } + static constexpr FieldMetadata_BlockBioBackmerge kBlockBioBackmerge{}; template T* set_block_bio_backmerge() { return BeginNestedMessage(115); } @@ -48851,14 +52296,7 @@ class FtraceEvent : public ::protozero::Message { BlockBioBounceFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_BlockBioBounce kBlockBioBounce() { return {}; } + static constexpr FieldMetadata_BlockBioBounce kBlockBioBounce{}; template T* set_block_bio_bounce() { return BeginNestedMessage(116); } @@ -48872,14 +52310,7 @@ class FtraceEvent : public ::protozero::Message { BlockBioCompleteFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_BlockBioComplete kBlockBioComplete() { return {}; } + static constexpr FieldMetadata_BlockBioComplete kBlockBioComplete{}; template T* set_block_bio_complete() { return BeginNestedMessage(117); } @@ -48893,14 +52324,7 @@ class FtraceEvent : public ::protozero::Message { BlockBioFrontmergeFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_BlockBioFrontmerge kBlockBioFrontmerge() { return {}; } + static constexpr FieldMetadata_BlockBioFrontmerge kBlockBioFrontmerge{}; template T* set_block_bio_frontmerge() { return BeginNestedMessage(118); } @@ -48914,14 +52338,7 @@ class FtraceEvent : public ::protozero::Message { BlockBioQueueFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_BlockBioQueue kBlockBioQueue() { return {}; } + static constexpr FieldMetadata_BlockBioQueue kBlockBioQueue{}; template T* set_block_bio_queue() { return BeginNestedMessage(119); } @@ -48935,14 +52352,7 @@ class FtraceEvent : public ::protozero::Message { BlockBioRemapFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_BlockBioRemap kBlockBioRemap() { return {}; } + static constexpr FieldMetadata_BlockBioRemap kBlockBioRemap{}; template T* set_block_bio_remap() { return BeginNestedMessage(120); } @@ -48956,14 +52366,7 @@ class FtraceEvent : public ::protozero::Message { BlockDirtyBufferFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_BlockDirtyBuffer kBlockDirtyBuffer() { return {}; } + static constexpr FieldMetadata_BlockDirtyBuffer kBlockDirtyBuffer{}; template T* set_block_dirty_buffer() { return BeginNestedMessage(121); } @@ -48977,14 +52380,7 @@ class FtraceEvent : public ::protozero::Message { BlockGetrqFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_BlockGetrq kBlockGetrq() { return {}; } + static constexpr FieldMetadata_BlockGetrq kBlockGetrq{}; template T* set_block_getrq() { return BeginNestedMessage(122); } @@ -48998,14 +52394,7 @@ class FtraceEvent : public ::protozero::Message { BlockPlugFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_BlockPlug kBlockPlug() { return {}; } + static constexpr FieldMetadata_BlockPlug kBlockPlug{}; template T* set_block_plug() { return BeginNestedMessage(123); } @@ -49019,14 +52408,7 @@ class FtraceEvent : public ::protozero::Message { BlockRqAbortFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_BlockRqAbort kBlockRqAbort() { return {}; } + static constexpr FieldMetadata_BlockRqAbort kBlockRqAbort{}; template T* set_block_rq_abort() { return BeginNestedMessage(124); } @@ -49040,14 +52422,7 @@ class FtraceEvent : public ::protozero::Message { BlockRqCompleteFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_BlockRqComplete kBlockRqComplete() { return {}; } + static constexpr FieldMetadata_BlockRqComplete kBlockRqComplete{}; template T* set_block_rq_complete() { return BeginNestedMessage(125); } @@ -49061,14 +52436,7 @@ class FtraceEvent : public ::protozero::Message { BlockRqInsertFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_BlockRqInsert kBlockRqInsert() { return {}; } + static constexpr FieldMetadata_BlockRqInsert kBlockRqInsert{}; template T* set_block_rq_insert() { return BeginNestedMessage(126); } @@ -49082,14 +52450,7 @@ class FtraceEvent : public ::protozero::Message { BlockRqRemapFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_BlockRqRemap kBlockRqRemap() { return {}; } + static constexpr FieldMetadata_BlockRqRemap kBlockRqRemap{}; template T* set_block_rq_remap() { return BeginNestedMessage(128); } @@ -49103,14 +52464,7 @@ class FtraceEvent : public ::protozero::Message { BlockRqRequeueFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_BlockRqRequeue kBlockRqRequeue() { return {}; } + static constexpr FieldMetadata_BlockRqRequeue kBlockRqRequeue{}; template T* set_block_rq_requeue() { return BeginNestedMessage(129); } @@ -49124,14 +52478,7 @@ class FtraceEvent : public ::protozero::Message { BlockSleeprqFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_BlockSleeprq kBlockSleeprq() { return {}; } + static constexpr FieldMetadata_BlockSleeprq kBlockSleeprq{}; template T* set_block_sleeprq() { return BeginNestedMessage(130); } @@ -49145,14 +52492,7 @@ class FtraceEvent : public ::protozero::Message { BlockSplitFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_BlockSplit kBlockSplit() { return {}; } + static constexpr FieldMetadata_BlockSplit kBlockSplit{}; template T* set_block_split() { return BeginNestedMessage(131); } @@ -49166,14 +52506,7 @@ class FtraceEvent : public ::protozero::Message { BlockTouchBufferFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_BlockTouchBuffer kBlockTouchBuffer() { return {}; } + static constexpr FieldMetadata_BlockTouchBuffer kBlockTouchBuffer{}; template T* set_block_touch_buffer() { return BeginNestedMessage(132); } @@ -49187,14 +52520,7 @@ class FtraceEvent : public ::protozero::Message { BlockUnplugFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_BlockUnplug kBlockUnplug() { return {}; } + static constexpr FieldMetadata_BlockUnplug kBlockUnplug{}; template T* set_block_unplug() { return BeginNestedMessage(133); } @@ -49208,14 +52534,7 @@ class FtraceEvent : public ::protozero::Message { Ext4AllocDaBlocksFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ext4AllocDaBlocks kExt4AllocDaBlocks() { return {}; } + static constexpr FieldMetadata_Ext4AllocDaBlocks kExt4AllocDaBlocks{}; template T* set_ext4_alloc_da_blocks() { return BeginNestedMessage(134); } @@ -49229,14 +52548,7 @@ class FtraceEvent : public ::protozero::Message { Ext4AllocateBlocksFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ext4AllocateBlocks kExt4AllocateBlocks() { return {}; } + static constexpr FieldMetadata_Ext4AllocateBlocks kExt4AllocateBlocks{}; template T* set_ext4_allocate_blocks() { return BeginNestedMessage(135); } @@ -49250,14 +52562,7 @@ class FtraceEvent : public ::protozero::Message { Ext4AllocateInodeFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ext4AllocateInode kExt4AllocateInode() { return {}; } + static constexpr FieldMetadata_Ext4AllocateInode kExt4AllocateInode{}; template T* set_ext4_allocate_inode() { return BeginNestedMessage(136); } @@ -49271,14 +52576,7 @@ class FtraceEvent : public ::protozero::Message { Ext4BeginOrderedTruncateFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ext4BeginOrderedTruncate kExt4BeginOrderedTruncate() { return {}; } + static constexpr FieldMetadata_Ext4BeginOrderedTruncate kExt4BeginOrderedTruncate{}; template T* set_ext4_begin_ordered_truncate() { return BeginNestedMessage(137); } @@ -49292,14 +52590,7 @@ class FtraceEvent : public ::protozero::Message { Ext4CollapseRangeFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ext4CollapseRange kExt4CollapseRange() { return {}; } + static constexpr FieldMetadata_Ext4CollapseRange kExt4CollapseRange{}; template T* set_ext4_collapse_range() { return BeginNestedMessage(138); } @@ -49313,14 +52604,7 @@ class FtraceEvent : public ::protozero::Message { Ext4DaReleaseSpaceFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ext4DaReleaseSpace kExt4DaReleaseSpace() { return {}; } + static constexpr FieldMetadata_Ext4DaReleaseSpace kExt4DaReleaseSpace{}; template T* set_ext4_da_release_space() { return BeginNestedMessage(139); } @@ -49334,14 +52618,7 @@ class FtraceEvent : public ::protozero::Message { Ext4DaReserveSpaceFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ext4DaReserveSpace kExt4DaReserveSpace() { return {}; } + static constexpr FieldMetadata_Ext4DaReserveSpace kExt4DaReserveSpace{}; template T* set_ext4_da_reserve_space() { return BeginNestedMessage(140); } @@ -49355,14 +52632,7 @@ class FtraceEvent : public ::protozero::Message { Ext4DaUpdateReserveSpaceFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ext4DaUpdateReserveSpace kExt4DaUpdateReserveSpace() { return {}; } + static constexpr FieldMetadata_Ext4DaUpdateReserveSpace kExt4DaUpdateReserveSpace{}; template T* set_ext4_da_update_reserve_space() { return BeginNestedMessage(141); } @@ -49376,14 +52646,7 @@ class FtraceEvent : public ::protozero::Message { Ext4DaWritePagesFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ext4DaWritePages kExt4DaWritePages() { return {}; } + static constexpr FieldMetadata_Ext4DaWritePages kExt4DaWritePages{}; template T* set_ext4_da_write_pages() { return BeginNestedMessage(142); } @@ -49397,14 +52660,7 @@ class FtraceEvent : public ::protozero::Message { Ext4DaWritePagesExtentFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ext4DaWritePagesExtent kExt4DaWritePagesExtent() { return {}; } + static constexpr FieldMetadata_Ext4DaWritePagesExtent kExt4DaWritePagesExtent{}; template T* set_ext4_da_write_pages_extent() { return BeginNestedMessage(143); } @@ -49418,14 +52674,7 @@ class FtraceEvent : public ::protozero::Message { Ext4DirectIOEnterFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ext4DirectIOEnter kExt4DirectIOEnter() { return {}; } + static constexpr FieldMetadata_Ext4DirectIOEnter kExt4DirectIOEnter{}; template T* set_ext4_direct_io_enter() { return BeginNestedMessage(144); } @@ -49439,14 +52688,7 @@ class FtraceEvent : public ::protozero::Message { Ext4DirectIOExitFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ext4DirectIOExit kExt4DirectIOExit() { return {}; } + static constexpr FieldMetadata_Ext4DirectIOExit kExt4DirectIOExit{}; template T* set_ext4_direct_io_exit() { return BeginNestedMessage(145); } @@ -49460,14 +52702,7 @@ class FtraceEvent : public ::protozero::Message { Ext4DiscardBlocksFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ext4DiscardBlocks kExt4DiscardBlocks() { return {}; } + static constexpr FieldMetadata_Ext4DiscardBlocks kExt4DiscardBlocks{}; template T* set_ext4_discard_blocks() { return BeginNestedMessage(146); } @@ -49481,14 +52716,7 @@ class FtraceEvent : public ::protozero::Message { Ext4DiscardPreallocationsFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ext4DiscardPreallocations kExt4DiscardPreallocations() { return {}; } + static constexpr FieldMetadata_Ext4DiscardPreallocations kExt4DiscardPreallocations{}; template T* set_ext4_discard_preallocations() { return BeginNestedMessage(147); } @@ -49502,14 +52730,7 @@ class FtraceEvent : public ::protozero::Message { Ext4DropInodeFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ext4DropInode kExt4DropInode() { return {}; } + static constexpr FieldMetadata_Ext4DropInode kExt4DropInode{}; template T* set_ext4_drop_inode() { return BeginNestedMessage(148); } @@ -49523,14 +52744,7 @@ class FtraceEvent : public ::protozero::Message { Ext4EsCacheExtentFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ext4EsCacheExtent kExt4EsCacheExtent() { return {}; } + static constexpr FieldMetadata_Ext4EsCacheExtent kExt4EsCacheExtent{}; template T* set_ext4_es_cache_extent() { return BeginNestedMessage(149); } @@ -49544,14 +52758,7 @@ class FtraceEvent : public ::protozero::Message { Ext4EsFindDelayedExtentRangeEnterFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ext4EsFindDelayedExtentRangeEnter kExt4EsFindDelayedExtentRangeEnter() { return {}; } + static constexpr FieldMetadata_Ext4EsFindDelayedExtentRangeEnter kExt4EsFindDelayedExtentRangeEnter{}; template T* set_ext4_es_find_delayed_extent_range_enter() { return BeginNestedMessage(150); } @@ -49565,14 +52772,7 @@ class FtraceEvent : public ::protozero::Message { Ext4EsFindDelayedExtentRangeExitFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ext4EsFindDelayedExtentRangeExit kExt4EsFindDelayedExtentRangeExit() { return {}; } + static constexpr FieldMetadata_Ext4EsFindDelayedExtentRangeExit kExt4EsFindDelayedExtentRangeExit{}; template T* set_ext4_es_find_delayed_extent_range_exit() { return BeginNestedMessage(151); } @@ -49586,14 +52786,7 @@ class FtraceEvent : public ::protozero::Message { Ext4EsInsertExtentFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ext4EsInsertExtent kExt4EsInsertExtent() { return {}; } + static constexpr FieldMetadata_Ext4EsInsertExtent kExt4EsInsertExtent{}; template T* set_ext4_es_insert_extent() { return BeginNestedMessage(152); } @@ -49607,14 +52800,7 @@ class FtraceEvent : public ::protozero::Message { Ext4EsLookupExtentEnterFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ext4EsLookupExtentEnter kExt4EsLookupExtentEnter() { return {}; } + static constexpr FieldMetadata_Ext4EsLookupExtentEnter kExt4EsLookupExtentEnter{}; template T* set_ext4_es_lookup_extent_enter() { return BeginNestedMessage(153); } @@ -49628,14 +52814,7 @@ class FtraceEvent : public ::protozero::Message { Ext4EsLookupExtentExitFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ext4EsLookupExtentExit kExt4EsLookupExtentExit() { return {}; } + static constexpr FieldMetadata_Ext4EsLookupExtentExit kExt4EsLookupExtentExit{}; template T* set_ext4_es_lookup_extent_exit() { return BeginNestedMessage(154); } @@ -49649,14 +52828,7 @@ class FtraceEvent : public ::protozero::Message { Ext4EsRemoveExtentFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ext4EsRemoveExtent kExt4EsRemoveExtent() { return {}; } + static constexpr FieldMetadata_Ext4EsRemoveExtent kExt4EsRemoveExtent{}; template T* set_ext4_es_remove_extent() { return BeginNestedMessage(155); } @@ -49670,14 +52842,7 @@ class FtraceEvent : public ::protozero::Message { Ext4EsShrinkFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ext4EsShrink kExt4EsShrink() { return {}; } + static constexpr FieldMetadata_Ext4EsShrink kExt4EsShrink{}; template T* set_ext4_es_shrink() { return BeginNestedMessage(156); } @@ -49691,14 +52856,7 @@ class FtraceEvent : public ::protozero::Message { Ext4EsShrinkCountFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ext4EsShrinkCount kExt4EsShrinkCount() { return {}; } + static constexpr FieldMetadata_Ext4EsShrinkCount kExt4EsShrinkCount{}; template T* set_ext4_es_shrink_count() { return BeginNestedMessage(157); } @@ -49712,14 +52870,7 @@ class FtraceEvent : public ::protozero::Message { Ext4EsShrinkScanEnterFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ext4EsShrinkScanEnter kExt4EsShrinkScanEnter() { return {}; } + static constexpr FieldMetadata_Ext4EsShrinkScanEnter kExt4EsShrinkScanEnter{}; template T* set_ext4_es_shrink_scan_enter() { return BeginNestedMessage(158); } @@ -49733,14 +52884,7 @@ class FtraceEvent : public ::protozero::Message { Ext4EsShrinkScanExitFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ext4EsShrinkScanExit kExt4EsShrinkScanExit() { return {}; } + static constexpr FieldMetadata_Ext4EsShrinkScanExit kExt4EsShrinkScanExit{}; template T* set_ext4_es_shrink_scan_exit() { return BeginNestedMessage(159); } @@ -49754,14 +52898,7 @@ class FtraceEvent : public ::protozero::Message { Ext4EvictInodeFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ext4EvictInode kExt4EvictInode() { return {}; } + static constexpr FieldMetadata_Ext4EvictInode kExt4EvictInode{}; template T* set_ext4_evict_inode() { return BeginNestedMessage(160); } @@ -49775,14 +52912,7 @@ class FtraceEvent : public ::protozero::Message { Ext4ExtConvertToInitializedEnterFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ext4ExtConvertToInitializedEnter kExt4ExtConvertToInitializedEnter() { return {}; } + static constexpr FieldMetadata_Ext4ExtConvertToInitializedEnter kExt4ExtConvertToInitializedEnter{}; template T* set_ext4_ext_convert_to_initialized_enter() { return BeginNestedMessage(161); } @@ -49796,14 +52926,7 @@ class FtraceEvent : public ::protozero::Message { Ext4ExtConvertToInitializedFastpathFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ext4ExtConvertToInitializedFastpath kExt4ExtConvertToInitializedFastpath() { return {}; } + static constexpr FieldMetadata_Ext4ExtConvertToInitializedFastpath kExt4ExtConvertToInitializedFastpath{}; template T* set_ext4_ext_convert_to_initialized_fastpath() { return BeginNestedMessage(162); } @@ -49817,14 +52940,7 @@ class FtraceEvent : public ::protozero::Message { Ext4ExtHandleUnwrittenExtentsFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ext4ExtHandleUnwrittenExtents kExt4ExtHandleUnwrittenExtents() { return {}; } + static constexpr FieldMetadata_Ext4ExtHandleUnwrittenExtents kExt4ExtHandleUnwrittenExtents{}; template T* set_ext4_ext_handle_unwritten_extents() { return BeginNestedMessage(163); } @@ -49838,14 +52954,7 @@ class FtraceEvent : public ::protozero::Message { Ext4ExtInCacheFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ext4ExtInCache kExt4ExtInCache() { return {}; } + static constexpr FieldMetadata_Ext4ExtInCache kExt4ExtInCache{}; template T* set_ext4_ext_in_cache() { return BeginNestedMessage(164); } @@ -49859,14 +52968,7 @@ class FtraceEvent : public ::protozero::Message { Ext4ExtLoadExtentFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ext4ExtLoadExtent kExt4ExtLoadExtent() { return {}; } + static constexpr FieldMetadata_Ext4ExtLoadExtent kExt4ExtLoadExtent{}; template T* set_ext4_ext_load_extent() { return BeginNestedMessage(165); } @@ -49880,14 +52982,7 @@ class FtraceEvent : public ::protozero::Message { Ext4ExtMapBlocksEnterFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ext4ExtMapBlocksEnter kExt4ExtMapBlocksEnter() { return {}; } + static constexpr FieldMetadata_Ext4ExtMapBlocksEnter kExt4ExtMapBlocksEnter{}; template T* set_ext4_ext_map_blocks_enter() { return BeginNestedMessage(166); } @@ -49901,14 +52996,7 @@ class FtraceEvent : public ::protozero::Message { Ext4ExtMapBlocksExitFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ext4ExtMapBlocksExit kExt4ExtMapBlocksExit() { return {}; } + static constexpr FieldMetadata_Ext4ExtMapBlocksExit kExt4ExtMapBlocksExit{}; template T* set_ext4_ext_map_blocks_exit() { return BeginNestedMessage(167); } @@ -49922,14 +53010,7 @@ class FtraceEvent : public ::protozero::Message { Ext4ExtPutInCacheFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ext4ExtPutInCache kExt4ExtPutInCache() { return {}; } + static constexpr FieldMetadata_Ext4ExtPutInCache kExt4ExtPutInCache{}; template T* set_ext4_ext_put_in_cache() { return BeginNestedMessage(168); } @@ -49943,14 +53024,7 @@ class FtraceEvent : public ::protozero::Message { Ext4ExtRemoveSpaceFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ext4ExtRemoveSpace kExt4ExtRemoveSpace() { return {}; } + static constexpr FieldMetadata_Ext4ExtRemoveSpace kExt4ExtRemoveSpace{}; template T* set_ext4_ext_remove_space() { return BeginNestedMessage(169); } @@ -49964,14 +53038,7 @@ class FtraceEvent : public ::protozero::Message { Ext4ExtRemoveSpaceDoneFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ext4ExtRemoveSpaceDone kExt4ExtRemoveSpaceDone() { return {}; } + static constexpr FieldMetadata_Ext4ExtRemoveSpaceDone kExt4ExtRemoveSpaceDone{}; template T* set_ext4_ext_remove_space_done() { return BeginNestedMessage(170); } @@ -49985,14 +53052,7 @@ class FtraceEvent : public ::protozero::Message { Ext4ExtRmIdxFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ext4ExtRmIdx kExt4ExtRmIdx() { return {}; } + static constexpr FieldMetadata_Ext4ExtRmIdx kExt4ExtRmIdx{}; template T* set_ext4_ext_rm_idx() { return BeginNestedMessage(171); } @@ -50006,14 +53066,7 @@ class FtraceEvent : public ::protozero::Message { Ext4ExtRmLeafFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ext4ExtRmLeaf kExt4ExtRmLeaf() { return {}; } + static constexpr FieldMetadata_Ext4ExtRmLeaf kExt4ExtRmLeaf{}; template T* set_ext4_ext_rm_leaf() { return BeginNestedMessage(172); } @@ -50027,14 +53080,7 @@ class FtraceEvent : public ::protozero::Message { Ext4ExtShowExtentFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ext4ExtShowExtent kExt4ExtShowExtent() { return {}; } + static constexpr FieldMetadata_Ext4ExtShowExtent kExt4ExtShowExtent{}; template T* set_ext4_ext_show_extent() { return BeginNestedMessage(173); } @@ -50048,14 +53094,7 @@ class FtraceEvent : public ::protozero::Message { Ext4FallocateEnterFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ext4FallocateEnter kExt4FallocateEnter() { return {}; } + static constexpr FieldMetadata_Ext4FallocateEnter kExt4FallocateEnter{}; template T* set_ext4_fallocate_enter() { return BeginNestedMessage(174); } @@ -50069,14 +53108,7 @@ class FtraceEvent : public ::protozero::Message { Ext4FallocateExitFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ext4FallocateExit kExt4FallocateExit() { return {}; } + static constexpr FieldMetadata_Ext4FallocateExit kExt4FallocateExit{}; template T* set_ext4_fallocate_exit() { return BeginNestedMessage(175); } @@ -50090,14 +53122,7 @@ class FtraceEvent : public ::protozero::Message { Ext4FindDelallocRangeFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ext4FindDelallocRange kExt4FindDelallocRange() { return {}; } + static constexpr FieldMetadata_Ext4FindDelallocRange kExt4FindDelallocRange{}; template T* set_ext4_find_delalloc_range() { return BeginNestedMessage(176); } @@ -50111,14 +53136,7 @@ class FtraceEvent : public ::protozero::Message { Ext4ForgetFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ext4Forget kExt4Forget() { return {}; } + static constexpr FieldMetadata_Ext4Forget kExt4Forget{}; template T* set_ext4_forget() { return BeginNestedMessage(177); } @@ -50132,14 +53150,7 @@ class FtraceEvent : public ::protozero::Message { Ext4FreeBlocksFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ext4FreeBlocks kExt4FreeBlocks() { return {}; } + static constexpr FieldMetadata_Ext4FreeBlocks kExt4FreeBlocks{}; template T* set_ext4_free_blocks() { return BeginNestedMessage(178); } @@ -50153,14 +53164,7 @@ class FtraceEvent : public ::protozero::Message { Ext4FreeInodeFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ext4FreeInode kExt4FreeInode() { return {}; } + static constexpr FieldMetadata_Ext4FreeInode kExt4FreeInode{}; template T* set_ext4_free_inode() { return BeginNestedMessage(179); } @@ -50174,14 +53178,7 @@ class FtraceEvent : public ::protozero::Message { Ext4GetImpliedClusterAllocExitFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ext4GetImpliedClusterAllocExit kExt4GetImpliedClusterAllocExit() { return {}; } + static constexpr FieldMetadata_Ext4GetImpliedClusterAllocExit kExt4GetImpliedClusterAllocExit{}; template T* set_ext4_get_implied_cluster_alloc_exit() { return BeginNestedMessage(180); } @@ -50195,14 +53192,7 @@ class FtraceEvent : public ::protozero::Message { Ext4GetReservedClusterAllocFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ext4GetReservedClusterAlloc kExt4GetReservedClusterAlloc() { return {}; } + static constexpr FieldMetadata_Ext4GetReservedClusterAlloc kExt4GetReservedClusterAlloc{}; template T* set_ext4_get_reserved_cluster_alloc() { return BeginNestedMessage(181); } @@ -50216,14 +53206,7 @@ class FtraceEvent : public ::protozero::Message { Ext4IndMapBlocksEnterFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ext4IndMapBlocksEnter kExt4IndMapBlocksEnter() { return {}; } + static constexpr FieldMetadata_Ext4IndMapBlocksEnter kExt4IndMapBlocksEnter{}; template T* set_ext4_ind_map_blocks_enter() { return BeginNestedMessage(182); } @@ -50237,14 +53220,7 @@ class FtraceEvent : public ::protozero::Message { Ext4IndMapBlocksExitFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ext4IndMapBlocksExit kExt4IndMapBlocksExit() { return {}; } + static constexpr FieldMetadata_Ext4IndMapBlocksExit kExt4IndMapBlocksExit{}; template T* set_ext4_ind_map_blocks_exit() { return BeginNestedMessage(183); } @@ -50258,14 +53234,7 @@ class FtraceEvent : public ::protozero::Message { Ext4InsertRangeFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ext4InsertRange kExt4InsertRange() { return {}; } + static constexpr FieldMetadata_Ext4InsertRange kExt4InsertRange{}; template T* set_ext4_insert_range() { return BeginNestedMessage(184); } @@ -50279,14 +53248,7 @@ class FtraceEvent : public ::protozero::Message { Ext4InvalidatepageFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ext4Invalidatepage kExt4Invalidatepage() { return {}; } + static constexpr FieldMetadata_Ext4Invalidatepage kExt4Invalidatepage{}; template T* set_ext4_invalidatepage() { return BeginNestedMessage(185); } @@ -50300,14 +53262,7 @@ class FtraceEvent : public ::protozero::Message { Ext4JournalStartFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ext4JournalStart kExt4JournalStart() { return {}; } + static constexpr FieldMetadata_Ext4JournalStart kExt4JournalStart{}; template T* set_ext4_journal_start() { return BeginNestedMessage(186); } @@ -50321,14 +53276,7 @@ class FtraceEvent : public ::protozero::Message { Ext4JournalStartReservedFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ext4JournalStartReserved kExt4JournalStartReserved() { return {}; } + static constexpr FieldMetadata_Ext4JournalStartReserved kExt4JournalStartReserved{}; template T* set_ext4_journal_start_reserved() { return BeginNestedMessage(187); } @@ -50342,14 +53290,7 @@ class FtraceEvent : public ::protozero::Message { Ext4JournalledInvalidatepageFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ext4JournalledInvalidatepage kExt4JournalledInvalidatepage() { return {}; } + static constexpr FieldMetadata_Ext4JournalledInvalidatepage kExt4JournalledInvalidatepage{}; template T* set_ext4_journalled_invalidatepage() { return BeginNestedMessage(188); } @@ -50363,14 +53304,7 @@ class FtraceEvent : public ::protozero::Message { Ext4JournalledWriteEndFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ext4JournalledWriteEnd kExt4JournalledWriteEnd() { return {}; } + static constexpr FieldMetadata_Ext4JournalledWriteEnd kExt4JournalledWriteEnd{}; template T* set_ext4_journalled_write_end() { return BeginNestedMessage(189); } @@ -50384,14 +53318,7 @@ class FtraceEvent : public ::protozero::Message { Ext4LoadInodeFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ext4LoadInode kExt4LoadInode() { return {}; } + static constexpr FieldMetadata_Ext4LoadInode kExt4LoadInode{}; template T* set_ext4_load_inode() { return BeginNestedMessage(190); } @@ -50405,14 +53332,7 @@ class FtraceEvent : public ::protozero::Message { Ext4LoadInodeBitmapFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ext4LoadInodeBitmap kExt4LoadInodeBitmap() { return {}; } + static constexpr FieldMetadata_Ext4LoadInodeBitmap kExt4LoadInodeBitmap{}; template T* set_ext4_load_inode_bitmap() { return BeginNestedMessage(191); } @@ -50426,14 +53346,7 @@ class FtraceEvent : public ::protozero::Message { Ext4MarkInodeDirtyFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ext4MarkInodeDirty kExt4MarkInodeDirty() { return {}; } + static constexpr FieldMetadata_Ext4MarkInodeDirty kExt4MarkInodeDirty{}; template T* set_ext4_mark_inode_dirty() { return BeginNestedMessage(192); } @@ -50447,14 +53360,7 @@ class FtraceEvent : public ::protozero::Message { Ext4MbBitmapLoadFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ext4MbBitmapLoad kExt4MbBitmapLoad() { return {}; } + static constexpr FieldMetadata_Ext4MbBitmapLoad kExt4MbBitmapLoad{}; template T* set_ext4_mb_bitmap_load() { return BeginNestedMessage(193); } @@ -50468,14 +53374,7 @@ class FtraceEvent : public ::protozero::Message { Ext4MbBuddyBitmapLoadFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ext4MbBuddyBitmapLoad kExt4MbBuddyBitmapLoad() { return {}; } + static constexpr FieldMetadata_Ext4MbBuddyBitmapLoad kExt4MbBuddyBitmapLoad{}; template T* set_ext4_mb_buddy_bitmap_load() { return BeginNestedMessage(194); } @@ -50489,14 +53388,7 @@ class FtraceEvent : public ::protozero::Message { Ext4MbDiscardPreallocationsFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ext4MbDiscardPreallocations kExt4MbDiscardPreallocations() { return {}; } + static constexpr FieldMetadata_Ext4MbDiscardPreallocations kExt4MbDiscardPreallocations{}; template T* set_ext4_mb_discard_preallocations() { return BeginNestedMessage(195); } @@ -50510,14 +53402,7 @@ class FtraceEvent : public ::protozero::Message { Ext4MbNewGroupPaFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ext4MbNewGroupPa kExt4MbNewGroupPa() { return {}; } + static constexpr FieldMetadata_Ext4MbNewGroupPa kExt4MbNewGroupPa{}; template T* set_ext4_mb_new_group_pa() { return BeginNestedMessage(196); } @@ -50531,14 +53416,7 @@ class FtraceEvent : public ::protozero::Message { Ext4MbNewInodePaFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ext4MbNewInodePa kExt4MbNewInodePa() { return {}; } + static constexpr FieldMetadata_Ext4MbNewInodePa kExt4MbNewInodePa{}; template T* set_ext4_mb_new_inode_pa() { return BeginNestedMessage(197); } @@ -50552,14 +53430,7 @@ class FtraceEvent : public ::protozero::Message { Ext4MbReleaseGroupPaFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ext4MbReleaseGroupPa kExt4MbReleaseGroupPa() { return {}; } + static constexpr FieldMetadata_Ext4MbReleaseGroupPa kExt4MbReleaseGroupPa{}; template T* set_ext4_mb_release_group_pa() { return BeginNestedMessage(198); } @@ -50573,14 +53444,7 @@ class FtraceEvent : public ::protozero::Message { Ext4MbReleaseInodePaFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ext4MbReleaseInodePa kExt4MbReleaseInodePa() { return {}; } + static constexpr FieldMetadata_Ext4MbReleaseInodePa kExt4MbReleaseInodePa{}; template T* set_ext4_mb_release_inode_pa() { return BeginNestedMessage(199); } @@ -50594,14 +53458,7 @@ class FtraceEvent : public ::protozero::Message { Ext4MballocAllocFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ext4MballocAlloc kExt4MballocAlloc() { return {}; } + static constexpr FieldMetadata_Ext4MballocAlloc kExt4MballocAlloc{}; template T* set_ext4_mballoc_alloc() { return BeginNestedMessage(200); } @@ -50615,14 +53472,7 @@ class FtraceEvent : public ::protozero::Message { Ext4MballocDiscardFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ext4MballocDiscard kExt4MballocDiscard() { return {}; } + static constexpr FieldMetadata_Ext4MballocDiscard kExt4MballocDiscard{}; template T* set_ext4_mballoc_discard() { return BeginNestedMessage(201); } @@ -50636,14 +53486,7 @@ class FtraceEvent : public ::protozero::Message { Ext4MballocFreeFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ext4MballocFree kExt4MballocFree() { return {}; } + static constexpr FieldMetadata_Ext4MballocFree kExt4MballocFree{}; template T* set_ext4_mballoc_free() { return BeginNestedMessage(202); } @@ -50657,14 +53500,7 @@ class FtraceEvent : public ::protozero::Message { Ext4MballocPreallocFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ext4MballocPrealloc kExt4MballocPrealloc() { return {}; } + static constexpr FieldMetadata_Ext4MballocPrealloc kExt4MballocPrealloc{}; template T* set_ext4_mballoc_prealloc() { return BeginNestedMessage(203); } @@ -50678,14 +53514,7 @@ class FtraceEvent : public ::protozero::Message { Ext4OtherInodeUpdateTimeFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ext4OtherInodeUpdateTime kExt4OtherInodeUpdateTime() { return {}; } + static constexpr FieldMetadata_Ext4OtherInodeUpdateTime kExt4OtherInodeUpdateTime{}; template T* set_ext4_other_inode_update_time() { return BeginNestedMessage(204); } @@ -50699,14 +53528,7 @@ class FtraceEvent : public ::protozero::Message { Ext4PunchHoleFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ext4PunchHole kExt4PunchHole() { return {}; } + static constexpr FieldMetadata_Ext4PunchHole kExt4PunchHole{}; template T* set_ext4_punch_hole() { return BeginNestedMessage(205); } @@ -50720,14 +53542,7 @@ class FtraceEvent : public ::protozero::Message { Ext4ReadBlockBitmapLoadFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ext4ReadBlockBitmapLoad kExt4ReadBlockBitmapLoad() { return {}; } + static constexpr FieldMetadata_Ext4ReadBlockBitmapLoad kExt4ReadBlockBitmapLoad{}; template T* set_ext4_read_block_bitmap_load() { return BeginNestedMessage(206); } @@ -50741,14 +53556,7 @@ class FtraceEvent : public ::protozero::Message { Ext4ReadpageFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ext4Readpage kExt4Readpage() { return {}; } + static constexpr FieldMetadata_Ext4Readpage kExt4Readpage{}; template T* set_ext4_readpage() { return BeginNestedMessage(207); } @@ -50762,14 +53570,7 @@ class FtraceEvent : public ::protozero::Message { Ext4ReleasepageFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ext4Releasepage kExt4Releasepage() { return {}; } + static constexpr FieldMetadata_Ext4Releasepage kExt4Releasepage{}; template T* set_ext4_releasepage() { return BeginNestedMessage(208); } @@ -50783,14 +53584,7 @@ class FtraceEvent : public ::protozero::Message { Ext4RemoveBlocksFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ext4RemoveBlocks kExt4RemoveBlocks() { return {}; } + static constexpr FieldMetadata_Ext4RemoveBlocks kExt4RemoveBlocks{}; template T* set_ext4_remove_blocks() { return BeginNestedMessage(209); } @@ -50804,14 +53598,7 @@ class FtraceEvent : public ::protozero::Message { Ext4RequestBlocksFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ext4RequestBlocks kExt4RequestBlocks() { return {}; } + static constexpr FieldMetadata_Ext4RequestBlocks kExt4RequestBlocks{}; template T* set_ext4_request_blocks() { return BeginNestedMessage(210); } @@ -50825,14 +53612,7 @@ class FtraceEvent : public ::protozero::Message { Ext4RequestInodeFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ext4RequestInode kExt4RequestInode() { return {}; } + static constexpr FieldMetadata_Ext4RequestInode kExt4RequestInode{}; template T* set_ext4_request_inode() { return BeginNestedMessage(211); } @@ -50846,14 +53626,7 @@ class FtraceEvent : public ::protozero::Message { Ext4SyncFsFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ext4SyncFs kExt4SyncFs() { return {}; } + static constexpr FieldMetadata_Ext4SyncFs kExt4SyncFs{}; template T* set_ext4_sync_fs() { return BeginNestedMessage(212); } @@ -50867,14 +53640,7 @@ class FtraceEvent : public ::protozero::Message { Ext4TrimAllFreeFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ext4TrimAllFree kExt4TrimAllFree() { return {}; } + static constexpr FieldMetadata_Ext4TrimAllFree kExt4TrimAllFree{}; template T* set_ext4_trim_all_free() { return BeginNestedMessage(213); } @@ -50888,14 +53654,7 @@ class FtraceEvent : public ::protozero::Message { Ext4TrimExtentFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ext4TrimExtent kExt4TrimExtent() { return {}; } + static constexpr FieldMetadata_Ext4TrimExtent kExt4TrimExtent{}; template T* set_ext4_trim_extent() { return BeginNestedMessage(214); } @@ -50909,14 +53668,7 @@ class FtraceEvent : public ::protozero::Message { Ext4TruncateEnterFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ext4TruncateEnter kExt4TruncateEnter() { return {}; } + static constexpr FieldMetadata_Ext4TruncateEnter kExt4TruncateEnter{}; template T* set_ext4_truncate_enter() { return BeginNestedMessage(215); } @@ -50930,14 +53682,7 @@ class FtraceEvent : public ::protozero::Message { Ext4TruncateExitFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ext4TruncateExit kExt4TruncateExit() { return {}; } + static constexpr FieldMetadata_Ext4TruncateExit kExt4TruncateExit{}; template T* set_ext4_truncate_exit() { return BeginNestedMessage(216); } @@ -50951,14 +53696,7 @@ class FtraceEvent : public ::protozero::Message { Ext4UnlinkEnterFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ext4UnlinkEnter kExt4UnlinkEnter() { return {}; } + static constexpr FieldMetadata_Ext4UnlinkEnter kExt4UnlinkEnter{}; template T* set_ext4_unlink_enter() { return BeginNestedMessage(217); } @@ -50972,14 +53710,7 @@ class FtraceEvent : public ::protozero::Message { Ext4UnlinkExitFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ext4UnlinkExit kExt4UnlinkExit() { return {}; } + static constexpr FieldMetadata_Ext4UnlinkExit kExt4UnlinkExit{}; template T* set_ext4_unlink_exit() { return BeginNestedMessage(218); } @@ -50993,14 +53724,7 @@ class FtraceEvent : public ::protozero::Message { Ext4WriteBeginFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ext4WriteBegin kExt4WriteBegin() { return {}; } + static constexpr FieldMetadata_Ext4WriteBegin kExt4WriteBegin{}; template T* set_ext4_write_begin() { return BeginNestedMessage(219); } @@ -51014,14 +53738,7 @@ class FtraceEvent : public ::protozero::Message { Ext4WriteEndFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ext4WriteEnd kExt4WriteEnd() { return {}; } + static constexpr FieldMetadata_Ext4WriteEnd kExt4WriteEnd{}; template T* set_ext4_write_end() { return BeginNestedMessage(230); } @@ -51035,14 +53752,7 @@ class FtraceEvent : public ::protozero::Message { Ext4WritepageFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ext4Writepage kExt4Writepage() { return {}; } + static constexpr FieldMetadata_Ext4Writepage kExt4Writepage{}; template T* set_ext4_writepage() { return BeginNestedMessage(231); } @@ -51056,14 +53766,7 @@ class FtraceEvent : public ::protozero::Message { Ext4WritepagesFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ext4Writepages kExt4Writepages() { return {}; } + static constexpr FieldMetadata_Ext4Writepages kExt4Writepages{}; template T* set_ext4_writepages() { return BeginNestedMessage(232); } @@ -51077,14 +53780,7 @@ class FtraceEvent : public ::protozero::Message { Ext4WritepagesResultFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ext4WritepagesResult kExt4WritepagesResult() { return {}; } + static constexpr FieldMetadata_Ext4WritepagesResult kExt4WritepagesResult{}; template T* set_ext4_writepages_result() { return BeginNestedMessage(233); } @@ -51098,14 +53794,7 @@ class FtraceEvent : public ::protozero::Message { Ext4ZeroRangeFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ext4ZeroRange kExt4ZeroRange() { return {}; } + static constexpr FieldMetadata_Ext4ZeroRange kExt4ZeroRange{}; template T* set_ext4_zero_range() { return BeginNestedMessage(234); } @@ -51119,14 +53808,7 @@ class FtraceEvent : public ::protozero::Message { TaskNewtaskFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_TaskNewtask kTaskNewtask() { return {}; } + static constexpr FieldMetadata_TaskNewtask kTaskNewtask{}; template T* set_task_newtask() { return BeginNestedMessage(235); } @@ -51140,14 +53822,7 @@ class FtraceEvent : public ::protozero::Message { TaskRenameFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_TaskRename kTaskRename() { return {}; } + static constexpr FieldMetadata_TaskRename kTaskRename{}; template T* set_task_rename() { return BeginNestedMessage(236); } @@ -51161,14 +53836,7 @@ class FtraceEvent : public ::protozero::Message { SchedProcessExecFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_SchedProcessExec kSchedProcessExec() { return {}; } + static constexpr FieldMetadata_SchedProcessExec kSchedProcessExec{}; template T* set_sched_process_exec() { return BeginNestedMessage(237); } @@ -51182,14 +53850,7 @@ class FtraceEvent : public ::protozero::Message { SchedProcessExitFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_SchedProcessExit kSchedProcessExit() { return {}; } + static constexpr FieldMetadata_SchedProcessExit kSchedProcessExit{}; template T* set_sched_process_exit() { return BeginNestedMessage(238); } @@ -51203,14 +53864,7 @@ class FtraceEvent : public ::protozero::Message { SchedProcessForkFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_SchedProcessFork kSchedProcessFork() { return {}; } + static constexpr FieldMetadata_SchedProcessFork kSchedProcessFork{}; template T* set_sched_process_fork() { return BeginNestedMessage(239); } @@ -51224,14 +53878,7 @@ class FtraceEvent : public ::protozero::Message { SchedProcessFreeFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_SchedProcessFree kSchedProcessFree() { return {}; } + static constexpr FieldMetadata_SchedProcessFree kSchedProcessFree{}; template T* set_sched_process_free() { return BeginNestedMessage(240); } @@ -51245,14 +53892,7 @@ class FtraceEvent : public ::protozero::Message { SchedProcessHangFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_SchedProcessHang kSchedProcessHang() { return {}; } + static constexpr FieldMetadata_SchedProcessHang kSchedProcessHang{}; template T* set_sched_process_hang() { return BeginNestedMessage(241); } @@ -51266,14 +53906,7 @@ class FtraceEvent : public ::protozero::Message { SchedProcessWaitFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_SchedProcessWait kSchedProcessWait() { return {}; } + static constexpr FieldMetadata_SchedProcessWait kSchedProcessWait{}; template T* set_sched_process_wait() { return BeginNestedMessage(242); } @@ -51287,14 +53920,7 @@ class FtraceEvent : public ::protozero::Message { F2fsDoSubmitBioFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_F2fsDoSubmitBio kF2fsDoSubmitBio() { return {}; } + static constexpr FieldMetadata_F2fsDoSubmitBio kF2fsDoSubmitBio{}; template T* set_f2fs_do_submit_bio() { return BeginNestedMessage(243); } @@ -51308,14 +53934,7 @@ class FtraceEvent : public ::protozero::Message { F2fsEvictInodeFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_F2fsEvictInode kF2fsEvictInode() { return {}; } + static constexpr FieldMetadata_F2fsEvictInode kF2fsEvictInode{}; template T* set_f2fs_evict_inode() { return BeginNestedMessage(244); } @@ -51329,14 +53948,7 @@ class FtraceEvent : public ::protozero::Message { F2fsFallocateFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_F2fsFallocate kF2fsFallocate() { return {}; } + static constexpr FieldMetadata_F2fsFallocate kF2fsFallocate{}; template T* set_f2fs_fallocate() { return BeginNestedMessage(245); } @@ -51350,14 +53962,7 @@ class FtraceEvent : public ::protozero::Message { F2fsGetDataBlockFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_F2fsGetDataBlock kF2fsGetDataBlock() { return {}; } + static constexpr FieldMetadata_F2fsGetDataBlock kF2fsGetDataBlock{}; template T* set_f2fs_get_data_block() { return BeginNestedMessage(246); } @@ -51371,14 +53976,7 @@ class FtraceEvent : public ::protozero::Message { F2fsGetVictimFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_F2fsGetVictim kF2fsGetVictim() { return {}; } + static constexpr FieldMetadata_F2fsGetVictim kF2fsGetVictim{}; template T* set_f2fs_get_victim() { return BeginNestedMessage(247); } @@ -51392,14 +53990,7 @@ class FtraceEvent : public ::protozero::Message { F2fsIgetFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_F2fsIget kF2fsIget() { return {}; } + static constexpr FieldMetadata_F2fsIget kF2fsIget{}; template T* set_f2fs_iget() { return BeginNestedMessage(248); } @@ -51413,14 +54004,7 @@ class FtraceEvent : public ::protozero::Message { F2fsIgetExitFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_F2fsIgetExit kF2fsIgetExit() { return {}; } + static constexpr FieldMetadata_F2fsIgetExit kF2fsIgetExit{}; template T* set_f2fs_iget_exit() { return BeginNestedMessage(249); } @@ -51434,14 +54018,7 @@ class FtraceEvent : public ::protozero::Message { F2fsNewInodeFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_F2fsNewInode kF2fsNewInode() { return {}; } + static constexpr FieldMetadata_F2fsNewInode kF2fsNewInode{}; template T* set_f2fs_new_inode() { return BeginNestedMessage(250); } @@ -51455,14 +54032,7 @@ class FtraceEvent : public ::protozero::Message { F2fsReadpageFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_F2fsReadpage kF2fsReadpage() { return {}; } + static constexpr FieldMetadata_F2fsReadpage kF2fsReadpage{}; template T* set_f2fs_readpage() { return BeginNestedMessage(251); } @@ -51476,14 +54046,7 @@ class FtraceEvent : public ::protozero::Message { F2fsReserveNewBlockFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_F2fsReserveNewBlock kF2fsReserveNewBlock() { return {}; } + static constexpr FieldMetadata_F2fsReserveNewBlock kF2fsReserveNewBlock{}; template T* set_f2fs_reserve_new_block() { return BeginNestedMessage(252); } @@ -51497,14 +54060,7 @@ class FtraceEvent : public ::protozero::Message { F2fsSetPageDirtyFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_F2fsSetPageDirty kF2fsSetPageDirty() { return {}; } + static constexpr FieldMetadata_F2fsSetPageDirty kF2fsSetPageDirty{}; template T* set_f2fs_set_page_dirty() { return BeginNestedMessage(253); } @@ -51518,14 +54074,7 @@ class FtraceEvent : public ::protozero::Message { F2fsSubmitWritePageFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_F2fsSubmitWritePage kF2fsSubmitWritePage() { return {}; } + static constexpr FieldMetadata_F2fsSubmitWritePage kF2fsSubmitWritePage{}; template T* set_f2fs_submit_write_page() { return BeginNestedMessage(254); } @@ -51539,14 +54088,7 @@ class FtraceEvent : public ::protozero::Message { F2fsSyncFileEnterFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_F2fsSyncFileEnter kF2fsSyncFileEnter() { return {}; } + static constexpr FieldMetadata_F2fsSyncFileEnter kF2fsSyncFileEnter{}; template T* set_f2fs_sync_file_enter() { return BeginNestedMessage(255); } @@ -51560,14 +54102,7 @@ class FtraceEvent : public ::protozero::Message { F2fsSyncFileExitFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_F2fsSyncFileExit kF2fsSyncFileExit() { return {}; } + static constexpr FieldMetadata_F2fsSyncFileExit kF2fsSyncFileExit{}; template T* set_f2fs_sync_file_exit() { return BeginNestedMessage(256); } @@ -51581,14 +54116,7 @@ class FtraceEvent : public ::protozero::Message { F2fsSyncFsFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_F2fsSyncFs kF2fsSyncFs() { return {}; } + static constexpr FieldMetadata_F2fsSyncFs kF2fsSyncFs{}; template T* set_f2fs_sync_fs() { return BeginNestedMessage(257); } @@ -51602,14 +54130,7 @@ class FtraceEvent : public ::protozero::Message { F2fsTruncateFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_F2fsTruncate kF2fsTruncate() { return {}; } + static constexpr FieldMetadata_F2fsTruncate kF2fsTruncate{}; template T* set_f2fs_truncate() { return BeginNestedMessage(258); } @@ -51623,14 +54144,7 @@ class FtraceEvent : public ::protozero::Message { F2fsTruncateBlocksEnterFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_F2fsTruncateBlocksEnter kF2fsTruncateBlocksEnter() { return {}; } + static constexpr FieldMetadata_F2fsTruncateBlocksEnter kF2fsTruncateBlocksEnter{}; template T* set_f2fs_truncate_blocks_enter() { return BeginNestedMessage(259); } @@ -51644,14 +54158,7 @@ class FtraceEvent : public ::protozero::Message { F2fsTruncateBlocksExitFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_F2fsTruncateBlocksExit kF2fsTruncateBlocksExit() { return {}; } + static constexpr FieldMetadata_F2fsTruncateBlocksExit kF2fsTruncateBlocksExit{}; template T* set_f2fs_truncate_blocks_exit() { return BeginNestedMessage(260); } @@ -51665,14 +54172,7 @@ class FtraceEvent : public ::protozero::Message { F2fsTruncateDataBlocksRangeFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_F2fsTruncateDataBlocksRange kF2fsTruncateDataBlocksRange() { return {}; } + static constexpr FieldMetadata_F2fsTruncateDataBlocksRange kF2fsTruncateDataBlocksRange{}; template T* set_f2fs_truncate_data_blocks_range() { return BeginNestedMessage(261); } @@ -51686,14 +54186,7 @@ class FtraceEvent : public ::protozero::Message { F2fsTruncateInodeBlocksEnterFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_F2fsTruncateInodeBlocksEnter kF2fsTruncateInodeBlocksEnter() { return {}; } + static constexpr FieldMetadata_F2fsTruncateInodeBlocksEnter kF2fsTruncateInodeBlocksEnter{}; template T* set_f2fs_truncate_inode_blocks_enter() { return BeginNestedMessage(262); } @@ -51707,14 +54200,7 @@ class FtraceEvent : public ::protozero::Message { F2fsTruncateInodeBlocksExitFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_F2fsTruncateInodeBlocksExit kF2fsTruncateInodeBlocksExit() { return {}; } + static constexpr FieldMetadata_F2fsTruncateInodeBlocksExit kF2fsTruncateInodeBlocksExit{}; template T* set_f2fs_truncate_inode_blocks_exit() { return BeginNestedMessage(263); } @@ -51728,14 +54214,7 @@ class FtraceEvent : public ::protozero::Message { F2fsTruncateNodeFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_F2fsTruncateNode kF2fsTruncateNode() { return {}; } + static constexpr FieldMetadata_F2fsTruncateNode kF2fsTruncateNode{}; template T* set_f2fs_truncate_node() { return BeginNestedMessage(264); } @@ -51749,14 +54228,7 @@ class FtraceEvent : public ::protozero::Message { F2fsTruncateNodesEnterFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_F2fsTruncateNodesEnter kF2fsTruncateNodesEnter() { return {}; } + static constexpr FieldMetadata_F2fsTruncateNodesEnter kF2fsTruncateNodesEnter{}; template T* set_f2fs_truncate_nodes_enter() { return BeginNestedMessage(265); } @@ -51770,14 +54242,7 @@ class FtraceEvent : public ::protozero::Message { F2fsTruncateNodesExitFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_F2fsTruncateNodesExit kF2fsTruncateNodesExit() { return {}; } + static constexpr FieldMetadata_F2fsTruncateNodesExit kF2fsTruncateNodesExit{}; template T* set_f2fs_truncate_nodes_exit() { return BeginNestedMessage(266); } @@ -51791,14 +54256,7 @@ class FtraceEvent : public ::protozero::Message { F2fsTruncatePartialNodesFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_F2fsTruncatePartialNodes kF2fsTruncatePartialNodes() { return {}; } + static constexpr FieldMetadata_F2fsTruncatePartialNodes kF2fsTruncatePartialNodes{}; template T* set_f2fs_truncate_partial_nodes() { return BeginNestedMessage(267); } @@ -51812,14 +54270,7 @@ class FtraceEvent : public ::protozero::Message { F2fsUnlinkEnterFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_F2fsUnlinkEnter kF2fsUnlinkEnter() { return {}; } + static constexpr FieldMetadata_F2fsUnlinkEnter kF2fsUnlinkEnter{}; template T* set_f2fs_unlink_enter() { return BeginNestedMessage(268); } @@ -51833,14 +54284,7 @@ class FtraceEvent : public ::protozero::Message { F2fsUnlinkExitFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_F2fsUnlinkExit kF2fsUnlinkExit() { return {}; } + static constexpr FieldMetadata_F2fsUnlinkExit kF2fsUnlinkExit{}; template T* set_f2fs_unlink_exit() { return BeginNestedMessage(269); } @@ -51854,14 +54298,7 @@ class FtraceEvent : public ::protozero::Message { F2fsVmPageMkwriteFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_F2fsVmPageMkwrite kF2fsVmPageMkwrite() { return {}; } + static constexpr FieldMetadata_F2fsVmPageMkwrite kF2fsVmPageMkwrite{}; template T* set_f2fs_vm_page_mkwrite() { return BeginNestedMessage(270); } @@ -51875,14 +54312,7 @@ class FtraceEvent : public ::protozero::Message { F2fsWriteBeginFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_F2fsWriteBegin kF2fsWriteBegin() { return {}; } + static constexpr FieldMetadata_F2fsWriteBegin kF2fsWriteBegin{}; template T* set_f2fs_write_begin() { return BeginNestedMessage(271); } @@ -51896,14 +54326,7 @@ class FtraceEvent : public ::protozero::Message { F2fsWriteCheckpointFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_F2fsWriteCheckpoint kF2fsWriteCheckpoint() { return {}; } + static constexpr FieldMetadata_F2fsWriteCheckpoint kF2fsWriteCheckpoint{}; template T* set_f2fs_write_checkpoint() { return BeginNestedMessage(272); } @@ -51917,14 +54340,7 @@ class FtraceEvent : public ::protozero::Message { F2fsWriteEndFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_F2fsWriteEnd kF2fsWriteEnd() { return {}; } + static constexpr FieldMetadata_F2fsWriteEnd kF2fsWriteEnd{}; template T* set_f2fs_write_end() { return BeginNestedMessage(273); } @@ -51938,14 +54354,7 @@ class FtraceEvent : public ::protozero::Message { AllocPagesIommuEndFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_AllocPagesIommuEnd kAllocPagesIommuEnd() { return {}; } + static constexpr FieldMetadata_AllocPagesIommuEnd kAllocPagesIommuEnd{}; template T* set_alloc_pages_iommu_end() { return BeginNestedMessage(274); } @@ -51959,14 +54368,7 @@ class FtraceEvent : public ::protozero::Message { AllocPagesIommuFailFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_AllocPagesIommuFail kAllocPagesIommuFail() { return {}; } + static constexpr FieldMetadata_AllocPagesIommuFail kAllocPagesIommuFail{}; template T* set_alloc_pages_iommu_fail() { return BeginNestedMessage(275); } @@ -51980,14 +54382,7 @@ class FtraceEvent : public ::protozero::Message { AllocPagesIommuStartFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_AllocPagesIommuStart kAllocPagesIommuStart() { return {}; } + static constexpr FieldMetadata_AllocPagesIommuStart kAllocPagesIommuStart{}; template T* set_alloc_pages_iommu_start() { return BeginNestedMessage(276); } @@ -52001,14 +54396,7 @@ class FtraceEvent : public ::protozero::Message { AllocPagesSysEndFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_AllocPagesSysEnd kAllocPagesSysEnd() { return {}; } + static constexpr FieldMetadata_AllocPagesSysEnd kAllocPagesSysEnd{}; template T* set_alloc_pages_sys_end() { return BeginNestedMessage(277); } @@ -52022,14 +54410,7 @@ class FtraceEvent : public ::protozero::Message { AllocPagesSysFailFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_AllocPagesSysFail kAllocPagesSysFail() { return {}; } + static constexpr FieldMetadata_AllocPagesSysFail kAllocPagesSysFail{}; template T* set_alloc_pages_sys_fail() { return BeginNestedMessage(278); } @@ -52043,14 +54424,7 @@ class FtraceEvent : public ::protozero::Message { AllocPagesSysStartFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_AllocPagesSysStart kAllocPagesSysStart() { return {}; } + static constexpr FieldMetadata_AllocPagesSysStart kAllocPagesSysStart{}; template T* set_alloc_pages_sys_start() { return BeginNestedMessage(279); } @@ -52064,14 +54438,7 @@ class FtraceEvent : public ::protozero::Message { DmaAllocContiguousRetryFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_DmaAllocContiguousRetry kDmaAllocContiguousRetry() { return {}; } + static constexpr FieldMetadata_DmaAllocContiguousRetry kDmaAllocContiguousRetry{}; template T* set_dma_alloc_contiguous_retry() { return BeginNestedMessage(280); } @@ -52085,14 +54452,7 @@ class FtraceEvent : public ::protozero::Message { IommuMapRangeFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_IommuMapRange kIommuMapRange() { return {}; } + static constexpr FieldMetadata_IommuMapRange kIommuMapRange{}; template T* set_iommu_map_range() { return BeginNestedMessage(281); } @@ -52106,14 +54466,7 @@ class FtraceEvent : public ::protozero::Message { IommuSecPtblMapRangeEndFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_IommuSecPtblMapRangeEnd kIommuSecPtblMapRangeEnd() { return {}; } + static constexpr FieldMetadata_IommuSecPtblMapRangeEnd kIommuSecPtblMapRangeEnd{}; template T* set_iommu_sec_ptbl_map_range_end() { return BeginNestedMessage(282); } @@ -52127,14 +54480,7 @@ class FtraceEvent : public ::protozero::Message { IommuSecPtblMapRangeStartFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_IommuSecPtblMapRangeStart kIommuSecPtblMapRangeStart() { return {}; } + static constexpr FieldMetadata_IommuSecPtblMapRangeStart kIommuSecPtblMapRangeStart{}; template T* set_iommu_sec_ptbl_map_range_start() { return BeginNestedMessage(283); } @@ -52148,14 +54494,7 @@ class FtraceEvent : public ::protozero::Message { IonAllocBufferEndFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_IonAllocBufferEnd kIonAllocBufferEnd() { return {}; } + static constexpr FieldMetadata_IonAllocBufferEnd kIonAllocBufferEnd{}; template T* set_ion_alloc_buffer_end() { return BeginNestedMessage(284); } @@ -52169,14 +54508,7 @@ class FtraceEvent : public ::protozero::Message { IonAllocBufferFailFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_IonAllocBufferFail kIonAllocBufferFail() { return {}; } + static constexpr FieldMetadata_IonAllocBufferFail kIonAllocBufferFail{}; template T* set_ion_alloc_buffer_fail() { return BeginNestedMessage(285); } @@ -52190,14 +54522,7 @@ class FtraceEvent : public ::protozero::Message { IonAllocBufferFallbackFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_IonAllocBufferFallback kIonAllocBufferFallback() { return {}; } + static constexpr FieldMetadata_IonAllocBufferFallback kIonAllocBufferFallback{}; template T* set_ion_alloc_buffer_fallback() { return BeginNestedMessage(286); } @@ -52211,14 +54536,7 @@ class FtraceEvent : public ::protozero::Message { IonAllocBufferStartFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_IonAllocBufferStart kIonAllocBufferStart() { return {}; } + static constexpr FieldMetadata_IonAllocBufferStart kIonAllocBufferStart{}; template T* set_ion_alloc_buffer_start() { return BeginNestedMessage(287); } @@ -52232,14 +54550,7 @@ class FtraceEvent : public ::protozero::Message { IonCpAllocRetryFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_IonCpAllocRetry kIonCpAllocRetry() { return {}; } + static constexpr FieldMetadata_IonCpAllocRetry kIonCpAllocRetry{}; template T* set_ion_cp_alloc_retry() { return BeginNestedMessage(288); } @@ -52253,14 +54564,7 @@ class FtraceEvent : public ::protozero::Message { IonCpSecureBufferEndFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_IonCpSecureBufferEnd kIonCpSecureBufferEnd() { return {}; } + static constexpr FieldMetadata_IonCpSecureBufferEnd kIonCpSecureBufferEnd{}; template T* set_ion_cp_secure_buffer_end() { return BeginNestedMessage(289); } @@ -52274,14 +54578,7 @@ class FtraceEvent : public ::protozero::Message { IonCpSecureBufferStartFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_IonCpSecureBufferStart kIonCpSecureBufferStart() { return {}; } + static constexpr FieldMetadata_IonCpSecureBufferStart kIonCpSecureBufferStart{}; template T* set_ion_cp_secure_buffer_start() { return BeginNestedMessage(290); } @@ -52295,14 +54592,7 @@ class FtraceEvent : public ::protozero::Message { IonPrefetchingFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_IonPrefetching kIonPrefetching() { return {}; } + static constexpr FieldMetadata_IonPrefetching kIonPrefetching{}; template T* set_ion_prefetching() { return BeginNestedMessage(291); } @@ -52316,14 +54606,7 @@ class FtraceEvent : public ::protozero::Message { IonSecureCmaAddToPoolEndFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_IonSecureCmaAddToPoolEnd kIonSecureCmaAddToPoolEnd() { return {}; } + static constexpr FieldMetadata_IonSecureCmaAddToPoolEnd kIonSecureCmaAddToPoolEnd{}; template T* set_ion_secure_cma_add_to_pool_end() { return BeginNestedMessage(292); } @@ -52337,14 +54620,7 @@ class FtraceEvent : public ::protozero::Message { IonSecureCmaAddToPoolStartFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_IonSecureCmaAddToPoolStart kIonSecureCmaAddToPoolStart() { return {}; } + static constexpr FieldMetadata_IonSecureCmaAddToPoolStart kIonSecureCmaAddToPoolStart{}; template T* set_ion_secure_cma_add_to_pool_start() { return BeginNestedMessage(293); } @@ -52358,14 +54634,7 @@ class FtraceEvent : public ::protozero::Message { IonSecureCmaAllocateEndFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_IonSecureCmaAllocateEnd kIonSecureCmaAllocateEnd() { return {}; } + static constexpr FieldMetadata_IonSecureCmaAllocateEnd kIonSecureCmaAllocateEnd{}; template T* set_ion_secure_cma_allocate_end() { return BeginNestedMessage(294); } @@ -52379,14 +54648,7 @@ class FtraceEvent : public ::protozero::Message { IonSecureCmaAllocateStartFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_IonSecureCmaAllocateStart kIonSecureCmaAllocateStart() { return {}; } + static constexpr FieldMetadata_IonSecureCmaAllocateStart kIonSecureCmaAllocateStart{}; template T* set_ion_secure_cma_allocate_start() { return BeginNestedMessage(295); } @@ -52400,14 +54662,7 @@ class FtraceEvent : public ::protozero::Message { IonSecureCmaShrinkPoolEndFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_IonSecureCmaShrinkPoolEnd kIonSecureCmaShrinkPoolEnd() { return {}; } + static constexpr FieldMetadata_IonSecureCmaShrinkPoolEnd kIonSecureCmaShrinkPoolEnd{}; template T* set_ion_secure_cma_shrink_pool_end() { return BeginNestedMessage(296); } @@ -52421,14 +54676,7 @@ class FtraceEvent : public ::protozero::Message { IonSecureCmaShrinkPoolStartFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_IonSecureCmaShrinkPoolStart kIonSecureCmaShrinkPoolStart() { return {}; } + static constexpr FieldMetadata_IonSecureCmaShrinkPoolStart kIonSecureCmaShrinkPoolStart{}; template T* set_ion_secure_cma_shrink_pool_start() { return BeginNestedMessage(297); } @@ -52442,14 +54690,7 @@ class FtraceEvent : public ::protozero::Message { KfreeFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Kfree kKfree() { return {}; } + static constexpr FieldMetadata_Kfree kKfree{}; template T* set_kfree() { return BeginNestedMessage(298); } @@ -52463,14 +54704,7 @@ class FtraceEvent : public ::protozero::Message { KmallocFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Kmalloc kKmalloc() { return {}; } + static constexpr FieldMetadata_Kmalloc kKmalloc{}; template T* set_kmalloc() { return BeginNestedMessage(299); } @@ -52484,14 +54718,7 @@ class FtraceEvent : public ::protozero::Message { KmallocNodeFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_KmallocNode kKmallocNode() { return {}; } + static constexpr FieldMetadata_KmallocNode kKmallocNode{}; template T* set_kmalloc_node() { return BeginNestedMessage(300); } @@ -52505,14 +54732,7 @@ class FtraceEvent : public ::protozero::Message { KmemCacheAllocFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_KmemCacheAlloc kKmemCacheAlloc() { return {}; } + static constexpr FieldMetadata_KmemCacheAlloc kKmemCacheAlloc{}; template T* set_kmem_cache_alloc() { return BeginNestedMessage(301); } @@ -52526,14 +54746,7 @@ class FtraceEvent : public ::protozero::Message { KmemCacheAllocNodeFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_KmemCacheAllocNode kKmemCacheAllocNode() { return {}; } + static constexpr FieldMetadata_KmemCacheAllocNode kKmemCacheAllocNode{}; template T* set_kmem_cache_alloc_node() { return BeginNestedMessage(302); } @@ -52547,14 +54760,7 @@ class FtraceEvent : public ::protozero::Message { KmemCacheFreeFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_KmemCacheFree kKmemCacheFree() { return {}; } + static constexpr FieldMetadata_KmemCacheFree kKmemCacheFree{}; template T* set_kmem_cache_free() { return BeginNestedMessage(303); } @@ -52568,14 +54774,7 @@ class FtraceEvent : public ::protozero::Message { MigratePagesEndFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_MigratePagesEnd kMigratePagesEnd() { return {}; } + static constexpr FieldMetadata_MigratePagesEnd kMigratePagesEnd{}; template T* set_migrate_pages_end() { return BeginNestedMessage(304); } @@ -52589,14 +54788,7 @@ class FtraceEvent : public ::protozero::Message { MigratePagesStartFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_MigratePagesStart kMigratePagesStart() { return {}; } + static constexpr FieldMetadata_MigratePagesStart kMigratePagesStart{}; template T* set_migrate_pages_start() { return BeginNestedMessage(305); } @@ -52610,14 +54802,7 @@ class FtraceEvent : public ::protozero::Message { MigrateRetryFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_MigrateRetry kMigrateRetry() { return {}; } + static constexpr FieldMetadata_MigrateRetry kMigrateRetry{}; template T* set_migrate_retry() { return BeginNestedMessage(306); } @@ -52631,14 +54816,7 @@ class FtraceEvent : public ::protozero::Message { MmPageAllocFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_MmPageAlloc kMmPageAlloc() { return {}; } + static constexpr FieldMetadata_MmPageAlloc kMmPageAlloc{}; template T* set_mm_page_alloc() { return BeginNestedMessage(307); } @@ -52652,14 +54830,7 @@ class FtraceEvent : public ::protozero::Message { MmPageAllocExtfragFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_MmPageAllocExtfrag kMmPageAllocExtfrag() { return {}; } + static constexpr FieldMetadata_MmPageAllocExtfrag kMmPageAllocExtfrag{}; template T* set_mm_page_alloc_extfrag() { return BeginNestedMessage(308); } @@ -52673,14 +54844,7 @@ class FtraceEvent : public ::protozero::Message { MmPageAllocZoneLockedFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_MmPageAllocZoneLocked kMmPageAllocZoneLocked() { return {}; } + static constexpr FieldMetadata_MmPageAllocZoneLocked kMmPageAllocZoneLocked{}; template T* set_mm_page_alloc_zone_locked() { return BeginNestedMessage(309); } @@ -52694,14 +54858,7 @@ class FtraceEvent : public ::protozero::Message { MmPageFreeFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_MmPageFree kMmPageFree() { return {}; } + static constexpr FieldMetadata_MmPageFree kMmPageFree{}; template T* set_mm_page_free() { return BeginNestedMessage(310); } @@ -52715,14 +54872,7 @@ class FtraceEvent : public ::protozero::Message { MmPageFreeBatchedFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_MmPageFreeBatched kMmPageFreeBatched() { return {}; } + static constexpr FieldMetadata_MmPageFreeBatched kMmPageFreeBatched{}; template T* set_mm_page_free_batched() { return BeginNestedMessage(311); } @@ -52736,14 +54886,7 @@ class FtraceEvent : public ::protozero::Message { MmPagePcpuDrainFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_MmPagePcpuDrain kMmPagePcpuDrain() { return {}; } + static constexpr FieldMetadata_MmPagePcpuDrain kMmPagePcpuDrain{}; template T* set_mm_page_pcpu_drain() { return BeginNestedMessage(312); } @@ -52757,14 +54900,7 @@ class FtraceEvent : public ::protozero::Message { RssStatFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_RssStat kRssStat() { return {}; } + static constexpr FieldMetadata_RssStat kRssStat{}; template T* set_rss_stat() { return BeginNestedMessage(313); } @@ -52778,14 +54914,7 @@ class FtraceEvent : public ::protozero::Message { IonHeapShrinkFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_IonHeapShrink kIonHeapShrink() { return {}; } + static constexpr FieldMetadata_IonHeapShrink kIonHeapShrink{}; template T* set_ion_heap_shrink() { return BeginNestedMessage(314); } @@ -52799,14 +54928,7 @@ class FtraceEvent : public ::protozero::Message { IonHeapGrowFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_IonHeapGrow kIonHeapGrow() { return {}; } + static constexpr FieldMetadata_IonHeapGrow kIonHeapGrow{}; template T* set_ion_heap_grow() { return BeginNestedMessage(315); } @@ -52820,14 +54942,7 @@ class FtraceEvent : public ::protozero::Message { FenceInitFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_FenceInit kFenceInit() { return {}; } + static constexpr FieldMetadata_FenceInit kFenceInit{}; template T* set_fence_init() { return BeginNestedMessage(316); } @@ -52841,14 +54956,7 @@ class FtraceEvent : public ::protozero::Message { FenceDestroyFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_FenceDestroy kFenceDestroy() { return {}; } + static constexpr FieldMetadata_FenceDestroy kFenceDestroy{}; template T* set_fence_destroy() { return BeginNestedMessage(317); } @@ -52862,14 +54970,7 @@ class FtraceEvent : public ::protozero::Message { FenceEnableSignalFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_FenceEnableSignal kFenceEnableSignal() { return {}; } + static constexpr FieldMetadata_FenceEnableSignal kFenceEnableSignal{}; template T* set_fence_enable_signal() { return BeginNestedMessage(318); } @@ -52883,14 +54984,7 @@ class FtraceEvent : public ::protozero::Message { FenceSignaledFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_FenceSignaled kFenceSignaled() { return {}; } + static constexpr FieldMetadata_FenceSignaled kFenceSignaled{}; template T* set_fence_signaled() { return BeginNestedMessage(319); } @@ -52904,14 +54998,7 @@ class FtraceEvent : public ::protozero::Message { ClkEnableFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ClkEnable kClkEnable() { return {}; } + static constexpr FieldMetadata_ClkEnable kClkEnable{}; template T* set_clk_enable() { return BeginNestedMessage(320); } @@ -52925,14 +55012,7 @@ class FtraceEvent : public ::protozero::Message { ClkDisableFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ClkDisable kClkDisable() { return {}; } + static constexpr FieldMetadata_ClkDisable kClkDisable{}; template T* set_clk_disable() { return BeginNestedMessage(321); } @@ -52946,14 +55026,7 @@ class FtraceEvent : public ::protozero::Message { ClkSetRateFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ClkSetRate kClkSetRate() { return {}; } + static constexpr FieldMetadata_ClkSetRate kClkSetRate{}; template T* set_clk_set_rate() { return BeginNestedMessage(322); } @@ -52967,14 +55040,7 @@ class FtraceEvent : public ::protozero::Message { BinderTransactionAllocBufFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_BinderTransactionAllocBuf kBinderTransactionAllocBuf() { return {}; } + static constexpr FieldMetadata_BinderTransactionAllocBuf kBinderTransactionAllocBuf{}; template T* set_binder_transaction_alloc_buf() { return BeginNestedMessage(323); } @@ -52988,14 +55054,7 @@ class FtraceEvent : public ::protozero::Message { SignalDeliverFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_SignalDeliver kSignalDeliver() { return {}; } + static constexpr FieldMetadata_SignalDeliver kSignalDeliver{}; template T* set_signal_deliver() { return BeginNestedMessage(324); } @@ -53009,14 +55068,7 @@ class FtraceEvent : public ::protozero::Message { SignalGenerateFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_SignalGenerate kSignalGenerate() { return {}; } + static constexpr FieldMetadata_SignalGenerate kSignalGenerate{}; template T* set_signal_generate() { return BeginNestedMessage(325); } @@ -53030,14 +55082,7 @@ class FtraceEvent : public ::protozero::Message { OomScoreAdjUpdateFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_OomScoreAdjUpdate kOomScoreAdjUpdate() { return {}; } + static constexpr FieldMetadata_OomScoreAdjUpdate kOomScoreAdjUpdate{}; template T* set_oom_score_adj_update() { return BeginNestedMessage(326); } @@ -53051,14 +55096,7 @@ class FtraceEvent : public ::protozero::Message { GenericFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Generic kGeneric() { return {}; } + static constexpr FieldMetadata_Generic kGeneric{}; template T* set_generic() { return BeginNestedMessage(327); } @@ -53072,14 +55110,7 @@ class FtraceEvent : public ::protozero::Message { MmEventRecordFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_MmEventRecord kMmEventRecord() { return {}; } + static constexpr FieldMetadata_MmEventRecord kMmEventRecord{}; template T* set_mm_event_record() { return BeginNestedMessage(328); } @@ -53093,14 +55124,7 @@ class FtraceEvent : public ::protozero::Message { SysEnterFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_SysEnter kSysEnter() { return {}; } + static constexpr FieldMetadata_SysEnter kSysEnter{}; template T* set_sys_enter() { return BeginNestedMessage(329); } @@ -53114,14 +55138,7 @@ class FtraceEvent : public ::protozero::Message { SysExitFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_SysExit kSysExit() { return {}; } + static constexpr FieldMetadata_SysExit kSysExit{}; template T* set_sys_exit() { return BeginNestedMessage(330); } @@ -53135,14 +55152,7 @@ class FtraceEvent : public ::protozero::Message { ZeroFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Zero kZero() { return {}; } + static constexpr FieldMetadata_Zero kZero{}; template T* set_zero() { return BeginNestedMessage(331); } @@ -53156,14 +55166,7 @@ class FtraceEvent : public ::protozero::Message { GpuFrequencyFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_GpuFrequency kGpuFrequency() { return {}; } + static constexpr FieldMetadata_GpuFrequency kGpuFrequency{}; template T* set_gpu_frequency() { return BeginNestedMessage(332); } @@ -53177,14 +55180,7 @@ class FtraceEvent : public ::protozero::Message { SdeTracingMarkWriteFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_SdeTracingMarkWrite kSdeTracingMarkWrite() { return {}; } + static constexpr FieldMetadata_SdeTracingMarkWrite kSdeTracingMarkWrite{}; template T* set_sde_tracing_mark_write() { return BeginNestedMessage(333); } @@ -53198,14 +55194,7 @@ class FtraceEvent : public ::protozero::Message { MarkVictimFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_MarkVictim kMarkVictim() { return {}; } + static constexpr FieldMetadata_MarkVictim kMarkVictim{}; template T* set_mark_victim() { return BeginNestedMessage(334); } @@ -53219,14 +55208,7 @@ class FtraceEvent : public ::protozero::Message { IonStatFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_IonStat kIonStat() { return {}; } + static constexpr FieldMetadata_IonStat kIonStat{}; template T* set_ion_stat() { return BeginNestedMessage(335); } @@ -53240,14 +55222,7 @@ class FtraceEvent : public ::protozero::Message { IonBufferCreateFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_IonBufferCreate kIonBufferCreate() { return {}; } + static constexpr FieldMetadata_IonBufferCreate kIonBufferCreate{}; template T* set_ion_buffer_create() { return BeginNestedMessage(336); } @@ -53261,14 +55236,7 @@ class FtraceEvent : public ::protozero::Message { IonBufferDestroyFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_IonBufferDestroy kIonBufferDestroy() { return {}; } + static constexpr FieldMetadata_IonBufferDestroy kIonBufferDestroy{}; template T* set_ion_buffer_destroy() { return BeginNestedMessage(337); } @@ -53282,14 +55250,7 @@ class FtraceEvent : public ::protozero::Message { ScmCallStartFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ScmCallStart kScmCallStart() { return {}; } + static constexpr FieldMetadata_ScmCallStart kScmCallStart{}; template T* set_scm_call_start() { return BeginNestedMessage(338); } @@ -53303,14 +55264,7 @@ class FtraceEvent : public ::protozero::Message { ScmCallEndFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ScmCallEnd kScmCallEnd() { return {}; } + static constexpr FieldMetadata_ScmCallEnd kScmCallEnd{}; template T* set_scm_call_end() { return BeginNestedMessage(339); } @@ -53324,14 +55278,7 @@ class FtraceEvent : public ::protozero::Message { GpuMemTotalFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_GpuMemTotal kGpuMemTotal() { return {}; } + static constexpr FieldMetadata_GpuMemTotal kGpuMemTotal{}; template T* set_gpu_mem_total() { return BeginNestedMessage(340); } @@ -53345,14 +55292,7 @@ class FtraceEvent : public ::protozero::Message { ThermalTemperatureFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ThermalTemperature kThermalTemperature() { return {}; } + static constexpr FieldMetadata_ThermalTemperature kThermalTemperature{}; template T* set_thermal_temperature() { return BeginNestedMessage(341); } @@ -53366,14 +55306,7 @@ class FtraceEvent : public ::protozero::Message { CdevUpdateFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_CdevUpdate kCdevUpdate() { return {}; } + static constexpr FieldMetadata_CdevUpdate kCdevUpdate{}; template T* set_cdev_update() { return BeginNestedMessage(342); } @@ -53387,14 +55320,7 @@ class FtraceEvent : public ::protozero::Message { CpuhpExitFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_CpuhpExit kCpuhpExit() { return {}; } + static constexpr FieldMetadata_CpuhpExit kCpuhpExit{}; template T* set_cpuhp_exit() { return BeginNestedMessage(343); } @@ -53408,14 +55334,7 @@ class FtraceEvent : public ::protozero::Message { CpuhpMultiEnterFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_CpuhpMultiEnter kCpuhpMultiEnter() { return {}; } + static constexpr FieldMetadata_CpuhpMultiEnter kCpuhpMultiEnter{}; template T* set_cpuhp_multi_enter() { return BeginNestedMessage(344); } @@ -53429,14 +55348,7 @@ class FtraceEvent : public ::protozero::Message { CpuhpEnterFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_CpuhpEnter kCpuhpEnter() { return {}; } + static constexpr FieldMetadata_CpuhpEnter kCpuhpEnter{}; template T* set_cpuhp_enter() { return BeginNestedMessage(345); } @@ -53450,14 +55362,7 @@ class FtraceEvent : public ::protozero::Message { CpuhpLatencyFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_CpuhpLatency kCpuhpLatency() { return {}; } + static constexpr FieldMetadata_CpuhpLatency kCpuhpLatency{}; template T* set_cpuhp_latency() { return BeginNestedMessage(346); } @@ -53471,14 +55376,7 @@ class FtraceEvent : public ::protozero::Message { FastrpcDmaStatFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_FastrpcDmaStat kFastrpcDmaStat() { return {}; } + static constexpr FieldMetadata_FastrpcDmaStat kFastrpcDmaStat{}; template T* set_fastrpc_dma_stat() { return BeginNestedMessage(347); } @@ -53492,14 +55390,7 @@ class FtraceEvent : public ::protozero::Message { DpuTracingMarkWriteFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_DpuTracingMarkWrite kDpuTracingMarkWrite() { return {}; } + static constexpr FieldMetadata_DpuTracingMarkWrite kDpuTracingMarkWrite{}; template T* set_dpu_tracing_mark_write() { return BeginNestedMessage(348); } @@ -53513,14 +55404,7 @@ class FtraceEvent : public ::protozero::Message { G2dTracingMarkWriteFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_G2dTracingMarkWrite kG2dTracingMarkWrite() { return {}; } + static constexpr FieldMetadata_G2dTracingMarkWrite kG2dTracingMarkWrite{}; template T* set_g2d_tracing_mark_write() { return BeginNestedMessage(349); } @@ -53534,14 +55418,7 @@ class FtraceEvent : public ::protozero::Message { MaliTracingMarkWriteFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_MaliTracingMarkWrite kMaliTracingMarkWrite() { return {}; } + static constexpr FieldMetadata_MaliTracingMarkWrite kMaliTracingMarkWrite{}; template T* set_mali_tracing_mark_write() { return BeginNestedMessage(350); } @@ -53555,14 +55432,7 @@ class FtraceEvent : public ::protozero::Message { DmaHeapStatFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_DmaHeapStat kDmaHeapStat() { return {}; } + static constexpr FieldMetadata_DmaHeapStat kDmaHeapStat{}; template T* set_dma_heap_stat() { return BeginNestedMessage(351); } @@ -53576,14 +55446,7 @@ class FtraceEvent : public ::protozero::Message { CpuhpPauseFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_CpuhpPause kCpuhpPause() { return {}; } + static constexpr FieldMetadata_CpuhpPause kCpuhpPause{}; template T* set_cpuhp_pause() { return BeginNestedMessage(352); } @@ -53597,14 +55460,7 @@ class FtraceEvent : public ::protozero::Message { SchedPiSetprioFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_SchedPiSetprio kSchedPiSetprio() { return {}; } + static constexpr FieldMetadata_SchedPiSetprio kSchedPiSetprio{}; template T* set_sched_pi_setprio() { return BeginNestedMessage(353); } @@ -53618,14 +55474,7 @@ class FtraceEvent : public ::protozero::Message { SdeSdeEvtlogFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_SdeSdeEvtlog kSdeSdeEvtlog() { return {}; } + static constexpr FieldMetadata_SdeSdeEvtlog kSdeSdeEvtlog{}; template T* set_sde_sde_evtlog() { return BeginNestedMessage(354); } @@ -53639,14 +55488,7 @@ class FtraceEvent : public ::protozero::Message { SdeSdePerfCalcCrtcFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_SdeSdePerfCalcCrtc kSdeSdePerfCalcCrtc() { return {}; } + static constexpr FieldMetadata_SdeSdePerfCalcCrtc kSdeSdePerfCalcCrtc{}; template T* set_sde_sde_perf_calc_crtc() { return BeginNestedMessage(355); } @@ -53660,14 +55502,7 @@ class FtraceEvent : public ::protozero::Message { SdeSdePerfCrtcUpdateFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_SdeSdePerfCrtcUpdate kSdeSdePerfCrtcUpdate() { return {}; } + static constexpr FieldMetadata_SdeSdePerfCrtcUpdate kSdeSdePerfCrtcUpdate{}; template T* set_sde_sde_perf_crtc_update() { return BeginNestedMessage(356); } @@ -53681,14 +55516,7 @@ class FtraceEvent : public ::protozero::Message { SdeSdePerfSetQosLutsFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_SdeSdePerfSetQosLuts kSdeSdePerfSetQosLuts() { return {}; } + static constexpr FieldMetadata_SdeSdePerfSetQosLuts kSdeSdePerfSetQosLuts{}; template T* set_sde_sde_perf_set_qos_luts() { return BeginNestedMessage(357); } @@ -53702,14 +55530,7 @@ class FtraceEvent : public ::protozero::Message { SdeSdePerfUpdateBusFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_SdeSdePerfUpdateBus kSdeSdePerfUpdateBus() { return {}; } + static constexpr FieldMetadata_SdeSdePerfUpdateBus kSdeSdePerfUpdateBus{}; template T* set_sde_sde_perf_update_bus() { return BeginNestedMessage(358); } @@ -53723,14 +55544,7 @@ class FtraceEvent : public ::protozero::Message { RssStatThrottledFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_RssStatThrottled kRssStatThrottled() { return {}; } + static constexpr FieldMetadata_RssStatThrottled kRssStatThrottled{}; template T* set_rss_stat_throttled() { return BeginNestedMessage(359); } @@ -53744,14 +55558,7 @@ class FtraceEvent : public ::protozero::Message { NetifReceiveSkbFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_NetifReceiveSkb kNetifReceiveSkb() { return {}; } + static constexpr FieldMetadata_NetifReceiveSkb kNetifReceiveSkb{}; template T* set_netif_receive_skb() { return BeginNestedMessage(360); } @@ -53765,14 +55572,7 @@ class FtraceEvent : public ::protozero::Message { NetDevXmitFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_NetDevXmit kNetDevXmit() { return {}; } + static constexpr FieldMetadata_NetDevXmit kNetDevXmit{}; template T* set_net_dev_xmit() { return BeginNestedMessage(361); } @@ -53786,14 +55586,7 @@ class FtraceEvent : public ::protozero::Message { InetSockSetStateFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_InetSockSetState kInetSockSetState() { return {}; } + static constexpr FieldMetadata_InetSockSetState kInetSockSetState{}; template T* set_inet_sock_set_state() { return BeginNestedMessage(362); } @@ -53807,14 +55600,7 @@ class FtraceEvent : public ::protozero::Message { TcpRetransmitSkbFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_TcpRetransmitSkb kTcpRetransmitSkb() { return {}; } + static constexpr FieldMetadata_TcpRetransmitSkb kTcpRetransmitSkb{}; template T* set_tcp_retransmit_skb() { return BeginNestedMessage(363); } @@ -53828,14 +55614,7 @@ class FtraceEvent : public ::protozero::Message { CrosEcSensorhubDataFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_CrosEcSensorhubData kCrosEcSensorhubData() { return {}; } + static constexpr FieldMetadata_CrosEcSensorhubData kCrosEcSensorhubData{}; template T* set_cros_ec_sensorhub_data() { return BeginNestedMessage(364); } @@ -53849,14 +55628,7 @@ class FtraceEvent : public ::protozero::Message { NapiGroReceiveEntryFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_NapiGroReceiveEntry kNapiGroReceiveEntry() { return {}; } + static constexpr FieldMetadata_NapiGroReceiveEntry kNapiGroReceiveEntry{}; template T* set_napi_gro_receive_entry() { return BeginNestedMessage(365); } @@ -53870,14 +55642,7 @@ class FtraceEvent : public ::protozero::Message { NapiGroReceiveExitFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_NapiGroReceiveExit kNapiGroReceiveExit() { return {}; } + static constexpr FieldMetadata_NapiGroReceiveExit kNapiGroReceiveExit{}; template T* set_napi_gro_receive_exit() { return BeginNestedMessage(366); } @@ -53891,14 +55656,7 @@ class FtraceEvent : public ::protozero::Message { KfreeSkbFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_KfreeSkb kKfreeSkb() { return {}; } + static constexpr FieldMetadata_KfreeSkb kKfreeSkb{}; template T* set_kfree_skb() { return BeginNestedMessage(367); } @@ -53912,14 +55670,7 @@ class FtraceEvent : public ::protozero::Message { KvmAccessFaultFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_KvmAccessFault kKvmAccessFault() { return {}; } + static constexpr FieldMetadata_KvmAccessFault kKvmAccessFault{}; template T* set_kvm_access_fault() { return BeginNestedMessage(368); } @@ -53933,14 +55684,7 @@ class FtraceEvent : public ::protozero::Message { KvmAckIrqFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_KvmAckIrq kKvmAckIrq() { return {}; } + static constexpr FieldMetadata_KvmAckIrq kKvmAckIrq{}; template T* set_kvm_ack_irq() { return BeginNestedMessage(369); } @@ -53954,14 +55698,7 @@ class FtraceEvent : public ::protozero::Message { KvmAgeHvaFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_KvmAgeHva kKvmAgeHva() { return {}; } + static constexpr FieldMetadata_KvmAgeHva kKvmAgeHva{}; template T* set_kvm_age_hva() { return BeginNestedMessage(370); } @@ -53975,14 +55712,7 @@ class FtraceEvent : public ::protozero::Message { KvmAgePageFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_KvmAgePage kKvmAgePage() { return {}; } + static constexpr FieldMetadata_KvmAgePage kKvmAgePage{}; template T* set_kvm_age_page() { return BeginNestedMessage(371); } @@ -53996,14 +55726,7 @@ class FtraceEvent : public ::protozero::Message { KvmArmClearDebugFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_KvmArmClearDebug kKvmArmClearDebug() { return {}; } + static constexpr FieldMetadata_KvmArmClearDebug kKvmArmClearDebug{}; template T* set_kvm_arm_clear_debug() { return BeginNestedMessage(372); } @@ -54017,14 +55740,7 @@ class FtraceEvent : public ::protozero::Message { KvmArmSetDreg32FtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_KvmArmSetDreg32 kKvmArmSetDreg32() { return {}; } + static constexpr FieldMetadata_KvmArmSetDreg32 kKvmArmSetDreg32{}; template T* set_kvm_arm_set_dreg32() { return BeginNestedMessage(373); } @@ -54038,14 +55754,7 @@ class FtraceEvent : public ::protozero::Message { KvmArmSetRegsetFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_KvmArmSetRegset kKvmArmSetRegset() { return {}; } + static constexpr FieldMetadata_KvmArmSetRegset kKvmArmSetRegset{}; template T* set_kvm_arm_set_regset() { return BeginNestedMessage(374); } @@ -54059,14 +55768,7 @@ class FtraceEvent : public ::protozero::Message { KvmArmSetupDebugFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_KvmArmSetupDebug kKvmArmSetupDebug() { return {}; } + static constexpr FieldMetadata_KvmArmSetupDebug kKvmArmSetupDebug{}; template T* set_kvm_arm_setup_debug() { return BeginNestedMessage(375); } @@ -54080,14 +55782,7 @@ class FtraceEvent : public ::protozero::Message { KvmEntryFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_KvmEntry kKvmEntry() { return {}; } + static constexpr FieldMetadata_KvmEntry kKvmEntry{}; template T* set_kvm_entry() { return BeginNestedMessage(376); } @@ -54101,14 +55796,7 @@ class FtraceEvent : public ::protozero::Message { KvmExitFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_KvmExit kKvmExit() { return {}; } + static constexpr FieldMetadata_KvmExit kKvmExit{}; template T* set_kvm_exit() { return BeginNestedMessage(377); } @@ -54122,14 +55810,7 @@ class FtraceEvent : public ::protozero::Message { KvmFpuFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_KvmFpu kKvmFpu() { return {}; } + static constexpr FieldMetadata_KvmFpu kKvmFpu{}; template T* set_kvm_fpu() { return BeginNestedMessage(378); } @@ -54143,14 +55824,7 @@ class FtraceEvent : public ::protozero::Message { KvmGetTimerMapFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_KvmGetTimerMap kKvmGetTimerMap() { return {}; } + static constexpr FieldMetadata_KvmGetTimerMap kKvmGetTimerMap{}; template T* set_kvm_get_timer_map() { return BeginNestedMessage(379); } @@ -54164,14 +55838,7 @@ class FtraceEvent : public ::protozero::Message { KvmGuestFaultFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_KvmGuestFault kKvmGuestFault() { return {}; } + static constexpr FieldMetadata_KvmGuestFault kKvmGuestFault{}; template T* set_kvm_guest_fault() { return BeginNestedMessage(380); } @@ -54185,14 +55852,7 @@ class FtraceEvent : public ::protozero::Message { KvmHandleSysRegFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_KvmHandleSysReg kKvmHandleSysReg() { return {}; } + static constexpr FieldMetadata_KvmHandleSysReg kKvmHandleSysReg{}; template T* set_kvm_handle_sys_reg() { return BeginNestedMessage(381); } @@ -54206,14 +55866,7 @@ class FtraceEvent : public ::protozero::Message { KvmHvcArm64FtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_KvmHvcArm64 kKvmHvcArm64() { return {}; } + static constexpr FieldMetadata_KvmHvcArm64 kKvmHvcArm64{}; template T* set_kvm_hvc_arm64() { return BeginNestedMessage(382); } @@ -54227,14 +55880,7 @@ class FtraceEvent : public ::protozero::Message { KvmIrqLineFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_KvmIrqLine kKvmIrqLine() { return {}; } + static constexpr FieldMetadata_KvmIrqLine kKvmIrqLine{}; template T* set_kvm_irq_line() { return BeginNestedMessage(383); } @@ -54248,14 +55894,7 @@ class FtraceEvent : public ::protozero::Message { KvmMmioFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_KvmMmio kKvmMmio() { return {}; } + static constexpr FieldMetadata_KvmMmio kKvmMmio{}; template T* set_kvm_mmio() { return BeginNestedMessage(384); } @@ -54269,14 +55908,7 @@ class FtraceEvent : public ::protozero::Message { KvmMmioEmulateFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_KvmMmioEmulate kKvmMmioEmulate() { return {}; } + static constexpr FieldMetadata_KvmMmioEmulate kKvmMmioEmulate{}; template T* set_kvm_mmio_emulate() { return BeginNestedMessage(385); } @@ -54290,14 +55922,7 @@ class FtraceEvent : public ::protozero::Message { KvmSetGuestDebugFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_KvmSetGuestDebug kKvmSetGuestDebug() { return {}; } + static constexpr FieldMetadata_KvmSetGuestDebug kKvmSetGuestDebug{}; template T* set_kvm_set_guest_debug() { return BeginNestedMessage(386); } @@ -54311,14 +55936,7 @@ class FtraceEvent : public ::protozero::Message { KvmSetIrqFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_KvmSetIrq kKvmSetIrq() { return {}; } + static constexpr FieldMetadata_KvmSetIrq kKvmSetIrq{}; template T* set_kvm_set_irq() { return BeginNestedMessage(387); } @@ -54332,14 +55950,7 @@ class FtraceEvent : public ::protozero::Message { KvmSetSpteHvaFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_KvmSetSpteHva kKvmSetSpteHva() { return {}; } + static constexpr FieldMetadata_KvmSetSpteHva kKvmSetSpteHva{}; template T* set_kvm_set_spte_hva() { return BeginNestedMessage(388); } @@ -54353,14 +55964,7 @@ class FtraceEvent : public ::protozero::Message { KvmSetWayFlushFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_KvmSetWayFlush kKvmSetWayFlush() { return {}; } + static constexpr FieldMetadata_KvmSetWayFlush kKvmSetWayFlush{}; template T* set_kvm_set_way_flush() { return BeginNestedMessage(389); } @@ -54374,14 +55978,7 @@ class FtraceEvent : public ::protozero::Message { KvmSysAccessFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_KvmSysAccess kKvmSysAccess() { return {}; } + static constexpr FieldMetadata_KvmSysAccess kKvmSysAccess{}; template T* set_kvm_sys_access() { return BeginNestedMessage(390); } @@ -54395,14 +55992,7 @@ class FtraceEvent : public ::protozero::Message { KvmTestAgeHvaFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_KvmTestAgeHva kKvmTestAgeHva() { return {}; } + static constexpr FieldMetadata_KvmTestAgeHva kKvmTestAgeHva{}; template T* set_kvm_test_age_hva() { return BeginNestedMessage(391); } @@ -54416,14 +56006,7 @@ class FtraceEvent : public ::protozero::Message { KvmTimerEmulateFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_KvmTimerEmulate kKvmTimerEmulate() { return {}; } + static constexpr FieldMetadata_KvmTimerEmulate kKvmTimerEmulate{}; template T* set_kvm_timer_emulate() { return BeginNestedMessage(392); } @@ -54437,14 +56020,7 @@ class FtraceEvent : public ::protozero::Message { KvmTimerHrtimerExpireFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_KvmTimerHrtimerExpire kKvmTimerHrtimerExpire() { return {}; } + static constexpr FieldMetadata_KvmTimerHrtimerExpire kKvmTimerHrtimerExpire{}; template T* set_kvm_timer_hrtimer_expire() { return BeginNestedMessage(393); } @@ -54458,14 +56034,7 @@ class FtraceEvent : public ::protozero::Message { KvmTimerRestoreStateFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_KvmTimerRestoreState kKvmTimerRestoreState() { return {}; } + static constexpr FieldMetadata_KvmTimerRestoreState kKvmTimerRestoreState{}; template T* set_kvm_timer_restore_state() { return BeginNestedMessage(394); } @@ -54479,14 +56048,7 @@ class FtraceEvent : public ::protozero::Message { KvmTimerSaveStateFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_KvmTimerSaveState kKvmTimerSaveState() { return {}; } + static constexpr FieldMetadata_KvmTimerSaveState kKvmTimerSaveState{}; template T* set_kvm_timer_save_state() { return BeginNestedMessage(395); } @@ -54500,14 +56062,7 @@ class FtraceEvent : public ::protozero::Message { KvmTimerUpdateIrqFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_KvmTimerUpdateIrq kKvmTimerUpdateIrq() { return {}; } + static constexpr FieldMetadata_KvmTimerUpdateIrq kKvmTimerUpdateIrq{}; template T* set_kvm_timer_update_irq() { return BeginNestedMessage(396); } @@ -54521,14 +56076,7 @@ class FtraceEvent : public ::protozero::Message { KvmToggleCacheFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_KvmToggleCache kKvmToggleCache() { return {}; } + static constexpr FieldMetadata_KvmToggleCache kKvmToggleCache{}; template T* set_kvm_toggle_cache() { return BeginNestedMessage(397); } @@ -54542,14 +56090,7 @@ class FtraceEvent : public ::protozero::Message { KvmUnmapHvaRangeFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_KvmUnmapHvaRange kKvmUnmapHvaRange() { return {}; } + static constexpr FieldMetadata_KvmUnmapHvaRange kKvmUnmapHvaRange{}; template T* set_kvm_unmap_hva_range() { return BeginNestedMessage(398); } @@ -54563,14 +56104,7 @@ class FtraceEvent : public ::protozero::Message { KvmUserspaceExitFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_KvmUserspaceExit kKvmUserspaceExit() { return {}; } + static constexpr FieldMetadata_KvmUserspaceExit kKvmUserspaceExit{}; template T* set_kvm_userspace_exit() { return BeginNestedMessage(399); } @@ -54584,14 +56118,7 @@ class FtraceEvent : public ::protozero::Message { KvmVcpuWakeupFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_KvmVcpuWakeup kKvmVcpuWakeup() { return {}; } + static constexpr FieldMetadata_KvmVcpuWakeup kKvmVcpuWakeup{}; template T* set_kvm_vcpu_wakeup() { return BeginNestedMessage(400); } @@ -54605,14 +56132,7 @@ class FtraceEvent : public ::protozero::Message { KvmWfxArm64FtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_KvmWfxArm64 kKvmWfxArm64() { return {}; } + static constexpr FieldMetadata_KvmWfxArm64 kKvmWfxArm64{}; template T* set_kvm_wfx_arm64() { return BeginNestedMessage(401); } @@ -54626,14 +56146,7 @@ class FtraceEvent : public ::protozero::Message { TrapRegFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_TrapReg kTrapReg() { return {}; } + static constexpr FieldMetadata_TrapReg kTrapReg{}; template T* set_trap_reg() { return BeginNestedMessage(402); } @@ -54647,14 +56160,7 @@ class FtraceEvent : public ::protozero::Message { VgicUpdateIrqPendingFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_VgicUpdateIrqPending kVgicUpdateIrqPending() { return {}; } + static constexpr FieldMetadata_VgicUpdateIrqPending kVgicUpdateIrqPending{}; template T* set_vgic_update_irq_pending() { return BeginNestedMessage(403); } @@ -54668,14 +56174,7 @@ class FtraceEvent : public ::protozero::Message { WakeupSourceActivateFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_WakeupSourceActivate kWakeupSourceActivate() { return {}; } + static constexpr FieldMetadata_WakeupSourceActivate kWakeupSourceActivate{}; template T* set_wakeup_source_activate() { return BeginNestedMessage(404); } @@ -54689,14 +56188,7 @@ class FtraceEvent : public ::protozero::Message { WakeupSourceDeactivateFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_WakeupSourceDeactivate kWakeupSourceDeactivate() { return {}; } + static constexpr FieldMetadata_WakeupSourceDeactivate kWakeupSourceDeactivate{}; template T* set_wakeup_source_deactivate() { return BeginNestedMessage(405); } @@ -54710,14 +56202,7 @@ class FtraceEvent : public ::protozero::Message { UfshcdCommandFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_UfshcdCommand kUfshcdCommand() { return {}; } + static constexpr FieldMetadata_UfshcdCommand kUfshcdCommand{}; template T* set_ufshcd_command() { return BeginNestedMessage(406); } @@ -54731,14 +56216,7 @@ class FtraceEvent : public ::protozero::Message { UfshcdClkGatingFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_UfshcdClkGating kUfshcdClkGating() { return {}; } + static constexpr FieldMetadata_UfshcdClkGating kUfshcdClkGating{}; template T* set_ufshcd_clk_gating() { return BeginNestedMessage(407); } @@ -54752,14 +56230,7 @@ class FtraceEvent : public ::protozero::Message { ConsoleFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Console kConsole() { return {}; } + static constexpr FieldMetadata_Console kConsole{}; template T* set_console() { return BeginNestedMessage(408); } @@ -54773,14 +56244,7 @@ class FtraceEvent : public ::protozero::Message { DrmVblankEventFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_DrmVblankEvent kDrmVblankEvent() { return {}; } + static constexpr FieldMetadata_DrmVblankEvent kDrmVblankEvent{}; template T* set_drm_vblank_event() { return BeginNestedMessage(409); } @@ -54794,14 +56258,7 @@ class FtraceEvent : public ::protozero::Message { DrmVblankEventDeliveredFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_DrmVblankEventDelivered kDrmVblankEventDelivered() { return {}; } + static constexpr FieldMetadata_DrmVblankEventDelivered kDrmVblankEventDelivered{}; template T* set_drm_vblank_event_delivered() { return BeginNestedMessage(410); } @@ -54815,14 +56272,7 @@ class FtraceEvent : public ::protozero::Message { DrmSchedJobFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_DrmSchedJob kDrmSchedJob() { return {}; } + static constexpr FieldMetadata_DrmSchedJob kDrmSchedJob{}; template T* set_drm_sched_job() { return BeginNestedMessage(411); } @@ -54836,14 +56286,7 @@ class FtraceEvent : public ::protozero::Message { DrmRunJobFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_DrmRunJob kDrmRunJob() { return {}; } + static constexpr FieldMetadata_DrmRunJob kDrmRunJob{}; template T* set_drm_run_job() { return BeginNestedMessage(412); } @@ -54857,14 +56300,7 @@ class FtraceEvent : public ::protozero::Message { DrmSchedProcessJobFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_DrmSchedProcessJob kDrmSchedProcessJob() { return {}; } + static constexpr FieldMetadata_DrmSchedProcessJob kDrmSchedProcessJob{}; template T* set_drm_sched_process_job() { return BeginNestedMessage(413); } @@ -54878,14 +56314,7 @@ class FtraceEvent : public ::protozero::Message { DmaFenceInitFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_DmaFenceInit kDmaFenceInit() { return {}; } + static constexpr FieldMetadata_DmaFenceInit kDmaFenceInit{}; template T* set_dma_fence_init() { return BeginNestedMessage(414); } @@ -54899,14 +56328,7 @@ class FtraceEvent : public ::protozero::Message { DmaFenceEmitFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_DmaFenceEmit kDmaFenceEmit() { return {}; } + static constexpr FieldMetadata_DmaFenceEmit kDmaFenceEmit{}; template T* set_dma_fence_emit() { return BeginNestedMessage(415); } @@ -54920,14 +56342,7 @@ class FtraceEvent : public ::protozero::Message { DmaFenceSignaledFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_DmaFenceSignaled kDmaFenceSignaled() { return {}; } + static constexpr FieldMetadata_DmaFenceSignaled kDmaFenceSignaled{}; template T* set_dma_fence_signaled() { return BeginNestedMessage(416); } @@ -54941,14 +56356,7 @@ class FtraceEvent : public ::protozero::Message { DmaFenceWaitStartFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_DmaFenceWaitStart kDmaFenceWaitStart() { return {}; } + static constexpr FieldMetadata_DmaFenceWaitStart kDmaFenceWaitStart{}; template T* set_dma_fence_wait_start() { return BeginNestedMessage(417); } @@ -54962,14 +56370,7 @@ class FtraceEvent : public ::protozero::Message { DmaFenceWaitEndFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_DmaFenceWaitEnd kDmaFenceWaitEnd() { return {}; } + static constexpr FieldMetadata_DmaFenceWaitEnd kDmaFenceWaitEnd{}; template T* set_dma_fence_wait_end() { return BeginNestedMessage(418); } @@ -54983,14 +56384,7 @@ class FtraceEvent : public ::protozero::Message { F2fsIostatFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_F2fsIostat kF2fsIostat() { return {}; } + static constexpr FieldMetadata_F2fsIostat kF2fsIostat{}; template T* set_f2fs_iostat() { return BeginNestedMessage(419); } @@ -55004,18 +56398,865 @@ class FtraceEvent : public ::protozero::Message { F2fsIostatLatencyFtraceEvent, FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_F2fsIostatLatency kF2fsIostatLatency() { return {}; } + static constexpr FieldMetadata_F2fsIostatLatency kF2fsIostatLatency{}; template T* set_f2fs_iostat_latency() { return BeginNestedMessage(420); } + + using FieldMetadata_SchedCpuUtilCfs = + ::protozero::proto_utils::FieldMetadata< + 421, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kMessage, + SchedCpuUtilCfsFtraceEvent, + FtraceEvent>; + + static constexpr FieldMetadata_SchedCpuUtilCfs kSchedCpuUtilCfs{}; + template T* set_sched_cpu_util_cfs() { + return BeginNestedMessage(421); + } + + + using FieldMetadata_V4l2Qbuf = + ::protozero::proto_utils::FieldMetadata< + 422, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kMessage, + V4l2QbufFtraceEvent, + FtraceEvent>; + + static constexpr FieldMetadata_V4l2Qbuf kV4l2Qbuf{}; + template T* set_v4l2_qbuf() { + return BeginNestedMessage(422); + } + + + using FieldMetadata_V4l2Dqbuf = + ::protozero::proto_utils::FieldMetadata< + 423, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kMessage, + V4l2DqbufFtraceEvent, + FtraceEvent>; + + static constexpr FieldMetadata_V4l2Dqbuf kV4l2Dqbuf{}; + template T* set_v4l2_dqbuf() { + return BeginNestedMessage(423); + } + + + using FieldMetadata_Vb2V4l2BufQueue = + ::protozero::proto_utils::FieldMetadata< + 424, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kMessage, + Vb2V4l2BufQueueFtraceEvent, + FtraceEvent>; + + static constexpr FieldMetadata_Vb2V4l2BufQueue kVb2V4l2BufQueue{}; + template T* set_vb2_v4l2_buf_queue() { + return BeginNestedMessage(424); + } + + + using FieldMetadata_Vb2V4l2BufDone = + ::protozero::proto_utils::FieldMetadata< + 425, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kMessage, + Vb2V4l2BufDoneFtraceEvent, + FtraceEvent>; + + static constexpr FieldMetadata_Vb2V4l2BufDone kVb2V4l2BufDone{}; + template T* set_vb2_v4l2_buf_done() { + return BeginNestedMessage(425); + } + + + using FieldMetadata_Vb2V4l2Qbuf = + ::protozero::proto_utils::FieldMetadata< + 426, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kMessage, + Vb2V4l2QbufFtraceEvent, + FtraceEvent>; + + static constexpr FieldMetadata_Vb2V4l2Qbuf kVb2V4l2Qbuf{}; + template T* set_vb2_v4l2_qbuf() { + return BeginNestedMessage(426); + } + + + using FieldMetadata_Vb2V4l2Dqbuf = + ::protozero::proto_utils::FieldMetadata< + 427, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kMessage, + Vb2V4l2DqbufFtraceEvent, + FtraceEvent>; + + static constexpr FieldMetadata_Vb2V4l2Dqbuf kVb2V4l2Dqbuf{}; + template T* set_vb2_v4l2_dqbuf() { + return BeginNestedMessage(427); + } + + + using FieldMetadata_DsiCmdFifoStatus = + ::protozero::proto_utils::FieldMetadata< + 428, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kMessage, + DsiCmdFifoStatusFtraceEvent, + FtraceEvent>; + + static constexpr FieldMetadata_DsiCmdFifoStatus kDsiCmdFifoStatus{}; + template T* set_dsi_cmd_fifo_status() { + return BeginNestedMessage(428); + } + + + using FieldMetadata_DsiRx = + ::protozero::proto_utils::FieldMetadata< + 429, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kMessage, + DsiRxFtraceEvent, + FtraceEvent>; + + static constexpr FieldMetadata_DsiRx kDsiRx{}; + template T* set_dsi_rx() { + return BeginNestedMessage(429); + } + + + using FieldMetadata_DsiTx = + ::protozero::proto_utils::FieldMetadata< + 430, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kMessage, + DsiTxFtraceEvent, + FtraceEvent>; + + static constexpr FieldMetadata_DsiTx kDsiTx{}; + template T* set_dsi_tx() { + return BeginNestedMessage(430); + } + + + using FieldMetadata_AndroidFsDatareadEnd = + ::protozero::proto_utils::FieldMetadata< + 431, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kMessage, + AndroidFsDatareadEndFtraceEvent, + FtraceEvent>; + + static constexpr FieldMetadata_AndroidFsDatareadEnd kAndroidFsDatareadEnd{}; + template T* set_android_fs_dataread_end() { + return BeginNestedMessage(431); + } + + + using FieldMetadata_AndroidFsDatareadStart = + ::protozero::proto_utils::FieldMetadata< + 432, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kMessage, + AndroidFsDatareadStartFtraceEvent, + FtraceEvent>; + + static constexpr FieldMetadata_AndroidFsDatareadStart kAndroidFsDatareadStart{}; + template T* set_android_fs_dataread_start() { + return BeginNestedMessage(432); + } + + + using FieldMetadata_AndroidFsDatawriteEnd = + ::protozero::proto_utils::FieldMetadata< + 433, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kMessage, + AndroidFsDatawriteEndFtraceEvent, + FtraceEvent>; + + static constexpr FieldMetadata_AndroidFsDatawriteEnd kAndroidFsDatawriteEnd{}; + template T* set_android_fs_datawrite_end() { + return BeginNestedMessage(433); + } + + + using FieldMetadata_AndroidFsDatawriteStart = + ::protozero::proto_utils::FieldMetadata< + 434, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kMessage, + AndroidFsDatawriteStartFtraceEvent, + FtraceEvent>; + + static constexpr FieldMetadata_AndroidFsDatawriteStart kAndroidFsDatawriteStart{}; + template T* set_android_fs_datawrite_start() { + return BeginNestedMessage(434); + } + + + using FieldMetadata_AndroidFsFsyncEnd = + ::protozero::proto_utils::FieldMetadata< + 435, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kMessage, + AndroidFsFsyncEndFtraceEvent, + FtraceEvent>; + + static constexpr FieldMetadata_AndroidFsFsyncEnd kAndroidFsFsyncEnd{}; + template T* set_android_fs_fsync_end() { + return BeginNestedMessage(435); + } + + + using FieldMetadata_AndroidFsFsyncStart = + ::protozero::proto_utils::FieldMetadata< + 436, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kMessage, + AndroidFsFsyncStartFtraceEvent, + FtraceEvent>; + + static constexpr FieldMetadata_AndroidFsFsyncStart kAndroidFsFsyncStart{}; + template T* set_android_fs_fsync_start() { + return BeginNestedMessage(436); + } + + + using FieldMetadata_FuncgraphEntry = + ::protozero::proto_utils::FieldMetadata< + 437, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kMessage, + FuncgraphEntryFtraceEvent, + FtraceEvent>; + + static constexpr FieldMetadata_FuncgraphEntry kFuncgraphEntry{}; + template T* set_funcgraph_entry() { + return BeginNestedMessage(437); + } + + + using FieldMetadata_FuncgraphExit = + ::protozero::proto_utils::FieldMetadata< + 438, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kMessage, + FuncgraphExitFtraceEvent, + FtraceEvent>; + + static constexpr FieldMetadata_FuncgraphExit kFuncgraphExit{}; + template T* set_funcgraph_exit() { + return BeginNestedMessage(438); + } + + + using FieldMetadata_VirtioVideoCmd = + ::protozero::proto_utils::FieldMetadata< + 439, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kMessage, + VirtioVideoCmdFtraceEvent, + FtraceEvent>; + + static constexpr FieldMetadata_VirtioVideoCmd kVirtioVideoCmd{}; + template T* set_virtio_video_cmd() { + return BeginNestedMessage(439); + } + + + using FieldMetadata_VirtioVideoCmdDone = + ::protozero::proto_utils::FieldMetadata< + 440, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kMessage, + VirtioVideoCmdDoneFtraceEvent, + FtraceEvent>; + + static constexpr FieldMetadata_VirtioVideoCmdDone kVirtioVideoCmdDone{}; + template T* set_virtio_video_cmd_done() { + return BeginNestedMessage(440); + } + + + using FieldMetadata_VirtioVideoResourceQueue = + ::protozero::proto_utils::FieldMetadata< + 441, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kMessage, + VirtioVideoResourceQueueFtraceEvent, + FtraceEvent>; + + static constexpr FieldMetadata_VirtioVideoResourceQueue kVirtioVideoResourceQueue{}; + template T* set_virtio_video_resource_queue() { + return BeginNestedMessage(441); + } + + + using FieldMetadata_VirtioVideoResourceQueueDone = + ::protozero::proto_utils::FieldMetadata< + 442, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kMessage, + VirtioVideoResourceQueueDoneFtraceEvent, + FtraceEvent>; + + static constexpr FieldMetadata_VirtioVideoResourceQueueDone kVirtioVideoResourceQueueDone{}; + template T* set_virtio_video_resource_queue_done() { + return BeginNestedMessage(442); + } + + + using FieldMetadata_MmShrinkSlabStart = + ::protozero::proto_utils::FieldMetadata< + 443, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kMessage, + MmShrinkSlabStartFtraceEvent, + FtraceEvent>; + + static constexpr FieldMetadata_MmShrinkSlabStart kMmShrinkSlabStart{}; + template T* set_mm_shrink_slab_start() { + return BeginNestedMessage(443); + } + + + using FieldMetadata_MmShrinkSlabEnd = + ::protozero::proto_utils::FieldMetadata< + 444, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kMessage, + MmShrinkSlabEndFtraceEvent, + FtraceEvent>; + + static constexpr FieldMetadata_MmShrinkSlabEnd kMmShrinkSlabEnd{}; + template T* set_mm_shrink_slab_end() { + return BeginNestedMessage(444); + } + + + using FieldMetadata_TrustySmc = + ::protozero::proto_utils::FieldMetadata< + 445, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kMessage, + TrustySmcFtraceEvent, + FtraceEvent>; + + static constexpr FieldMetadata_TrustySmc kTrustySmc{}; + template T* set_trusty_smc() { + return BeginNestedMessage(445); + } + + + using FieldMetadata_TrustySmcDone = + ::protozero::proto_utils::FieldMetadata< + 446, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kMessage, + TrustySmcDoneFtraceEvent, + FtraceEvent>; + + static constexpr FieldMetadata_TrustySmcDone kTrustySmcDone{}; + template T* set_trusty_smc_done() { + return BeginNestedMessage(446); + } + + + using FieldMetadata_TrustyStdCall32 = + ::protozero::proto_utils::FieldMetadata< + 447, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kMessage, + TrustyStdCall32FtraceEvent, + FtraceEvent>; + + static constexpr FieldMetadata_TrustyStdCall32 kTrustyStdCall32{}; + template T* set_trusty_std_call32() { + return BeginNestedMessage(447); + } + + + using FieldMetadata_TrustyStdCall32Done = + ::protozero::proto_utils::FieldMetadata< + 448, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kMessage, + TrustyStdCall32DoneFtraceEvent, + FtraceEvent>; + + static constexpr FieldMetadata_TrustyStdCall32Done kTrustyStdCall32Done{}; + template T* set_trusty_std_call32_done() { + return BeginNestedMessage(448); + } + + + using FieldMetadata_TrustyShareMemory = + ::protozero::proto_utils::FieldMetadata< + 449, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kMessage, + TrustyShareMemoryFtraceEvent, + FtraceEvent>; + + static constexpr FieldMetadata_TrustyShareMemory kTrustyShareMemory{}; + template T* set_trusty_share_memory() { + return BeginNestedMessage(449); + } + + + using FieldMetadata_TrustyShareMemoryDone = + ::protozero::proto_utils::FieldMetadata< + 450, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kMessage, + TrustyShareMemoryDoneFtraceEvent, + FtraceEvent>; + + static constexpr FieldMetadata_TrustyShareMemoryDone kTrustyShareMemoryDone{}; + template T* set_trusty_share_memory_done() { + return BeginNestedMessage(450); + } + + + using FieldMetadata_TrustyReclaimMemory = + ::protozero::proto_utils::FieldMetadata< + 451, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kMessage, + TrustyReclaimMemoryFtraceEvent, + FtraceEvent>; + + static constexpr FieldMetadata_TrustyReclaimMemory kTrustyReclaimMemory{}; + template T* set_trusty_reclaim_memory() { + return BeginNestedMessage(451); + } + + + using FieldMetadata_TrustyReclaimMemoryDone = + ::protozero::proto_utils::FieldMetadata< + 452, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kMessage, + TrustyReclaimMemoryDoneFtraceEvent, + FtraceEvent>; + + static constexpr FieldMetadata_TrustyReclaimMemoryDone kTrustyReclaimMemoryDone{}; + template T* set_trusty_reclaim_memory_done() { + return BeginNestedMessage(452); + } + + + using FieldMetadata_TrustyIrq = + ::protozero::proto_utils::FieldMetadata< + 453, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kMessage, + TrustyIrqFtraceEvent, + FtraceEvent>; + + static constexpr FieldMetadata_TrustyIrq kTrustyIrq{}; + template T* set_trusty_irq() { + return BeginNestedMessage(453); + } + + + using FieldMetadata_TrustyIpcHandleEvent = + ::protozero::proto_utils::FieldMetadata< + 454, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kMessage, + TrustyIpcHandleEventFtraceEvent, + FtraceEvent>; + + static constexpr FieldMetadata_TrustyIpcHandleEvent kTrustyIpcHandleEvent{}; + template T* set_trusty_ipc_handle_event() { + return BeginNestedMessage(454); + } + + + using FieldMetadata_TrustyIpcConnect = + ::protozero::proto_utils::FieldMetadata< + 455, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kMessage, + TrustyIpcConnectFtraceEvent, + FtraceEvent>; + + static constexpr FieldMetadata_TrustyIpcConnect kTrustyIpcConnect{}; + template T* set_trusty_ipc_connect() { + return BeginNestedMessage(455); + } + + + using FieldMetadata_TrustyIpcConnectEnd = + ::protozero::proto_utils::FieldMetadata< + 456, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kMessage, + TrustyIpcConnectEndFtraceEvent, + FtraceEvent>; + + static constexpr FieldMetadata_TrustyIpcConnectEnd kTrustyIpcConnectEnd{}; + template T* set_trusty_ipc_connect_end() { + return BeginNestedMessage(456); + } + + + using FieldMetadata_TrustyIpcWrite = + ::protozero::proto_utils::FieldMetadata< + 457, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kMessage, + TrustyIpcWriteFtraceEvent, + FtraceEvent>; + + static constexpr FieldMetadata_TrustyIpcWrite kTrustyIpcWrite{}; + template T* set_trusty_ipc_write() { + return BeginNestedMessage(457); + } + + + using FieldMetadata_TrustyIpcPoll = + ::protozero::proto_utils::FieldMetadata< + 458, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kMessage, + TrustyIpcPollFtraceEvent, + FtraceEvent>; + + static constexpr FieldMetadata_TrustyIpcPoll kTrustyIpcPoll{}; + template T* set_trusty_ipc_poll() { + return BeginNestedMessage(458); + } + + + using FieldMetadata_TrustyIpcRead = + ::protozero::proto_utils::FieldMetadata< + 460, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kMessage, + TrustyIpcReadFtraceEvent, + FtraceEvent>; + + static constexpr FieldMetadata_TrustyIpcRead kTrustyIpcRead{}; + template T* set_trusty_ipc_read() { + return BeginNestedMessage(460); + } + + + using FieldMetadata_TrustyIpcReadEnd = + ::protozero::proto_utils::FieldMetadata< + 461, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kMessage, + TrustyIpcReadEndFtraceEvent, + FtraceEvent>; + + static constexpr FieldMetadata_TrustyIpcReadEnd kTrustyIpcReadEnd{}; + template T* set_trusty_ipc_read_end() { + return BeginNestedMessage(461); + } + + + using FieldMetadata_TrustyIpcRx = + ::protozero::proto_utils::FieldMetadata< + 462, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kMessage, + TrustyIpcRxFtraceEvent, + FtraceEvent>; + + static constexpr FieldMetadata_TrustyIpcRx kTrustyIpcRx{}; + template T* set_trusty_ipc_rx() { + return BeginNestedMessage(462); + } + + + using FieldMetadata_TrustyEnqueueNop = + ::protozero::proto_utils::FieldMetadata< + 464, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kMessage, + TrustyEnqueueNopFtraceEvent, + FtraceEvent>; + + static constexpr FieldMetadata_TrustyEnqueueNop kTrustyEnqueueNop{}; + template T* set_trusty_enqueue_nop() { + return BeginNestedMessage(464); + } + + + using FieldMetadata_CmaAllocStart = + ::protozero::proto_utils::FieldMetadata< + 465, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kMessage, + CmaAllocStartFtraceEvent, + FtraceEvent>; + + static constexpr FieldMetadata_CmaAllocStart kCmaAllocStart{}; + template T* set_cma_alloc_start() { + return BeginNestedMessage(465); + } + + + using FieldMetadata_CmaAllocInfo = + ::protozero::proto_utils::FieldMetadata< + 466, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kMessage, + CmaAllocInfoFtraceEvent, + FtraceEvent>; + + static constexpr FieldMetadata_CmaAllocInfo kCmaAllocInfo{}; + template T* set_cma_alloc_info() { + return BeginNestedMessage(466); + } + + + using FieldMetadata_LwisTracingMarkWrite = + ::protozero::proto_utils::FieldMetadata< + 467, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kMessage, + LwisTracingMarkWriteFtraceEvent, + FtraceEvent>; + + static constexpr FieldMetadata_LwisTracingMarkWrite kLwisTracingMarkWrite{}; + template T* set_lwis_tracing_mark_write() { + return BeginNestedMessage(467); + } + + + using FieldMetadata_VirtioGpuCmdQueue = + ::protozero::proto_utils::FieldMetadata< + 468, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kMessage, + VirtioGpuCmdQueueFtraceEvent, + FtraceEvent>; + + static constexpr FieldMetadata_VirtioGpuCmdQueue kVirtioGpuCmdQueue{}; + template T* set_virtio_gpu_cmd_queue() { + return BeginNestedMessage(468); + } + + + using FieldMetadata_VirtioGpuCmdResponse = + ::protozero::proto_utils::FieldMetadata< + 469, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kMessage, + VirtioGpuCmdResponseFtraceEvent, + FtraceEvent>; + + static constexpr FieldMetadata_VirtioGpuCmdResponse kVirtioGpuCmdResponse{}; + template T* set_virtio_gpu_cmd_response() { + return BeginNestedMessage(469); + } + + + using FieldMetadata_MaliMaliKCPUCQSSET = + ::protozero::proto_utils::FieldMetadata< + 470, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kMessage, + MaliMaliKCPUCQSSETFtraceEvent, + FtraceEvent>; + + static constexpr FieldMetadata_MaliMaliKCPUCQSSET kMaliMaliKCPUCQSSET{}; + template T* set_mali_mali_kcpu_cqs_set() { + return BeginNestedMessage(470); + } + + + using FieldMetadata_MaliMaliKCPUCQSWAITSTART = + ::protozero::proto_utils::FieldMetadata< + 471, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kMessage, + MaliMaliKCPUCQSWAITSTARTFtraceEvent, + FtraceEvent>; + + static constexpr FieldMetadata_MaliMaliKCPUCQSWAITSTART kMaliMaliKCPUCQSWAITSTART{}; + template T* set_mali_mali_kcpu_cqs_wait_start() { + return BeginNestedMessage(471); + } + + + using FieldMetadata_MaliMaliKCPUCQSWAITEND = + ::protozero::proto_utils::FieldMetadata< + 472, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kMessage, + MaliMaliKCPUCQSWAITENDFtraceEvent, + FtraceEvent>; + + static constexpr FieldMetadata_MaliMaliKCPUCQSWAITEND kMaliMaliKCPUCQSWAITEND{}; + template T* set_mali_mali_kcpu_cqs_wait_end() { + return BeginNestedMessage(472); + } + + + using FieldMetadata_MaliMaliKCPUFENCESIGNAL = + ::protozero::proto_utils::FieldMetadata< + 473, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kMessage, + MaliMaliKCPUFENCESIGNALFtraceEvent, + FtraceEvent>; + + static constexpr FieldMetadata_MaliMaliKCPUFENCESIGNAL kMaliMaliKCPUFENCESIGNAL{}; + template T* set_mali_mali_kcpu_fence_signal() { + return BeginNestedMessage(473); + } + + + using FieldMetadata_MaliMaliKCPUFENCEWAITSTART = + ::protozero::proto_utils::FieldMetadata< + 474, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kMessage, + MaliMaliKCPUFENCEWAITSTARTFtraceEvent, + FtraceEvent>; + + static constexpr FieldMetadata_MaliMaliKCPUFENCEWAITSTART kMaliMaliKCPUFENCEWAITSTART{}; + template T* set_mali_mali_kcpu_fence_wait_start() { + return BeginNestedMessage(474); + } + + + using FieldMetadata_MaliMaliKCPUFENCEWAITEND = + ::protozero::proto_utils::FieldMetadata< + 475, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kMessage, + MaliMaliKCPUFENCEWAITENDFtraceEvent, + FtraceEvent>; + + static constexpr FieldMetadata_MaliMaliKCPUFENCEWAITEND kMaliMaliKCPUFENCEWAITEND{}; + template T* set_mali_mali_kcpu_fence_wait_end() { + return BeginNestedMessage(475); + } + + + using FieldMetadata_HypEnter = + ::protozero::proto_utils::FieldMetadata< + 476, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kMessage, + HypEnterFtraceEvent, + FtraceEvent>; + + static constexpr FieldMetadata_HypEnter kHypEnter{}; + template T* set_hyp_enter() { + return BeginNestedMessage(476); + } + + + using FieldMetadata_HypExit = + ::protozero::proto_utils::FieldMetadata< + 477, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kMessage, + HypExitFtraceEvent, + FtraceEvent>; + + static constexpr FieldMetadata_HypExit kHypExit{}; + template T* set_hyp_exit() { + return BeginNestedMessage(477); + } + + + using FieldMetadata_HostHcall = + ::protozero::proto_utils::FieldMetadata< + 478, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kMessage, + HostHcallFtraceEvent, + FtraceEvent>; + + static constexpr FieldMetadata_HostHcall kHostHcall{}; + template T* set_host_hcall() { + return BeginNestedMessage(478); + } + + + using FieldMetadata_HostSmc = + ::protozero::proto_utils::FieldMetadata< + 479, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kMessage, + HostSmcFtraceEvent, + FtraceEvent>; + + static constexpr FieldMetadata_HostSmc kHostSmc{}; + template T* set_host_smc() { + return BeginNestedMessage(479); + } + + + using FieldMetadata_HostMemAbort = + ::protozero::proto_utils::FieldMetadata< + 480, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kMessage, + HostMemAbortFtraceEvent, + FtraceEvent>; + + static constexpr FieldMetadata_HostMemAbort kHostMemAbort{}; + template T* set_host_mem_abort() { + return BeginNestedMessage(480); + } + + + using FieldMetadata_SuspendResumeMinimal = + ::protozero::proto_utils::FieldMetadata< + 481, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kMessage, + SuspendResumeMinimalFtraceEvent, + FtraceEvent>; + + static constexpr FieldMetadata_SuspendResumeMinimal kSuspendResumeMinimal{}; + template T* set_suspend_resume_minimal() { + return BeginNestedMessage(481); + } + + + using FieldMetadata_MaliMaliCSFINTERRUPTSTART = + ::protozero::proto_utils::FieldMetadata< + 482, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kMessage, + MaliMaliCSFINTERRUPTSTARTFtraceEvent, + FtraceEvent>; + + static constexpr FieldMetadata_MaliMaliCSFINTERRUPTSTART kMaliMaliCSFINTERRUPTSTART{}; + template T* set_mali_mali_csf_interrupt_start() { + return BeginNestedMessage(482); + } + + + using FieldMetadata_MaliMaliCSFINTERRUPTEND = + ::protozero::proto_utils::FieldMetadata< + 483, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kMessage, + MaliMaliCSFINTERRUPTENDFtraceEvent, + FtraceEvent>; + + static constexpr FieldMetadata_MaliMaliCSFINTERRUPTEND kMaliMaliCSFINTERRUPTEND{}; + template T* set_mali_mali_csf_interrupt_end() { + return BeginNestedMessage(483); + } + }; } // Namespace. @@ -55050,10 +57291,33 @@ enum FtraceClock : int32_t { FTRACE_CLOCK_UNKNOWN = 1, FTRACE_CLOCK_GLOBAL = 2, FTRACE_CLOCK_LOCAL = 3, + FTRACE_CLOCK_MONO_RAW = 4, }; -const FtraceClock FtraceClock_MIN = FTRACE_CLOCK_UNSPECIFIED; -const FtraceClock FtraceClock_MAX = FTRACE_CLOCK_LOCAL; +constexpr FtraceClock FtraceClock_MIN = FtraceClock::FTRACE_CLOCK_UNSPECIFIED; +constexpr FtraceClock FtraceClock_MAX = FtraceClock::FTRACE_CLOCK_MONO_RAW; + + +PERFETTO_PROTOZERO_CONSTEXPR14_OR_INLINE +const char* FtraceClock_Name(::perfetto::protos::pbzero::FtraceClock value) { + switch (value) { + case ::perfetto::protos::pbzero::FtraceClock::FTRACE_CLOCK_UNSPECIFIED: + return "FTRACE_CLOCK_UNSPECIFIED"; + + case ::perfetto::protos::pbzero::FtraceClock::FTRACE_CLOCK_UNKNOWN: + return "FTRACE_CLOCK_UNKNOWN"; + + case ::perfetto::protos::pbzero::FtraceClock::FTRACE_CLOCK_GLOBAL: + return "FTRACE_CLOCK_GLOBAL"; + + case ::perfetto::protos::pbzero::FtraceClock::FTRACE_CLOCK_LOCAL: + return "FTRACE_CLOCK_LOCAL"; + + case ::perfetto::protos::pbzero::FtraceClock::FTRACE_CLOCK_MONO_RAW: + return "FTRACE_CLOCK_MONO_RAW"; + } + return "PBZERO_UNKNOWN_ENUM_VALUE"; +} class FtraceEventBundle_Decoder : public ::protozero::TypedProtoDecoder { public: @@ -55100,14 +57364,7 @@ class FtraceEventBundle : public ::protozero::Message { uint32_t, FtraceEventBundle>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Cpu kCpu() { return {}; } + static constexpr FieldMetadata_Cpu kCpu{}; void set_cpu(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Cpu::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -55125,14 +57382,7 @@ class FtraceEventBundle : public ::protozero::Message { FtraceEvent, FtraceEventBundle>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Event kEvent() { return {}; } + static constexpr FieldMetadata_Event kEvent{}; template T* add_event() { return BeginNestedMessage(2); } @@ -55146,14 +57396,7 @@ class FtraceEventBundle : public ::protozero::Message { bool, FtraceEventBundle>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_LostEvents kLostEvents() { return {}; } + static constexpr FieldMetadata_LostEvents kLostEvents{}; void set_lost_events(bool value) { static constexpr uint32_t field_id = FieldMetadata_LostEvents::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -55171,14 +57414,7 @@ class FtraceEventBundle : public ::protozero::Message { FtraceEventBundle_CompactSched, FtraceEventBundle>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_CompactSched kCompactSched() { return {}; } + static constexpr FieldMetadata_CompactSched kCompactSched{}; template T* set_compact_sched() { return BeginNestedMessage(4); } @@ -55192,14 +57428,7 @@ class FtraceEventBundle : public ::protozero::Message { ::perfetto::protos::pbzero::FtraceClock, FtraceEventBundle>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_FtraceClock kFtraceClock() { return {}; } + static constexpr FieldMetadata_FtraceClock kFtraceClock{}; void set_ftrace_clock(::perfetto::protos::pbzero::FtraceClock value) { static constexpr uint32_t field_id = FieldMetadata_FtraceClock::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -55217,14 +57446,7 @@ class FtraceEventBundle : public ::protozero::Message { int64_t, FtraceEventBundle>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_FtraceTimestamp kFtraceTimestamp() { return {}; } + static constexpr FieldMetadata_FtraceTimestamp kFtraceTimestamp{}; void set_ftrace_timestamp(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_FtraceTimestamp::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -55242,14 +57464,7 @@ class FtraceEventBundle : public ::protozero::Message { int64_t, FtraceEventBundle>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_BootTimestamp kBootTimestamp() { return {}; } + static constexpr FieldMetadata_BootTimestamp kBootTimestamp{}; void set_boot_timestamp(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_BootTimestamp::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -55260,7 +57475,7 @@ class FtraceEventBundle : public ::protozero::Message { } }; -class FtraceEventBundle_CompactSched_Decoder : public ::protozero::TypedProtoDecoder { +class FtraceEventBundle_CompactSched_Decoder : public ::protozero::TypedProtoDecoder { public: FtraceEventBundle_CompactSched_Decoder(const uint8_t* data, size_t len) : TypedProtoDecoder(data, len) {} explicit FtraceEventBundle_CompactSched_Decoder(const std::string& raw) : TypedProtoDecoder(reinterpret_cast(raw.data()), raw.size()) {} @@ -55287,6 +57502,8 @@ class FtraceEventBundle_CompactSched_Decoder : public ::protozero::TypedProtoDec ::protozero::PackedRepeatedFieldIterator<::protozero::proto_utils::ProtoWireType::kVarInt, int32_t> waking_prio(bool* parse_error_ptr) const { return GetPackedRepeated<::protozero::proto_utils::ProtoWireType::kVarInt, int32_t>(10, parse_error_ptr); } bool has_waking_comm_index() const { return at<11>().valid(); } ::protozero::PackedRepeatedFieldIterator<::protozero::proto_utils::ProtoWireType::kVarInt, uint32_t> waking_comm_index(bool* parse_error_ptr) const { return GetPackedRepeated<::protozero::proto_utils::ProtoWireType::kVarInt, uint32_t>(11, parse_error_ptr); } + bool has_waking_common_flags() const { return at<12>().valid(); } + ::protozero::PackedRepeatedFieldIterator<::protozero::proto_utils::ProtoWireType::kVarInt, uint32_t> waking_common_flags(bool* parse_error_ptr) const { return GetPackedRepeated<::protozero::proto_utils::ProtoWireType::kVarInt, uint32_t>(12, parse_error_ptr); } }; class FtraceEventBundle_CompactSched : public ::protozero::Message { @@ -55304,6 +57521,7 @@ class FtraceEventBundle_CompactSched : public ::protozero::Message { kWakingTargetCpuFieldNumber = 9, kWakingPrioFieldNumber = 10, kWakingCommIndexFieldNumber = 11, + kWakingCommonFlagsFieldNumber = 12, }; static constexpr const char* GetName() { return ".perfetto.protos.FtraceEventBundle.CompactSched"; } @@ -55316,17 +57534,13 @@ class FtraceEventBundle_CompactSched : public ::protozero::Message { std::string, FtraceEventBundle_CompactSched>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_InternTable kInternTable() { return {}; } + static constexpr FieldMetadata_InternTable kInternTable{}; void add_intern_table(const char* data, size_t size) { AppendBytes(FieldMetadata_InternTable::kFieldId, data, size); } + void add_intern_table(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_InternTable::kFieldId, chars.data, chars.size); + } void add_intern_table(std::string value) { static constexpr uint32_t field_id = FieldMetadata_InternTable::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -55344,14 +57558,7 @@ class FtraceEventBundle_CompactSched : public ::protozero::Message { uint64_t, FtraceEventBundle_CompactSched>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_SwitchTimestamp kSwitchTimestamp() { return {}; } + static constexpr FieldMetadata_SwitchTimestamp kSwitchTimestamp{}; void set_switch_timestamp(const ::protozero::PackedVarInt& packed_buffer) { AppendBytes(FieldMetadata_SwitchTimestamp::kFieldId, packed_buffer.data(), packed_buffer.size()); @@ -55365,14 +57572,7 @@ class FtraceEventBundle_CompactSched : public ::protozero::Message { int64_t, FtraceEventBundle_CompactSched>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_SwitchPrevState kSwitchPrevState() { return {}; } + static constexpr FieldMetadata_SwitchPrevState kSwitchPrevState{}; void set_switch_prev_state(const ::protozero::PackedVarInt& packed_buffer) { AppendBytes(FieldMetadata_SwitchPrevState::kFieldId, packed_buffer.data(), packed_buffer.size()); @@ -55386,14 +57586,7 @@ class FtraceEventBundle_CompactSched : public ::protozero::Message { int32_t, FtraceEventBundle_CompactSched>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_SwitchNextPid kSwitchNextPid() { return {}; } + static constexpr FieldMetadata_SwitchNextPid kSwitchNextPid{}; void set_switch_next_pid(const ::protozero::PackedVarInt& packed_buffer) { AppendBytes(FieldMetadata_SwitchNextPid::kFieldId, packed_buffer.data(), packed_buffer.size()); @@ -55407,14 +57600,7 @@ class FtraceEventBundle_CompactSched : public ::protozero::Message { int32_t, FtraceEventBundle_CompactSched>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_SwitchNextPrio kSwitchNextPrio() { return {}; } + static constexpr FieldMetadata_SwitchNextPrio kSwitchNextPrio{}; void set_switch_next_prio(const ::protozero::PackedVarInt& packed_buffer) { AppendBytes(FieldMetadata_SwitchNextPrio::kFieldId, packed_buffer.data(), packed_buffer.size()); @@ -55428,14 +57614,7 @@ class FtraceEventBundle_CompactSched : public ::protozero::Message { uint32_t, FtraceEventBundle_CompactSched>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_SwitchNextCommIndex kSwitchNextCommIndex() { return {}; } + static constexpr FieldMetadata_SwitchNextCommIndex kSwitchNextCommIndex{}; void set_switch_next_comm_index(const ::protozero::PackedVarInt& packed_buffer) { AppendBytes(FieldMetadata_SwitchNextCommIndex::kFieldId, packed_buffer.data(), packed_buffer.size()); @@ -55449,14 +57628,7 @@ class FtraceEventBundle_CompactSched : public ::protozero::Message { uint64_t, FtraceEventBundle_CompactSched>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_WakingTimestamp kWakingTimestamp() { return {}; } + static constexpr FieldMetadata_WakingTimestamp kWakingTimestamp{}; void set_waking_timestamp(const ::protozero::PackedVarInt& packed_buffer) { AppendBytes(FieldMetadata_WakingTimestamp::kFieldId, packed_buffer.data(), packed_buffer.size()); @@ -55470,14 +57642,7 @@ class FtraceEventBundle_CompactSched : public ::protozero::Message { int32_t, FtraceEventBundle_CompactSched>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_WakingPid kWakingPid() { return {}; } + static constexpr FieldMetadata_WakingPid kWakingPid{}; void set_waking_pid(const ::protozero::PackedVarInt& packed_buffer) { AppendBytes(FieldMetadata_WakingPid::kFieldId, packed_buffer.data(), packed_buffer.size()); @@ -55491,14 +57656,7 @@ class FtraceEventBundle_CompactSched : public ::protozero::Message { int32_t, FtraceEventBundle_CompactSched>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_WakingTargetCpu kWakingTargetCpu() { return {}; } + static constexpr FieldMetadata_WakingTargetCpu kWakingTargetCpu{}; void set_waking_target_cpu(const ::protozero::PackedVarInt& packed_buffer) { AppendBytes(FieldMetadata_WakingTargetCpu::kFieldId, packed_buffer.data(), packed_buffer.size()); @@ -55512,14 +57670,7 @@ class FtraceEventBundle_CompactSched : public ::protozero::Message { int32_t, FtraceEventBundle_CompactSched>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_WakingPrio kWakingPrio() { return {}; } + static constexpr FieldMetadata_WakingPrio kWakingPrio{}; void set_waking_prio(const ::protozero::PackedVarInt& packed_buffer) { AppendBytes(FieldMetadata_WakingPrio::kFieldId, packed_buffer.data(), packed_buffer.size()); @@ -55533,18 +57684,25 @@ class FtraceEventBundle_CompactSched : public ::protozero::Message { uint32_t, FtraceEventBundle_CompactSched>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_WakingCommIndex kWakingCommIndex() { return {}; } + static constexpr FieldMetadata_WakingCommIndex kWakingCommIndex{}; void set_waking_comm_index(const ::protozero::PackedVarInt& packed_buffer) { AppendBytes(FieldMetadata_WakingCommIndex::kFieldId, packed_buffer.data(), packed_buffer.size()); } + + using FieldMetadata_WakingCommonFlags = + ::protozero::proto_utils::FieldMetadata< + 12, + ::protozero::proto_utils::RepetitionType::kRepeatedPacked, + ::protozero::proto_utils::ProtoSchemaType::kUint32, + uint32_t, + FtraceEventBundle_CompactSched>; + + static constexpr FieldMetadata_WakingCommonFlags kWakingCommonFlags{}; + void set_waking_common_flags(const ::protozero::PackedVarInt& packed_buffer) { + AppendBytes(FieldMetadata_WakingCommonFlags::kFieldId, packed_buffer.data(), + packed_buffer.size()); + } }; } // Namespace. @@ -55571,18 +57729,41 @@ namespace protos { namespace pbzero { class FtraceCpuStats; -enum FtraceStats_Phase : int32_t; +namespace perfetto_pbzero_enum_FtraceStats { +enum Phase : int32_t; +} // namespace perfetto_pbzero_enum_FtraceStats +using FtraceStats_Phase = perfetto_pbzero_enum_FtraceStats::Phase; -enum FtraceStats_Phase : int32_t { - FtraceStats_Phase_UNSPECIFIED = 0, - FtraceStats_Phase_START_OF_TRACE = 1, - FtraceStats_Phase_END_OF_TRACE = 2, +namespace perfetto_pbzero_enum_FtraceStats { +enum Phase : int32_t { + UNSPECIFIED = 0, + START_OF_TRACE = 1, + END_OF_TRACE = 2, }; +} // namespace perfetto_pbzero_enum_FtraceStats +using FtraceStats_Phase = perfetto_pbzero_enum_FtraceStats::Phase; -const FtraceStats_Phase FtraceStats_Phase_MIN = FtraceStats_Phase_UNSPECIFIED; -const FtraceStats_Phase FtraceStats_Phase_MAX = FtraceStats_Phase_END_OF_TRACE; -class FtraceStats_Decoder : public ::protozero::TypedProtoDecoder { +constexpr FtraceStats_Phase FtraceStats_Phase_MIN = FtraceStats_Phase::UNSPECIFIED; +constexpr FtraceStats_Phase FtraceStats_Phase_MAX = FtraceStats_Phase::END_OF_TRACE; + + +PERFETTO_PROTOZERO_CONSTEXPR14_OR_INLINE +const char* FtraceStats_Phase_Name(::perfetto::protos::pbzero::FtraceStats_Phase value) { + switch (value) { + case ::perfetto::protos::pbzero::FtraceStats_Phase::UNSPECIFIED: + return "UNSPECIFIED"; + + case ::perfetto::protos::pbzero::FtraceStats_Phase::START_OF_TRACE: + return "START_OF_TRACE"; + + case ::perfetto::protos::pbzero::FtraceStats_Phase::END_OF_TRACE: + return "END_OF_TRACE"; + } + return "PBZERO_UNKNOWN_ENUM_VALUE"; +} + +class FtraceStats_Decoder : public ::protozero::TypedProtoDecoder { public: FtraceStats_Decoder(const uint8_t* data, size_t len) : TypedProtoDecoder(data, len) {} explicit FtraceStats_Decoder(const std::string& raw) : TypedProtoDecoder(reinterpret_cast(raw.data()), raw.size()) {} @@ -55601,6 +57782,8 @@ class FtraceStats_Decoder : public ::protozero::TypedProtoDecoder unknown_ftrace_events() const { return GetRepeated<::protozero::ConstChars>(6); } bool has_failed_ftrace_events() const { return at<7>().valid(); } ::protozero::RepeatedFieldIterator<::protozero::ConstChars> failed_ftrace_events() const { return GetRepeated<::protozero::ConstChars>(7); } + bool has_preserve_ftrace_buffer() const { return at<8>().valid(); } + bool preserve_ftrace_buffer() const { return at<8>().as_bool(); } }; class FtraceStats : public ::protozero::Message { @@ -55614,13 +57797,18 @@ class FtraceStats : public ::protozero::Message { kAtraceErrorsFieldNumber = 5, kUnknownFtraceEventsFieldNumber = 6, kFailedFtraceEventsFieldNumber = 7, + kPreserveFtraceBufferFieldNumber = 8, }; static constexpr const char* GetName() { return ".perfetto.protos.FtraceStats"; } + using Phase = ::perfetto::protos::pbzero::FtraceStats_Phase; - static const Phase UNSPECIFIED = FtraceStats_Phase_UNSPECIFIED; - static const Phase START_OF_TRACE = FtraceStats_Phase_START_OF_TRACE; - static const Phase END_OF_TRACE = FtraceStats_Phase_END_OF_TRACE; + static inline const char* Phase_Name(Phase value) { + return ::perfetto::protos::pbzero::FtraceStats_Phase_Name(value); + } + static const Phase UNSPECIFIED = Phase::UNSPECIFIED; + static const Phase START_OF_TRACE = Phase::START_OF_TRACE; + static const Phase END_OF_TRACE = Phase::END_OF_TRACE; using FieldMetadata_Phase = ::protozero::proto_utils::FieldMetadata< @@ -55630,14 +57818,7 @@ class FtraceStats : public ::protozero::Message { ::perfetto::protos::pbzero::FtraceStats_Phase, FtraceStats>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Phase kPhase() { return {}; } + static constexpr FieldMetadata_Phase kPhase{}; void set_phase(::perfetto::protos::pbzero::FtraceStats_Phase value) { static constexpr uint32_t field_id = FieldMetadata_Phase::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -55655,14 +57836,7 @@ class FtraceStats : public ::protozero::Message { FtraceCpuStats, FtraceStats>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_CpuStats kCpuStats() { return {}; } + static constexpr FieldMetadata_CpuStats kCpuStats{}; template T* add_cpu_stats() { return BeginNestedMessage(2); } @@ -55676,14 +57850,7 @@ class FtraceStats : public ::protozero::Message { uint32_t, FtraceStats>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_KernelSymbolsParsed kKernelSymbolsParsed() { return {}; } + static constexpr FieldMetadata_KernelSymbolsParsed kKernelSymbolsParsed{}; void set_kernel_symbols_parsed(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_KernelSymbolsParsed::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -55701,14 +57868,7 @@ class FtraceStats : public ::protozero::Message { uint32_t, FtraceStats>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_KernelSymbolsMemKb kKernelSymbolsMemKb() { return {}; } + static constexpr FieldMetadata_KernelSymbolsMemKb kKernelSymbolsMemKb{}; void set_kernel_symbols_mem_kb(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_KernelSymbolsMemKb::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -55726,17 +57886,13 @@ class FtraceStats : public ::protozero::Message { std::string, FtraceStats>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_AtraceErrors kAtraceErrors() { return {}; } + static constexpr FieldMetadata_AtraceErrors kAtraceErrors{}; void set_atrace_errors(const char* data, size_t size) { AppendBytes(FieldMetadata_AtraceErrors::kFieldId, data, size); } + void set_atrace_errors(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_AtraceErrors::kFieldId, chars.data, chars.size); + } void set_atrace_errors(std::string value) { static constexpr uint32_t field_id = FieldMetadata_AtraceErrors::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -55754,17 +57910,13 @@ class FtraceStats : public ::protozero::Message { std::string, FtraceStats>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_UnknownFtraceEvents kUnknownFtraceEvents() { return {}; } + static constexpr FieldMetadata_UnknownFtraceEvents kUnknownFtraceEvents{}; void add_unknown_ftrace_events(const char* data, size_t size) { AppendBytes(FieldMetadata_UnknownFtraceEvents::kFieldId, data, size); } + void add_unknown_ftrace_events(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_UnknownFtraceEvents::kFieldId, chars.data, chars.size); + } void add_unknown_ftrace_events(std::string value) { static constexpr uint32_t field_id = FieldMetadata_UnknownFtraceEvents::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -55782,17 +57934,13 @@ class FtraceStats : public ::protozero::Message { std::string, FtraceStats>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_FailedFtraceEvents kFailedFtraceEvents() { return {}; } + static constexpr FieldMetadata_FailedFtraceEvents kFailedFtraceEvents{}; void add_failed_ftrace_events(const char* data, size_t size) { AppendBytes(FieldMetadata_FailedFtraceEvents::kFieldId, data, size); } + void add_failed_ftrace_events(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_FailedFtraceEvents::kFieldId, chars.data, chars.size); + } void add_failed_ftrace_events(std::string value) { static constexpr uint32_t field_id = FieldMetadata_FailedFtraceEvents::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -55801,6 +57949,24 @@ class FtraceStats : public ::protozero::Message { ::protozero::proto_utils::ProtoSchemaType::kString> ::Append(*this, field_id, value); } + + using FieldMetadata_PreserveFtraceBuffer = + ::protozero::proto_utils::FieldMetadata< + 8, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kBool, + bool, + FtraceStats>; + + static constexpr FieldMetadata_PreserveFtraceBuffer kPreserveFtraceBuffer{}; + void set_preserve_ftrace_buffer(bool value) { + static constexpr uint32_t field_id = FieldMetadata_PreserveFtraceBuffer::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kBool> + ::Append(*this, field_id, value); + } }; class FtraceCpuStats_Decoder : public ::protozero::TypedProtoDecoder { @@ -55853,14 +58019,7 @@ class FtraceCpuStats : public ::protozero::Message { uint64_t, FtraceCpuStats>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Cpu kCpu() { return {}; } + static constexpr FieldMetadata_Cpu kCpu{}; void set_cpu(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Cpu::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -55878,14 +58037,7 @@ class FtraceCpuStats : public ::protozero::Message { uint64_t, FtraceCpuStats>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Entries kEntries() { return {}; } + static constexpr FieldMetadata_Entries kEntries{}; void set_entries(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Entries::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -55903,14 +58055,7 @@ class FtraceCpuStats : public ::protozero::Message { uint64_t, FtraceCpuStats>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Overrun kOverrun() { return {}; } + static constexpr FieldMetadata_Overrun kOverrun{}; void set_overrun(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Overrun::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -55928,14 +58073,7 @@ class FtraceCpuStats : public ::protozero::Message { uint64_t, FtraceCpuStats>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_CommitOverrun kCommitOverrun() { return {}; } + static constexpr FieldMetadata_CommitOverrun kCommitOverrun{}; void set_commit_overrun(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_CommitOverrun::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -55953,14 +58091,7 @@ class FtraceCpuStats : public ::protozero::Message { uint64_t, FtraceCpuStats>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_BytesRead kBytesRead() { return {}; } + static constexpr FieldMetadata_BytesRead kBytesRead{}; void set_bytes_read(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_BytesRead::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -55978,14 +58109,7 @@ class FtraceCpuStats : public ::protozero::Message { double, FtraceCpuStats>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_OldestEventTs kOldestEventTs() { return {}; } + static constexpr FieldMetadata_OldestEventTs kOldestEventTs{}; void set_oldest_event_ts(double value) { static constexpr uint32_t field_id = FieldMetadata_OldestEventTs::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -56003,14 +58127,7 @@ class FtraceCpuStats : public ::protozero::Message { double, FtraceCpuStats>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_NowTs kNowTs() { return {}; } + static constexpr FieldMetadata_NowTs kNowTs{}; void set_now_ts(double value) { static constexpr uint32_t field_id = FieldMetadata_NowTs::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -56028,14 +58145,7 @@ class FtraceCpuStats : public ::protozero::Message { uint64_t, FtraceCpuStats>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_DroppedEvents kDroppedEvents() { return {}; } + static constexpr FieldMetadata_DroppedEvents kDroppedEvents{}; void set_dropped_events(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_DroppedEvents::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -56053,14 +58163,7 @@ class FtraceCpuStats : public ::protozero::Message { uint64_t, FtraceCpuStats>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ReadEvents kReadEvents() { return {}; } + static constexpr FieldMetadata_ReadEvents kReadEvents{}; void set_read_events(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_ReadEvents::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -56128,17 +58231,13 @@ class TestBundleWrapper : public ::protozero::Message { std::string, TestBundleWrapper>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Before kBefore() { return {}; } + static constexpr FieldMetadata_Before kBefore{}; void set_before(const char* data, size_t size) { AppendBytes(FieldMetadata_Before::kFieldId, data, size); } + void set_before(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Before::kFieldId, chars.data, chars.size); + } void set_before(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Before::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -56156,14 +58255,7 @@ class TestBundleWrapper : public ::protozero::Message { FtraceEventBundle, TestBundleWrapper>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Bundle kBundle() { return {}; } + static constexpr FieldMetadata_Bundle kBundle{}; template T* add_bundle() { return BeginNestedMessage(2); } @@ -56177,17 +58269,13 @@ class TestBundleWrapper : public ::protozero::Message { std::string, TestBundleWrapper>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_After kAfter() { return {}; } + static constexpr FieldMetadata_After kAfter{}; void set_after(const char* data, size_t size) { AppendBytes(FieldMetadata_After::kFieldId, data, size); } + void set_after(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_After::kFieldId, chars.data, chars.size); + } void set_after(std::string value) { static constexpr uint32_t field_id = FieldMetadata_After::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -56253,17 +58341,13 @@ class GenericFtraceEvent : public ::protozero::Message { std::string, GenericFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_EventName kEventName() { return {}; } + static constexpr FieldMetadata_EventName kEventName{}; void set_event_name(const char* data, size_t size) { AppendBytes(FieldMetadata_EventName::kFieldId, data, size); } + void set_event_name(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_EventName::kFieldId, chars.data, chars.size); + } void set_event_name(std::string value) { static constexpr uint32_t field_id = FieldMetadata_EventName::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -56281,14 +58365,7 @@ class GenericFtraceEvent : public ::protozero::Message { GenericFtraceEvent_Field, GenericFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Field kField() { return {}; } + static constexpr FieldMetadata_Field kField{}; template T* add_field() { return BeginNestedMessage(2); } @@ -56330,17 +58407,13 @@ class GenericFtraceEvent_Field : public ::protozero::Message { std::string, GenericFtraceEvent_Field>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Name kName() { return {}; } + static constexpr FieldMetadata_Name kName{}; void set_name(const char* data, size_t size) { AppendBytes(FieldMetadata_Name::kFieldId, data, size); } + void set_name(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Name::kFieldId, chars.data, chars.size); + } void set_name(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Name::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -56358,17 +58431,13 @@ class GenericFtraceEvent_Field : public ::protozero::Message { std::string, GenericFtraceEvent_Field>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_StrValue kStrValue() { return {}; } + static constexpr FieldMetadata_StrValue kStrValue{}; void set_str_value(const char* data, size_t size) { AppendBytes(FieldMetadata_StrValue::kFieldId, data, size); } + void set_str_value(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_StrValue::kFieldId, chars.data, chars.size); + } void set_str_value(std::string value) { static constexpr uint32_t field_id = FieldMetadata_StrValue::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -56386,14 +58455,7 @@ class GenericFtraceEvent_Field : public ::protozero::Message { int64_t, GenericFtraceEvent_Field>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_IntValue kIntValue() { return {}; } + static constexpr FieldMetadata_IntValue kIntValue{}; void set_int_value(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_IntValue::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -56411,14 +58473,7 @@ class GenericFtraceEvent_Field : public ::protozero::Message { uint64_t, GenericFtraceEvent_Field>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_UintValue kUintValue() { return {}; } + static constexpr FieldMetadata_UintValue kUintValue{}; void set_uint_value(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_UintValue::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -56429,6 +58484,750 @@ class GenericFtraceEvent_Field : public ::protozero::Message { } }; +} // Namespace. +} // Namespace. +} // Namespace. +#endif // Include guard. +// gen_amalgamated begin header: gen/protos/perfetto/trace/ftrace/android_fs.pbzero.h +// Autogenerated by the ProtoZero compiler plugin. DO NOT EDIT. + +#ifndef PERFETTO_PROTOS_PROTOS_PERFETTO_TRACE_FTRACE_ANDROID_FS_PROTO_H_ +#define PERFETTO_PROTOS_PROTOS_PERFETTO_TRACE_FTRACE_ANDROID_FS_PROTO_H_ + +#include +#include + +// gen_amalgamated expanded: #include "perfetto/protozero/field_writer.h" +// gen_amalgamated expanded: #include "perfetto/protozero/message.h" +// gen_amalgamated expanded: #include "perfetto/protozero/packed_repeated_fields.h" +// gen_amalgamated expanded: #include "perfetto/protozero/proto_decoder.h" +// gen_amalgamated expanded: #include "perfetto/protozero/proto_utils.h" + +namespace perfetto { +namespace protos { +namespace pbzero { + + +class AndroidFsFsyncStartFtraceEvent_Decoder : public ::protozero::TypedProtoDecoder { + public: + AndroidFsFsyncStartFtraceEvent_Decoder(const uint8_t* data, size_t len) : TypedProtoDecoder(data, len) {} + explicit AndroidFsFsyncStartFtraceEvent_Decoder(const std::string& raw) : TypedProtoDecoder(reinterpret_cast(raw.data()), raw.size()) {} + explicit AndroidFsFsyncStartFtraceEvent_Decoder(const ::protozero::ConstBytes& raw) : TypedProtoDecoder(raw.data, raw.size) {} + bool has_cmdline() const { return at<1>().valid(); } + ::protozero::ConstChars cmdline() const { return at<1>().as_string(); } + bool has_i_size() const { return at<2>().valid(); } + int64_t i_size() const { return at<2>().as_int64(); } + bool has_ino() const { return at<3>().valid(); } + uint64_t ino() const { return at<3>().as_uint64(); } + bool has_pathbuf() const { return at<4>().valid(); } + ::protozero::ConstChars pathbuf() const { return at<4>().as_string(); } + bool has_pid() const { return at<5>().valid(); } + int32_t pid() const { return at<5>().as_int32(); } +}; + +class AndroidFsFsyncStartFtraceEvent : public ::protozero::Message { + public: + using Decoder = AndroidFsFsyncStartFtraceEvent_Decoder; + enum : int32_t { + kCmdlineFieldNumber = 1, + kISizeFieldNumber = 2, + kInoFieldNumber = 3, + kPathbufFieldNumber = 4, + kPidFieldNumber = 5, + }; + static constexpr const char* GetName() { return ".perfetto.protos.AndroidFsFsyncStartFtraceEvent"; } + + + using FieldMetadata_Cmdline = + ::protozero::proto_utils::FieldMetadata< + 1, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kString, + std::string, + AndroidFsFsyncStartFtraceEvent>; + + static constexpr FieldMetadata_Cmdline kCmdline{}; + void set_cmdline(const char* data, size_t size) { + AppendBytes(FieldMetadata_Cmdline::kFieldId, data, size); + } + void set_cmdline(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Cmdline::kFieldId, chars.data, chars.size); + } + void set_cmdline(std::string value) { + static constexpr uint32_t field_id = FieldMetadata_Cmdline::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kString> + ::Append(*this, field_id, value); + } + + using FieldMetadata_ISize = + ::protozero::proto_utils::FieldMetadata< + 2, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kInt64, + int64_t, + AndroidFsFsyncStartFtraceEvent>; + + static constexpr FieldMetadata_ISize kISize{}; + void set_i_size(int64_t value) { + static constexpr uint32_t field_id = FieldMetadata_ISize::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kInt64> + ::Append(*this, field_id, value); + } + + using FieldMetadata_Ino = + ::protozero::proto_utils::FieldMetadata< + 3, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint64, + uint64_t, + AndroidFsFsyncStartFtraceEvent>; + + static constexpr FieldMetadata_Ino kIno{}; + void set_ino(uint64_t value) { + static constexpr uint32_t field_id = FieldMetadata_Ino::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint64> + ::Append(*this, field_id, value); + } + + using FieldMetadata_Pathbuf = + ::protozero::proto_utils::FieldMetadata< + 4, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kString, + std::string, + AndroidFsFsyncStartFtraceEvent>; + + static constexpr FieldMetadata_Pathbuf kPathbuf{}; + void set_pathbuf(const char* data, size_t size) { + AppendBytes(FieldMetadata_Pathbuf::kFieldId, data, size); + } + void set_pathbuf(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Pathbuf::kFieldId, chars.data, chars.size); + } + void set_pathbuf(std::string value) { + static constexpr uint32_t field_id = FieldMetadata_Pathbuf::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kString> + ::Append(*this, field_id, value); + } + + using FieldMetadata_Pid = + ::protozero::proto_utils::FieldMetadata< + 5, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kInt32, + int32_t, + AndroidFsFsyncStartFtraceEvent>; + + static constexpr FieldMetadata_Pid kPid{}; + void set_pid(int32_t value) { + static constexpr uint32_t field_id = FieldMetadata_Pid::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kInt32> + ::Append(*this, field_id, value); + } +}; + +class AndroidFsFsyncEndFtraceEvent_Decoder : public ::protozero::TypedProtoDecoder { + public: + AndroidFsFsyncEndFtraceEvent_Decoder(const uint8_t* data, size_t len) : TypedProtoDecoder(data, len) {} + explicit AndroidFsFsyncEndFtraceEvent_Decoder(const std::string& raw) : TypedProtoDecoder(reinterpret_cast(raw.data()), raw.size()) {} + explicit AndroidFsFsyncEndFtraceEvent_Decoder(const ::protozero::ConstBytes& raw) : TypedProtoDecoder(raw.data, raw.size) {} + bool has_bytes() const { return at<1>().valid(); } + int32_t bytes() const { return at<1>().as_int32(); } + bool has_ino() const { return at<2>().valid(); } + uint64_t ino() const { return at<2>().as_uint64(); } + bool has_offset() const { return at<3>().valid(); } + int64_t offset() const { return at<3>().as_int64(); } +}; + +class AndroidFsFsyncEndFtraceEvent : public ::protozero::Message { + public: + using Decoder = AndroidFsFsyncEndFtraceEvent_Decoder; + enum : int32_t { + kBytesFieldNumber = 1, + kInoFieldNumber = 2, + kOffsetFieldNumber = 3, + }; + static constexpr const char* GetName() { return ".perfetto.protos.AndroidFsFsyncEndFtraceEvent"; } + + + using FieldMetadata_Bytes = + ::protozero::proto_utils::FieldMetadata< + 1, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kInt32, + int32_t, + AndroidFsFsyncEndFtraceEvent>; + + static constexpr FieldMetadata_Bytes kBytes{}; + void set_bytes(int32_t value) { + static constexpr uint32_t field_id = FieldMetadata_Bytes::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kInt32> + ::Append(*this, field_id, value); + } + + using FieldMetadata_Ino = + ::protozero::proto_utils::FieldMetadata< + 2, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint64, + uint64_t, + AndroidFsFsyncEndFtraceEvent>; + + static constexpr FieldMetadata_Ino kIno{}; + void set_ino(uint64_t value) { + static constexpr uint32_t field_id = FieldMetadata_Ino::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint64> + ::Append(*this, field_id, value); + } + + using FieldMetadata_Offset = + ::protozero::proto_utils::FieldMetadata< + 3, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kInt64, + int64_t, + AndroidFsFsyncEndFtraceEvent>; + + static constexpr FieldMetadata_Offset kOffset{}; + void set_offset(int64_t value) { + static constexpr uint32_t field_id = FieldMetadata_Offset::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kInt64> + ::Append(*this, field_id, value); + } +}; + +class AndroidFsDatawriteStartFtraceEvent_Decoder : public ::protozero::TypedProtoDecoder { + public: + AndroidFsDatawriteStartFtraceEvent_Decoder(const uint8_t* data, size_t len) : TypedProtoDecoder(data, len) {} + explicit AndroidFsDatawriteStartFtraceEvent_Decoder(const std::string& raw) : TypedProtoDecoder(reinterpret_cast(raw.data()), raw.size()) {} + explicit AndroidFsDatawriteStartFtraceEvent_Decoder(const ::protozero::ConstBytes& raw) : TypedProtoDecoder(raw.data, raw.size) {} + bool has_bytes() const { return at<1>().valid(); } + int32_t bytes() const { return at<1>().as_int32(); } + bool has_cmdline() const { return at<2>().valid(); } + ::protozero::ConstChars cmdline() const { return at<2>().as_string(); } + bool has_i_size() const { return at<3>().valid(); } + int64_t i_size() const { return at<3>().as_int64(); } + bool has_ino() const { return at<4>().valid(); } + uint64_t ino() const { return at<4>().as_uint64(); } + bool has_offset() const { return at<5>().valid(); } + int64_t offset() const { return at<5>().as_int64(); } + bool has_pathbuf() const { return at<6>().valid(); } + ::protozero::ConstChars pathbuf() const { return at<6>().as_string(); } + bool has_pid() const { return at<7>().valid(); } + int32_t pid() const { return at<7>().as_int32(); } +}; + +class AndroidFsDatawriteStartFtraceEvent : public ::protozero::Message { + public: + using Decoder = AndroidFsDatawriteStartFtraceEvent_Decoder; + enum : int32_t { + kBytesFieldNumber = 1, + kCmdlineFieldNumber = 2, + kISizeFieldNumber = 3, + kInoFieldNumber = 4, + kOffsetFieldNumber = 5, + kPathbufFieldNumber = 6, + kPidFieldNumber = 7, + }; + static constexpr const char* GetName() { return ".perfetto.protos.AndroidFsDatawriteStartFtraceEvent"; } + + + using FieldMetadata_Bytes = + ::protozero::proto_utils::FieldMetadata< + 1, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kInt32, + int32_t, + AndroidFsDatawriteStartFtraceEvent>; + + static constexpr FieldMetadata_Bytes kBytes{}; + void set_bytes(int32_t value) { + static constexpr uint32_t field_id = FieldMetadata_Bytes::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kInt32> + ::Append(*this, field_id, value); + } + + using FieldMetadata_Cmdline = + ::protozero::proto_utils::FieldMetadata< + 2, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kString, + std::string, + AndroidFsDatawriteStartFtraceEvent>; + + static constexpr FieldMetadata_Cmdline kCmdline{}; + void set_cmdline(const char* data, size_t size) { + AppendBytes(FieldMetadata_Cmdline::kFieldId, data, size); + } + void set_cmdline(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Cmdline::kFieldId, chars.data, chars.size); + } + void set_cmdline(std::string value) { + static constexpr uint32_t field_id = FieldMetadata_Cmdline::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kString> + ::Append(*this, field_id, value); + } + + using FieldMetadata_ISize = + ::protozero::proto_utils::FieldMetadata< + 3, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kInt64, + int64_t, + AndroidFsDatawriteStartFtraceEvent>; + + static constexpr FieldMetadata_ISize kISize{}; + void set_i_size(int64_t value) { + static constexpr uint32_t field_id = FieldMetadata_ISize::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kInt64> + ::Append(*this, field_id, value); + } + + using FieldMetadata_Ino = + ::protozero::proto_utils::FieldMetadata< + 4, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint64, + uint64_t, + AndroidFsDatawriteStartFtraceEvent>; + + static constexpr FieldMetadata_Ino kIno{}; + void set_ino(uint64_t value) { + static constexpr uint32_t field_id = FieldMetadata_Ino::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint64> + ::Append(*this, field_id, value); + } + + using FieldMetadata_Offset = + ::protozero::proto_utils::FieldMetadata< + 5, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kInt64, + int64_t, + AndroidFsDatawriteStartFtraceEvent>; + + static constexpr FieldMetadata_Offset kOffset{}; + void set_offset(int64_t value) { + static constexpr uint32_t field_id = FieldMetadata_Offset::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kInt64> + ::Append(*this, field_id, value); + } + + using FieldMetadata_Pathbuf = + ::protozero::proto_utils::FieldMetadata< + 6, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kString, + std::string, + AndroidFsDatawriteStartFtraceEvent>; + + static constexpr FieldMetadata_Pathbuf kPathbuf{}; + void set_pathbuf(const char* data, size_t size) { + AppendBytes(FieldMetadata_Pathbuf::kFieldId, data, size); + } + void set_pathbuf(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Pathbuf::kFieldId, chars.data, chars.size); + } + void set_pathbuf(std::string value) { + static constexpr uint32_t field_id = FieldMetadata_Pathbuf::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kString> + ::Append(*this, field_id, value); + } + + using FieldMetadata_Pid = + ::protozero::proto_utils::FieldMetadata< + 7, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kInt32, + int32_t, + AndroidFsDatawriteStartFtraceEvent>; + + static constexpr FieldMetadata_Pid kPid{}; + void set_pid(int32_t value) { + static constexpr uint32_t field_id = FieldMetadata_Pid::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kInt32> + ::Append(*this, field_id, value); + } +}; + +class AndroidFsDatawriteEndFtraceEvent_Decoder : public ::protozero::TypedProtoDecoder { + public: + AndroidFsDatawriteEndFtraceEvent_Decoder(const uint8_t* data, size_t len) : TypedProtoDecoder(data, len) {} + explicit AndroidFsDatawriteEndFtraceEvent_Decoder(const std::string& raw) : TypedProtoDecoder(reinterpret_cast(raw.data()), raw.size()) {} + explicit AndroidFsDatawriteEndFtraceEvent_Decoder(const ::protozero::ConstBytes& raw) : TypedProtoDecoder(raw.data, raw.size) {} + bool has_bytes() const { return at<1>().valid(); } + int32_t bytes() const { return at<1>().as_int32(); } + bool has_ino() const { return at<2>().valid(); } + uint64_t ino() const { return at<2>().as_uint64(); } + bool has_offset() const { return at<3>().valid(); } + int64_t offset() const { return at<3>().as_int64(); } +}; + +class AndroidFsDatawriteEndFtraceEvent : public ::protozero::Message { + public: + using Decoder = AndroidFsDatawriteEndFtraceEvent_Decoder; + enum : int32_t { + kBytesFieldNumber = 1, + kInoFieldNumber = 2, + kOffsetFieldNumber = 3, + }; + static constexpr const char* GetName() { return ".perfetto.protos.AndroidFsDatawriteEndFtraceEvent"; } + + + using FieldMetadata_Bytes = + ::protozero::proto_utils::FieldMetadata< + 1, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kInt32, + int32_t, + AndroidFsDatawriteEndFtraceEvent>; + + static constexpr FieldMetadata_Bytes kBytes{}; + void set_bytes(int32_t value) { + static constexpr uint32_t field_id = FieldMetadata_Bytes::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kInt32> + ::Append(*this, field_id, value); + } + + using FieldMetadata_Ino = + ::protozero::proto_utils::FieldMetadata< + 2, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint64, + uint64_t, + AndroidFsDatawriteEndFtraceEvent>; + + static constexpr FieldMetadata_Ino kIno{}; + void set_ino(uint64_t value) { + static constexpr uint32_t field_id = FieldMetadata_Ino::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint64> + ::Append(*this, field_id, value); + } + + using FieldMetadata_Offset = + ::protozero::proto_utils::FieldMetadata< + 3, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kInt64, + int64_t, + AndroidFsDatawriteEndFtraceEvent>; + + static constexpr FieldMetadata_Offset kOffset{}; + void set_offset(int64_t value) { + static constexpr uint32_t field_id = FieldMetadata_Offset::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kInt64> + ::Append(*this, field_id, value); + } +}; + +class AndroidFsDatareadStartFtraceEvent_Decoder : public ::protozero::TypedProtoDecoder { + public: + AndroidFsDatareadStartFtraceEvent_Decoder(const uint8_t* data, size_t len) : TypedProtoDecoder(data, len) {} + explicit AndroidFsDatareadStartFtraceEvent_Decoder(const std::string& raw) : TypedProtoDecoder(reinterpret_cast(raw.data()), raw.size()) {} + explicit AndroidFsDatareadStartFtraceEvent_Decoder(const ::protozero::ConstBytes& raw) : TypedProtoDecoder(raw.data, raw.size) {} + bool has_bytes() const { return at<1>().valid(); } + int32_t bytes() const { return at<1>().as_int32(); } + bool has_cmdline() const { return at<2>().valid(); } + ::protozero::ConstChars cmdline() const { return at<2>().as_string(); } + bool has_i_size() const { return at<3>().valid(); } + int64_t i_size() const { return at<3>().as_int64(); } + bool has_ino() const { return at<4>().valid(); } + uint64_t ino() const { return at<4>().as_uint64(); } + bool has_offset() const { return at<5>().valid(); } + int64_t offset() const { return at<5>().as_int64(); } + bool has_pathbuf() const { return at<6>().valid(); } + ::protozero::ConstChars pathbuf() const { return at<6>().as_string(); } + bool has_pid() const { return at<7>().valid(); } + int32_t pid() const { return at<7>().as_int32(); } +}; + +class AndroidFsDatareadStartFtraceEvent : public ::protozero::Message { + public: + using Decoder = AndroidFsDatareadStartFtraceEvent_Decoder; + enum : int32_t { + kBytesFieldNumber = 1, + kCmdlineFieldNumber = 2, + kISizeFieldNumber = 3, + kInoFieldNumber = 4, + kOffsetFieldNumber = 5, + kPathbufFieldNumber = 6, + kPidFieldNumber = 7, + }; + static constexpr const char* GetName() { return ".perfetto.protos.AndroidFsDatareadStartFtraceEvent"; } + + + using FieldMetadata_Bytes = + ::protozero::proto_utils::FieldMetadata< + 1, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kInt32, + int32_t, + AndroidFsDatareadStartFtraceEvent>; + + static constexpr FieldMetadata_Bytes kBytes{}; + void set_bytes(int32_t value) { + static constexpr uint32_t field_id = FieldMetadata_Bytes::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kInt32> + ::Append(*this, field_id, value); + } + + using FieldMetadata_Cmdline = + ::protozero::proto_utils::FieldMetadata< + 2, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kString, + std::string, + AndroidFsDatareadStartFtraceEvent>; + + static constexpr FieldMetadata_Cmdline kCmdline{}; + void set_cmdline(const char* data, size_t size) { + AppendBytes(FieldMetadata_Cmdline::kFieldId, data, size); + } + void set_cmdline(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Cmdline::kFieldId, chars.data, chars.size); + } + void set_cmdline(std::string value) { + static constexpr uint32_t field_id = FieldMetadata_Cmdline::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kString> + ::Append(*this, field_id, value); + } + + using FieldMetadata_ISize = + ::protozero::proto_utils::FieldMetadata< + 3, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kInt64, + int64_t, + AndroidFsDatareadStartFtraceEvent>; + + static constexpr FieldMetadata_ISize kISize{}; + void set_i_size(int64_t value) { + static constexpr uint32_t field_id = FieldMetadata_ISize::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kInt64> + ::Append(*this, field_id, value); + } + + using FieldMetadata_Ino = + ::protozero::proto_utils::FieldMetadata< + 4, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint64, + uint64_t, + AndroidFsDatareadStartFtraceEvent>; + + static constexpr FieldMetadata_Ino kIno{}; + void set_ino(uint64_t value) { + static constexpr uint32_t field_id = FieldMetadata_Ino::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint64> + ::Append(*this, field_id, value); + } + + using FieldMetadata_Offset = + ::protozero::proto_utils::FieldMetadata< + 5, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kInt64, + int64_t, + AndroidFsDatareadStartFtraceEvent>; + + static constexpr FieldMetadata_Offset kOffset{}; + void set_offset(int64_t value) { + static constexpr uint32_t field_id = FieldMetadata_Offset::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kInt64> + ::Append(*this, field_id, value); + } + + using FieldMetadata_Pathbuf = + ::protozero::proto_utils::FieldMetadata< + 6, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kString, + std::string, + AndroidFsDatareadStartFtraceEvent>; + + static constexpr FieldMetadata_Pathbuf kPathbuf{}; + void set_pathbuf(const char* data, size_t size) { + AppendBytes(FieldMetadata_Pathbuf::kFieldId, data, size); + } + void set_pathbuf(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Pathbuf::kFieldId, chars.data, chars.size); + } + void set_pathbuf(std::string value) { + static constexpr uint32_t field_id = FieldMetadata_Pathbuf::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kString> + ::Append(*this, field_id, value); + } + + using FieldMetadata_Pid = + ::protozero::proto_utils::FieldMetadata< + 7, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kInt32, + int32_t, + AndroidFsDatareadStartFtraceEvent>; + + static constexpr FieldMetadata_Pid kPid{}; + void set_pid(int32_t value) { + static constexpr uint32_t field_id = FieldMetadata_Pid::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kInt32> + ::Append(*this, field_id, value); + } +}; + +class AndroidFsDatareadEndFtraceEvent_Decoder : public ::protozero::TypedProtoDecoder { + public: + AndroidFsDatareadEndFtraceEvent_Decoder(const uint8_t* data, size_t len) : TypedProtoDecoder(data, len) {} + explicit AndroidFsDatareadEndFtraceEvent_Decoder(const std::string& raw) : TypedProtoDecoder(reinterpret_cast(raw.data()), raw.size()) {} + explicit AndroidFsDatareadEndFtraceEvent_Decoder(const ::protozero::ConstBytes& raw) : TypedProtoDecoder(raw.data, raw.size) {} + bool has_bytes() const { return at<1>().valid(); } + int32_t bytes() const { return at<1>().as_int32(); } + bool has_ino() const { return at<2>().valid(); } + uint64_t ino() const { return at<2>().as_uint64(); } + bool has_offset() const { return at<3>().valid(); } + int64_t offset() const { return at<3>().as_int64(); } +}; + +class AndroidFsDatareadEndFtraceEvent : public ::protozero::Message { + public: + using Decoder = AndroidFsDatareadEndFtraceEvent_Decoder; + enum : int32_t { + kBytesFieldNumber = 1, + kInoFieldNumber = 2, + kOffsetFieldNumber = 3, + }; + static constexpr const char* GetName() { return ".perfetto.protos.AndroidFsDatareadEndFtraceEvent"; } + + + using FieldMetadata_Bytes = + ::protozero::proto_utils::FieldMetadata< + 1, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kInt32, + int32_t, + AndroidFsDatareadEndFtraceEvent>; + + static constexpr FieldMetadata_Bytes kBytes{}; + void set_bytes(int32_t value) { + static constexpr uint32_t field_id = FieldMetadata_Bytes::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kInt32> + ::Append(*this, field_id, value); + } + + using FieldMetadata_Ino = + ::protozero::proto_utils::FieldMetadata< + 2, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint64, + uint64_t, + AndroidFsDatareadEndFtraceEvent>; + + static constexpr FieldMetadata_Ino kIno{}; + void set_ino(uint64_t value) { + static constexpr uint32_t field_id = FieldMetadata_Ino::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint64> + ::Append(*this, field_id, value); + } + + using FieldMetadata_Offset = + ::protozero::proto_utils::FieldMetadata< + 3, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kInt64, + int64_t, + AndroidFsDatareadEndFtraceEvent>; + + static constexpr FieldMetadata_Offset kOffset{}; + void set_offset(int64_t value) { + static constexpr uint32_t field_id = FieldMetadata_Offset::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kInt64> + ::Append(*this, field_id, value); + } +}; + } // Namespace. } // Namespace. } // Namespace. @@ -56488,14 +59287,7 @@ class BinderTransactionAllocBufFtraceEvent : public ::protozero::Message { uint64_t, BinderTransactionAllocBufFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_DataSize kDataSize() { return {}; } + static constexpr FieldMetadata_DataSize kDataSize{}; void set_data_size(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_DataSize::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -56513,14 +59305,7 @@ class BinderTransactionAllocBufFtraceEvent : public ::protozero::Message { int32_t, BinderTransactionAllocBufFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_DebugId kDebugId() { return {}; } + static constexpr FieldMetadata_DebugId kDebugId{}; void set_debug_id(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_DebugId::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -56538,14 +59323,7 @@ class BinderTransactionAllocBufFtraceEvent : public ::protozero::Message { uint64_t, BinderTransactionAllocBufFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_OffsetsSize kOffsetsSize() { return {}; } + static constexpr FieldMetadata_OffsetsSize kOffsetsSize{}; void set_offsets_size(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_OffsetsSize::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -56563,14 +59341,7 @@ class BinderTransactionAllocBufFtraceEvent : public ::protozero::Message { uint64_t, BinderTransactionAllocBufFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ExtraBuffersSize kExtraBuffersSize() { return {}; } + static constexpr FieldMetadata_ExtraBuffersSize kExtraBuffersSize{}; void set_extra_buffers_size(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_ExtraBuffersSize::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -56607,17 +59378,13 @@ class BinderUnlockFtraceEvent : public ::protozero::Message { std::string, BinderUnlockFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Tag kTag() { return {}; } + static constexpr FieldMetadata_Tag kTag{}; void set_tag(const char* data, size_t size) { AppendBytes(FieldMetadata_Tag::kFieldId, data, size); } + void set_tag(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Tag::kFieldId, chars.data, chars.size); + } void set_tag(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Tag::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -56654,17 +59421,13 @@ class BinderLockedFtraceEvent : public ::protozero::Message { std::string, BinderLockedFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Tag kTag() { return {}; } + static constexpr FieldMetadata_Tag kTag{}; void set_tag(const char* data, size_t size) { AppendBytes(FieldMetadata_Tag::kFieldId, data, size); } + void set_tag(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Tag::kFieldId, chars.data, chars.size); + } void set_tag(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Tag::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -56701,17 +59464,13 @@ class BinderLockFtraceEvent : public ::protozero::Message { std::string, BinderLockFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Tag kTag() { return {}; } + static constexpr FieldMetadata_Tag kTag{}; void set_tag(const char* data, size_t size) { AppendBytes(FieldMetadata_Tag::kFieldId, data, size); } + void set_tag(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Tag::kFieldId, chars.data, chars.size); + } void set_tag(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Tag::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -56760,14 +59519,7 @@ class BinderSetPriorityFtraceEvent : public ::protozero::Message { int32_t, BinderSetPriorityFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Proc kProc() { return {}; } + static constexpr FieldMetadata_Proc kProc{}; void set_proc(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Proc::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -56785,14 +59537,7 @@ class BinderSetPriorityFtraceEvent : public ::protozero::Message { int32_t, BinderSetPriorityFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Thread kThread() { return {}; } + static constexpr FieldMetadata_Thread kThread{}; void set_thread(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Thread::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -56810,14 +59555,7 @@ class BinderSetPriorityFtraceEvent : public ::protozero::Message { uint32_t, BinderSetPriorityFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_OldPrio kOldPrio() { return {}; } + static constexpr FieldMetadata_OldPrio kOldPrio{}; void set_old_prio(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_OldPrio::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -56835,14 +59573,7 @@ class BinderSetPriorityFtraceEvent : public ::protozero::Message { uint32_t, BinderSetPriorityFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_NewPrio kNewPrio() { return {}; } + static constexpr FieldMetadata_NewPrio kNewPrio{}; void set_new_prio(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_NewPrio::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -56860,14 +59591,7 @@ class BinderSetPriorityFtraceEvent : public ::protozero::Message { uint32_t, BinderSetPriorityFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_DesiredPrio kDesiredPrio() { return {}; } + static constexpr FieldMetadata_DesiredPrio kDesiredPrio{}; void set_desired_prio(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_DesiredPrio::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -56904,14 +59628,7 @@ class BinderTransactionReceivedFtraceEvent : public ::protozero::Message { int32_t, BinderTransactionReceivedFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_DebugId kDebugId() { return {}; } + static constexpr FieldMetadata_DebugId kDebugId{}; void set_debug_id(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_DebugId::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -56966,14 +59683,7 @@ class BinderTransactionFtraceEvent : public ::protozero::Message { int32_t, BinderTransactionFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_DebugId kDebugId() { return {}; } + static constexpr FieldMetadata_DebugId kDebugId{}; void set_debug_id(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_DebugId::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -56991,14 +59701,7 @@ class BinderTransactionFtraceEvent : public ::protozero::Message { int32_t, BinderTransactionFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_TargetNode kTargetNode() { return {}; } + static constexpr FieldMetadata_TargetNode kTargetNode{}; void set_target_node(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_TargetNode::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -57016,14 +59719,7 @@ class BinderTransactionFtraceEvent : public ::protozero::Message { int32_t, BinderTransactionFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ToProc kToProc() { return {}; } + static constexpr FieldMetadata_ToProc kToProc{}; void set_to_proc(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_ToProc::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -57041,14 +59737,7 @@ class BinderTransactionFtraceEvent : public ::protozero::Message { int32_t, BinderTransactionFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ToThread kToThread() { return {}; } + static constexpr FieldMetadata_ToThread kToThread{}; void set_to_thread(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_ToThread::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -57066,14 +59755,7 @@ class BinderTransactionFtraceEvent : public ::protozero::Message { int32_t, BinderTransactionFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Reply kReply() { return {}; } + static constexpr FieldMetadata_Reply kReply{}; void set_reply(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Reply::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -57091,14 +59773,7 @@ class BinderTransactionFtraceEvent : public ::protozero::Message { uint32_t, BinderTransactionFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Code kCode() { return {}; } + static constexpr FieldMetadata_Code kCode{}; void set_code(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Code::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -57116,14 +59791,7 @@ class BinderTransactionFtraceEvent : public ::protozero::Message { uint32_t, BinderTransactionFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Flags kFlags() { return {}; } + static constexpr FieldMetadata_Flags kFlags{}; void set_flags(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Flags::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -57187,14 +59855,7 @@ class BlockUnplugFtraceEvent : public ::protozero::Message { int32_t, BlockUnplugFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_NrRq kNrRq() { return {}; } + static constexpr FieldMetadata_NrRq kNrRq{}; void set_nr_rq(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_NrRq::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -57212,17 +59873,13 @@ class BlockUnplugFtraceEvent : public ::protozero::Message { std::string, BlockUnplugFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Comm kComm() { return {}; } + static constexpr FieldMetadata_Comm kComm{}; void set_comm(const char* data, size_t size) { AppendBytes(FieldMetadata_Comm::kFieldId, data, size); } + void set_comm(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Comm::kFieldId, chars.data, chars.size); + } void set_comm(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Comm::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -57265,14 +59922,7 @@ class BlockTouchBufferFtraceEvent : public ::protozero::Message { uint64_t, BlockTouchBufferFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Dev kDev() { return {}; } + static constexpr FieldMetadata_Dev kDev{}; void set_dev(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Dev::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -57290,14 +59940,7 @@ class BlockTouchBufferFtraceEvent : public ::protozero::Message { uint64_t, BlockTouchBufferFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Sector kSector() { return {}; } + static constexpr FieldMetadata_Sector kSector{}; void set_sector(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Sector::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -57315,14 +59958,7 @@ class BlockTouchBufferFtraceEvent : public ::protozero::Message { uint64_t, BlockTouchBufferFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Size kSize() { return {}; } + static constexpr FieldMetadata_Size kSize{}; void set_size(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Size::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -57371,14 +60007,7 @@ class BlockSplitFtraceEvent : public ::protozero::Message { uint64_t, BlockSplitFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Dev kDev() { return {}; } + static constexpr FieldMetadata_Dev kDev{}; void set_dev(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Dev::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -57396,14 +60025,7 @@ class BlockSplitFtraceEvent : public ::protozero::Message { uint64_t, BlockSplitFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Sector kSector() { return {}; } + static constexpr FieldMetadata_Sector kSector{}; void set_sector(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Sector::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -57421,14 +60043,7 @@ class BlockSplitFtraceEvent : public ::protozero::Message { uint64_t, BlockSplitFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_NewSector kNewSector() { return {}; } + static constexpr FieldMetadata_NewSector kNewSector{}; void set_new_sector(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_NewSector::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -57446,17 +60061,13 @@ class BlockSplitFtraceEvent : public ::protozero::Message { std::string, BlockSplitFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Rwbs kRwbs() { return {}; } + static constexpr FieldMetadata_Rwbs kRwbs{}; void set_rwbs(const char* data, size_t size) { AppendBytes(FieldMetadata_Rwbs::kFieldId, data, size); } + void set_rwbs(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Rwbs::kFieldId, chars.data, chars.size); + } void set_rwbs(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Rwbs::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -57474,17 +60085,13 @@ class BlockSplitFtraceEvent : public ::protozero::Message { std::string, BlockSplitFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Comm kComm() { return {}; } + static constexpr FieldMetadata_Comm kComm{}; void set_comm(const char* data, size_t size) { AppendBytes(FieldMetadata_Comm::kFieldId, data, size); } + void set_comm(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Comm::kFieldId, chars.data, chars.size); + } void set_comm(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Comm::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -57533,14 +60140,7 @@ class BlockSleeprqFtraceEvent : public ::protozero::Message { uint64_t, BlockSleeprqFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Dev kDev() { return {}; } + static constexpr FieldMetadata_Dev kDev{}; void set_dev(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Dev::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -57558,14 +60158,7 @@ class BlockSleeprqFtraceEvent : public ::protozero::Message { uint64_t, BlockSleeprqFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Sector kSector() { return {}; } + static constexpr FieldMetadata_Sector kSector{}; void set_sector(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Sector::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -57583,14 +60176,7 @@ class BlockSleeprqFtraceEvent : public ::protozero::Message { uint32_t, BlockSleeprqFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_NrSector kNrSector() { return {}; } + static constexpr FieldMetadata_NrSector kNrSector{}; void set_nr_sector(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_NrSector::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -57608,17 +60194,13 @@ class BlockSleeprqFtraceEvent : public ::protozero::Message { std::string, BlockSleeprqFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Rwbs kRwbs() { return {}; } + static constexpr FieldMetadata_Rwbs kRwbs{}; void set_rwbs(const char* data, size_t size) { AppendBytes(FieldMetadata_Rwbs::kFieldId, data, size); } + void set_rwbs(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Rwbs::kFieldId, chars.data, chars.size); + } void set_rwbs(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Rwbs::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -57636,17 +60218,13 @@ class BlockSleeprqFtraceEvent : public ::protozero::Message { std::string, BlockSleeprqFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Comm kComm() { return {}; } + static constexpr FieldMetadata_Comm kComm{}; void set_comm(const char* data, size_t size) { AppendBytes(FieldMetadata_Comm::kFieldId, data, size); } + void set_comm(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Comm::kFieldId, chars.data, chars.size); + } void set_comm(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Comm::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -57698,14 +60276,7 @@ class BlockRqRequeueFtraceEvent : public ::protozero::Message { uint64_t, BlockRqRequeueFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Dev kDev() { return {}; } + static constexpr FieldMetadata_Dev kDev{}; void set_dev(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Dev::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -57723,14 +60294,7 @@ class BlockRqRequeueFtraceEvent : public ::protozero::Message { uint64_t, BlockRqRequeueFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Sector kSector() { return {}; } + static constexpr FieldMetadata_Sector kSector{}; void set_sector(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Sector::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -57748,14 +60312,7 @@ class BlockRqRequeueFtraceEvent : public ::protozero::Message { uint32_t, BlockRqRequeueFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_NrSector kNrSector() { return {}; } + static constexpr FieldMetadata_NrSector kNrSector{}; void set_nr_sector(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_NrSector::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -57773,14 +60330,7 @@ class BlockRqRequeueFtraceEvent : public ::protozero::Message { int32_t, BlockRqRequeueFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Errors kErrors() { return {}; } + static constexpr FieldMetadata_Errors kErrors{}; void set_errors(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Errors::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -57798,17 +60348,13 @@ class BlockRqRequeueFtraceEvent : public ::protozero::Message { std::string, BlockRqRequeueFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Rwbs kRwbs() { return {}; } + static constexpr FieldMetadata_Rwbs kRwbs{}; void set_rwbs(const char* data, size_t size) { AppendBytes(FieldMetadata_Rwbs::kFieldId, data, size); } + void set_rwbs(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Rwbs::kFieldId, chars.data, chars.size); + } void set_rwbs(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Rwbs::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -57826,17 +60372,13 @@ class BlockRqRequeueFtraceEvent : public ::protozero::Message { std::string, BlockRqRequeueFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Cmd kCmd() { return {}; } + static constexpr FieldMetadata_Cmd kCmd{}; void set_cmd(const char* data, size_t size) { AppendBytes(FieldMetadata_Cmd::kFieldId, data, size); } + void set_cmd(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Cmd::kFieldId, chars.data, chars.size); + } void set_cmd(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Cmd::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -57891,14 +60433,7 @@ class BlockRqRemapFtraceEvent : public ::protozero::Message { uint64_t, BlockRqRemapFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Dev kDev() { return {}; } + static constexpr FieldMetadata_Dev kDev{}; void set_dev(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Dev::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -57916,14 +60451,7 @@ class BlockRqRemapFtraceEvent : public ::protozero::Message { uint64_t, BlockRqRemapFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Sector kSector() { return {}; } + static constexpr FieldMetadata_Sector kSector{}; void set_sector(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Sector::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -57941,14 +60469,7 @@ class BlockRqRemapFtraceEvent : public ::protozero::Message { uint32_t, BlockRqRemapFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_NrSector kNrSector() { return {}; } + static constexpr FieldMetadata_NrSector kNrSector{}; void set_nr_sector(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_NrSector::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -57966,14 +60487,7 @@ class BlockRqRemapFtraceEvent : public ::protozero::Message { uint64_t, BlockRqRemapFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_OldDev kOldDev() { return {}; } + static constexpr FieldMetadata_OldDev kOldDev{}; void set_old_dev(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_OldDev::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -57991,14 +60505,7 @@ class BlockRqRemapFtraceEvent : public ::protozero::Message { uint64_t, BlockRqRemapFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_OldSector kOldSector() { return {}; } + static constexpr FieldMetadata_OldSector kOldSector{}; void set_old_sector(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_OldSector::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -58016,14 +60523,7 @@ class BlockRqRemapFtraceEvent : public ::protozero::Message { uint32_t, BlockRqRemapFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_NrBios kNrBios() { return {}; } + static constexpr FieldMetadata_NrBios kNrBios{}; void set_nr_bios(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_NrBios::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -58041,17 +60541,13 @@ class BlockRqRemapFtraceEvent : public ::protozero::Message { std::string, BlockRqRemapFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Rwbs kRwbs() { return {}; } + static constexpr FieldMetadata_Rwbs kRwbs{}; void set_rwbs(const char* data, size_t size) { AppendBytes(FieldMetadata_Rwbs::kFieldId, data, size); } + void set_rwbs(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Rwbs::kFieldId, chars.data, chars.size); + } void set_rwbs(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Rwbs::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -58106,14 +60602,7 @@ class BlockRqInsertFtraceEvent : public ::protozero::Message { uint64_t, BlockRqInsertFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Dev kDev() { return {}; } + static constexpr FieldMetadata_Dev kDev{}; void set_dev(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Dev::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -58131,14 +60620,7 @@ class BlockRqInsertFtraceEvent : public ::protozero::Message { uint64_t, BlockRqInsertFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Sector kSector() { return {}; } + static constexpr FieldMetadata_Sector kSector{}; void set_sector(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Sector::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -58156,14 +60638,7 @@ class BlockRqInsertFtraceEvent : public ::protozero::Message { uint32_t, BlockRqInsertFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_NrSector kNrSector() { return {}; } + static constexpr FieldMetadata_NrSector kNrSector{}; void set_nr_sector(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_NrSector::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -58181,14 +60656,7 @@ class BlockRqInsertFtraceEvent : public ::protozero::Message { uint32_t, BlockRqInsertFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Bytes kBytes() { return {}; } + static constexpr FieldMetadata_Bytes kBytes{}; void set_bytes(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Bytes::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -58206,17 +60674,13 @@ class BlockRqInsertFtraceEvent : public ::protozero::Message { std::string, BlockRqInsertFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Rwbs kRwbs() { return {}; } + static constexpr FieldMetadata_Rwbs kRwbs{}; void set_rwbs(const char* data, size_t size) { AppendBytes(FieldMetadata_Rwbs::kFieldId, data, size); } + void set_rwbs(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Rwbs::kFieldId, chars.data, chars.size); + } void set_rwbs(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Rwbs::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -58234,17 +60698,13 @@ class BlockRqInsertFtraceEvent : public ::protozero::Message { std::string, BlockRqInsertFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Comm kComm() { return {}; } + static constexpr FieldMetadata_Comm kComm{}; void set_comm(const char* data, size_t size) { AppendBytes(FieldMetadata_Comm::kFieldId, data, size); } + void set_comm(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Comm::kFieldId, chars.data, chars.size); + } void set_comm(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Comm::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -58262,17 +60722,13 @@ class BlockRqInsertFtraceEvent : public ::protozero::Message { std::string, BlockRqInsertFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Cmd kCmd() { return {}; } + static constexpr FieldMetadata_Cmd kCmd{}; void set_cmd(const char* data, size_t size) { AppendBytes(FieldMetadata_Cmd::kFieldId, data, size); } + void set_cmd(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Cmd::kFieldId, chars.data, chars.size); + } void set_cmd(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Cmd::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -58327,14 +60783,7 @@ class BlockRqCompleteFtraceEvent : public ::protozero::Message { uint64_t, BlockRqCompleteFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Dev kDev() { return {}; } + static constexpr FieldMetadata_Dev kDev{}; void set_dev(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Dev::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -58352,14 +60801,7 @@ class BlockRqCompleteFtraceEvent : public ::protozero::Message { uint64_t, BlockRqCompleteFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Sector kSector() { return {}; } + static constexpr FieldMetadata_Sector kSector{}; void set_sector(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Sector::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -58377,14 +60819,7 @@ class BlockRqCompleteFtraceEvent : public ::protozero::Message { uint32_t, BlockRqCompleteFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_NrSector kNrSector() { return {}; } + static constexpr FieldMetadata_NrSector kNrSector{}; void set_nr_sector(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_NrSector::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -58402,14 +60837,7 @@ class BlockRqCompleteFtraceEvent : public ::protozero::Message { int32_t, BlockRqCompleteFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Errors kErrors() { return {}; } + static constexpr FieldMetadata_Errors kErrors{}; void set_errors(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Errors::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -58427,17 +60855,13 @@ class BlockRqCompleteFtraceEvent : public ::protozero::Message { std::string, BlockRqCompleteFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Rwbs kRwbs() { return {}; } + static constexpr FieldMetadata_Rwbs kRwbs{}; void set_rwbs(const char* data, size_t size) { AppendBytes(FieldMetadata_Rwbs::kFieldId, data, size); } + void set_rwbs(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Rwbs::kFieldId, chars.data, chars.size); + } void set_rwbs(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Rwbs::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -58455,17 +60879,13 @@ class BlockRqCompleteFtraceEvent : public ::protozero::Message { std::string, BlockRqCompleteFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Cmd kCmd() { return {}; } + static constexpr FieldMetadata_Cmd kCmd{}; void set_cmd(const char* data, size_t size) { AppendBytes(FieldMetadata_Cmd::kFieldId, data, size); } + void set_cmd(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Cmd::kFieldId, chars.data, chars.size); + } void set_cmd(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Cmd::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -58483,14 +60903,7 @@ class BlockRqCompleteFtraceEvent : public ::protozero::Message { int32_t, BlockRqCompleteFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Error kError() { return {}; } + static constexpr FieldMetadata_Error kError{}; void set_error(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Error::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -58542,14 +60955,7 @@ class BlockRqAbortFtraceEvent : public ::protozero::Message { uint64_t, BlockRqAbortFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Dev kDev() { return {}; } + static constexpr FieldMetadata_Dev kDev{}; void set_dev(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Dev::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -58567,14 +60973,7 @@ class BlockRqAbortFtraceEvent : public ::protozero::Message { uint64_t, BlockRqAbortFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Sector kSector() { return {}; } + static constexpr FieldMetadata_Sector kSector{}; void set_sector(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Sector::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -58592,14 +60991,7 @@ class BlockRqAbortFtraceEvent : public ::protozero::Message { uint32_t, BlockRqAbortFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_NrSector kNrSector() { return {}; } + static constexpr FieldMetadata_NrSector kNrSector{}; void set_nr_sector(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_NrSector::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -58617,14 +61009,7 @@ class BlockRqAbortFtraceEvent : public ::protozero::Message { int32_t, BlockRqAbortFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Errors kErrors() { return {}; } + static constexpr FieldMetadata_Errors kErrors{}; void set_errors(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Errors::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -58642,17 +61027,13 @@ class BlockRqAbortFtraceEvent : public ::protozero::Message { std::string, BlockRqAbortFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Rwbs kRwbs() { return {}; } + static constexpr FieldMetadata_Rwbs kRwbs{}; void set_rwbs(const char* data, size_t size) { AppendBytes(FieldMetadata_Rwbs::kFieldId, data, size); } + void set_rwbs(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Rwbs::kFieldId, chars.data, chars.size); + } void set_rwbs(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Rwbs::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -58670,17 +61051,13 @@ class BlockRqAbortFtraceEvent : public ::protozero::Message { std::string, BlockRqAbortFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Cmd kCmd() { return {}; } + static constexpr FieldMetadata_Cmd kCmd{}; void set_cmd(const char* data, size_t size) { AppendBytes(FieldMetadata_Cmd::kFieldId, data, size); } + void set_cmd(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Cmd::kFieldId, chars.data, chars.size); + } void set_cmd(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Cmd::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -58717,17 +61094,13 @@ class BlockPlugFtraceEvent : public ::protozero::Message { std::string, BlockPlugFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Comm kComm() { return {}; } + static constexpr FieldMetadata_Comm kComm{}; void set_comm(const char* data, size_t size) { AppendBytes(FieldMetadata_Comm::kFieldId, data, size); } + void set_comm(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Comm::kFieldId, chars.data, chars.size); + } void set_comm(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Comm::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -58776,14 +61149,7 @@ class BlockGetrqFtraceEvent : public ::protozero::Message { uint64_t, BlockGetrqFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Dev kDev() { return {}; } + static constexpr FieldMetadata_Dev kDev{}; void set_dev(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Dev::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -58801,14 +61167,7 @@ class BlockGetrqFtraceEvent : public ::protozero::Message { uint64_t, BlockGetrqFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Sector kSector() { return {}; } + static constexpr FieldMetadata_Sector kSector{}; void set_sector(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Sector::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -58826,14 +61185,7 @@ class BlockGetrqFtraceEvent : public ::protozero::Message { uint32_t, BlockGetrqFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_NrSector kNrSector() { return {}; } + static constexpr FieldMetadata_NrSector kNrSector{}; void set_nr_sector(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_NrSector::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -58851,17 +61203,13 @@ class BlockGetrqFtraceEvent : public ::protozero::Message { std::string, BlockGetrqFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Rwbs kRwbs() { return {}; } + static constexpr FieldMetadata_Rwbs kRwbs{}; void set_rwbs(const char* data, size_t size) { AppendBytes(FieldMetadata_Rwbs::kFieldId, data, size); } + void set_rwbs(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Rwbs::kFieldId, chars.data, chars.size); + } void set_rwbs(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Rwbs::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -58879,17 +61227,13 @@ class BlockGetrqFtraceEvent : public ::protozero::Message { std::string, BlockGetrqFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Comm kComm() { return {}; } + static constexpr FieldMetadata_Comm kComm{}; void set_comm(const char* data, size_t size) { AppendBytes(FieldMetadata_Comm::kFieldId, data, size); } + void set_comm(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Comm::kFieldId, chars.data, chars.size); + } void set_comm(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Comm::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -58932,14 +61276,7 @@ class BlockDirtyBufferFtraceEvent : public ::protozero::Message { uint64_t, BlockDirtyBufferFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Dev kDev() { return {}; } + static constexpr FieldMetadata_Dev kDev{}; void set_dev(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Dev::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -58957,14 +61294,7 @@ class BlockDirtyBufferFtraceEvent : public ::protozero::Message { uint64_t, BlockDirtyBufferFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Sector kSector() { return {}; } + static constexpr FieldMetadata_Sector kSector{}; void set_sector(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Sector::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -58982,14 +61312,7 @@ class BlockDirtyBufferFtraceEvent : public ::protozero::Message { uint64_t, BlockDirtyBufferFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Size kSize() { return {}; } + static constexpr FieldMetadata_Size kSize{}; void set_size(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Size::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -59041,14 +61364,7 @@ class BlockBioRemapFtraceEvent : public ::protozero::Message { uint64_t, BlockBioRemapFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Dev kDev() { return {}; } + static constexpr FieldMetadata_Dev kDev{}; void set_dev(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Dev::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -59066,14 +61382,7 @@ class BlockBioRemapFtraceEvent : public ::protozero::Message { uint64_t, BlockBioRemapFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Sector kSector() { return {}; } + static constexpr FieldMetadata_Sector kSector{}; void set_sector(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Sector::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -59091,14 +61400,7 @@ class BlockBioRemapFtraceEvent : public ::protozero::Message { uint32_t, BlockBioRemapFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_NrSector kNrSector() { return {}; } + static constexpr FieldMetadata_NrSector kNrSector{}; void set_nr_sector(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_NrSector::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -59116,14 +61418,7 @@ class BlockBioRemapFtraceEvent : public ::protozero::Message { uint64_t, BlockBioRemapFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_OldDev kOldDev() { return {}; } + static constexpr FieldMetadata_OldDev kOldDev{}; void set_old_dev(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_OldDev::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -59141,14 +61436,7 @@ class BlockBioRemapFtraceEvent : public ::protozero::Message { uint64_t, BlockBioRemapFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_OldSector kOldSector() { return {}; } + static constexpr FieldMetadata_OldSector kOldSector{}; void set_old_sector(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_OldSector::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -59166,17 +61454,13 @@ class BlockBioRemapFtraceEvent : public ::protozero::Message { std::string, BlockBioRemapFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Rwbs kRwbs() { return {}; } + static constexpr FieldMetadata_Rwbs kRwbs{}; void set_rwbs(const char* data, size_t size) { AppendBytes(FieldMetadata_Rwbs::kFieldId, data, size); } + void set_rwbs(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Rwbs::kFieldId, chars.data, chars.size); + } void set_rwbs(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Rwbs::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -59225,14 +61509,7 @@ class BlockBioQueueFtraceEvent : public ::protozero::Message { uint64_t, BlockBioQueueFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Dev kDev() { return {}; } + static constexpr FieldMetadata_Dev kDev{}; void set_dev(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Dev::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -59250,14 +61527,7 @@ class BlockBioQueueFtraceEvent : public ::protozero::Message { uint64_t, BlockBioQueueFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Sector kSector() { return {}; } + static constexpr FieldMetadata_Sector kSector{}; void set_sector(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Sector::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -59275,14 +61545,7 @@ class BlockBioQueueFtraceEvent : public ::protozero::Message { uint32_t, BlockBioQueueFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_NrSector kNrSector() { return {}; } + static constexpr FieldMetadata_NrSector kNrSector{}; void set_nr_sector(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_NrSector::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -59300,17 +61563,13 @@ class BlockBioQueueFtraceEvent : public ::protozero::Message { std::string, BlockBioQueueFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Rwbs kRwbs() { return {}; } + static constexpr FieldMetadata_Rwbs kRwbs{}; void set_rwbs(const char* data, size_t size) { AppendBytes(FieldMetadata_Rwbs::kFieldId, data, size); } + void set_rwbs(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Rwbs::kFieldId, chars.data, chars.size); + } void set_rwbs(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Rwbs::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -59328,17 +61587,13 @@ class BlockBioQueueFtraceEvent : public ::protozero::Message { std::string, BlockBioQueueFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Comm kComm() { return {}; } + static constexpr FieldMetadata_Comm kComm{}; void set_comm(const char* data, size_t size) { AppendBytes(FieldMetadata_Comm::kFieldId, data, size); } + void set_comm(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Comm::kFieldId, chars.data, chars.size); + } void set_comm(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Comm::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -59387,14 +61642,7 @@ class BlockBioFrontmergeFtraceEvent : public ::protozero::Message { uint64_t, BlockBioFrontmergeFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Dev kDev() { return {}; } + static constexpr FieldMetadata_Dev kDev{}; void set_dev(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Dev::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -59412,14 +61660,7 @@ class BlockBioFrontmergeFtraceEvent : public ::protozero::Message { uint64_t, BlockBioFrontmergeFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Sector kSector() { return {}; } + static constexpr FieldMetadata_Sector kSector{}; void set_sector(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Sector::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -59437,14 +61678,7 @@ class BlockBioFrontmergeFtraceEvent : public ::protozero::Message { uint32_t, BlockBioFrontmergeFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_NrSector kNrSector() { return {}; } + static constexpr FieldMetadata_NrSector kNrSector{}; void set_nr_sector(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_NrSector::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -59462,17 +61696,13 @@ class BlockBioFrontmergeFtraceEvent : public ::protozero::Message { std::string, BlockBioFrontmergeFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Rwbs kRwbs() { return {}; } + static constexpr FieldMetadata_Rwbs kRwbs{}; void set_rwbs(const char* data, size_t size) { AppendBytes(FieldMetadata_Rwbs::kFieldId, data, size); } + void set_rwbs(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Rwbs::kFieldId, chars.data, chars.size); + } void set_rwbs(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Rwbs::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -59490,17 +61720,13 @@ class BlockBioFrontmergeFtraceEvent : public ::protozero::Message { std::string, BlockBioFrontmergeFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Comm kComm() { return {}; } + static constexpr FieldMetadata_Comm kComm{}; void set_comm(const char* data, size_t size) { AppendBytes(FieldMetadata_Comm::kFieldId, data, size); } + void set_comm(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Comm::kFieldId, chars.data, chars.size); + } void set_comm(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Comm::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -59549,14 +61775,7 @@ class BlockBioCompleteFtraceEvent : public ::protozero::Message { uint64_t, BlockBioCompleteFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Dev kDev() { return {}; } + static constexpr FieldMetadata_Dev kDev{}; void set_dev(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Dev::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -59574,14 +61793,7 @@ class BlockBioCompleteFtraceEvent : public ::protozero::Message { uint64_t, BlockBioCompleteFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Sector kSector() { return {}; } + static constexpr FieldMetadata_Sector kSector{}; void set_sector(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Sector::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -59599,14 +61811,7 @@ class BlockBioCompleteFtraceEvent : public ::protozero::Message { uint32_t, BlockBioCompleteFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_NrSector kNrSector() { return {}; } + static constexpr FieldMetadata_NrSector kNrSector{}; void set_nr_sector(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_NrSector::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -59624,14 +61829,7 @@ class BlockBioCompleteFtraceEvent : public ::protozero::Message { int32_t, BlockBioCompleteFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Error kError() { return {}; } + static constexpr FieldMetadata_Error kError{}; void set_error(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Error::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -59649,17 +61847,13 @@ class BlockBioCompleteFtraceEvent : public ::protozero::Message { std::string, BlockBioCompleteFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Rwbs kRwbs() { return {}; } + static constexpr FieldMetadata_Rwbs kRwbs{}; void set_rwbs(const char* data, size_t size) { AppendBytes(FieldMetadata_Rwbs::kFieldId, data, size); } + void set_rwbs(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Rwbs::kFieldId, chars.data, chars.size); + } void set_rwbs(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Rwbs::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -59708,14 +61902,7 @@ class BlockBioBounceFtraceEvent : public ::protozero::Message { uint64_t, BlockBioBounceFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Dev kDev() { return {}; } + static constexpr FieldMetadata_Dev kDev{}; void set_dev(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Dev::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -59733,14 +61920,7 @@ class BlockBioBounceFtraceEvent : public ::protozero::Message { uint64_t, BlockBioBounceFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Sector kSector() { return {}; } + static constexpr FieldMetadata_Sector kSector{}; void set_sector(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Sector::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -59758,14 +61938,7 @@ class BlockBioBounceFtraceEvent : public ::protozero::Message { uint32_t, BlockBioBounceFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_NrSector kNrSector() { return {}; } + static constexpr FieldMetadata_NrSector kNrSector{}; void set_nr_sector(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_NrSector::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -59783,17 +61956,13 @@ class BlockBioBounceFtraceEvent : public ::protozero::Message { std::string, BlockBioBounceFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Rwbs kRwbs() { return {}; } + static constexpr FieldMetadata_Rwbs kRwbs{}; void set_rwbs(const char* data, size_t size) { AppendBytes(FieldMetadata_Rwbs::kFieldId, data, size); } + void set_rwbs(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Rwbs::kFieldId, chars.data, chars.size); + } void set_rwbs(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Rwbs::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -59811,17 +61980,13 @@ class BlockBioBounceFtraceEvent : public ::protozero::Message { std::string, BlockBioBounceFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Comm kComm() { return {}; } + static constexpr FieldMetadata_Comm kComm{}; void set_comm(const char* data, size_t size) { AppendBytes(FieldMetadata_Comm::kFieldId, data, size); } + void set_comm(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Comm::kFieldId, chars.data, chars.size); + } void set_comm(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Comm::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -59870,14 +62035,7 @@ class BlockBioBackmergeFtraceEvent : public ::protozero::Message { uint64_t, BlockBioBackmergeFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Dev kDev() { return {}; } + static constexpr FieldMetadata_Dev kDev{}; void set_dev(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Dev::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -59895,14 +62053,7 @@ class BlockBioBackmergeFtraceEvent : public ::protozero::Message { uint64_t, BlockBioBackmergeFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Sector kSector() { return {}; } + static constexpr FieldMetadata_Sector kSector{}; void set_sector(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Sector::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -59920,14 +62071,7 @@ class BlockBioBackmergeFtraceEvent : public ::protozero::Message { uint32_t, BlockBioBackmergeFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_NrSector kNrSector() { return {}; } + static constexpr FieldMetadata_NrSector kNrSector{}; void set_nr_sector(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_NrSector::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -59945,17 +62089,13 @@ class BlockBioBackmergeFtraceEvent : public ::protozero::Message { std::string, BlockBioBackmergeFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Rwbs kRwbs() { return {}; } + static constexpr FieldMetadata_Rwbs kRwbs{}; void set_rwbs(const char* data, size_t size) { AppendBytes(FieldMetadata_Rwbs::kFieldId, data, size); } + void set_rwbs(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Rwbs::kFieldId, chars.data, chars.size); + } void set_rwbs(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Rwbs::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -59973,17 +62113,13 @@ class BlockBioBackmergeFtraceEvent : public ::protozero::Message { std::string, BlockBioBackmergeFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Comm kComm() { return {}; } + static constexpr FieldMetadata_Comm kComm{}; void set_comm(const char* data, size_t size) { AppendBytes(FieldMetadata_Comm::kFieldId, data, size); } + void set_comm(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Comm::kFieldId, chars.data, chars.size); + } void set_comm(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Comm::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -60038,14 +62174,7 @@ class BlockRqIssueFtraceEvent : public ::protozero::Message { uint64_t, BlockRqIssueFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Dev kDev() { return {}; } + static constexpr FieldMetadata_Dev kDev{}; void set_dev(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Dev::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -60063,14 +62192,7 @@ class BlockRqIssueFtraceEvent : public ::protozero::Message { uint64_t, BlockRqIssueFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Sector kSector() { return {}; } + static constexpr FieldMetadata_Sector kSector{}; void set_sector(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Sector::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -60088,14 +62210,7 @@ class BlockRqIssueFtraceEvent : public ::protozero::Message { uint32_t, BlockRqIssueFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_NrSector kNrSector() { return {}; } + static constexpr FieldMetadata_NrSector kNrSector{}; void set_nr_sector(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_NrSector::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -60113,14 +62228,7 @@ class BlockRqIssueFtraceEvent : public ::protozero::Message { uint32_t, BlockRqIssueFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Bytes kBytes() { return {}; } + static constexpr FieldMetadata_Bytes kBytes{}; void set_bytes(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Bytes::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -60138,17 +62246,13 @@ class BlockRqIssueFtraceEvent : public ::protozero::Message { std::string, BlockRqIssueFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Rwbs kRwbs() { return {}; } + static constexpr FieldMetadata_Rwbs kRwbs{}; void set_rwbs(const char* data, size_t size) { AppendBytes(FieldMetadata_Rwbs::kFieldId, data, size); } + void set_rwbs(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Rwbs::kFieldId, chars.data, chars.size); + } void set_rwbs(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Rwbs::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -60166,17 +62270,13 @@ class BlockRqIssueFtraceEvent : public ::protozero::Message { std::string, BlockRqIssueFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Comm kComm() { return {}; } + static constexpr FieldMetadata_Comm kComm{}; void set_comm(const char* data, size_t size) { AppendBytes(FieldMetadata_Comm::kFieldId, data, size); } + void set_comm(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Comm::kFieldId, chars.data, chars.size); + } void set_comm(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Comm::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -60194,17 +62294,13 @@ class BlockRqIssueFtraceEvent : public ::protozero::Message { std::string, BlockRqIssueFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Cmd kCmd() { return {}; } + static constexpr FieldMetadata_Cmd kCmd{}; void set_cmd(const char* data, size_t size) { AppendBytes(FieldMetadata_Cmd::kFieldId, data, size); } + void set_cmd(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Cmd::kFieldId, chars.data, chars.size); + } void set_cmd(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Cmd::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -60271,14 +62367,7 @@ class CgroupSetupRootFtraceEvent : public ::protozero::Message { int32_t, CgroupSetupRootFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Root kRoot() { return {}; } + static constexpr FieldMetadata_Root kRoot{}; void set_root(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Root::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -60296,14 +62385,7 @@ class CgroupSetupRootFtraceEvent : public ::protozero::Message { uint32_t, CgroupSetupRootFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_SsMask kSsMask() { return {}; } + static constexpr FieldMetadata_SsMask kSsMask{}; void set_ss_mask(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_SsMask::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -60321,17 +62403,13 @@ class CgroupSetupRootFtraceEvent : public ::protozero::Message { std::string, CgroupSetupRootFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Name kName() { return {}; } + static constexpr FieldMetadata_Name kName{}; void set_name(const char* data, size_t size) { AppendBytes(FieldMetadata_Name::kFieldId, data, size); } + void set_name(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Name::kFieldId, chars.data, chars.size); + } void set_name(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Name::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -60380,14 +62458,7 @@ class CgroupRenameFtraceEvent : public ::protozero::Message { int32_t, CgroupRenameFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Root kRoot() { return {}; } + static constexpr FieldMetadata_Root kRoot{}; void set_root(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Root::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -60405,14 +62476,7 @@ class CgroupRenameFtraceEvent : public ::protozero::Message { int32_t, CgroupRenameFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Id kId() { return {}; } + static constexpr FieldMetadata_Id kId{}; void set_id(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Id::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -60430,17 +62494,13 @@ class CgroupRenameFtraceEvent : public ::protozero::Message { std::string, CgroupRenameFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Cname kCname() { return {}; } + static constexpr FieldMetadata_Cname kCname{}; void set_cname(const char* data, size_t size) { AppendBytes(FieldMetadata_Cname::kFieldId, data, size); } + void set_cname(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Cname::kFieldId, chars.data, chars.size); + } void set_cname(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Cname::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -60458,14 +62518,7 @@ class CgroupRenameFtraceEvent : public ::protozero::Message { int32_t, CgroupRenameFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Level kLevel() { return {}; } + static constexpr FieldMetadata_Level kLevel{}; void set_level(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Level::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -60483,17 +62536,13 @@ class CgroupRenameFtraceEvent : public ::protozero::Message { std::string, CgroupRenameFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Path kPath() { return {}; } + static constexpr FieldMetadata_Path kPath{}; void set_path(const char* data, size_t size) { AppendBytes(FieldMetadata_Path::kFieldId, data, size); } + void set_path(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Path::kFieldId, chars.data, chars.size); + } void set_path(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Path::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -60542,14 +62591,7 @@ class CgroupReleaseFtraceEvent : public ::protozero::Message { int32_t, CgroupReleaseFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Root kRoot() { return {}; } + static constexpr FieldMetadata_Root kRoot{}; void set_root(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Root::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -60567,14 +62609,7 @@ class CgroupReleaseFtraceEvent : public ::protozero::Message { int32_t, CgroupReleaseFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Id kId() { return {}; } + static constexpr FieldMetadata_Id kId{}; void set_id(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Id::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -60592,17 +62627,13 @@ class CgroupReleaseFtraceEvent : public ::protozero::Message { std::string, CgroupReleaseFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Cname kCname() { return {}; } + static constexpr FieldMetadata_Cname kCname{}; void set_cname(const char* data, size_t size) { AppendBytes(FieldMetadata_Cname::kFieldId, data, size); } + void set_cname(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Cname::kFieldId, chars.data, chars.size); + } void set_cname(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Cname::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -60620,14 +62651,7 @@ class CgroupReleaseFtraceEvent : public ::protozero::Message { int32_t, CgroupReleaseFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Level kLevel() { return {}; } + static constexpr FieldMetadata_Level kLevel{}; void set_level(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Level::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -60645,17 +62669,13 @@ class CgroupReleaseFtraceEvent : public ::protozero::Message { std::string, CgroupReleaseFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Path kPath() { return {}; } + static constexpr FieldMetadata_Path kPath{}; void set_path(const char* data, size_t size) { AppendBytes(FieldMetadata_Path::kFieldId, data, size); } + void set_path(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Path::kFieldId, chars.data, chars.size); + } void set_path(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Path::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -60698,14 +62718,7 @@ class CgroupDestroyRootFtraceEvent : public ::protozero::Message { int32_t, CgroupDestroyRootFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Root kRoot() { return {}; } + static constexpr FieldMetadata_Root kRoot{}; void set_root(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Root::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -60723,14 +62736,7 @@ class CgroupDestroyRootFtraceEvent : public ::protozero::Message { uint32_t, CgroupDestroyRootFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_SsMask kSsMask() { return {}; } + static constexpr FieldMetadata_SsMask kSsMask{}; void set_ss_mask(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_SsMask::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -60748,17 +62754,13 @@ class CgroupDestroyRootFtraceEvent : public ::protozero::Message { std::string, CgroupDestroyRootFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Name kName() { return {}; } + static constexpr FieldMetadata_Name kName{}; void set_name(const char* data, size_t size) { AppendBytes(FieldMetadata_Name::kFieldId, data, size); } + void set_name(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Name::kFieldId, chars.data, chars.size); + } void set_name(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Name::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -60813,14 +62815,7 @@ class CgroupTransferTasksFtraceEvent : public ::protozero::Message { int32_t, CgroupTransferTasksFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_DstRoot kDstRoot() { return {}; } + static constexpr FieldMetadata_DstRoot kDstRoot{}; void set_dst_root(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_DstRoot::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -60838,14 +62833,7 @@ class CgroupTransferTasksFtraceEvent : public ::protozero::Message { int32_t, CgroupTransferTasksFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_DstId kDstId() { return {}; } + static constexpr FieldMetadata_DstId kDstId{}; void set_dst_id(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_DstId::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -60863,14 +62851,7 @@ class CgroupTransferTasksFtraceEvent : public ::protozero::Message { int32_t, CgroupTransferTasksFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Pid kPid() { return {}; } + static constexpr FieldMetadata_Pid kPid{}; void set_pid(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Pid::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -60888,17 +62869,13 @@ class CgroupTransferTasksFtraceEvent : public ::protozero::Message { std::string, CgroupTransferTasksFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Comm kComm() { return {}; } + static constexpr FieldMetadata_Comm kComm{}; void set_comm(const char* data, size_t size) { AppendBytes(FieldMetadata_Comm::kFieldId, data, size); } + void set_comm(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Comm::kFieldId, chars.data, chars.size); + } void set_comm(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Comm::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -60916,17 +62893,13 @@ class CgroupTransferTasksFtraceEvent : public ::protozero::Message { std::string, CgroupTransferTasksFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Cname kCname() { return {}; } + static constexpr FieldMetadata_Cname kCname{}; void set_cname(const char* data, size_t size) { AppendBytes(FieldMetadata_Cname::kFieldId, data, size); } + void set_cname(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Cname::kFieldId, chars.data, chars.size); + } void set_cname(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Cname::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -60944,14 +62917,7 @@ class CgroupTransferTasksFtraceEvent : public ::protozero::Message { int32_t, CgroupTransferTasksFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_DstLevel kDstLevel() { return {}; } + static constexpr FieldMetadata_DstLevel kDstLevel{}; void set_dst_level(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_DstLevel::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -60969,17 +62935,13 @@ class CgroupTransferTasksFtraceEvent : public ::protozero::Message { std::string, CgroupTransferTasksFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_DstPath kDstPath() { return {}; } + static constexpr FieldMetadata_DstPath kDstPath{}; void set_dst_path(const char* data, size_t size) { AppendBytes(FieldMetadata_DstPath::kFieldId, data, size); } + void set_dst_path(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_DstPath::kFieldId, chars.data, chars.size); + } void set_dst_path(std::string value) { static constexpr uint32_t field_id = FieldMetadata_DstPath::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -61028,14 +62990,7 @@ class CgroupRmdirFtraceEvent : public ::protozero::Message { int32_t, CgroupRmdirFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Root kRoot() { return {}; } + static constexpr FieldMetadata_Root kRoot{}; void set_root(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Root::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -61053,14 +63008,7 @@ class CgroupRmdirFtraceEvent : public ::protozero::Message { int32_t, CgroupRmdirFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Id kId() { return {}; } + static constexpr FieldMetadata_Id kId{}; void set_id(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Id::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -61078,17 +63026,13 @@ class CgroupRmdirFtraceEvent : public ::protozero::Message { std::string, CgroupRmdirFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Cname kCname() { return {}; } + static constexpr FieldMetadata_Cname kCname{}; void set_cname(const char* data, size_t size) { AppendBytes(FieldMetadata_Cname::kFieldId, data, size); } + void set_cname(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Cname::kFieldId, chars.data, chars.size); + } void set_cname(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Cname::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -61106,14 +63050,7 @@ class CgroupRmdirFtraceEvent : public ::protozero::Message { int32_t, CgroupRmdirFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Level kLevel() { return {}; } + static constexpr FieldMetadata_Level kLevel{}; void set_level(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Level::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -61131,17 +63068,13 @@ class CgroupRmdirFtraceEvent : public ::protozero::Message { std::string, CgroupRmdirFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Path kPath() { return {}; } + static constexpr FieldMetadata_Path kPath{}; void set_path(const char* data, size_t size) { AppendBytes(FieldMetadata_Path::kFieldId, data, size); } + void set_path(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Path::kFieldId, chars.data, chars.size); + } void set_path(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Path::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -61184,14 +63117,7 @@ class CgroupRemountFtraceEvent : public ::protozero::Message { int32_t, CgroupRemountFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Root kRoot() { return {}; } + static constexpr FieldMetadata_Root kRoot{}; void set_root(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Root::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -61209,14 +63135,7 @@ class CgroupRemountFtraceEvent : public ::protozero::Message { uint32_t, CgroupRemountFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_SsMask kSsMask() { return {}; } + static constexpr FieldMetadata_SsMask kSsMask{}; void set_ss_mask(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_SsMask::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -61234,17 +63153,13 @@ class CgroupRemountFtraceEvent : public ::protozero::Message { std::string, CgroupRemountFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Name kName() { return {}; } + static constexpr FieldMetadata_Name kName{}; void set_name(const char* data, size_t size) { AppendBytes(FieldMetadata_Name::kFieldId, data, size); } + void set_name(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Name::kFieldId, chars.data, chars.size); + } void set_name(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Name::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -61293,14 +63208,7 @@ class CgroupMkdirFtraceEvent : public ::protozero::Message { int32_t, CgroupMkdirFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Root kRoot() { return {}; } + static constexpr FieldMetadata_Root kRoot{}; void set_root(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Root::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -61318,14 +63226,7 @@ class CgroupMkdirFtraceEvent : public ::protozero::Message { int32_t, CgroupMkdirFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Id kId() { return {}; } + static constexpr FieldMetadata_Id kId{}; void set_id(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Id::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -61343,17 +63244,13 @@ class CgroupMkdirFtraceEvent : public ::protozero::Message { std::string, CgroupMkdirFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Cname kCname() { return {}; } + static constexpr FieldMetadata_Cname kCname{}; void set_cname(const char* data, size_t size) { AppendBytes(FieldMetadata_Cname::kFieldId, data, size); } + void set_cname(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Cname::kFieldId, chars.data, chars.size); + } void set_cname(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Cname::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -61371,14 +63268,7 @@ class CgroupMkdirFtraceEvent : public ::protozero::Message { int32_t, CgroupMkdirFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Level kLevel() { return {}; } + static constexpr FieldMetadata_Level kLevel{}; void set_level(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Level::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -61396,17 +63286,13 @@ class CgroupMkdirFtraceEvent : public ::protozero::Message { std::string, CgroupMkdirFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Path kPath() { return {}; } + static constexpr FieldMetadata_Path kPath{}; void set_path(const char* data, size_t size) { AppendBytes(FieldMetadata_Path::kFieldId, data, size); } + void set_path(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Path::kFieldId, chars.data, chars.size); + } void set_path(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Path::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -61461,14 +63347,7 @@ class CgroupAttachTaskFtraceEvent : public ::protozero::Message { int32_t, CgroupAttachTaskFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_DstRoot kDstRoot() { return {}; } + static constexpr FieldMetadata_DstRoot kDstRoot{}; void set_dst_root(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_DstRoot::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -61486,14 +63365,7 @@ class CgroupAttachTaskFtraceEvent : public ::protozero::Message { int32_t, CgroupAttachTaskFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_DstId kDstId() { return {}; } + static constexpr FieldMetadata_DstId kDstId{}; void set_dst_id(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_DstId::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -61511,14 +63383,7 @@ class CgroupAttachTaskFtraceEvent : public ::protozero::Message { int32_t, CgroupAttachTaskFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Pid kPid() { return {}; } + static constexpr FieldMetadata_Pid kPid{}; void set_pid(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Pid::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -61536,17 +63401,13 @@ class CgroupAttachTaskFtraceEvent : public ::protozero::Message { std::string, CgroupAttachTaskFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Comm kComm() { return {}; } + static constexpr FieldMetadata_Comm kComm{}; void set_comm(const char* data, size_t size) { AppendBytes(FieldMetadata_Comm::kFieldId, data, size); } + void set_comm(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Comm::kFieldId, chars.data, chars.size); + } void set_comm(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Comm::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -61564,17 +63425,13 @@ class CgroupAttachTaskFtraceEvent : public ::protozero::Message { std::string, CgroupAttachTaskFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Cname kCname() { return {}; } + static constexpr FieldMetadata_Cname kCname{}; void set_cname(const char* data, size_t size) { AppendBytes(FieldMetadata_Cname::kFieldId, data, size); } + void set_cname(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Cname::kFieldId, chars.data, chars.size); + } void set_cname(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Cname::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -61592,14 +63449,7 @@ class CgroupAttachTaskFtraceEvent : public ::protozero::Message { int32_t, CgroupAttachTaskFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_DstLevel kDstLevel() { return {}; } + static constexpr FieldMetadata_DstLevel kDstLevel{}; void set_dst_level(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_DstLevel::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -61617,17 +63467,13 @@ class CgroupAttachTaskFtraceEvent : public ::protozero::Message { std::string, CgroupAttachTaskFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_DstPath kDstPath() { return {}; } + static constexpr FieldMetadata_DstPath kDstPath{}; void set_dst_path(const char* data, size_t size) { AppendBytes(FieldMetadata_DstPath::kFieldId, data, size); } + void set_dst_path(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_DstPath::kFieldId, chars.data, chars.size); + } void set_dst_path(std::string value) { static constexpr uint32_t field_id = FieldMetadata_DstPath::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -61691,17 +63537,13 @@ class ClkSetRateFtraceEvent : public ::protozero::Message { std::string, ClkSetRateFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Name kName() { return {}; } + static constexpr FieldMetadata_Name kName{}; void set_name(const char* data, size_t size) { AppendBytes(FieldMetadata_Name::kFieldId, data, size); } + void set_name(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Name::kFieldId, chars.data, chars.size); + } void set_name(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Name::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -61719,14 +63561,7 @@ class ClkSetRateFtraceEvent : public ::protozero::Message { uint64_t, ClkSetRateFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Rate kRate() { return {}; } + static constexpr FieldMetadata_Rate kRate{}; void set_rate(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Rate::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -61763,17 +63598,13 @@ class ClkDisableFtraceEvent : public ::protozero::Message { std::string, ClkDisableFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Name kName() { return {}; } + static constexpr FieldMetadata_Name kName{}; void set_name(const char* data, size_t size) { AppendBytes(FieldMetadata_Name::kFieldId, data, size); } + void set_name(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Name::kFieldId, chars.data, chars.size); + } void set_name(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Name::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -61810,17 +63641,354 @@ class ClkEnableFtraceEvent : public ::protozero::Message { std::string, ClkEnableFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Name kName() { return {}; } + static constexpr FieldMetadata_Name kName{}; void set_name(const char* data, size_t size) { AppendBytes(FieldMetadata_Name::kFieldId, data, size); } + void set_name(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Name::kFieldId, chars.data, chars.size); + } + void set_name(std::string value) { + static constexpr uint32_t field_id = FieldMetadata_Name::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kString> + ::Append(*this, field_id, value); + } +}; + +} // Namespace. +} // Namespace. +} // Namespace. +#endif // Include guard. +// gen_amalgamated begin header: gen/protos/perfetto/trace/ftrace/cma.pbzero.h +// Autogenerated by the ProtoZero compiler plugin. DO NOT EDIT. + +#ifndef PERFETTO_PROTOS_PROTOS_PERFETTO_TRACE_FTRACE_CMA_PROTO_H_ +#define PERFETTO_PROTOS_PROTOS_PERFETTO_TRACE_FTRACE_CMA_PROTO_H_ + +#include +#include + +// gen_amalgamated expanded: #include "perfetto/protozero/field_writer.h" +// gen_amalgamated expanded: #include "perfetto/protozero/message.h" +// gen_amalgamated expanded: #include "perfetto/protozero/packed_repeated_fields.h" +// gen_amalgamated expanded: #include "perfetto/protozero/proto_decoder.h" +// gen_amalgamated expanded: #include "perfetto/protozero/proto_utils.h" + +namespace perfetto { +namespace protos { +namespace pbzero { + + +class CmaAllocInfoFtraceEvent_Decoder : public ::protozero::TypedProtoDecoder { + public: + CmaAllocInfoFtraceEvent_Decoder(const uint8_t* data, size_t len) : TypedProtoDecoder(data, len) {} + explicit CmaAllocInfoFtraceEvent_Decoder(const std::string& raw) : TypedProtoDecoder(reinterpret_cast(raw.data()), raw.size()) {} + explicit CmaAllocInfoFtraceEvent_Decoder(const ::protozero::ConstBytes& raw) : TypedProtoDecoder(raw.data, raw.size) {} + bool has_align() const { return at<1>().valid(); } + uint32_t align() const { return at<1>().as_uint32(); } + bool has_count() const { return at<2>().valid(); } + uint32_t count() const { return at<2>().as_uint32(); } + bool has_err_iso() const { return at<3>().valid(); } + uint32_t err_iso() const { return at<3>().as_uint32(); } + bool has_err_mig() const { return at<4>().valid(); } + uint32_t err_mig() const { return at<4>().as_uint32(); } + bool has_err_test() const { return at<5>().valid(); } + uint32_t err_test() const { return at<5>().as_uint32(); } + bool has_name() const { return at<6>().valid(); } + ::protozero::ConstChars name() const { return at<6>().as_string(); } + bool has_nr_mapped() const { return at<7>().valid(); } + uint64_t nr_mapped() const { return at<7>().as_uint64(); } + bool has_nr_migrated() const { return at<8>().valid(); } + uint64_t nr_migrated() const { return at<8>().as_uint64(); } + bool has_nr_reclaimed() const { return at<9>().valid(); } + uint64_t nr_reclaimed() const { return at<9>().as_uint64(); } + bool has_pfn() const { return at<10>().valid(); } + uint64_t pfn() const { return at<10>().as_uint64(); } +}; + +class CmaAllocInfoFtraceEvent : public ::protozero::Message { + public: + using Decoder = CmaAllocInfoFtraceEvent_Decoder; + enum : int32_t { + kAlignFieldNumber = 1, + kCountFieldNumber = 2, + kErrIsoFieldNumber = 3, + kErrMigFieldNumber = 4, + kErrTestFieldNumber = 5, + kNameFieldNumber = 6, + kNrMappedFieldNumber = 7, + kNrMigratedFieldNumber = 8, + kNrReclaimedFieldNumber = 9, + kPfnFieldNumber = 10, + }; + static constexpr const char* GetName() { return ".perfetto.protos.CmaAllocInfoFtraceEvent"; } + + + using FieldMetadata_Align = + ::protozero::proto_utils::FieldMetadata< + 1, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint32, + uint32_t, + CmaAllocInfoFtraceEvent>; + + static constexpr FieldMetadata_Align kAlign{}; + void set_align(uint32_t value) { + static constexpr uint32_t field_id = FieldMetadata_Align::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint32> + ::Append(*this, field_id, value); + } + + using FieldMetadata_Count = + ::protozero::proto_utils::FieldMetadata< + 2, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint32, + uint32_t, + CmaAllocInfoFtraceEvent>; + + static constexpr FieldMetadata_Count kCount{}; + void set_count(uint32_t value) { + static constexpr uint32_t field_id = FieldMetadata_Count::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint32> + ::Append(*this, field_id, value); + } + + using FieldMetadata_ErrIso = + ::protozero::proto_utils::FieldMetadata< + 3, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint32, + uint32_t, + CmaAllocInfoFtraceEvent>; + + static constexpr FieldMetadata_ErrIso kErrIso{}; + void set_err_iso(uint32_t value) { + static constexpr uint32_t field_id = FieldMetadata_ErrIso::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint32> + ::Append(*this, field_id, value); + } + + using FieldMetadata_ErrMig = + ::protozero::proto_utils::FieldMetadata< + 4, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint32, + uint32_t, + CmaAllocInfoFtraceEvent>; + + static constexpr FieldMetadata_ErrMig kErrMig{}; + void set_err_mig(uint32_t value) { + static constexpr uint32_t field_id = FieldMetadata_ErrMig::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint32> + ::Append(*this, field_id, value); + } + + using FieldMetadata_ErrTest = + ::protozero::proto_utils::FieldMetadata< + 5, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint32, + uint32_t, + CmaAllocInfoFtraceEvent>; + + static constexpr FieldMetadata_ErrTest kErrTest{}; + void set_err_test(uint32_t value) { + static constexpr uint32_t field_id = FieldMetadata_ErrTest::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint32> + ::Append(*this, field_id, value); + } + + using FieldMetadata_Name = + ::protozero::proto_utils::FieldMetadata< + 6, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kString, + std::string, + CmaAllocInfoFtraceEvent>; + + static constexpr FieldMetadata_Name kName{}; + void set_name(const char* data, size_t size) { + AppendBytes(FieldMetadata_Name::kFieldId, data, size); + } + void set_name(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Name::kFieldId, chars.data, chars.size); + } + void set_name(std::string value) { + static constexpr uint32_t field_id = FieldMetadata_Name::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kString> + ::Append(*this, field_id, value); + } + + using FieldMetadata_NrMapped = + ::protozero::proto_utils::FieldMetadata< + 7, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint64, + uint64_t, + CmaAllocInfoFtraceEvent>; + + static constexpr FieldMetadata_NrMapped kNrMapped{}; + void set_nr_mapped(uint64_t value) { + static constexpr uint32_t field_id = FieldMetadata_NrMapped::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint64> + ::Append(*this, field_id, value); + } + + using FieldMetadata_NrMigrated = + ::protozero::proto_utils::FieldMetadata< + 8, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint64, + uint64_t, + CmaAllocInfoFtraceEvent>; + + static constexpr FieldMetadata_NrMigrated kNrMigrated{}; + void set_nr_migrated(uint64_t value) { + static constexpr uint32_t field_id = FieldMetadata_NrMigrated::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint64> + ::Append(*this, field_id, value); + } + + using FieldMetadata_NrReclaimed = + ::protozero::proto_utils::FieldMetadata< + 9, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint64, + uint64_t, + CmaAllocInfoFtraceEvent>; + + static constexpr FieldMetadata_NrReclaimed kNrReclaimed{}; + void set_nr_reclaimed(uint64_t value) { + static constexpr uint32_t field_id = FieldMetadata_NrReclaimed::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint64> + ::Append(*this, field_id, value); + } + + using FieldMetadata_Pfn = + ::protozero::proto_utils::FieldMetadata< + 10, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint64, + uint64_t, + CmaAllocInfoFtraceEvent>; + + static constexpr FieldMetadata_Pfn kPfn{}; + void set_pfn(uint64_t value) { + static constexpr uint32_t field_id = FieldMetadata_Pfn::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint64> + ::Append(*this, field_id, value); + } +}; + +class CmaAllocStartFtraceEvent_Decoder : public ::protozero::TypedProtoDecoder { + public: + CmaAllocStartFtraceEvent_Decoder(const uint8_t* data, size_t len) : TypedProtoDecoder(data, len) {} + explicit CmaAllocStartFtraceEvent_Decoder(const std::string& raw) : TypedProtoDecoder(reinterpret_cast(raw.data()), raw.size()) {} + explicit CmaAllocStartFtraceEvent_Decoder(const ::protozero::ConstBytes& raw) : TypedProtoDecoder(raw.data, raw.size) {} + bool has_align() const { return at<1>().valid(); } + uint32_t align() const { return at<1>().as_uint32(); } + bool has_count() const { return at<2>().valid(); } + uint32_t count() const { return at<2>().as_uint32(); } + bool has_name() const { return at<3>().valid(); } + ::protozero::ConstChars name() const { return at<3>().as_string(); } +}; + +class CmaAllocStartFtraceEvent : public ::protozero::Message { + public: + using Decoder = CmaAllocStartFtraceEvent_Decoder; + enum : int32_t { + kAlignFieldNumber = 1, + kCountFieldNumber = 2, + kNameFieldNumber = 3, + }; + static constexpr const char* GetName() { return ".perfetto.protos.CmaAllocStartFtraceEvent"; } + + + using FieldMetadata_Align = + ::protozero::proto_utils::FieldMetadata< + 1, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint32, + uint32_t, + CmaAllocStartFtraceEvent>; + + static constexpr FieldMetadata_Align kAlign{}; + void set_align(uint32_t value) { + static constexpr uint32_t field_id = FieldMetadata_Align::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint32> + ::Append(*this, field_id, value); + } + + using FieldMetadata_Count = + ::protozero::proto_utils::FieldMetadata< + 2, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint32, + uint32_t, + CmaAllocStartFtraceEvent>; + + static constexpr FieldMetadata_Count kCount{}; + void set_count(uint32_t value) { + static constexpr uint32_t field_id = FieldMetadata_Count::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint32> + ::Append(*this, field_id, value); + } + + using FieldMetadata_Name = + ::protozero::proto_utils::FieldMetadata< + 3, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kString, + std::string, + CmaAllocStartFtraceEvent>; + + static constexpr FieldMetadata_Name kName{}; + void set_name(const char* data, size_t size) { + AppendBytes(FieldMetadata_Name::kFieldId, data, size); + } + void set_name(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Name::kFieldId, chars.data, chars.size); + } void set_name(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Name::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -61890,14 +64058,7 @@ class MmCompactionWakeupKcompactdFtraceEvent : public ::protozero::Message { int32_t, MmCompactionWakeupKcompactdFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Nid kNid() { return {}; } + static constexpr FieldMetadata_Nid kNid{}; void set_nid(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Nid::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -61915,14 +64076,7 @@ class MmCompactionWakeupKcompactdFtraceEvent : public ::protozero::Message { int32_t, MmCompactionWakeupKcompactdFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Order kOrder() { return {}; } + static constexpr FieldMetadata_Order kOrder{}; void set_order(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Order::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -61940,14 +64094,7 @@ class MmCompactionWakeupKcompactdFtraceEvent : public ::protozero::Message { uint32_t, MmCompactionWakeupKcompactdFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ClasszoneIdx kClasszoneIdx() { return {}; } + static constexpr FieldMetadata_ClasszoneIdx kClasszoneIdx{}; void set_classzone_idx(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_ClasszoneIdx::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -61965,14 +64112,7 @@ class MmCompactionWakeupKcompactdFtraceEvent : public ::protozero::Message { uint32_t, MmCompactionWakeupKcompactdFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_HighestZoneidx kHighestZoneidx() { return {}; } + static constexpr FieldMetadata_HighestZoneidx kHighestZoneidx{}; void set_highest_zoneidx(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_HighestZoneidx::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -62018,14 +64158,7 @@ class MmCompactionTryToCompactPagesFtraceEvent : public ::protozero::Message { int32_t, MmCompactionTryToCompactPagesFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Order kOrder() { return {}; } + static constexpr FieldMetadata_Order kOrder{}; void set_order(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Order::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -62043,14 +64176,7 @@ class MmCompactionTryToCompactPagesFtraceEvent : public ::protozero::Message { uint32_t, MmCompactionTryToCompactPagesFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_GfpMask kGfpMask() { return {}; } + static constexpr FieldMetadata_GfpMask kGfpMask{}; void set_gfp_mask(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_GfpMask::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -62068,14 +64194,7 @@ class MmCompactionTryToCompactPagesFtraceEvent : public ::protozero::Message { uint32_t, MmCompactionTryToCompactPagesFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Mode kMode() { return {}; } + static constexpr FieldMetadata_Mode kMode{}; void set_mode(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Mode::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -62093,14 +64212,7 @@ class MmCompactionTryToCompactPagesFtraceEvent : public ::protozero::Message { int32_t, MmCompactionTryToCompactPagesFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Prio kPrio() { return {}; } + static constexpr FieldMetadata_Prio kPrio{}; void set_prio(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Prio::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -62146,14 +64258,7 @@ class MmCompactionSuitableFtraceEvent : public ::protozero::Message { int32_t, MmCompactionSuitableFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Nid kNid() { return {}; } + static constexpr FieldMetadata_Nid kNid{}; void set_nid(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Nid::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -62171,14 +64276,7 @@ class MmCompactionSuitableFtraceEvent : public ::protozero::Message { uint32_t, MmCompactionSuitableFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Idx kIdx() { return {}; } + static constexpr FieldMetadata_Idx kIdx{}; void set_idx(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Idx::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -62196,14 +64294,7 @@ class MmCompactionSuitableFtraceEvent : public ::protozero::Message { int32_t, MmCompactionSuitableFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Order kOrder() { return {}; } + static constexpr FieldMetadata_Order kOrder{}; void set_order(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Order::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -62221,14 +64312,7 @@ class MmCompactionSuitableFtraceEvent : public ::protozero::Message { int32_t, MmCompactionSuitableFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ret kRet() { return {}; } + static constexpr FieldMetadata_Ret kRet{}; void set_ret(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Ret::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -62268,14 +64352,7 @@ class MmCompactionMigratepagesFtraceEvent : public ::protozero::Message { uint64_t, MmCompactionMigratepagesFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_NrMigrated kNrMigrated() { return {}; } + static constexpr FieldMetadata_NrMigrated kNrMigrated{}; void set_nr_migrated(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_NrMigrated::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -62293,14 +64370,7 @@ class MmCompactionMigratepagesFtraceEvent : public ::protozero::Message { uint64_t, MmCompactionMigratepagesFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_NrFailed kNrFailed() { return {}; } + static constexpr FieldMetadata_NrFailed kNrFailed{}; void set_nr_failed(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_NrFailed::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -62346,14 +64416,7 @@ class MmCompactionKcompactdWakeFtraceEvent : public ::protozero::Message { int32_t, MmCompactionKcompactdWakeFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Nid kNid() { return {}; } + static constexpr FieldMetadata_Nid kNid{}; void set_nid(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Nid::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -62371,14 +64434,7 @@ class MmCompactionKcompactdWakeFtraceEvent : public ::protozero::Message { int32_t, MmCompactionKcompactdWakeFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Order kOrder() { return {}; } + static constexpr FieldMetadata_Order kOrder{}; void set_order(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Order::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -62396,14 +64452,7 @@ class MmCompactionKcompactdWakeFtraceEvent : public ::protozero::Message { uint32_t, MmCompactionKcompactdWakeFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ClasszoneIdx kClasszoneIdx() { return {}; } + static constexpr FieldMetadata_ClasszoneIdx kClasszoneIdx{}; void set_classzone_idx(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_ClasszoneIdx::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -62421,14 +64470,7 @@ class MmCompactionKcompactdWakeFtraceEvent : public ::protozero::Message { uint32_t, MmCompactionKcompactdWakeFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_HighestZoneidx kHighestZoneidx() { return {}; } + static constexpr FieldMetadata_HighestZoneidx kHighestZoneidx{}; void set_highest_zoneidx(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_HighestZoneidx::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -62465,14 +64507,7 @@ class MmCompactionKcompactdSleepFtraceEvent : public ::protozero::Message { int32_t, MmCompactionKcompactdSleepFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Nid kNid() { return {}; } + static constexpr FieldMetadata_Nid kNid{}; void set_nid(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Nid::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -62518,14 +64553,7 @@ class MmCompactionIsolateMigratepagesFtraceEvent : public ::protozero::Message { uint64_t, MmCompactionIsolateMigratepagesFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_StartPfn kStartPfn() { return {}; } + static constexpr FieldMetadata_StartPfn kStartPfn{}; void set_start_pfn(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_StartPfn::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -62543,14 +64571,7 @@ class MmCompactionIsolateMigratepagesFtraceEvent : public ::protozero::Message { uint64_t, MmCompactionIsolateMigratepagesFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_EndPfn kEndPfn() { return {}; } + static constexpr FieldMetadata_EndPfn kEndPfn{}; void set_end_pfn(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_EndPfn::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -62568,14 +64589,7 @@ class MmCompactionIsolateMigratepagesFtraceEvent : public ::protozero::Message { uint64_t, MmCompactionIsolateMigratepagesFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_NrScanned kNrScanned() { return {}; } + static constexpr FieldMetadata_NrScanned kNrScanned{}; void set_nr_scanned(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_NrScanned::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -62593,14 +64607,7 @@ class MmCompactionIsolateMigratepagesFtraceEvent : public ::protozero::Message { uint64_t, MmCompactionIsolateMigratepagesFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_NrTaken kNrTaken() { return {}; } + static constexpr FieldMetadata_NrTaken kNrTaken{}; void set_nr_taken(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_NrTaken::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -62646,14 +64653,7 @@ class MmCompactionIsolateFreepagesFtraceEvent : public ::protozero::Message { uint64_t, MmCompactionIsolateFreepagesFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_StartPfn kStartPfn() { return {}; } + static constexpr FieldMetadata_StartPfn kStartPfn{}; void set_start_pfn(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_StartPfn::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -62671,14 +64671,7 @@ class MmCompactionIsolateFreepagesFtraceEvent : public ::protozero::Message { uint64_t, MmCompactionIsolateFreepagesFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_EndPfn kEndPfn() { return {}; } + static constexpr FieldMetadata_EndPfn kEndPfn{}; void set_end_pfn(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_EndPfn::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -62696,14 +64689,7 @@ class MmCompactionIsolateFreepagesFtraceEvent : public ::protozero::Message { uint64_t, MmCompactionIsolateFreepagesFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_NrScanned kNrScanned() { return {}; } + static constexpr FieldMetadata_NrScanned kNrScanned{}; void set_nr_scanned(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_NrScanned::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -62721,14 +64707,7 @@ class MmCompactionIsolateFreepagesFtraceEvent : public ::protozero::Message { uint64_t, MmCompactionIsolateFreepagesFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_NrTaken kNrTaken() { return {}; } + static constexpr FieldMetadata_NrTaken kNrTaken{}; void set_nr_taken(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_NrTaken::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -62774,14 +64753,7 @@ class MmCompactionFinishedFtraceEvent : public ::protozero::Message { int32_t, MmCompactionFinishedFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Nid kNid() { return {}; } + static constexpr FieldMetadata_Nid kNid{}; void set_nid(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Nid::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -62799,14 +64771,7 @@ class MmCompactionFinishedFtraceEvent : public ::protozero::Message { uint32_t, MmCompactionFinishedFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Idx kIdx() { return {}; } + static constexpr FieldMetadata_Idx kIdx{}; void set_idx(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Idx::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -62824,14 +64789,7 @@ class MmCompactionFinishedFtraceEvent : public ::protozero::Message { int32_t, MmCompactionFinishedFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Order kOrder() { return {}; } + static constexpr FieldMetadata_Order kOrder{}; void set_order(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Order::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -62849,14 +64807,7 @@ class MmCompactionFinishedFtraceEvent : public ::protozero::Message { int32_t, MmCompactionFinishedFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ret kRet() { return {}; } + static constexpr FieldMetadata_Ret kRet{}; void set_ret(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Ret::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -62908,14 +64859,7 @@ class MmCompactionEndFtraceEvent : public ::protozero::Message { uint64_t, MmCompactionEndFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ZoneStart kZoneStart() { return {}; } + static constexpr FieldMetadata_ZoneStart kZoneStart{}; void set_zone_start(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_ZoneStart::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -62933,14 +64877,7 @@ class MmCompactionEndFtraceEvent : public ::protozero::Message { uint64_t, MmCompactionEndFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_MigratePfn kMigratePfn() { return {}; } + static constexpr FieldMetadata_MigratePfn kMigratePfn{}; void set_migrate_pfn(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_MigratePfn::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -62958,14 +64895,7 @@ class MmCompactionEndFtraceEvent : public ::protozero::Message { uint64_t, MmCompactionEndFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_FreePfn kFreePfn() { return {}; } + static constexpr FieldMetadata_FreePfn kFreePfn{}; void set_free_pfn(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_FreePfn::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -62983,14 +64913,7 @@ class MmCompactionEndFtraceEvent : public ::protozero::Message { uint64_t, MmCompactionEndFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ZoneEnd kZoneEnd() { return {}; } + static constexpr FieldMetadata_ZoneEnd kZoneEnd{}; void set_zone_end(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_ZoneEnd::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -63008,14 +64931,7 @@ class MmCompactionEndFtraceEvent : public ::protozero::Message { uint32_t, MmCompactionEndFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Sync kSync() { return {}; } + static constexpr FieldMetadata_Sync kSync{}; void set_sync(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Sync::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -63033,14 +64949,7 @@ class MmCompactionEndFtraceEvent : public ::protozero::Message { int32_t, MmCompactionEndFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Status kStatus() { return {}; } + static constexpr FieldMetadata_Status kStatus{}; void set_status(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Status::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -63092,14 +65001,7 @@ class MmCompactionDeferResetFtraceEvent : public ::protozero::Message { int32_t, MmCompactionDeferResetFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Nid kNid() { return {}; } + static constexpr FieldMetadata_Nid kNid{}; void set_nid(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Nid::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -63117,14 +65019,7 @@ class MmCompactionDeferResetFtraceEvent : public ::protozero::Message { uint32_t, MmCompactionDeferResetFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Idx kIdx() { return {}; } + static constexpr FieldMetadata_Idx kIdx{}; void set_idx(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Idx::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -63142,14 +65037,7 @@ class MmCompactionDeferResetFtraceEvent : public ::protozero::Message { int32_t, MmCompactionDeferResetFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Order kOrder() { return {}; } + static constexpr FieldMetadata_Order kOrder{}; void set_order(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Order::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -63167,14 +65055,7 @@ class MmCompactionDeferResetFtraceEvent : public ::protozero::Message { uint32_t, MmCompactionDeferResetFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Considered kConsidered() { return {}; } + static constexpr FieldMetadata_Considered kConsidered{}; void set_considered(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Considered::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -63192,14 +65073,7 @@ class MmCompactionDeferResetFtraceEvent : public ::protozero::Message { uint32_t, MmCompactionDeferResetFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_DeferShift kDeferShift() { return {}; } + static constexpr FieldMetadata_DeferShift kDeferShift{}; void set_defer_shift(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_DeferShift::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -63217,14 +65091,7 @@ class MmCompactionDeferResetFtraceEvent : public ::protozero::Message { int32_t, MmCompactionDeferResetFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_OrderFailed kOrderFailed() { return {}; } + static constexpr FieldMetadata_OrderFailed kOrderFailed{}; void set_order_failed(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_OrderFailed::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -63276,14 +65143,7 @@ class MmCompactionDeferredFtraceEvent : public ::protozero::Message { int32_t, MmCompactionDeferredFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Nid kNid() { return {}; } + static constexpr FieldMetadata_Nid kNid{}; void set_nid(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Nid::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -63301,14 +65161,7 @@ class MmCompactionDeferredFtraceEvent : public ::protozero::Message { uint32_t, MmCompactionDeferredFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Idx kIdx() { return {}; } + static constexpr FieldMetadata_Idx kIdx{}; void set_idx(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Idx::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -63326,14 +65179,7 @@ class MmCompactionDeferredFtraceEvent : public ::protozero::Message { int32_t, MmCompactionDeferredFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Order kOrder() { return {}; } + static constexpr FieldMetadata_Order kOrder{}; void set_order(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Order::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -63351,14 +65197,7 @@ class MmCompactionDeferredFtraceEvent : public ::protozero::Message { uint32_t, MmCompactionDeferredFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Considered kConsidered() { return {}; } + static constexpr FieldMetadata_Considered kConsidered{}; void set_considered(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Considered::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -63376,14 +65215,7 @@ class MmCompactionDeferredFtraceEvent : public ::protozero::Message { uint32_t, MmCompactionDeferredFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_DeferShift kDeferShift() { return {}; } + static constexpr FieldMetadata_DeferShift kDeferShift{}; void set_defer_shift(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_DeferShift::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -63401,14 +65233,7 @@ class MmCompactionDeferredFtraceEvent : public ::protozero::Message { int32_t, MmCompactionDeferredFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_OrderFailed kOrderFailed() { return {}; } + static constexpr FieldMetadata_OrderFailed kOrderFailed{}; void set_order_failed(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_OrderFailed::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -63460,14 +65285,7 @@ class MmCompactionDeferCompactionFtraceEvent : public ::protozero::Message { int32_t, MmCompactionDeferCompactionFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Nid kNid() { return {}; } + static constexpr FieldMetadata_Nid kNid{}; void set_nid(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Nid::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -63485,14 +65303,7 @@ class MmCompactionDeferCompactionFtraceEvent : public ::protozero::Message { uint32_t, MmCompactionDeferCompactionFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Idx kIdx() { return {}; } + static constexpr FieldMetadata_Idx kIdx{}; void set_idx(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Idx::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -63510,14 +65321,7 @@ class MmCompactionDeferCompactionFtraceEvent : public ::protozero::Message { int32_t, MmCompactionDeferCompactionFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Order kOrder() { return {}; } + static constexpr FieldMetadata_Order kOrder{}; void set_order(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Order::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -63535,14 +65339,7 @@ class MmCompactionDeferCompactionFtraceEvent : public ::protozero::Message { uint32_t, MmCompactionDeferCompactionFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Considered kConsidered() { return {}; } + static constexpr FieldMetadata_Considered kConsidered{}; void set_considered(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Considered::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -63560,14 +65357,7 @@ class MmCompactionDeferCompactionFtraceEvent : public ::protozero::Message { uint32_t, MmCompactionDeferCompactionFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_DeferShift kDeferShift() { return {}; } + static constexpr FieldMetadata_DeferShift kDeferShift{}; void set_defer_shift(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_DeferShift::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -63585,14 +65375,7 @@ class MmCompactionDeferCompactionFtraceEvent : public ::protozero::Message { int32_t, MmCompactionDeferCompactionFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_OrderFailed kOrderFailed() { return {}; } + static constexpr FieldMetadata_OrderFailed kOrderFailed{}; void set_order_failed(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_OrderFailed::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -63641,14 +65424,7 @@ class MmCompactionBeginFtraceEvent : public ::protozero::Message { uint64_t, MmCompactionBeginFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ZoneStart kZoneStart() { return {}; } + static constexpr FieldMetadata_ZoneStart kZoneStart{}; void set_zone_start(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_ZoneStart::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -63666,14 +65442,7 @@ class MmCompactionBeginFtraceEvent : public ::protozero::Message { uint64_t, MmCompactionBeginFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_MigratePfn kMigratePfn() { return {}; } + static constexpr FieldMetadata_MigratePfn kMigratePfn{}; void set_migrate_pfn(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_MigratePfn::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -63691,14 +65460,7 @@ class MmCompactionBeginFtraceEvent : public ::protozero::Message { uint64_t, MmCompactionBeginFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_FreePfn kFreePfn() { return {}; } + static constexpr FieldMetadata_FreePfn kFreePfn{}; void set_free_pfn(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_FreePfn::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -63716,14 +65478,7 @@ class MmCompactionBeginFtraceEvent : public ::protozero::Message { uint64_t, MmCompactionBeginFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ZoneEnd kZoneEnd() { return {}; } + static constexpr FieldMetadata_ZoneEnd kZoneEnd{}; void set_zone_end(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_ZoneEnd::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -63741,14 +65496,7 @@ class MmCompactionBeginFtraceEvent : public ::protozero::Message { uint32_t, MmCompactionBeginFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Sync kSync() { return {}; } + static constexpr FieldMetadata_Sync kSync{}; void set_sync(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Sync::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -63818,14 +65566,7 @@ class CpuhpPauseFtraceEvent : public ::protozero::Message { uint32_t, CpuhpPauseFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ActiveCpus kActiveCpus() { return {}; } + static constexpr FieldMetadata_ActiveCpus kActiveCpus{}; void set_active_cpus(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_ActiveCpus::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -63843,14 +65584,7 @@ class CpuhpPauseFtraceEvent : public ::protozero::Message { uint32_t, CpuhpPauseFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Cpus kCpus() { return {}; } + static constexpr FieldMetadata_Cpus kCpus{}; void set_cpus(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Cpus::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -63868,14 +65602,7 @@ class CpuhpPauseFtraceEvent : public ::protozero::Message { uint32_t, CpuhpPauseFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Pause kPause() { return {}; } + static constexpr FieldMetadata_Pause kPause{}; void set_pause(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Pause::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -63893,14 +65620,7 @@ class CpuhpPauseFtraceEvent : public ::protozero::Message { uint32_t, CpuhpPauseFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Time kTime() { return {}; } + static constexpr FieldMetadata_Time kTime{}; void set_time(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Time::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -63946,14 +65666,7 @@ class CpuhpLatencyFtraceEvent : public ::protozero::Message { uint32_t, CpuhpLatencyFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Cpu kCpu() { return {}; } + static constexpr FieldMetadata_Cpu kCpu{}; void set_cpu(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Cpu::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -63971,14 +65684,7 @@ class CpuhpLatencyFtraceEvent : public ::protozero::Message { int32_t, CpuhpLatencyFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ret kRet() { return {}; } + static constexpr FieldMetadata_Ret kRet{}; void set_ret(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Ret::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -63996,14 +65702,7 @@ class CpuhpLatencyFtraceEvent : public ::protozero::Message { uint32_t, CpuhpLatencyFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_State kState() { return {}; } + static constexpr FieldMetadata_State kState{}; void set_state(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_State::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -64021,14 +65720,7 @@ class CpuhpLatencyFtraceEvent : public ::protozero::Message { uint64_t, CpuhpLatencyFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Time kTime() { return {}; } + static constexpr FieldMetadata_Time kTime{}; void set_time(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Time::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -64074,14 +65766,7 @@ class CpuhpEnterFtraceEvent : public ::protozero::Message { uint32_t, CpuhpEnterFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Cpu kCpu() { return {}; } + static constexpr FieldMetadata_Cpu kCpu{}; void set_cpu(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Cpu::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -64099,14 +65784,7 @@ class CpuhpEnterFtraceEvent : public ::protozero::Message { uint64_t, CpuhpEnterFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Fun kFun() { return {}; } + static constexpr FieldMetadata_Fun kFun{}; void set_fun(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Fun::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -64124,14 +65802,7 @@ class CpuhpEnterFtraceEvent : public ::protozero::Message { int32_t, CpuhpEnterFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Idx kIdx() { return {}; } + static constexpr FieldMetadata_Idx kIdx{}; void set_idx(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Idx::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -64149,14 +65820,7 @@ class CpuhpEnterFtraceEvent : public ::protozero::Message { int32_t, CpuhpEnterFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Target kTarget() { return {}; } + static constexpr FieldMetadata_Target kTarget{}; void set_target(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Target::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -64202,14 +65866,7 @@ class CpuhpMultiEnterFtraceEvent : public ::protozero::Message { uint32_t, CpuhpMultiEnterFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Cpu kCpu() { return {}; } + static constexpr FieldMetadata_Cpu kCpu{}; void set_cpu(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Cpu::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -64227,14 +65884,7 @@ class CpuhpMultiEnterFtraceEvent : public ::protozero::Message { uint64_t, CpuhpMultiEnterFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Fun kFun() { return {}; } + static constexpr FieldMetadata_Fun kFun{}; void set_fun(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Fun::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -64252,14 +65902,7 @@ class CpuhpMultiEnterFtraceEvent : public ::protozero::Message { int32_t, CpuhpMultiEnterFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Idx kIdx() { return {}; } + static constexpr FieldMetadata_Idx kIdx{}; void set_idx(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Idx::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -64277,14 +65920,7 @@ class CpuhpMultiEnterFtraceEvent : public ::protozero::Message { int32_t, CpuhpMultiEnterFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Target kTarget() { return {}; } + static constexpr FieldMetadata_Target kTarget{}; void set_target(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Target::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -64330,14 +65966,7 @@ class CpuhpExitFtraceEvent : public ::protozero::Message { uint32_t, CpuhpExitFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Cpu kCpu() { return {}; } + static constexpr FieldMetadata_Cpu kCpu{}; void set_cpu(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Cpu::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -64355,14 +65984,7 @@ class CpuhpExitFtraceEvent : public ::protozero::Message { int32_t, CpuhpExitFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Idx kIdx() { return {}; } + static constexpr FieldMetadata_Idx kIdx{}; void set_idx(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Idx::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -64380,14 +66002,7 @@ class CpuhpExitFtraceEvent : public ::protozero::Message { int32_t, CpuhpExitFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ret kRet() { return {}; } + static constexpr FieldMetadata_Ret kRet{}; void set_ret(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Ret::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -64405,14 +66020,7 @@ class CpuhpExitFtraceEvent : public ::protozero::Message { int32_t, CpuhpExitFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_State kState() { return {}; } + static constexpr FieldMetadata_State kState{}; void set_state(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_State::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -64488,14 +66096,7 @@ class CrosEcSensorhubDataFtraceEvent : public ::protozero::Message { int64_t, CrosEcSensorhubDataFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_CurrentTime kCurrentTime() { return {}; } + static constexpr FieldMetadata_CurrentTime kCurrentTime{}; void set_current_time(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_CurrentTime::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -64513,14 +66114,7 @@ class CrosEcSensorhubDataFtraceEvent : public ::protozero::Message { int64_t, CrosEcSensorhubDataFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_CurrentTimestamp kCurrentTimestamp() { return {}; } + static constexpr FieldMetadata_CurrentTimestamp kCurrentTimestamp{}; void set_current_timestamp(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_CurrentTimestamp::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -64538,14 +66132,7 @@ class CrosEcSensorhubDataFtraceEvent : public ::protozero::Message { int64_t, CrosEcSensorhubDataFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Delta kDelta() { return {}; } + static constexpr FieldMetadata_Delta kDelta{}; void set_delta(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_Delta::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -64563,14 +66150,7 @@ class CrosEcSensorhubDataFtraceEvent : public ::protozero::Message { uint32_t, CrosEcSensorhubDataFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_EcFifoTimestamp kEcFifoTimestamp() { return {}; } + static constexpr FieldMetadata_EcFifoTimestamp kEcFifoTimestamp{}; void set_ec_fifo_timestamp(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_EcFifoTimestamp::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -64588,14 +66168,7 @@ class CrosEcSensorhubDataFtraceEvent : public ::protozero::Message { uint32_t, CrosEcSensorhubDataFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_EcSensorNum kEcSensorNum() { return {}; } + static constexpr FieldMetadata_EcSensorNum kEcSensorNum{}; void set_ec_sensor_num(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_EcSensorNum::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -64613,14 +66186,7 @@ class CrosEcSensorhubDataFtraceEvent : public ::protozero::Message { int64_t, CrosEcSensorhubDataFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_FifoTimestamp kFifoTimestamp() { return {}; } + static constexpr FieldMetadata_FifoTimestamp kFifoTimestamp{}; void set_fifo_timestamp(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_FifoTimestamp::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -64690,14 +66256,7 @@ class DmaFenceWaitEndFtraceEvent : public ::protozero::Message { uint32_t, DmaFenceWaitEndFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Context kContext() { return {}; } + static constexpr FieldMetadata_Context kContext{}; void set_context(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Context::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -64715,17 +66274,13 @@ class DmaFenceWaitEndFtraceEvent : public ::protozero::Message { std::string, DmaFenceWaitEndFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Driver kDriver() { return {}; } + static constexpr FieldMetadata_Driver kDriver{}; void set_driver(const char* data, size_t size) { AppendBytes(FieldMetadata_Driver::kFieldId, data, size); } + void set_driver(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Driver::kFieldId, chars.data, chars.size); + } void set_driver(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Driver::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -64743,14 +66298,7 @@ class DmaFenceWaitEndFtraceEvent : public ::protozero::Message { uint32_t, DmaFenceWaitEndFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Seqno kSeqno() { return {}; } + static constexpr FieldMetadata_Seqno kSeqno{}; void set_seqno(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Seqno::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -64768,17 +66316,13 @@ class DmaFenceWaitEndFtraceEvent : public ::protozero::Message { std::string, DmaFenceWaitEndFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Timeline kTimeline() { return {}; } + static constexpr FieldMetadata_Timeline kTimeline{}; void set_timeline(const char* data, size_t size) { AppendBytes(FieldMetadata_Timeline::kFieldId, data, size); } + void set_timeline(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Timeline::kFieldId, chars.data, chars.size); + } void set_timeline(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Timeline::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -64824,14 +66368,7 @@ class DmaFenceWaitStartFtraceEvent : public ::protozero::Message { uint32_t, DmaFenceWaitStartFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Context kContext() { return {}; } + static constexpr FieldMetadata_Context kContext{}; void set_context(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Context::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -64849,17 +66386,13 @@ class DmaFenceWaitStartFtraceEvent : public ::protozero::Message { std::string, DmaFenceWaitStartFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Driver kDriver() { return {}; } + static constexpr FieldMetadata_Driver kDriver{}; void set_driver(const char* data, size_t size) { AppendBytes(FieldMetadata_Driver::kFieldId, data, size); } + void set_driver(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Driver::kFieldId, chars.data, chars.size); + } void set_driver(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Driver::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -64877,14 +66410,7 @@ class DmaFenceWaitStartFtraceEvent : public ::protozero::Message { uint32_t, DmaFenceWaitStartFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Seqno kSeqno() { return {}; } + static constexpr FieldMetadata_Seqno kSeqno{}; void set_seqno(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Seqno::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -64902,17 +66428,13 @@ class DmaFenceWaitStartFtraceEvent : public ::protozero::Message { std::string, DmaFenceWaitStartFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Timeline kTimeline() { return {}; } + static constexpr FieldMetadata_Timeline kTimeline{}; void set_timeline(const char* data, size_t size) { AppendBytes(FieldMetadata_Timeline::kFieldId, data, size); } + void set_timeline(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Timeline::kFieldId, chars.data, chars.size); + } void set_timeline(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Timeline::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -64958,14 +66480,7 @@ class DmaFenceSignaledFtraceEvent : public ::protozero::Message { uint32_t, DmaFenceSignaledFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Context kContext() { return {}; } + static constexpr FieldMetadata_Context kContext{}; void set_context(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Context::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -64983,17 +66498,13 @@ class DmaFenceSignaledFtraceEvent : public ::protozero::Message { std::string, DmaFenceSignaledFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Driver kDriver() { return {}; } + static constexpr FieldMetadata_Driver kDriver{}; void set_driver(const char* data, size_t size) { AppendBytes(FieldMetadata_Driver::kFieldId, data, size); } + void set_driver(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Driver::kFieldId, chars.data, chars.size); + } void set_driver(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Driver::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -65011,14 +66522,7 @@ class DmaFenceSignaledFtraceEvent : public ::protozero::Message { uint32_t, DmaFenceSignaledFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Seqno kSeqno() { return {}; } + static constexpr FieldMetadata_Seqno kSeqno{}; void set_seqno(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Seqno::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -65036,17 +66540,13 @@ class DmaFenceSignaledFtraceEvent : public ::protozero::Message { std::string, DmaFenceSignaledFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Timeline kTimeline() { return {}; } + static constexpr FieldMetadata_Timeline kTimeline{}; void set_timeline(const char* data, size_t size) { AppendBytes(FieldMetadata_Timeline::kFieldId, data, size); } + void set_timeline(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Timeline::kFieldId, chars.data, chars.size); + } void set_timeline(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Timeline::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -65092,14 +66592,7 @@ class DmaFenceEmitFtraceEvent : public ::protozero::Message { uint32_t, DmaFenceEmitFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Context kContext() { return {}; } + static constexpr FieldMetadata_Context kContext{}; void set_context(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Context::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -65117,17 +66610,13 @@ class DmaFenceEmitFtraceEvent : public ::protozero::Message { std::string, DmaFenceEmitFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Driver kDriver() { return {}; } + static constexpr FieldMetadata_Driver kDriver{}; void set_driver(const char* data, size_t size) { AppendBytes(FieldMetadata_Driver::kFieldId, data, size); } + void set_driver(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Driver::kFieldId, chars.data, chars.size); + } void set_driver(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Driver::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -65145,14 +66634,7 @@ class DmaFenceEmitFtraceEvent : public ::protozero::Message { uint32_t, DmaFenceEmitFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Seqno kSeqno() { return {}; } + static constexpr FieldMetadata_Seqno kSeqno{}; void set_seqno(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Seqno::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -65170,17 +66652,13 @@ class DmaFenceEmitFtraceEvent : public ::protozero::Message { std::string, DmaFenceEmitFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Timeline kTimeline() { return {}; } + static constexpr FieldMetadata_Timeline kTimeline{}; void set_timeline(const char* data, size_t size) { AppendBytes(FieldMetadata_Timeline::kFieldId, data, size); } + void set_timeline(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Timeline::kFieldId, chars.data, chars.size); + } void set_timeline(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Timeline::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -65226,14 +66704,7 @@ class DmaFenceInitFtraceEvent : public ::protozero::Message { uint32_t, DmaFenceInitFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Context kContext() { return {}; } + static constexpr FieldMetadata_Context kContext{}; void set_context(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Context::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -65251,17 +66722,13 @@ class DmaFenceInitFtraceEvent : public ::protozero::Message { std::string, DmaFenceInitFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Driver kDriver() { return {}; } + static constexpr FieldMetadata_Driver kDriver{}; void set_driver(const char* data, size_t size) { AppendBytes(FieldMetadata_Driver::kFieldId, data, size); } + void set_driver(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Driver::kFieldId, chars.data, chars.size); + } void set_driver(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Driver::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -65279,14 +66746,7 @@ class DmaFenceInitFtraceEvent : public ::protozero::Message { uint32_t, DmaFenceInitFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Seqno kSeqno() { return {}; } + static constexpr FieldMetadata_Seqno kSeqno{}; void set_seqno(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Seqno::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -65304,17 +66764,13 @@ class DmaFenceInitFtraceEvent : public ::protozero::Message { std::string, DmaFenceInitFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Timeline kTimeline() { return {}; } + static constexpr FieldMetadata_Timeline kTimeline{}; void set_timeline(const char* data, size_t size) { AppendBytes(FieldMetadata_Timeline::kFieldId, data, size); } + void set_timeline(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Timeline::kFieldId, chars.data, chars.size); + } void set_timeline(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Timeline::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -65381,14 +66837,7 @@ class DmaHeapStatFtraceEvent : public ::protozero::Message { uint64_t, DmaHeapStatFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Inode kInode() { return {}; } + static constexpr FieldMetadata_Inode kInode{}; void set_inode(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Inode::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -65406,14 +66855,7 @@ class DmaHeapStatFtraceEvent : public ::protozero::Message { int64_t, DmaHeapStatFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Len kLen() { return {}; } + static constexpr FieldMetadata_Len kLen{}; void set_len(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_Len::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -65431,14 +66873,7 @@ class DmaHeapStatFtraceEvent : public ::protozero::Message { uint64_t, DmaHeapStatFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_TotalAllocated kTotalAllocated() { return {}; } + static constexpr FieldMetadata_TotalAllocated kTotalAllocated{}; void set_total_allocated(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_TotalAllocated::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -65514,14 +66949,7 @@ class DpuTracingMarkWriteFtraceEvent : public ::protozero::Message { int32_t, DpuTracingMarkWriteFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Pid kPid() { return {}; } + static constexpr FieldMetadata_Pid kPid{}; void set_pid(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Pid::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -65539,17 +66967,13 @@ class DpuTracingMarkWriteFtraceEvent : public ::protozero::Message { std::string, DpuTracingMarkWriteFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_TraceName kTraceName() { return {}; } + static constexpr FieldMetadata_TraceName kTraceName{}; void set_trace_name(const char* data, size_t size) { AppendBytes(FieldMetadata_TraceName::kFieldId, data, size); } + void set_trace_name(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_TraceName::kFieldId, chars.data, chars.size); + } void set_trace_name(std::string value) { static constexpr uint32_t field_id = FieldMetadata_TraceName::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -65567,14 +66991,7 @@ class DpuTracingMarkWriteFtraceEvent : public ::protozero::Message { uint32_t, DpuTracingMarkWriteFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_TraceBegin kTraceBegin() { return {}; } + static constexpr FieldMetadata_TraceBegin kTraceBegin{}; void set_trace_begin(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_TraceBegin::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -65592,17 +67009,13 @@ class DpuTracingMarkWriteFtraceEvent : public ::protozero::Message { std::string, DpuTracingMarkWriteFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Name kName() { return {}; } + static constexpr FieldMetadata_Name kName{}; void set_name(const char* data, size_t size) { AppendBytes(FieldMetadata_Name::kFieldId, data, size); } + void set_name(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Name::kFieldId, chars.data, chars.size); + } void set_name(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Name::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -65620,14 +67033,7 @@ class DpuTracingMarkWriteFtraceEvent : public ::protozero::Message { uint32_t, DpuTracingMarkWriteFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Type kType() { return {}; } + static constexpr FieldMetadata_Type kType{}; void set_type(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Type::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -65645,14 +67051,7 @@ class DpuTracingMarkWriteFtraceEvent : public ::protozero::Message { int32_t, DpuTracingMarkWriteFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Value kValue() { return {}; } + static constexpr FieldMetadata_Value kValue{}; void set_value(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Value::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -65719,14 +67118,7 @@ class DrmVblankEventDeliveredFtraceEvent : public ::protozero::Message { int32_t, DrmVblankEventDeliveredFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Crtc kCrtc() { return {}; } + static constexpr FieldMetadata_Crtc kCrtc{}; void set_crtc(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Crtc::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -65744,14 +67136,7 @@ class DrmVblankEventDeliveredFtraceEvent : public ::protozero::Message { uint64_t, DrmVblankEventDeliveredFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_File kFile() { return {}; } + static constexpr FieldMetadata_File kFile{}; void set_file(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_File::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -65769,14 +67154,7 @@ class DrmVblankEventDeliveredFtraceEvent : public ::protozero::Message { uint32_t, DrmVblankEventDeliveredFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Seq kSeq() { return {}; } + static constexpr FieldMetadata_Seq kSeq{}; void set_seq(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Seq::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -65822,14 +67200,7 @@ class DrmVblankEventFtraceEvent : public ::protozero::Message { int32_t, DrmVblankEventFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Crtc kCrtc() { return {}; } + static constexpr FieldMetadata_Crtc kCrtc{}; void set_crtc(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Crtc::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -65847,14 +67218,7 @@ class DrmVblankEventFtraceEvent : public ::protozero::Message { uint32_t, DrmVblankEventFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_HighPrec kHighPrec() { return {}; } + static constexpr FieldMetadata_HighPrec kHighPrec{}; void set_high_prec(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_HighPrec::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -65872,14 +67236,7 @@ class DrmVblankEventFtraceEvent : public ::protozero::Message { uint32_t, DrmVblankEventFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Seq kSeq() { return {}; } + static constexpr FieldMetadata_Seq kSeq{}; void set_seq(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Seq::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -65897,14 +67254,7 @@ class DrmVblankEventFtraceEvent : public ::protozero::Message { int64_t, DrmVblankEventFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Time kTime() { return {}; } + static constexpr FieldMetadata_Time kTime{}; void set_time(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_Time::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -65977,14 +67327,7 @@ class Ext4ZeroRangeFtraceEvent : public ::protozero::Message { uint64_t, Ext4ZeroRangeFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Dev kDev() { return {}; } + static constexpr FieldMetadata_Dev kDev{}; void set_dev(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Dev::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -66002,14 +67345,7 @@ class Ext4ZeroRangeFtraceEvent : public ::protozero::Message { uint64_t, Ext4ZeroRangeFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ino kIno() { return {}; } + static constexpr FieldMetadata_Ino kIno{}; void set_ino(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Ino::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -66027,14 +67363,7 @@ class Ext4ZeroRangeFtraceEvent : public ::protozero::Message { int64_t, Ext4ZeroRangeFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Offset kOffset() { return {}; } + static constexpr FieldMetadata_Offset kOffset{}; void set_offset(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_Offset::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -66052,14 +67381,7 @@ class Ext4ZeroRangeFtraceEvent : public ::protozero::Message { int64_t, Ext4ZeroRangeFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Len kLen() { return {}; } + static constexpr FieldMetadata_Len kLen{}; void set_len(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_Len::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -66077,14 +67399,7 @@ class Ext4ZeroRangeFtraceEvent : public ::protozero::Message { int32_t, Ext4ZeroRangeFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Mode kMode() { return {}; } + static constexpr FieldMetadata_Mode kMode{}; void set_mode(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Mode::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -66139,14 +67454,7 @@ class Ext4WritepagesResultFtraceEvent : public ::protozero::Message { uint64_t, Ext4WritepagesResultFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Dev kDev() { return {}; } + static constexpr FieldMetadata_Dev kDev{}; void set_dev(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Dev::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -66164,14 +67472,7 @@ class Ext4WritepagesResultFtraceEvent : public ::protozero::Message { uint64_t, Ext4WritepagesResultFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ino kIno() { return {}; } + static constexpr FieldMetadata_Ino kIno{}; void set_ino(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Ino::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -66189,14 +67490,7 @@ class Ext4WritepagesResultFtraceEvent : public ::protozero::Message { int32_t, Ext4WritepagesResultFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ret kRet() { return {}; } + static constexpr FieldMetadata_Ret kRet{}; void set_ret(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Ret::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -66214,14 +67508,7 @@ class Ext4WritepagesResultFtraceEvent : public ::protozero::Message { int32_t, Ext4WritepagesResultFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_PagesWritten kPagesWritten() { return {}; } + static constexpr FieldMetadata_PagesWritten kPagesWritten{}; void set_pages_written(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_PagesWritten::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -66239,14 +67526,7 @@ class Ext4WritepagesResultFtraceEvent : public ::protozero::Message { int64_t, Ext4WritepagesResultFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_PagesSkipped kPagesSkipped() { return {}; } + static constexpr FieldMetadata_PagesSkipped kPagesSkipped{}; void set_pages_skipped(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_PagesSkipped::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -66264,14 +67544,7 @@ class Ext4WritepagesResultFtraceEvent : public ::protozero::Message { uint64_t, Ext4WritepagesResultFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_WritebackIndex kWritebackIndex() { return {}; } + static constexpr FieldMetadata_WritebackIndex kWritebackIndex{}; void set_writeback_index(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_WritebackIndex::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -66289,14 +67562,7 @@ class Ext4WritepagesResultFtraceEvent : public ::protozero::Message { int32_t, Ext4WritepagesResultFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_SyncMode kSyncMode() { return {}; } + static constexpr FieldMetadata_SyncMode kSyncMode{}; void set_sync_mode(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_SyncMode::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -66360,14 +67626,7 @@ class Ext4WritepagesFtraceEvent : public ::protozero::Message { uint64_t, Ext4WritepagesFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Dev kDev() { return {}; } + static constexpr FieldMetadata_Dev kDev{}; void set_dev(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Dev::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -66385,14 +67644,7 @@ class Ext4WritepagesFtraceEvent : public ::protozero::Message { uint64_t, Ext4WritepagesFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ino kIno() { return {}; } + static constexpr FieldMetadata_Ino kIno{}; void set_ino(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Ino::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -66410,14 +67662,7 @@ class Ext4WritepagesFtraceEvent : public ::protozero::Message { int64_t, Ext4WritepagesFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_NrToWrite kNrToWrite() { return {}; } + static constexpr FieldMetadata_NrToWrite kNrToWrite{}; void set_nr_to_write(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_NrToWrite::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -66435,14 +67680,7 @@ class Ext4WritepagesFtraceEvent : public ::protozero::Message { int64_t, Ext4WritepagesFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_PagesSkipped kPagesSkipped() { return {}; } + static constexpr FieldMetadata_PagesSkipped kPagesSkipped{}; void set_pages_skipped(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_PagesSkipped::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -66460,14 +67698,7 @@ class Ext4WritepagesFtraceEvent : public ::protozero::Message { int64_t, Ext4WritepagesFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_RangeStart kRangeStart() { return {}; } + static constexpr FieldMetadata_RangeStart kRangeStart{}; void set_range_start(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_RangeStart::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -66485,14 +67716,7 @@ class Ext4WritepagesFtraceEvent : public ::protozero::Message { int64_t, Ext4WritepagesFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_RangeEnd kRangeEnd() { return {}; } + static constexpr FieldMetadata_RangeEnd kRangeEnd{}; void set_range_end(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_RangeEnd::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -66510,14 +67734,7 @@ class Ext4WritepagesFtraceEvent : public ::protozero::Message { uint64_t, Ext4WritepagesFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_WritebackIndex kWritebackIndex() { return {}; } + static constexpr FieldMetadata_WritebackIndex kWritebackIndex{}; void set_writeback_index(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_WritebackIndex::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -66535,14 +67752,7 @@ class Ext4WritepagesFtraceEvent : public ::protozero::Message { int32_t, Ext4WritepagesFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_SyncMode kSyncMode() { return {}; } + static constexpr FieldMetadata_SyncMode kSyncMode{}; void set_sync_mode(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_SyncMode::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -66560,14 +67770,7 @@ class Ext4WritepagesFtraceEvent : public ::protozero::Message { uint32_t, Ext4WritepagesFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ForKupdate kForKupdate() { return {}; } + static constexpr FieldMetadata_ForKupdate kForKupdate{}; void set_for_kupdate(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_ForKupdate::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -66585,14 +67788,7 @@ class Ext4WritepagesFtraceEvent : public ::protozero::Message { uint32_t, Ext4WritepagesFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_RangeCyclic kRangeCyclic() { return {}; } + static constexpr FieldMetadata_RangeCyclic kRangeCyclic{}; void set_range_cyclic(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_RangeCyclic::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -66635,14 +67831,7 @@ class Ext4WritepageFtraceEvent : public ::protozero::Message { uint64_t, Ext4WritepageFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Dev kDev() { return {}; } + static constexpr FieldMetadata_Dev kDev{}; void set_dev(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Dev::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -66660,14 +67849,7 @@ class Ext4WritepageFtraceEvent : public ::protozero::Message { uint64_t, Ext4WritepageFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ino kIno() { return {}; } + static constexpr FieldMetadata_Ino kIno{}; void set_ino(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Ino::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -66685,14 +67867,7 @@ class Ext4WritepageFtraceEvent : public ::protozero::Message { uint64_t, Ext4WritepageFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Index kIndex() { return {}; } + static constexpr FieldMetadata_Index kIndex{}; void set_index(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Index::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -66741,14 +67916,7 @@ class Ext4WriteEndFtraceEvent : public ::protozero::Message { uint64_t, Ext4WriteEndFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Dev kDev() { return {}; } + static constexpr FieldMetadata_Dev kDev{}; void set_dev(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Dev::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -66766,14 +67934,7 @@ class Ext4WriteEndFtraceEvent : public ::protozero::Message { uint64_t, Ext4WriteEndFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ino kIno() { return {}; } + static constexpr FieldMetadata_Ino kIno{}; void set_ino(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Ino::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -66791,14 +67952,7 @@ class Ext4WriteEndFtraceEvent : public ::protozero::Message { int64_t, Ext4WriteEndFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Pos kPos() { return {}; } + static constexpr FieldMetadata_Pos kPos{}; void set_pos(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_Pos::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -66816,14 +67970,7 @@ class Ext4WriteEndFtraceEvent : public ::protozero::Message { uint32_t, Ext4WriteEndFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Len kLen() { return {}; } + static constexpr FieldMetadata_Len kLen{}; void set_len(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Len::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -66841,14 +67988,7 @@ class Ext4WriteEndFtraceEvent : public ::protozero::Message { uint32_t, Ext4WriteEndFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Copied kCopied() { return {}; } + static constexpr FieldMetadata_Copied kCopied{}; void set_copied(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Copied::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -66897,14 +68037,7 @@ class Ext4WriteBeginFtraceEvent : public ::protozero::Message { uint64_t, Ext4WriteBeginFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Dev kDev() { return {}; } + static constexpr FieldMetadata_Dev kDev{}; void set_dev(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Dev::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -66922,14 +68055,7 @@ class Ext4WriteBeginFtraceEvent : public ::protozero::Message { uint64_t, Ext4WriteBeginFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ino kIno() { return {}; } + static constexpr FieldMetadata_Ino kIno{}; void set_ino(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Ino::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -66947,14 +68073,7 @@ class Ext4WriteBeginFtraceEvent : public ::protozero::Message { int64_t, Ext4WriteBeginFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Pos kPos() { return {}; } + static constexpr FieldMetadata_Pos kPos{}; void set_pos(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_Pos::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -66972,14 +68091,7 @@ class Ext4WriteBeginFtraceEvent : public ::protozero::Message { uint32_t, Ext4WriteBeginFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Len kLen() { return {}; } + static constexpr FieldMetadata_Len kLen{}; void set_len(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Len::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -66997,14 +68109,7 @@ class Ext4WriteBeginFtraceEvent : public ::protozero::Message { uint32_t, Ext4WriteBeginFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Flags kFlags() { return {}; } + static constexpr FieldMetadata_Flags kFlags{}; void set_flags(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Flags::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -67047,14 +68152,7 @@ class Ext4UnlinkExitFtraceEvent : public ::protozero::Message { uint64_t, Ext4UnlinkExitFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Dev kDev() { return {}; } + static constexpr FieldMetadata_Dev kDev{}; void set_dev(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Dev::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -67072,14 +68170,7 @@ class Ext4UnlinkExitFtraceEvent : public ::protozero::Message { uint64_t, Ext4UnlinkExitFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ino kIno() { return {}; } + static constexpr FieldMetadata_Ino kIno{}; void set_ino(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Ino::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -67097,14 +68188,7 @@ class Ext4UnlinkExitFtraceEvent : public ::protozero::Message { int32_t, Ext4UnlinkExitFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ret kRet() { return {}; } + static constexpr FieldMetadata_Ret kRet{}; void set_ret(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Ret::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -67150,14 +68234,7 @@ class Ext4UnlinkEnterFtraceEvent : public ::protozero::Message { uint64_t, Ext4UnlinkEnterFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Dev kDev() { return {}; } + static constexpr FieldMetadata_Dev kDev{}; void set_dev(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Dev::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -67175,14 +68252,7 @@ class Ext4UnlinkEnterFtraceEvent : public ::protozero::Message { uint64_t, Ext4UnlinkEnterFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ino kIno() { return {}; } + static constexpr FieldMetadata_Ino kIno{}; void set_ino(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Ino::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -67200,14 +68270,7 @@ class Ext4UnlinkEnterFtraceEvent : public ::protozero::Message { uint64_t, Ext4UnlinkEnterFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Parent kParent() { return {}; } + static constexpr FieldMetadata_Parent kParent{}; void set_parent(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Parent::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -67225,14 +68288,7 @@ class Ext4UnlinkEnterFtraceEvent : public ::protozero::Message { int64_t, Ext4UnlinkEnterFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Size kSize() { return {}; } + static constexpr FieldMetadata_Size kSize{}; void set_size(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_Size::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -67275,14 +68331,7 @@ class Ext4TruncateExitFtraceEvent : public ::protozero::Message { uint64_t, Ext4TruncateExitFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Dev kDev() { return {}; } + static constexpr FieldMetadata_Dev kDev{}; void set_dev(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Dev::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -67300,14 +68349,7 @@ class Ext4TruncateExitFtraceEvent : public ::protozero::Message { uint64_t, Ext4TruncateExitFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ino kIno() { return {}; } + static constexpr FieldMetadata_Ino kIno{}; void set_ino(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Ino::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -67325,14 +68367,7 @@ class Ext4TruncateExitFtraceEvent : public ::protozero::Message { uint64_t, Ext4TruncateExitFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Blocks kBlocks() { return {}; } + static constexpr FieldMetadata_Blocks kBlocks{}; void set_blocks(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Blocks::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -67375,14 +68410,7 @@ class Ext4TruncateEnterFtraceEvent : public ::protozero::Message { uint64_t, Ext4TruncateEnterFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Dev kDev() { return {}; } + static constexpr FieldMetadata_Dev kDev{}; void set_dev(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Dev::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -67400,14 +68428,7 @@ class Ext4TruncateEnterFtraceEvent : public ::protozero::Message { uint64_t, Ext4TruncateEnterFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ino kIno() { return {}; } + static constexpr FieldMetadata_Ino kIno{}; void set_ino(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Ino::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -67425,14 +68446,7 @@ class Ext4TruncateEnterFtraceEvent : public ::protozero::Message { uint64_t, Ext4TruncateEnterFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Blocks kBlocks() { return {}; } + static constexpr FieldMetadata_Blocks kBlocks{}; void set_blocks(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Blocks::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -67481,14 +68495,7 @@ class Ext4TrimExtentFtraceEvent : public ::protozero::Message { int32_t, Ext4TrimExtentFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_DevMajor kDevMajor() { return {}; } + static constexpr FieldMetadata_DevMajor kDevMajor{}; void set_dev_major(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_DevMajor::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -67506,14 +68513,7 @@ class Ext4TrimExtentFtraceEvent : public ::protozero::Message { int32_t, Ext4TrimExtentFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_DevMinor kDevMinor() { return {}; } + static constexpr FieldMetadata_DevMinor kDevMinor{}; void set_dev_minor(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_DevMinor::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -67531,14 +68531,7 @@ class Ext4TrimExtentFtraceEvent : public ::protozero::Message { uint32_t, Ext4TrimExtentFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Group kGroup() { return {}; } + static constexpr FieldMetadata_Group kGroup{}; void set_group(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Group::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -67556,14 +68549,7 @@ class Ext4TrimExtentFtraceEvent : public ::protozero::Message { int32_t, Ext4TrimExtentFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Start kStart() { return {}; } + static constexpr FieldMetadata_Start kStart{}; void set_start(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Start::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -67581,14 +68567,7 @@ class Ext4TrimExtentFtraceEvent : public ::protozero::Message { int32_t, Ext4TrimExtentFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Len kLen() { return {}; } + static constexpr FieldMetadata_Len kLen{}; void set_len(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Len::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -67637,14 +68616,7 @@ class Ext4TrimAllFreeFtraceEvent : public ::protozero::Message { int32_t, Ext4TrimAllFreeFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_DevMajor kDevMajor() { return {}; } + static constexpr FieldMetadata_DevMajor kDevMajor{}; void set_dev_major(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_DevMajor::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -67662,14 +68634,7 @@ class Ext4TrimAllFreeFtraceEvent : public ::protozero::Message { int32_t, Ext4TrimAllFreeFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_DevMinor kDevMinor() { return {}; } + static constexpr FieldMetadata_DevMinor kDevMinor{}; void set_dev_minor(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_DevMinor::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -67687,14 +68652,7 @@ class Ext4TrimAllFreeFtraceEvent : public ::protozero::Message { uint32_t, Ext4TrimAllFreeFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Group kGroup() { return {}; } + static constexpr FieldMetadata_Group kGroup{}; void set_group(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Group::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -67712,14 +68670,7 @@ class Ext4TrimAllFreeFtraceEvent : public ::protozero::Message { int32_t, Ext4TrimAllFreeFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Start kStart() { return {}; } + static constexpr FieldMetadata_Start kStart{}; void set_start(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Start::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -67737,14 +68688,7 @@ class Ext4TrimAllFreeFtraceEvent : public ::protozero::Message { int32_t, Ext4TrimAllFreeFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Len kLen() { return {}; } + static constexpr FieldMetadata_Len kLen{}; void set_len(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Len::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -67784,14 +68728,7 @@ class Ext4SyncFsFtraceEvent : public ::protozero::Message { uint64_t, Ext4SyncFsFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Dev kDev() { return {}; } + static constexpr FieldMetadata_Dev kDev{}; void set_dev(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Dev::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -67809,14 +68746,7 @@ class Ext4SyncFsFtraceEvent : public ::protozero::Message { int32_t, Ext4SyncFsFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Wait kWait() { return {}; } + static constexpr FieldMetadata_Wait kWait{}; void set_wait(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Wait::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -67859,14 +68789,7 @@ class Ext4RequestInodeFtraceEvent : public ::protozero::Message { uint64_t, Ext4RequestInodeFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Dev kDev() { return {}; } + static constexpr FieldMetadata_Dev kDev{}; void set_dev(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Dev::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -67884,14 +68807,7 @@ class Ext4RequestInodeFtraceEvent : public ::protozero::Message { uint64_t, Ext4RequestInodeFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Dir kDir() { return {}; } + static constexpr FieldMetadata_Dir kDir{}; void set_dir(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Dir::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -67909,14 +68825,7 @@ class Ext4RequestInodeFtraceEvent : public ::protozero::Message { uint32_t, Ext4RequestInodeFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Mode kMode() { return {}; } + static constexpr FieldMetadata_Mode kMode{}; void set_mode(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Mode::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -67980,14 +68889,7 @@ class Ext4RequestBlocksFtraceEvent : public ::protozero::Message { uint64_t, Ext4RequestBlocksFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Dev kDev() { return {}; } + static constexpr FieldMetadata_Dev kDev{}; void set_dev(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Dev::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -68005,14 +68907,7 @@ class Ext4RequestBlocksFtraceEvent : public ::protozero::Message { uint64_t, Ext4RequestBlocksFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ino kIno() { return {}; } + static constexpr FieldMetadata_Ino kIno{}; void set_ino(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Ino::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -68030,14 +68925,7 @@ class Ext4RequestBlocksFtraceEvent : public ::protozero::Message { uint32_t, Ext4RequestBlocksFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Len kLen() { return {}; } + static constexpr FieldMetadata_Len kLen{}; void set_len(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Len::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -68055,14 +68943,7 @@ class Ext4RequestBlocksFtraceEvent : public ::protozero::Message { uint32_t, Ext4RequestBlocksFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Logical kLogical() { return {}; } + static constexpr FieldMetadata_Logical kLogical{}; void set_logical(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Logical::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -68080,14 +68961,7 @@ class Ext4RequestBlocksFtraceEvent : public ::protozero::Message { uint32_t, Ext4RequestBlocksFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Lleft kLleft() { return {}; } + static constexpr FieldMetadata_Lleft kLleft{}; void set_lleft(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Lleft::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -68105,14 +68979,7 @@ class Ext4RequestBlocksFtraceEvent : public ::protozero::Message { uint32_t, Ext4RequestBlocksFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Lright kLright() { return {}; } + static constexpr FieldMetadata_Lright kLright{}; void set_lright(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Lright::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -68130,14 +68997,7 @@ class Ext4RequestBlocksFtraceEvent : public ::protozero::Message { uint64_t, Ext4RequestBlocksFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Goal kGoal() { return {}; } + static constexpr FieldMetadata_Goal kGoal{}; void set_goal(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Goal::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -68155,14 +69015,7 @@ class Ext4RequestBlocksFtraceEvent : public ::protozero::Message { uint64_t, Ext4RequestBlocksFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Pleft kPleft() { return {}; } + static constexpr FieldMetadata_Pleft kPleft{}; void set_pleft(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Pleft::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -68180,14 +69033,7 @@ class Ext4RequestBlocksFtraceEvent : public ::protozero::Message { uint64_t, Ext4RequestBlocksFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Pright kPright() { return {}; } + static constexpr FieldMetadata_Pright kPright{}; void set_pright(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Pright::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -68205,14 +69051,7 @@ class Ext4RequestBlocksFtraceEvent : public ::protozero::Message { uint32_t, Ext4RequestBlocksFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Flags kFlags() { return {}; } + static constexpr FieldMetadata_Flags kFlags{}; void set_flags(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Flags::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -68279,14 +69118,7 @@ class Ext4RemoveBlocksFtraceEvent : public ::protozero::Message { uint64_t, Ext4RemoveBlocksFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Dev kDev() { return {}; } + static constexpr FieldMetadata_Dev kDev{}; void set_dev(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Dev::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -68304,14 +69136,7 @@ class Ext4RemoveBlocksFtraceEvent : public ::protozero::Message { uint64_t, Ext4RemoveBlocksFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ino kIno() { return {}; } + static constexpr FieldMetadata_Ino kIno{}; void set_ino(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Ino::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -68329,14 +69154,7 @@ class Ext4RemoveBlocksFtraceEvent : public ::protozero::Message { uint32_t, Ext4RemoveBlocksFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_From kFrom() { return {}; } + static constexpr FieldMetadata_From kFrom{}; void set_from(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_From::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -68354,14 +69172,7 @@ class Ext4RemoveBlocksFtraceEvent : public ::protozero::Message { uint32_t, Ext4RemoveBlocksFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_To kTo() { return {}; } + static constexpr FieldMetadata_To kTo{}; void set_to(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_To::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -68379,14 +69190,7 @@ class Ext4RemoveBlocksFtraceEvent : public ::protozero::Message { int64_t, Ext4RemoveBlocksFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Partial kPartial() { return {}; } + static constexpr FieldMetadata_Partial kPartial{}; void set_partial(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_Partial::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -68404,14 +69208,7 @@ class Ext4RemoveBlocksFtraceEvent : public ::protozero::Message { uint64_t, Ext4RemoveBlocksFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_EePblk kEePblk() { return {}; } + static constexpr FieldMetadata_EePblk kEePblk{}; void set_ee_pblk(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_EePblk::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -68429,14 +69226,7 @@ class Ext4RemoveBlocksFtraceEvent : public ::protozero::Message { uint32_t, Ext4RemoveBlocksFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_EeLblk kEeLblk() { return {}; } + static constexpr FieldMetadata_EeLblk kEeLblk{}; void set_ee_lblk(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_EeLblk::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -68454,14 +69244,7 @@ class Ext4RemoveBlocksFtraceEvent : public ::protozero::Message { uint32_t, Ext4RemoveBlocksFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_EeLen kEeLen() { return {}; } + static constexpr FieldMetadata_EeLen kEeLen{}; void set_ee_len(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_EeLen::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -68479,14 +69262,7 @@ class Ext4RemoveBlocksFtraceEvent : public ::protozero::Message { uint32_t, Ext4RemoveBlocksFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_PcLblk kPcLblk() { return {}; } + static constexpr FieldMetadata_PcLblk kPcLblk{}; void set_pc_lblk(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_PcLblk::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -68504,14 +69280,7 @@ class Ext4RemoveBlocksFtraceEvent : public ::protozero::Message { uint64_t, Ext4RemoveBlocksFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_PcPclu kPcPclu() { return {}; } + static constexpr FieldMetadata_PcPclu kPcPclu{}; void set_pc_pclu(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_PcPclu::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -68529,14 +69298,7 @@ class Ext4RemoveBlocksFtraceEvent : public ::protozero::Message { int32_t, Ext4RemoveBlocksFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_PcState kPcState() { return {}; } + static constexpr FieldMetadata_PcState kPcState{}; void set_pc_state(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_PcState::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -68579,14 +69341,7 @@ class Ext4ReleasepageFtraceEvent : public ::protozero::Message { uint64_t, Ext4ReleasepageFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Dev kDev() { return {}; } + static constexpr FieldMetadata_Dev kDev{}; void set_dev(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Dev::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -68604,14 +69359,7 @@ class Ext4ReleasepageFtraceEvent : public ::protozero::Message { uint64_t, Ext4ReleasepageFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ino kIno() { return {}; } + static constexpr FieldMetadata_Ino kIno{}; void set_ino(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Ino::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -68629,14 +69377,7 @@ class Ext4ReleasepageFtraceEvent : public ::protozero::Message { uint64_t, Ext4ReleasepageFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Index kIndex() { return {}; } + static constexpr FieldMetadata_Index kIndex{}; void set_index(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Index::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -68679,14 +69420,7 @@ class Ext4ReadpageFtraceEvent : public ::protozero::Message { uint64_t, Ext4ReadpageFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Dev kDev() { return {}; } + static constexpr FieldMetadata_Dev kDev{}; void set_dev(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Dev::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -68704,14 +69438,7 @@ class Ext4ReadpageFtraceEvent : public ::protozero::Message { uint64_t, Ext4ReadpageFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ino kIno() { return {}; } + static constexpr FieldMetadata_Ino kIno{}; void set_ino(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Ino::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -68729,14 +69456,7 @@ class Ext4ReadpageFtraceEvent : public ::protozero::Message { uint64_t, Ext4ReadpageFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Index kIndex() { return {}; } + static constexpr FieldMetadata_Index kIndex{}; void set_index(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Index::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -68779,14 +69499,7 @@ class Ext4ReadBlockBitmapLoadFtraceEvent : public ::protozero::Message { uint64_t, Ext4ReadBlockBitmapLoadFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Dev kDev() { return {}; } + static constexpr FieldMetadata_Dev kDev{}; void set_dev(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Dev::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -68804,14 +69517,7 @@ class Ext4ReadBlockBitmapLoadFtraceEvent : public ::protozero::Message { uint32_t, Ext4ReadBlockBitmapLoadFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Group kGroup() { return {}; } + static constexpr FieldMetadata_Group kGroup{}; void set_group(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Group::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -68829,14 +69535,7 @@ class Ext4ReadBlockBitmapLoadFtraceEvent : public ::protozero::Message { uint32_t, Ext4ReadBlockBitmapLoadFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Prefetch kPrefetch() { return {}; } + static constexpr FieldMetadata_Prefetch kPrefetch{}; void set_prefetch(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Prefetch::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -68885,14 +69584,7 @@ class Ext4PunchHoleFtraceEvent : public ::protozero::Message { uint64_t, Ext4PunchHoleFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Dev kDev() { return {}; } + static constexpr FieldMetadata_Dev kDev{}; void set_dev(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Dev::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -68910,14 +69602,7 @@ class Ext4PunchHoleFtraceEvent : public ::protozero::Message { uint64_t, Ext4PunchHoleFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ino kIno() { return {}; } + static constexpr FieldMetadata_Ino kIno{}; void set_ino(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Ino::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -68935,14 +69620,7 @@ class Ext4PunchHoleFtraceEvent : public ::protozero::Message { int64_t, Ext4PunchHoleFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Offset kOffset() { return {}; } + static constexpr FieldMetadata_Offset kOffset{}; void set_offset(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_Offset::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -68960,14 +69638,7 @@ class Ext4PunchHoleFtraceEvent : public ::protozero::Message { int64_t, Ext4PunchHoleFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Len kLen() { return {}; } + static constexpr FieldMetadata_Len kLen{}; void set_len(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_Len::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -68985,14 +69656,7 @@ class Ext4PunchHoleFtraceEvent : public ::protozero::Message { int32_t, Ext4PunchHoleFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Mode kMode() { return {}; } + static constexpr FieldMetadata_Mode kMode{}; void set_mode(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Mode::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -69044,14 +69708,7 @@ class Ext4OtherInodeUpdateTimeFtraceEvent : public ::protozero::Message { uint64_t, Ext4OtherInodeUpdateTimeFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Dev kDev() { return {}; } + static constexpr FieldMetadata_Dev kDev{}; void set_dev(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Dev::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -69069,14 +69726,7 @@ class Ext4OtherInodeUpdateTimeFtraceEvent : public ::protozero::Message { uint64_t, Ext4OtherInodeUpdateTimeFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ino kIno() { return {}; } + static constexpr FieldMetadata_Ino kIno{}; void set_ino(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Ino::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -69094,14 +69744,7 @@ class Ext4OtherInodeUpdateTimeFtraceEvent : public ::protozero::Message { uint64_t, Ext4OtherInodeUpdateTimeFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_OrigIno kOrigIno() { return {}; } + static constexpr FieldMetadata_OrigIno kOrigIno{}; void set_orig_ino(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_OrigIno::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -69119,14 +69762,7 @@ class Ext4OtherInodeUpdateTimeFtraceEvent : public ::protozero::Message { uint32_t, Ext4OtherInodeUpdateTimeFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Uid kUid() { return {}; } + static constexpr FieldMetadata_Uid kUid{}; void set_uid(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Uid::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -69144,14 +69780,7 @@ class Ext4OtherInodeUpdateTimeFtraceEvent : public ::protozero::Message { uint32_t, Ext4OtherInodeUpdateTimeFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Gid kGid() { return {}; } + static constexpr FieldMetadata_Gid kGid{}; void set_gid(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Gid::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -69169,14 +69798,7 @@ class Ext4OtherInodeUpdateTimeFtraceEvent : public ::protozero::Message { uint32_t, Ext4OtherInodeUpdateTimeFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Mode kMode() { return {}; } + static constexpr FieldMetadata_Mode kMode{}; void set_mode(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Mode::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -69240,14 +69862,7 @@ class Ext4MballocPreallocFtraceEvent : public ::protozero::Message { uint64_t, Ext4MballocPreallocFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Dev kDev() { return {}; } + static constexpr FieldMetadata_Dev kDev{}; void set_dev(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Dev::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -69265,14 +69880,7 @@ class Ext4MballocPreallocFtraceEvent : public ::protozero::Message { uint64_t, Ext4MballocPreallocFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ino kIno() { return {}; } + static constexpr FieldMetadata_Ino kIno{}; void set_ino(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Ino::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -69290,14 +69898,7 @@ class Ext4MballocPreallocFtraceEvent : public ::protozero::Message { uint32_t, Ext4MballocPreallocFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_OrigLogical kOrigLogical() { return {}; } + static constexpr FieldMetadata_OrigLogical kOrigLogical{}; void set_orig_logical(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_OrigLogical::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -69315,14 +69916,7 @@ class Ext4MballocPreallocFtraceEvent : public ::protozero::Message { int32_t, Ext4MballocPreallocFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_OrigStart kOrigStart() { return {}; } + static constexpr FieldMetadata_OrigStart kOrigStart{}; void set_orig_start(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_OrigStart::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -69340,14 +69934,7 @@ class Ext4MballocPreallocFtraceEvent : public ::protozero::Message { uint32_t, Ext4MballocPreallocFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_OrigGroup kOrigGroup() { return {}; } + static constexpr FieldMetadata_OrigGroup kOrigGroup{}; void set_orig_group(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_OrigGroup::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -69365,14 +69952,7 @@ class Ext4MballocPreallocFtraceEvent : public ::protozero::Message { int32_t, Ext4MballocPreallocFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_OrigLen kOrigLen() { return {}; } + static constexpr FieldMetadata_OrigLen kOrigLen{}; void set_orig_len(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_OrigLen::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -69390,14 +69970,7 @@ class Ext4MballocPreallocFtraceEvent : public ::protozero::Message { uint32_t, Ext4MballocPreallocFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ResultLogical kResultLogical() { return {}; } + static constexpr FieldMetadata_ResultLogical kResultLogical{}; void set_result_logical(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_ResultLogical::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -69415,14 +69988,7 @@ class Ext4MballocPreallocFtraceEvent : public ::protozero::Message { int32_t, Ext4MballocPreallocFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ResultStart kResultStart() { return {}; } + static constexpr FieldMetadata_ResultStart kResultStart{}; void set_result_start(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_ResultStart::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -69440,14 +70006,7 @@ class Ext4MballocPreallocFtraceEvent : public ::protozero::Message { uint32_t, Ext4MballocPreallocFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ResultGroup kResultGroup() { return {}; } + static constexpr FieldMetadata_ResultGroup kResultGroup{}; void set_result_group(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_ResultGroup::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -69465,14 +70024,7 @@ class Ext4MballocPreallocFtraceEvent : public ::protozero::Message { int32_t, Ext4MballocPreallocFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ResultLen kResultLen() { return {}; } + static constexpr FieldMetadata_ResultLen kResultLen{}; void set_result_len(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_ResultLen::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -69521,14 +70073,7 @@ class Ext4MballocFreeFtraceEvent : public ::protozero::Message { uint64_t, Ext4MballocFreeFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Dev kDev() { return {}; } + static constexpr FieldMetadata_Dev kDev{}; void set_dev(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Dev::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -69546,14 +70091,7 @@ class Ext4MballocFreeFtraceEvent : public ::protozero::Message { uint64_t, Ext4MballocFreeFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ino kIno() { return {}; } + static constexpr FieldMetadata_Ino kIno{}; void set_ino(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Ino::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -69571,14 +70109,7 @@ class Ext4MballocFreeFtraceEvent : public ::protozero::Message { int32_t, Ext4MballocFreeFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ResultStart kResultStart() { return {}; } + static constexpr FieldMetadata_ResultStart kResultStart{}; void set_result_start(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_ResultStart::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -69596,14 +70127,7 @@ class Ext4MballocFreeFtraceEvent : public ::protozero::Message { uint32_t, Ext4MballocFreeFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ResultGroup kResultGroup() { return {}; } + static constexpr FieldMetadata_ResultGroup kResultGroup{}; void set_result_group(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_ResultGroup::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -69621,14 +70145,7 @@ class Ext4MballocFreeFtraceEvent : public ::protozero::Message { int32_t, Ext4MballocFreeFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ResultLen kResultLen() { return {}; } + static constexpr FieldMetadata_ResultLen kResultLen{}; void set_result_len(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_ResultLen::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -69677,14 +70194,7 @@ class Ext4MballocDiscardFtraceEvent : public ::protozero::Message { uint64_t, Ext4MballocDiscardFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Dev kDev() { return {}; } + static constexpr FieldMetadata_Dev kDev{}; void set_dev(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Dev::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -69702,14 +70212,7 @@ class Ext4MballocDiscardFtraceEvent : public ::protozero::Message { uint64_t, Ext4MballocDiscardFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ino kIno() { return {}; } + static constexpr FieldMetadata_Ino kIno{}; void set_ino(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Ino::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -69727,14 +70230,7 @@ class Ext4MballocDiscardFtraceEvent : public ::protozero::Message { int32_t, Ext4MballocDiscardFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ResultStart kResultStart() { return {}; } + static constexpr FieldMetadata_ResultStart kResultStart{}; void set_result_start(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_ResultStart::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -69752,14 +70248,7 @@ class Ext4MballocDiscardFtraceEvent : public ::protozero::Message { uint32_t, Ext4MballocDiscardFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ResultGroup kResultGroup() { return {}; } + static constexpr FieldMetadata_ResultGroup kResultGroup{}; void set_result_group(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_ResultGroup::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -69777,14 +70266,7 @@ class Ext4MballocDiscardFtraceEvent : public ::protozero::Message { int32_t, Ext4MballocDiscardFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ResultLen kResultLen() { return {}; } + static constexpr FieldMetadata_ResultLen kResultLen{}; void set_result_len(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_ResultLen::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -69878,14 +70360,7 @@ class Ext4MballocAllocFtraceEvent : public ::protozero::Message { uint64_t, Ext4MballocAllocFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Dev kDev() { return {}; } + static constexpr FieldMetadata_Dev kDev{}; void set_dev(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Dev::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -69903,14 +70378,7 @@ class Ext4MballocAllocFtraceEvent : public ::protozero::Message { uint64_t, Ext4MballocAllocFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ino kIno() { return {}; } + static constexpr FieldMetadata_Ino kIno{}; void set_ino(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Ino::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -69928,14 +70396,7 @@ class Ext4MballocAllocFtraceEvent : public ::protozero::Message { uint32_t, Ext4MballocAllocFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_OrigLogical kOrigLogical() { return {}; } + static constexpr FieldMetadata_OrigLogical kOrigLogical{}; void set_orig_logical(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_OrigLogical::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -69953,14 +70414,7 @@ class Ext4MballocAllocFtraceEvent : public ::protozero::Message { int32_t, Ext4MballocAllocFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_OrigStart kOrigStart() { return {}; } + static constexpr FieldMetadata_OrigStart kOrigStart{}; void set_orig_start(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_OrigStart::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -69978,14 +70432,7 @@ class Ext4MballocAllocFtraceEvent : public ::protozero::Message { uint32_t, Ext4MballocAllocFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_OrigGroup kOrigGroup() { return {}; } + static constexpr FieldMetadata_OrigGroup kOrigGroup{}; void set_orig_group(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_OrigGroup::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -70003,14 +70450,7 @@ class Ext4MballocAllocFtraceEvent : public ::protozero::Message { int32_t, Ext4MballocAllocFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_OrigLen kOrigLen() { return {}; } + static constexpr FieldMetadata_OrigLen kOrigLen{}; void set_orig_len(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_OrigLen::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -70028,14 +70468,7 @@ class Ext4MballocAllocFtraceEvent : public ::protozero::Message { uint32_t, Ext4MballocAllocFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_GoalLogical kGoalLogical() { return {}; } + static constexpr FieldMetadata_GoalLogical kGoalLogical{}; void set_goal_logical(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_GoalLogical::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -70053,14 +70486,7 @@ class Ext4MballocAllocFtraceEvent : public ::protozero::Message { int32_t, Ext4MballocAllocFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_GoalStart kGoalStart() { return {}; } + static constexpr FieldMetadata_GoalStart kGoalStart{}; void set_goal_start(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_GoalStart::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -70078,14 +70504,7 @@ class Ext4MballocAllocFtraceEvent : public ::protozero::Message { uint32_t, Ext4MballocAllocFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_GoalGroup kGoalGroup() { return {}; } + static constexpr FieldMetadata_GoalGroup kGoalGroup{}; void set_goal_group(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_GoalGroup::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -70103,14 +70522,7 @@ class Ext4MballocAllocFtraceEvent : public ::protozero::Message { int32_t, Ext4MballocAllocFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_GoalLen kGoalLen() { return {}; } + static constexpr FieldMetadata_GoalLen kGoalLen{}; void set_goal_len(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_GoalLen::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -70128,14 +70540,7 @@ class Ext4MballocAllocFtraceEvent : public ::protozero::Message { uint32_t, Ext4MballocAllocFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ResultLogical kResultLogical() { return {}; } + static constexpr FieldMetadata_ResultLogical kResultLogical{}; void set_result_logical(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_ResultLogical::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -70153,14 +70558,7 @@ class Ext4MballocAllocFtraceEvent : public ::protozero::Message { int32_t, Ext4MballocAllocFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ResultStart kResultStart() { return {}; } + static constexpr FieldMetadata_ResultStart kResultStart{}; void set_result_start(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_ResultStart::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -70178,14 +70576,7 @@ class Ext4MballocAllocFtraceEvent : public ::protozero::Message { uint32_t, Ext4MballocAllocFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ResultGroup kResultGroup() { return {}; } + static constexpr FieldMetadata_ResultGroup kResultGroup{}; void set_result_group(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_ResultGroup::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -70203,14 +70594,7 @@ class Ext4MballocAllocFtraceEvent : public ::protozero::Message { int32_t, Ext4MballocAllocFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ResultLen kResultLen() { return {}; } + static constexpr FieldMetadata_ResultLen kResultLen{}; void set_result_len(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_ResultLen::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -70228,14 +70612,7 @@ class Ext4MballocAllocFtraceEvent : public ::protozero::Message { uint32_t, Ext4MballocAllocFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Found kFound() { return {}; } + static constexpr FieldMetadata_Found kFound{}; void set_found(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Found::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -70253,14 +70630,7 @@ class Ext4MballocAllocFtraceEvent : public ::protozero::Message { uint32_t, Ext4MballocAllocFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Groups kGroups() { return {}; } + static constexpr FieldMetadata_Groups kGroups{}; void set_groups(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Groups::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -70278,14 +70648,7 @@ class Ext4MballocAllocFtraceEvent : public ::protozero::Message { uint32_t, Ext4MballocAllocFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Buddy kBuddy() { return {}; } + static constexpr FieldMetadata_Buddy kBuddy{}; void set_buddy(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Buddy::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -70303,14 +70666,7 @@ class Ext4MballocAllocFtraceEvent : public ::protozero::Message { uint32_t, Ext4MballocAllocFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Flags kFlags() { return {}; } + static constexpr FieldMetadata_Flags kFlags{}; void set_flags(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Flags::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -70328,14 +70684,7 @@ class Ext4MballocAllocFtraceEvent : public ::protozero::Message { uint32_t, Ext4MballocAllocFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Tail kTail() { return {}; } + static constexpr FieldMetadata_Tail kTail{}; void set_tail(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Tail::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -70353,14 +70702,7 @@ class Ext4MballocAllocFtraceEvent : public ::protozero::Message { uint32_t, Ext4MballocAllocFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Cr kCr() { return {}; } + static constexpr FieldMetadata_Cr kCr{}; void set_cr(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Cr::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -70406,14 +70748,7 @@ class Ext4MbReleaseInodePaFtraceEvent : public ::protozero::Message { uint64_t, Ext4MbReleaseInodePaFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Dev kDev() { return {}; } + static constexpr FieldMetadata_Dev kDev{}; void set_dev(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Dev::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -70431,14 +70766,7 @@ class Ext4MbReleaseInodePaFtraceEvent : public ::protozero::Message { uint64_t, Ext4MbReleaseInodePaFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ino kIno() { return {}; } + static constexpr FieldMetadata_Ino kIno{}; void set_ino(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Ino::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -70456,14 +70784,7 @@ class Ext4MbReleaseInodePaFtraceEvent : public ::protozero::Message { uint64_t, Ext4MbReleaseInodePaFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Block kBlock() { return {}; } + static constexpr FieldMetadata_Block kBlock{}; void set_block(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Block::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -70481,14 +70802,7 @@ class Ext4MbReleaseInodePaFtraceEvent : public ::protozero::Message { uint32_t, Ext4MbReleaseInodePaFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Count kCount() { return {}; } + static constexpr FieldMetadata_Count kCount{}; void set_count(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Count::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -70531,14 +70845,7 @@ class Ext4MbReleaseGroupPaFtraceEvent : public ::protozero::Message { uint64_t, Ext4MbReleaseGroupPaFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Dev kDev() { return {}; } + static constexpr FieldMetadata_Dev kDev{}; void set_dev(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Dev::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -70556,14 +70863,7 @@ class Ext4MbReleaseGroupPaFtraceEvent : public ::protozero::Message { uint64_t, Ext4MbReleaseGroupPaFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_PaPstart kPaPstart() { return {}; } + static constexpr FieldMetadata_PaPstart kPaPstart{}; void set_pa_pstart(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_PaPstart::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -70581,14 +70881,7 @@ class Ext4MbReleaseGroupPaFtraceEvent : public ::protozero::Message { uint32_t, Ext4MbReleaseGroupPaFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_PaLen kPaLen() { return {}; } + static constexpr FieldMetadata_PaLen kPaLen{}; void set_pa_len(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_PaLen::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -70637,14 +70930,7 @@ class Ext4MbNewInodePaFtraceEvent : public ::protozero::Message { uint64_t, Ext4MbNewInodePaFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Dev kDev() { return {}; } + static constexpr FieldMetadata_Dev kDev{}; void set_dev(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Dev::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -70662,14 +70948,7 @@ class Ext4MbNewInodePaFtraceEvent : public ::protozero::Message { uint64_t, Ext4MbNewInodePaFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ino kIno() { return {}; } + static constexpr FieldMetadata_Ino kIno{}; void set_ino(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Ino::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -70687,14 +70966,7 @@ class Ext4MbNewInodePaFtraceEvent : public ::protozero::Message { uint64_t, Ext4MbNewInodePaFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_PaPstart kPaPstart() { return {}; } + static constexpr FieldMetadata_PaPstart kPaPstart{}; void set_pa_pstart(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_PaPstart::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -70712,14 +70984,7 @@ class Ext4MbNewInodePaFtraceEvent : public ::protozero::Message { uint64_t, Ext4MbNewInodePaFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_PaLstart kPaLstart() { return {}; } + static constexpr FieldMetadata_PaLstart kPaLstart{}; void set_pa_lstart(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_PaLstart::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -70737,14 +71002,7 @@ class Ext4MbNewInodePaFtraceEvent : public ::protozero::Message { uint32_t, Ext4MbNewInodePaFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_PaLen kPaLen() { return {}; } + static constexpr FieldMetadata_PaLen kPaLen{}; void set_pa_len(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_PaLen::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -70793,14 +71051,7 @@ class Ext4MbNewGroupPaFtraceEvent : public ::protozero::Message { uint64_t, Ext4MbNewGroupPaFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Dev kDev() { return {}; } + static constexpr FieldMetadata_Dev kDev{}; void set_dev(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Dev::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -70818,14 +71069,7 @@ class Ext4MbNewGroupPaFtraceEvent : public ::protozero::Message { uint64_t, Ext4MbNewGroupPaFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ino kIno() { return {}; } + static constexpr FieldMetadata_Ino kIno{}; void set_ino(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Ino::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -70843,14 +71087,7 @@ class Ext4MbNewGroupPaFtraceEvent : public ::protozero::Message { uint64_t, Ext4MbNewGroupPaFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_PaPstart kPaPstart() { return {}; } + static constexpr FieldMetadata_PaPstart kPaPstart{}; void set_pa_pstart(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_PaPstart::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -70868,14 +71105,7 @@ class Ext4MbNewGroupPaFtraceEvent : public ::protozero::Message { uint64_t, Ext4MbNewGroupPaFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_PaLstart kPaLstart() { return {}; } + static constexpr FieldMetadata_PaLstart kPaLstart{}; void set_pa_lstart(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_PaLstart::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -70893,14 +71123,7 @@ class Ext4MbNewGroupPaFtraceEvent : public ::protozero::Message { uint32_t, Ext4MbNewGroupPaFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_PaLen kPaLen() { return {}; } + static constexpr FieldMetadata_PaLen kPaLen{}; void set_pa_len(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_PaLen::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -70940,14 +71163,7 @@ class Ext4MbDiscardPreallocationsFtraceEvent : public ::protozero::Message { uint64_t, Ext4MbDiscardPreallocationsFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Dev kDev() { return {}; } + static constexpr FieldMetadata_Dev kDev{}; void set_dev(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Dev::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -70965,14 +71181,7 @@ class Ext4MbDiscardPreallocationsFtraceEvent : public ::protozero::Message { int32_t, Ext4MbDiscardPreallocationsFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Needed kNeeded() { return {}; } + static constexpr FieldMetadata_Needed kNeeded{}; void set_needed(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Needed::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -71012,14 +71221,7 @@ class Ext4MbBuddyBitmapLoadFtraceEvent : public ::protozero::Message { uint64_t, Ext4MbBuddyBitmapLoadFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Dev kDev() { return {}; } + static constexpr FieldMetadata_Dev kDev{}; void set_dev(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Dev::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -71037,14 +71239,7 @@ class Ext4MbBuddyBitmapLoadFtraceEvent : public ::protozero::Message { uint32_t, Ext4MbBuddyBitmapLoadFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Group kGroup() { return {}; } + static constexpr FieldMetadata_Group kGroup{}; void set_group(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Group::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -71084,14 +71279,7 @@ class Ext4MbBitmapLoadFtraceEvent : public ::protozero::Message { uint64_t, Ext4MbBitmapLoadFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Dev kDev() { return {}; } + static constexpr FieldMetadata_Dev kDev{}; void set_dev(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Dev::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -71109,14 +71297,7 @@ class Ext4MbBitmapLoadFtraceEvent : public ::protozero::Message { uint32_t, Ext4MbBitmapLoadFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Group kGroup() { return {}; } + static constexpr FieldMetadata_Group kGroup{}; void set_group(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Group::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -71159,14 +71340,7 @@ class Ext4MarkInodeDirtyFtraceEvent : public ::protozero::Message { uint64_t, Ext4MarkInodeDirtyFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Dev kDev() { return {}; } + static constexpr FieldMetadata_Dev kDev{}; void set_dev(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Dev::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -71184,14 +71358,7 @@ class Ext4MarkInodeDirtyFtraceEvent : public ::protozero::Message { uint64_t, Ext4MarkInodeDirtyFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ino kIno() { return {}; } + static constexpr FieldMetadata_Ino kIno{}; void set_ino(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Ino::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -71209,14 +71376,7 @@ class Ext4MarkInodeDirtyFtraceEvent : public ::protozero::Message { uint64_t, Ext4MarkInodeDirtyFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ip kIp() { return {}; } + static constexpr FieldMetadata_Ip kIp{}; void set_ip(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Ip::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -71256,14 +71416,7 @@ class Ext4LoadInodeBitmapFtraceEvent : public ::protozero::Message { uint64_t, Ext4LoadInodeBitmapFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Dev kDev() { return {}; } + static constexpr FieldMetadata_Dev kDev{}; void set_dev(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Dev::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -71281,14 +71434,7 @@ class Ext4LoadInodeBitmapFtraceEvent : public ::protozero::Message { uint32_t, Ext4LoadInodeBitmapFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Group kGroup() { return {}; } + static constexpr FieldMetadata_Group kGroup{}; void set_group(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Group::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -71328,14 +71474,7 @@ class Ext4LoadInodeFtraceEvent : public ::protozero::Message { uint64_t, Ext4LoadInodeFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Dev kDev() { return {}; } + static constexpr FieldMetadata_Dev kDev{}; void set_dev(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Dev::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -71353,14 +71492,7 @@ class Ext4LoadInodeFtraceEvent : public ::protozero::Message { uint64_t, Ext4LoadInodeFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ino kIno() { return {}; } + static constexpr FieldMetadata_Ino kIno{}; void set_ino(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Ino::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -71409,14 +71541,7 @@ class Ext4JournalledWriteEndFtraceEvent : public ::protozero::Message { uint64_t, Ext4JournalledWriteEndFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Dev kDev() { return {}; } + static constexpr FieldMetadata_Dev kDev{}; void set_dev(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Dev::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -71434,14 +71559,7 @@ class Ext4JournalledWriteEndFtraceEvent : public ::protozero::Message { uint64_t, Ext4JournalledWriteEndFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ino kIno() { return {}; } + static constexpr FieldMetadata_Ino kIno{}; void set_ino(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Ino::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -71459,14 +71577,7 @@ class Ext4JournalledWriteEndFtraceEvent : public ::protozero::Message { int64_t, Ext4JournalledWriteEndFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Pos kPos() { return {}; } + static constexpr FieldMetadata_Pos kPos{}; void set_pos(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_Pos::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -71484,14 +71595,7 @@ class Ext4JournalledWriteEndFtraceEvent : public ::protozero::Message { uint32_t, Ext4JournalledWriteEndFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Len kLen() { return {}; } + static constexpr FieldMetadata_Len kLen{}; void set_len(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Len::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -71509,14 +71613,7 @@ class Ext4JournalledWriteEndFtraceEvent : public ::protozero::Message { uint32_t, Ext4JournalledWriteEndFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Copied kCopied() { return {}; } + static constexpr FieldMetadata_Copied kCopied{}; void set_copied(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Copied::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -71565,14 +71662,7 @@ class Ext4JournalledInvalidatepageFtraceEvent : public ::protozero::Message { uint64_t, Ext4JournalledInvalidatepageFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Dev kDev() { return {}; } + static constexpr FieldMetadata_Dev kDev{}; void set_dev(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Dev::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -71590,14 +71680,7 @@ class Ext4JournalledInvalidatepageFtraceEvent : public ::protozero::Message { uint64_t, Ext4JournalledInvalidatepageFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ino kIno() { return {}; } + static constexpr FieldMetadata_Ino kIno{}; void set_ino(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Ino::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -71615,14 +71698,7 @@ class Ext4JournalledInvalidatepageFtraceEvent : public ::protozero::Message { uint64_t, Ext4JournalledInvalidatepageFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Index kIndex() { return {}; } + static constexpr FieldMetadata_Index kIndex{}; void set_index(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Index::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -71640,14 +71716,7 @@ class Ext4JournalledInvalidatepageFtraceEvent : public ::protozero::Message { uint64_t, Ext4JournalledInvalidatepageFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Offset kOffset() { return {}; } + static constexpr FieldMetadata_Offset kOffset{}; void set_offset(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Offset::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -71665,14 +71734,7 @@ class Ext4JournalledInvalidatepageFtraceEvent : public ::protozero::Message { uint32_t, Ext4JournalledInvalidatepageFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Length kLength() { return {}; } + static constexpr FieldMetadata_Length kLength{}; void set_length(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Length::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -71715,14 +71777,7 @@ class Ext4JournalStartReservedFtraceEvent : public ::protozero::Message { uint64_t, Ext4JournalStartReservedFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Dev kDev() { return {}; } + static constexpr FieldMetadata_Dev kDev{}; void set_dev(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Dev::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -71740,14 +71795,7 @@ class Ext4JournalStartReservedFtraceEvent : public ::protozero::Message { uint64_t, Ext4JournalStartReservedFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ip kIp() { return {}; } + static constexpr FieldMetadata_Ip kIp{}; void set_ip(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Ip::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -71765,14 +71813,7 @@ class Ext4JournalStartReservedFtraceEvent : public ::protozero::Message { int32_t, Ext4JournalStartReservedFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Blocks kBlocks() { return {}; } + static constexpr FieldMetadata_Blocks kBlocks{}; void set_blocks(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Blocks::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -71824,14 +71865,7 @@ class Ext4JournalStartFtraceEvent : public ::protozero::Message { uint64_t, Ext4JournalStartFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Dev kDev() { return {}; } + static constexpr FieldMetadata_Dev kDev{}; void set_dev(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Dev::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -71849,14 +71883,7 @@ class Ext4JournalStartFtraceEvent : public ::protozero::Message { uint64_t, Ext4JournalStartFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ip kIp() { return {}; } + static constexpr FieldMetadata_Ip kIp{}; void set_ip(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Ip::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -71874,14 +71901,7 @@ class Ext4JournalStartFtraceEvent : public ::protozero::Message { int32_t, Ext4JournalStartFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Blocks kBlocks() { return {}; } + static constexpr FieldMetadata_Blocks kBlocks{}; void set_blocks(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Blocks::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -71899,14 +71919,7 @@ class Ext4JournalStartFtraceEvent : public ::protozero::Message { int32_t, Ext4JournalStartFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_RsvBlocks kRsvBlocks() { return {}; } + static constexpr FieldMetadata_RsvBlocks kRsvBlocks{}; void set_rsv_blocks(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_RsvBlocks::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -71924,14 +71937,7 @@ class Ext4JournalStartFtraceEvent : public ::protozero::Message { int32_t, Ext4JournalStartFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Nblocks kNblocks() { return {}; } + static constexpr FieldMetadata_Nblocks kNblocks{}; void set_nblocks(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Nblocks::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -71949,14 +71955,7 @@ class Ext4JournalStartFtraceEvent : public ::protozero::Message { int32_t, Ext4JournalStartFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_RevokeCreds kRevokeCreds() { return {}; } + static constexpr FieldMetadata_RevokeCreds kRevokeCreds{}; void set_revoke_creds(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_RevokeCreds::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -72005,14 +72004,7 @@ class Ext4InvalidatepageFtraceEvent : public ::protozero::Message { uint64_t, Ext4InvalidatepageFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Dev kDev() { return {}; } + static constexpr FieldMetadata_Dev kDev{}; void set_dev(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Dev::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -72030,14 +72022,7 @@ class Ext4InvalidatepageFtraceEvent : public ::protozero::Message { uint64_t, Ext4InvalidatepageFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ino kIno() { return {}; } + static constexpr FieldMetadata_Ino kIno{}; void set_ino(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Ino::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -72055,14 +72040,7 @@ class Ext4InvalidatepageFtraceEvent : public ::protozero::Message { uint64_t, Ext4InvalidatepageFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Index kIndex() { return {}; } + static constexpr FieldMetadata_Index kIndex{}; void set_index(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Index::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -72080,14 +72058,7 @@ class Ext4InvalidatepageFtraceEvent : public ::protozero::Message { uint64_t, Ext4InvalidatepageFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Offset kOffset() { return {}; } + static constexpr FieldMetadata_Offset kOffset{}; void set_offset(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Offset::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -72105,14 +72076,7 @@ class Ext4InvalidatepageFtraceEvent : public ::protozero::Message { uint32_t, Ext4InvalidatepageFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Length kLength() { return {}; } + static constexpr FieldMetadata_Length kLength{}; void set_length(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Length::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -72158,14 +72122,7 @@ class Ext4InsertRangeFtraceEvent : public ::protozero::Message { uint64_t, Ext4InsertRangeFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Dev kDev() { return {}; } + static constexpr FieldMetadata_Dev kDev{}; void set_dev(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Dev::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -72183,14 +72140,7 @@ class Ext4InsertRangeFtraceEvent : public ::protozero::Message { uint64_t, Ext4InsertRangeFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ino kIno() { return {}; } + static constexpr FieldMetadata_Ino kIno{}; void set_ino(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Ino::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -72208,14 +72158,7 @@ class Ext4InsertRangeFtraceEvent : public ::protozero::Message { int64_t, Ext4InsertRangeFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Offset kOffset() { return {}; } + static constexpr FieldMetadata_Offset kOffset{}; void set_offset(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_Offset::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -72233,14 +72176,7 @@ class Ext4InsertRangeFtraceEvent : public ::protozero::Message { int64_t, Ext4InsertRangeFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Len kLen() { return {}; } + static constexpr FieldMetadata_Len kLen{}; void set_len(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_Len::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -72298,14 +72234,7 @@ class Ext4IndMapBlocksExitFtraceEvent : public ::protozero::Message { uint64_t, Ext4IndMapBlocksExitFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Dev kDev() { return {}; } + static constexpr FieldMetadata_Dev kDev{}; void set_dev(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Dev::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -72323,14 +72252,7 @@ class Ext4IndMapBlocksExitFtraceEvent : public ::protozero::Message { uint64_t, Ext4IndMapBlocksExitFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ino kIno() { return {}; } + static constexpr FieldMetadata_Ino kIno{}; void set_ino(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Ino::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -72348,14 +72270,7 @@ class Ext4IndMapBlocksExitFtraceEvent : public ::protozero::Message { uint32_t, Ext4IndMapBlocksExitFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Flags kFlags() { return {}; } + static constexpr FieldMetadata_Flags kFlags{}; void set_flags(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Flags::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -72373,14 +72288,7 @@ class Ext4IndMapBlocksExitFtraceEvent : public ::protozero::Message { uint64_t, Ext4IndMapBlocksExitFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Pblk kPblk() { return {}; } + static constexpr FieldMetadata_Pblk kPblk{}; void set_pblk(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Pblk::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -72398,14 +72306,7 @@ class Ext4IndMapBlocksExitFtraceEvent : public ::protozero::Message { uint32_t, Ext4IndMapBlocksExitFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Lblk kLblk() { return {}; } + static constexpr FieldMetadata_Lblk kLblk{}; void set_lblk(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Lblk::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -72423,14 +72324,7 @@ class Ext4IndMapBlocksExitFtraceEvent : public ::protozero::Message { uint32_t, Ext4IndMapBlocksExitFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Len kLen() { return {}; } + static constexpr FieldMetadata_Len kLen{}; void set_len(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Len::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -72448,14 +72342,7 @@ class Ext4IndMapBlocksExitFtraceEvent : public ::protozero::Message { uint32_t, Ext4IndMapBlocksExitFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Mflags kMflags() { return {}; } + static constexpr FieldMetadata_Mflags kMflags{}; void set_mflags(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Mflags::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -72473,14 +72360,7 @@ class Ext4IndMapBlocksExitFtraceEvent : public ::protozero::Message { int32_t, Ext4IndMapBlocksExitFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ret kRet() { return {}; } + static constexpr FieldMetadata_Ret kRet{}; void set_ret(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Ret::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -72529,14 +72409,7 @@ class Ext4IndMapBlocksEnterFtraceEvent : public ::protozero::Message { uint64_t, Ext4IndMapBlocksEnterFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Dev kDev() { return {}; } + static constexpr FieldMetadata_Dev kDev{}; void set_dev(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Dev::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -72554,14 +72427,7 @@ class Ext4IndMapBlocksEnterFtraceEvent : public ::protozero::Message { uint64_t, Ext4IndMapBlocksEnterFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ino kIno() { return {}; } + static constexpr FieldMetadata_Ino kIno{}; void set_ino(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Ino::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -72579,14 +72445,7 @@ class Ext4IndMapBlocksEnterFtraceEvent : public ::protozero::Message { uint32_t, Ext4IndMapBlocksEnterFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Lblk kLblk() { return {}; } + static constexpr FieldMetadata_Lblk kLblk{}; void set_lblk(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Lblk::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -72604,14 +72463,7 @@ class Ext4IndMapBlocksEnterFtraceEvent : public ::protozero::Message { uint32_t, Ext4IndMapBlocksEnterFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Len kLen() { return {}; } + static constexpr FieldMetadata_Len kLen{}; void set_len(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Len::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -72629,14 +72481,7 @@ class Ext4IndMapBlocksEnterFtraceEvent : public ::protozero::Message { uint32_t, Ext4IndMapBlocksEnterFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Flags kFlags() { return {}; } + static constexpr FieldMetadata_Flags kFlags{}; void set_flags(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Flags::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -72682,14 +72527,7 @@ class Ext4GetReservedClusterAllocFtraceEvent : public ::protozero::Message { uint64_t, Ext4GetReservedClusterAllocFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Dev kDev() { return {}; } + static constexpr FieldMetadata_Dev kDev{}; void set_dev(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Dev::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -72707,14 +72545,7 @@ class Ext4GetReservedClusterAllocFtraceEvent : public ::protozero::Message { uint64_t, Ext4GetReservedClusterAllocFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ino kIno() { return {}; } + static constexpr FieldMetadata_Ino kIno{}; void set_ino(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Ino::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -72732,14 +72563,7 @@ class Ext4GetReservedClusterAllocFtraceEvent : public ::protozero::Message { uint32_t, Ext4GetReservedClusterAllocFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Lblk kLblk() { return {}; } + static constexpr FieldMetadata_Lblk kLblk{}; void set_lblk(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Lblk::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -72757,14 +72581,7 @@ class Ext4GetReservedClusterAllocFtraceEvent : public ::protozero::Message { uint32_t, Ext4GetReservedClusterAllocFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Len kLen() { return {}; } + static constexpr FieldMetadata_Len kLen{}; void set_len(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Len::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -72816,14 +72633,7 @@ class Ext4GetImpliedClusterAllocExitFtraceEvent : public ::protozero::Message { uint64_t, Ext4GetImpliedClusterAllocExitFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Dev kDev() { return {}; } + static constexpr FieldMetadata_Dev kDev{}; void set_dev(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Dev::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -72841,14 +72651,7 @@ class Ext4GetImpliedClusterAllocExitFtraceEvent : public ::protozero::Message { uint32_t, Ext4GetImpliedClusterAllocExitFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Flags kFlags() { return {}; } + static constexpr FieldMetadata_Flags kFlags{}; void set_flags(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Flags::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -72866,14 +72669,7 @@ class Ext4GetImpliedClusterAllocExitFtraceEvent : public ::protozero::Message { uint32_t, Ext4GetImpliedClusterAllocExitFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Lblk kLblk() { return {}; } + static constexpr FieldMetadata_Lblk kLblk{}; void set_lblk(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Lblk::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -72891,14 +72687,7 @@ class Ext4GetImpliedClusterAllocExitFtraceEvent : public ::protozero::Message { uint64_t, Ext4GetImpliedClusterAllocExitFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Pblk kPblk() { return {}; } + static constexpr FieldMetadata_Pblk kPblk{}; void set_pblk(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Pblk::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -72916,14 +72705,7 @@ class Ext4GetImpliedClusterAllocExitFtraceEvent : public ::protozero::Message { uint32_t, Ext4GetImpliedClusterAllocExitFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Len kLen() { return {}; } + static constexpr FieldMetadata_Len kLen{}; void set_len(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Len::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -72941,14 +72723,7 @@ class Ext4GetImpliedClusterAllocExitFtraceEvent : public ::protozero::Message { int32_t, Ext4GetImpliedClusterAllocExitFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ret kRet() { return {}; } + static constexpr FieldMetadata_Ret kRet{}; void set_ret(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Ret::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -73000,14 +72775,7 @@ class Ext4FreeInodeFtraceEvent : public ::protozero::Message { uint64_t, Ext4FreeInodeFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Dev kDev() { return {}; } + static constexpr FieldMetadata_Dev kDev{}; void set_dev(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Dev::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -73025,14 +72793,7 @@ class Ext4FreeInodeFtraceEvent : public ::protozero::Message { uint64_t, Ext4FreeInodeFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ino kIno() { return {}; } + static constexpr FieldMetadata_Ino kIno{}; void set_ino(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Ino::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -73050,14 +72811,7 @@ class Ext4FreeInodeFtraceEvent : public ::protozero::Message { uint32_t, Ext4FreeInodeFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Uid kUid() { return {}; } + static constexpr FieldMetadata_Uid kUid{}; void set_uid(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Uid::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -73075,14 +72829,7 @@ class Ext4FreeInodeFtraceEvent : public ::protozero::Message { uint32_t, Ext4FreeInodeFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Gid kGid() { return {}; } + static constexpr FieldMetadata_Gid kGid{}; void set_gid(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Gid::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -73100,14 +72847,7 @@ class Ext4FreeInodeFtraceEvent : public ::protozero::Message { uint64_t, Ext4FreeInodeFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Blocks kBlocks() { return {}; } + static constexpr FieldMetadata_Blocks kBlocks{}; void set_blocks(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Blocks::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -73125,14 +72865,7 @@ class Ext4FreeInodeFtraceEvent : public ::protozero::Message { uint32_t, Ext4FreeInodeFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Mode kMode() { return {}; } + static constexpr FieldMetadata_Mode kMode{}; void set_mode(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Mode::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -73184,14 +72917,7 @@ class Ext4FreeBlocksFtraceEvent : public ::protozero::Message { uint64_t, Ext4FreeBlocksFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Dev kDev() { return {}; } + static constexpr FieldMetadata_Dev kDev{}; void set_dev(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Dev::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -73209,14 +72935,7 @@ class Ext4FreeBlocksFtraceEvent : public ::protozero::Message { uint64_t, Ext4FreeBlocksFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ino kIno() { return {}; } + static constexpr FieldMetadata_Ino kIno{}; void set_ino(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Ino::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -73234,14 +72953,7 @@ class Ext4FreeBlocksFtraceEvent : public ::protozero::Message { uint64_t, Ext4FreeBlocksFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Block kBlock() { return {}; } + static constexpr FieldMetadata_Block kBlock{}; void set_block(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Block::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -73259,14 +72971,7 @@ class Ext4FreeBlocksFtraceEvent : public ::protozero::Message { uint64_t, Ext4FreeBlocksFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Count kCount() { return {}; } + static constexpr FieldMetadata_Count kCount{}; void set_count(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Count::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -73284,14 +72989,7 @@ class Ext4FreeBlocksFtraceEvent : public ::protozero::Message { int32_t, Ext4FreeBlocksFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Flags kFlags() { return {}; } + static constexpr FieldMetadata_Flags kFlags{}; void set_flags(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Flags::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -73309,14 +73007,7 @@ class Ext4FreeBlocksFtraceEvent : public ::protozero::Message { uint32_t, Ext4FreeBlocksFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Mode kMode() { return {}; } + static constexpr FieldMetadata_Mode kMode{}; void set_mode(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Mode::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -73365,14 +73056,7 @@ class Ext4ForgetFtraceEvent : public ::protozero::Message { uint64_t, Ext4ForgetFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Dev kDev() { return {}; } + static constexpr FieldMetadata_Dev kDev{}; void set_dev(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Dev::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -73390,14 +73074,7 @@ class Ext4ForgetFtraceEvent : public ::protozero::Message { uint64_t, Ext4ForgetFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ino kIno() { return {}; } + static constexpr FieldMetadata_Ino kIno{}; void set_ino(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Ino::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -73415,14 +73092,7 @@ class Ext4ForgetFtraceEvent : public ::protozero::Message { uint64_t, Ext4ForgetFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Block kBlock() { return {}; } + static constexpr FieldMetadata_Block kBlock{}; void set_block(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Block::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -73440,14 +73110,7 @@ class Ext4ForgetFtraceEvent : public ::protozero::Message { int32_t, Ext4ForgetFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_IsMetadata kIsMetadata() { return {}; } + static constexpr FieldMetadata_IsMetadata kIsMetadata{}; void set_is_metadata(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_IsMetadata::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -73465,14 +73128,7 @@ class Ext4ForgetFtraceEvent : public ::protozero::Message { uint32_t, Ext4ForgetFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Mode kMode() { return {}; } + static constexpr FieldMetadata_Mode kMode{}; void set_mode(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Mode::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -73527,14 +73183,7 @@ class Ext4FindDelallocRangeFtraceEvent : public ::protozero::Message { uint64_t, Ext4FindDelallocRangeFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Dev kDev() { return {}; } + static constexpr FieldMetadata_Dev kDev{}; void set_dev(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Dev::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -73552,14 +73201,7 @@ class Ext4FindDelallocRangeFtraceEvent : public ::protozero::Message { uint64_t, Ext4FindDelallocRangeFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ino kIno() { return {}; } + static constexpr FieldMetadata_Ino kIno{}; void set_ino(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Ino::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -73577,14 +73219,7 @@ class Ext4FindDelallocRangeFtraceEvent : public ::protozero::Message { uint32_t, Ext4FindDelallocRangeFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_From kFrom() { return {}; } + static constexpr FieldMetadata_From kFrom{}; void set_from(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_From::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -73602,14 +73237,7 @@ class Ext4FindDelallocRangeFtraceEvent : public ::protozero::Message { uint32_t, Ext4FindDelallocRangeFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_To kTo() { return {}; } + static constexpr FieldMetadata_To kTo{}; void set_to(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_To::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -73627,14 +73255,7 @@ class Ext4FindDelallocRangeFtraceEvent : public ::protozero::Message { int32_t, Ext4FindDelallocRangeFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Reverse kReverse() { return {}; } + static constexpr FieldMetadata_Reverse kReverse{}; void set_reverse(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Reverse::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -73652,14 +73273,7 @@ class Ext4FindDelallocRangeFtraceEvent : public ::protozero::Message { int32_t, Ext4FindDelallocRangeFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Found kFound() { return {}; } + static constexpr FieldMetadata_Found kFound{}; void set_found(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Found::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -73677,14 +73291,7 @@ class Ext4FindDelallocRangeFtraceEvent : public ::protozero::Message { uint32_t, Ext4FindDelallocRangeFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_FoundBlk kFoundBlk() { return {}; } + static constexpr FieldMetadata_FoundBlk kFoundBlk{}; void set_found_blk(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_FoundBlk::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -73733,14 +73340,7 @@ class Ext4FallocateExitFtraceEvent : public ::protozero::Message { uint64_t, Ext4FallocateExitFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Dev kDev() { return {}; } + static constexpr FieldMetadata_Dev kDev{}; void set_dev(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Dev::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -73758,14 +73358,7 @@ class Ext4FallocateExitFtraceEvent : public ::protozero::Message { uint64_t, Ext4FallocateExitFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ino kIno() { return {}; } + static constexpr FieldMetadata_Ino kIno{}; void set_ino(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Ino::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -73783,14 +73376,7 @@ class Ext4FallocateExitFtraceEvent : public ::protozero::Message { int64_t, Ext4FallocateExitFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Pos kPos() { return {}; } + static constexpr FieldMetadata_Pos kPos{}; void set_pos(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_Pos::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -73808,14 +73394,7 @@ class Ext4FallocateExitFtraceEvent : public ::protozero::Message { uint32_t, Ext4FallocateExitFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Blocks kBlocks() { return {}; } + static constexpr FieldMetadata_Blocks kBlocks{}; void set_blocks(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Blocks::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -73833,14 +73412,7 @@ class Ext4FallocateExitFtraceEvent : public ::protozero::Message { int32_t, Ext4FallocateExitFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ret kRet() { return {}; } + static constexpr FieldMetadata_Ret kRet{}; void set_ret(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Ret::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -73892,14 +73464,7 @@ class Ext4FallocateEnterFtraceEvent : public ::protozero::Message { uint64_t, Ext4FallocateEnterFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Dev kDev() { return {}; } + static constexpr FieldMetadata_Dev kDev{}; void set_dev(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Dev::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -73917,14 +73482,7 @@ class Ext4FallocateEnterFtraceEvent : public ::protozero::Message { uint64_t, Ext4FallocateEnterFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ino kIno() { return {}; } + static constexpr FieldMetadata_Ino kIno{}; void set_ino(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Ino::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -73942,14 +73500,7 @@ class Ext4FallocateEnterFtraceEvent : public ::protozero::Message { int64_t, Ext4FallocateEnterFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Offset kOffset() { return {}; } + static constexpr FieldMetadata_Offset kOffset{}; void set_offset(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_Offset::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -73967,14 +73518,7 @@ class Ext4FallocateEnterFtraceEvent : public ::protozero::Message { int64_t, Ext4FallocateEnterFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Len kLen() { return {}; } + static constexpr FieldMetadata_Len kLen{}; void set_len(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_Len::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -73992,14 +73536,7 @@ class Ext4FallocateEnterFtraceEvent : public ::protozero::Message { int32_t, Ext4FallocateEnterFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Mode kMode() { return {}; } + static constexpr FieldMetadata_Mode kMode{}; void set_mode(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Mode::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -74017,14 +73554,7 @@ class Ext4FallocateEnterFtraceEvent : public ::protozero::Message { int64_t, Ext4FallocateEnterFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Pos kPos() { return {}; } + static constexpr FieldMetadata_Pos kPos{}; void set_pos(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_Pos::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -74073,14 +73603,7 @@ class Ext4ExtShowExtentFtraceEvent : public ::protozero::Message { uint64_t, Ext4ExtShowExtentFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Dev kDev() { return {}; } + static constexpr FieldMetadata_Dev kDev{}; void set_dev(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Dev::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -74098,14 +73621,7 @@ class Ext4ExtShowExtentFtraceEvent : public ::protozero::Message { uint64_t, Ext4ExtShowExtentFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ino kIno() { return {}; } + static constexpr FieldMetadata_Ino kIno{}; void set_ino(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Ino::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -74123,14 +73639,7 @@ class Ext4ExtShowExtentFtraceEvent : public ::protozero::Message { uint64_t, Ext4ExtShowExtentFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Pblk kPblk() { return {}; } + static constexpr FieldMetadata_Pblk kPblk{}; void set_pblk(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Pblk::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -74148,14 +73657,7 @@ class Ext4ExtShowExtentFtraceEvent : public ::protozero::Message { uint32_t, Ext4ExtShowExtentFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Lblk kLblk() { return {}; } + static constexpr FieldMetadata_Lblk kLblk{}; void set_lblk(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Lblk::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -74173,14 +73675,7 @@ class Ext4ExtShowExtentFtraceEvent : public ::protozero::Message { uint32_t, Ext4ExtShowExtentFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Len kLen() { return {}; } + static constexpr FieldMetadata_Len kLen{}; void set_len(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Len::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -74244,14 +73739,7 @@ class Ext4ExtRmLeafFtraceEvent : public ::protozero::Message { uint64_t, Ext4ExtRmLeafFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Dev kDev() { return {}; } + static constexpr FieldMetadata_Dev kDev{}; void set_dev(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Dev::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -74269,14 +73757,7 @@ class Ext4ExtRmLeafFtraceEvent : public ::protozero::Message { uint64_t, Ext4ExtRmLeafFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ino kIno() { return {}; } + static constexpr FieldMetadata_Ino kIno{}; void set_ino(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Ino::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -74294,14 +73775,7 @@ class Ext4ExtRmLeafFtraceEvent : public ::protozero::Message { int64_t, Ext4ExtRmLeafFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Partial kPartial() { return {}; } + static constexpr FieldMetadata_Partial kPartial{}; void set_partial(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_Partial::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -74319,14 +73793,7 @@ class Ext4ExtRmLeafFtraceEvent : public ::protozero::Message { uint32_t, Ext4ExtRmLeafFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Start kStart() { return {}; } + static constexpr FieldMetadata_Start kStart{}; void set_start(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Start::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -74344,14 +73811,7 @@ class Ext4ExtRmLeafFtraceEvent : public ::protozero::Message { uint32_t, Ext4ExtRmLeafFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_EeLblk kEeLblk() { return {}; } + static constexpr FieldMetadata_EeLblk kEeLblk{}; void set_ee_lblk(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_EeLblk::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -74369,14 +73829,7 @@ class Ext4ExtRmLeafFtraceEvent : public ::protozero::Message { uint64_t, Ext4ExtRmLeafFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_EePblk kEePblk() { return {}; } + static constexpr FieldMetadata_EePblk kEePblk{}; void set_ee_pblk(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_EePblk::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -74394,14 +73847,7 @@ class Ext4ExtRmLeafFtraceEvent : public ::protozero::Message { int32_t, Ext4ExtRmLeafFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_EeLen kEeLen() { return {}; } + static constexpr FieldMetadata_EeLen kEeLen{}; void set_ee_len(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_EeLen::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -74419,14 +73865,7 @@ class Ext4ExtRmLeafFtraceEvent : public ::protozero::Message { uint32_t, Ext4ExtRmLeafFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_PcLblk kPcLblk() { return {}; } + static constexpr FieldMetadata_PcLblk kPcLblk{}; void set_pc_lblk(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_PcLblk::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -74444,14 +73883,7 @@ class Ext4ExtRmLeafFtraceEvent : public ::protozero::Message { uint64_t, Ext4ExtRmLeafFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_PcPclu kPcPclu() { return {}; } + static constexpr FieldMetadata_PcPclu kPcPclu{}; void set_pc_pclu(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_PcPclu::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -74469,14 +73901,7 @@ class Ext4ExtRmLeafFtraceEvent : public ::protozero::Message { int32_t, Ext4ExtRmLeafFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_PcState kPcState() { return {}; } + static constexpr FieldMetadata_PcState kPcState{}; void set_pc_state(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_PcState::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -74519,14 +73944,7 @@ class Ext4ExtRmIdxFtraceEvent : public ::protozero::Message { uint64_t, Ext4ExtRmIdxFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Dev kDev() { return {}; } + static constexpr FieldMetadata_Dev kDev{}; void set_dev(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Dev::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -74544,14 +73962,7 @@ class Ext4ExtRmIdxFtraceEvent : public ::protozero::Message { uint64_t, Ext4ExtRmIdxFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ino kIno() { return {}; } + static constexpr FieldMetadata_Ino kIno{}; void set_ino(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Ino::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -74569,14 +73980,7 @@ class Ext4ExtRmIdxFtraceEvent : public ::protozero::Message { uint64_t, Ext4ExtRmIdxFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Pblk kPblk() { return {}; } + static constexpr FieldMetadata_Pblk kPblk{}; void set_pblk(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Pblk::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -74640,14 +74044,7 @@ class Ext4ExtRemoveSpaceDoneFtraceEvent : public ::protozero::Message { uint64_t, Ext4ExtRemoveSpaceDoneFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Dev kDev() { return {}; } + static constexpr FieldMetadata_Dev kDev{}; void set_dev(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Dev::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -74665,14 +74062,7 @@ class Ext4ExtRemoveSpaceDoneFtraceEvent : public ::protozero::Message { uint64_t, Ext4ExtRemoveSpaceDoneFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ino kIno() { return {}; } + static constexpr FieldMetadata_Ino kIno{}; void set_ino(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Ino::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -74690,14 +74080,7 @@ class Ext4ExtRemoveSpaceDoneFtraceEvent : public ::protozero::Message { uint32_t, Ext4ExtRemoveSpaceDoneFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Start kStart() { return {}; } + static constexpr FieldMetadata_Start kStart{}; void set_start(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Start::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -74715,14 +74098,7 @@ class Ext4ExtRemoveSpaceDoneFtraceEvent : public ::protozero::Message { uint32_t, Ext4ExtRemoveSpaceDoneFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_End kEnd() { return {}; } + static constexpr FieldMetadata_End kEnd{}; void set_end(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_End::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -74740,14 +74116,7 @@ class Ext4ExtRemoveSpaceDoneFtraceEvent : public ::protozero::Message { int32_t, Ext4ExtRemoveSpaceDoneFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Depth kDepth() { return {}; } + static constexpr FieldMetadata_Depth kDepth{}; void set_depth(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Depth::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -74765,14 +74134,7 @@ class Ext4ExtRemoveSpaceDoneFtraceEvent : public ::protozero::Message { int64_t, Ext4ExtRemoveSpaceDoneFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Partial kPartial() { return {}; } + static constexpr FieldMetadata_Partial kPartial{}; void set_partial(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_Partial::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -74790,14 +74152,7 @@ class Ext4ExtRemoveSpaceDoneFtraceEvent : public ::protozero::Message { uint32_t, Ext4ExtRemoveSpaceDoneFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_EhEntries kEhEntries() { return {}; } + static constexpr FieldMetadata_EhEntries kEhEntries{}; void set_eh_entries(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_EhEntries::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -74815,14 +74170,7 @@ class Ext4ExtRemoveSpaceDoneFtraceEvent : public ::protozero::Message { uint32_t, Ext4ExtRemoveSpaceDoneFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_PcLblk kPcLblk() { return {}; } + static constexpr FieldMetadata_PcLblk kPcLblk{}; void set_pc_lblk(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_PcLblk::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -74840,14 +74188,7 @@ class Ext4ExtRemoveSpaceDoneFtraceEvent : public ::protozero::Message { uint64_t, Ext4ExtRemoveSpaceDoneFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_PcPclu kPcPclu() { return {}; } + static constexpr FieldMetadata_PcPclu kPcPclu{}; void set_pc_pclu(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_PcPclu::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -74865,14 +74206,7 @@ class Ext4ExtRemoveSpaceDoneFtraceEvent : public ::protozero::Message { int32_t, Ext4ExtRemoveSpaceDoneFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_PcState kPcState() { return {}; } + static constexpr FieldMetadata_PcState kPcState{}; void set_pc_state(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_PcState::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -74921,14 +74255,7 @@ class Ext4ExtRemoveSpaceFtraceEvent : public ::protozero::Message { uint64_t, Ext4ExtRemoveSpaceFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Dev kDev() { return {}; } + static constexpr FieldMetadata_Dev kDev{}; void set_dev(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Dev::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -74946,14 +74273,7 @@ class Ext4ExtRemoveSpaceFtraceEvent : public ::protozero::Message { uint64_t, Ext4ExtRemoveSpaceFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ino kIno() { return {}; } + static constexpr FieldMetadata_Ino kIno{}; void set_ino(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Ino::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -74971,14 +74291,7 @@ class Ext4ExtRemoveSpaceFtraceEvent : public ::protozero::Message { uint32_t, Ext4ExtRemoveSpaceFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Start kStart() { return {}; } + static constexpr FieldMetadata_Start kStart{}; void set_start(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Start::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -74996,14 +74309,7 @@ class Ext4ExtRemoveSpaceFtraceEvent : public ::protozero::Message { uint32_t, Ext4ExtRemoveSpaceFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_End kEnd() { return {}; } + static constexpr FieldMetadata_End kEnd{}; void set_end(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_End::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -75021,14 +74327,7 @@ class Ext4ExtRemoveSpaceFtraceEvent : public ::protozero::Message { int32_t, Ext4ExtRemoveSpaceFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Depth kDepth() { return {}; } + static constexpr FieldMetadata_Depth kDepth{}; void set_depth(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Depth::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -75077,14 +74376,7 @@ class Ext4ExtPutInCacheFtraceEvent : public ::protozero::Message { uint64_t, Ext4ExtPutInCacheFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Dev kDev() { return {}; } + static constexpr FieldMetadata_Dev kDev{}; void set_dev(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Dev::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -75102,14 +74394,7 @@ class Ext4ExtPutInCacheFtraceEvent : public ::protozero::Message { uint64_t, Ext4ExtPutInCacheFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ino kIno() { return {}; } + static constexpr FieldMetadata_Ino kIno{}; void set_ino(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Ino::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -75127,14 +74412,7 @@ class Ext4ExtPutInCacheFtraceEvent : public ::protozero::Message { uint32_t, Ext4ExtPutInCacheFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Lblk kLblk() { return {}; } + static constexpr FieldMetadata_Lblk kLblk{}; void set_lblk(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Lblk::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -75152,14 +74430,7 @@ class Ext4ExtPutInCacheFtraceEvent : public ::protozero::Message { uint32_t, Ext4ExtPutInCacheFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Len kLen() { return {}; } + static constexpr FieldMetadata_Len kLen{}; void set_len(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Len::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -75177,14 +74448,7 @@ class Ext4ExtPutInCacheFtraceEvent : public ::protozero::Message { uint64_t, Ext4ExtPutInCacheFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Start kStart() { return {}; } + static constexpr FieldMetadata_Start kStart{}; void set_start(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Start::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -75242,14 +74506,7 @@ class Ext4ExtMapBlocksExitFtraceEvent : public ::protozero::Message { uint64_t, Ext4ExtMapBlocksExitFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Dev kDev() { return {}; } + static constexpr FieldMetadata_Dev kDev{}; void set_dev(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Dev::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -75267,14 +74524,7 @@ class Ext4ExtMapBlocksExitFtraceEvent : public ::protozero::Message { uint64_t, Ext4ExtMapBlocksExitFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ino kIno() { return {}; } + static constexpr FieldMetadata_Ino kIno{}; void set_ino(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Ino::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -75292,14 +74542,7 @@ class Ext4ExtMapBlocksExitFtraceEvent : public ::protozero::Message { uint32_t, Ext4ExtMapBlocksExitFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Flags kFlags() { return {}; } + static constexpr FieldMetadata_Flags kFlags{}; void set_flags(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Flags::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -75317,14 +74560,7 @@ class Ext4ExtMapBlocksExitFtraceEvent : public ::protozero::Message { uint64_t, Ext4ExtMapBlocksExitFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Pblk kPblk() { return {}; } + static constexpr FieldMetadata_Pblk kPblk{}; void set_pblk(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Pblk::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -75342,14 +74578,7 @@ class Ext4ExtMapBlocksExitFtraceEvent : public ::protozero::Message { uint32_t, Ext4ExtMapBlocksExitFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Lblk kLblk() { return {}; } + static constexpr FieldMetadata_Lblk kLblk{}; void set_lblk(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Lblk::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -75367,14 +74596,7 @@ class Ext4ExtMapBlocksExitFtraceEvent : public ::protozero::Message { uint32_t, Ext4ExtMapBlocksExitFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Len kLen() { return {}; } + static constexpr FieldMetadata_Len kLen{}; void set_len(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Len::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -75392,14 +74614,7 @@ class Ext4ExtMapBlocksExitFtraceEvent : public ::protozero::Message { uint32_t, Ext4ExtMapBlocksExitFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Mflags kMflags() { return {}; } + static constexpr FieldMetadata_Mflags kMflags{}; void set_mflags(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Mflags::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -75417,14 +74632,7 @@ class Ext4ExtMapBlocksExitFtraceEvent : public ::protozero::Message { int32_t, Ext4ExtMapBlocksExitFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ret kRet() { return {}; } + static constexpr FieldMetadata_Ret kRet{}; void set_ret(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Ret::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -75473,14 +74681,7 @@ class Ext4ExtMapBlocksEnterFtraceEvent : public ::protozero::Message { uint64_t, Ext4ExtMapBlocksEnterFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Dev kDev() { return {}; } + static constexpr FieldMetadata_Dev kDev{}; void set_dev(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Dev::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -75498,14 +74699,7 @@ class Ext4ExtMapBlocksEnterFtraceEvent : public ::protozero::Message { uint64_t, Ext4ExtMapBlocksEnterFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ino kIno() { return {}; } + static constexpr FieldMetadata_Ino kIno{}; void set_ino(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Ino::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -75523,14 +74717,7 @@ class Ext4ExtMapBlocksEnterFtraceEvent : public ::protozero::Message { uint32_t, Ext4ExtMapBlocksEnterFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Lblk kLblk() { return {}; } + static constexpr FieldMetadata_Lblk kLblk{}; void set_lblk(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Lblk::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -75548,14 +74735,7 @@ class Ext4ExtMapBlocksEnterFtraceEvent : public ::protozero::Message { uint32_t, Ext4ExtMapBlocksEnterFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Len kLen() { return {}; } + static constexpr FieldMetadata_Len kLen{}; void set_len(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Len::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -75573,14 +74753,7 @@ class Ext4ExtMapBlocksEnterFtraceEvent : public ::protozero::Message { uint32_t, Ext4ExtMapBlocksEnterFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Flags kFlags() { return {}; } + static constexpr FieldMetadata_Flags kFlags{}; void set_flags(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Flags::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -75626,14 +74799,7 @@ class Ext4ExtLoadExtentFtraceEvent : public ::protozero::Message { uint64_t, Ext4ExtLoadExtentFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Dev kDev() { return {}; } + static constexpr FieldMetadata_Dev kDev{}; void set_dev(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Dev::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -75651,14 +74817,7 @@ class Ext4ExtLoadExtentFtraceEvent : public ::protozero::Message { uint64_t, Ext4ExtLoadExtentFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ino kIno() { return {}; } + static constexpr FieldMetadata_Ino kIno{}; void set_ino(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Ino::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -75676,14 +74835,7 @@ class Ext4ExtLoadExtentFtraceEvent : public ::protozero::Message { uint64_t, Ext4ExtLoadExtentFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Pblk kPblk() { return {}; } + static constexpr FieldMetadata_Pblk kPblk{}; void set_pblk(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Pblk::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -75701,14 +74853,7 @@ class Ext4ExtLoadExtentFtraceEvent : public ::protozero::Message { uint32_t, Ext4ExtLoadExtentFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Lblk kLblk() { return {}; } + static constexpr FieldMetadata_Lblk kLblk{}; void set_lblk(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Lblk::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -75754,14 +74899,7 @@ class Ext4ExtInCacheFtraceEvent : public ::protozero::Message { uint64_t, Ext4ExtInCacheFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Dev kDev() { return {}; } + static constexpr FieldMetadata_Dev kDev{}; void set_dev(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Dev::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -75779,14 +74917,7 @@ class Ext4ExtInCacheFtraceEvent : public ::protozero::Message { uint64_t, Ext4ExtInCacheFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ino kIno() { return {}; } + static constexpr FieldMetadata_Ino kIno{}; void set_ino(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Ino::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -75804,14 +74935,7 @@ class Ext4ExtInCacheFtraceEvent : public ::protozero::Message { uint32_t, Ext4ExtInCacheFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Lblk kLblk() { return {}; } + static constexpr FieldMetadata_Lblk kLblk{}; void set_lblk(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Lblk::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -75829,14 +74953,7 @@ class Ext4ExtInCacheFtraceEvent : public ::protozero::Message { int32_t, Ext4ExtInCacheFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ret kRet() { return {}; } + static constexpr FieldMetadata_Ret kRet{}; void set_ret(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Ret::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -75894,14 +75011,7 @@ class Ext4ExtHandleUnwrittenExtentsFtraceEvent : public ::protozero::Message { uint64_t, Ext4ExtHandleUnwrittenExtentsFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Dev kDev() { return {}; } + static constexpr FieldMetadata_Dev kDev{}; void set_dev(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Dev::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -75919,14 +75029,7 @@ class Ext4ExtHandleUnwrittenExtentsFtraceEvent : public ::protozero::Message { uint64_t, Ext4ExtHandleUnwrittenExtentsFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ino kIno() { return {}; } + static constexpr FieldMetadata_Ino kIno{}; void set_ino(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Ino::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -75944,14 +75047,7 @@ class Ext4ExtHandleUnwrittenExtentsFtraceEvent : public ::protozero::Message { int32_t, Ext4ExtHandleUnwrittenExtentsFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Flags kFlags() { return {}; } + static constexpr FieldMetadata_Flags kFlags{}; void set_flags(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Flags::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -75969,14 +75065,7 @@ class Ext4ExtHandleUnwrittenExtentsFtraceEvent : public ::protozero::Message { uint32_t, Ext4ExtHandleUnwrittenExtentsFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Lblk kLblk() { return {}; } + static constexpr FieldMetadata_Lblk kLblk{}; void set_lblk(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Lblk::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -75994,14 +75083,7 @@ class Ext4ExtHandleUnwrittenExtentsFtraceEvent : public ::protozero::Message { uint64_t, Ext4ExtHandleUnwrittenExtentsFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Pblk kPblk() { return {}; } + static constexpr FieldMetadata_Pblk kPblk{}; void set_pblk(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Pblk::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -76019,14 +75101,7 @@ class Ext4ExtHandleUnwrittenExtentsFtraceEvent : public ::protozero::Message { uint32_t, Ext4ExtHandleUnwrittenExtentsFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Len kLen() { return {}; } + static constexpr FieldMetadata_Len kLen{}; void set_len(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Len::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -76044,14 +75119,7 @@ class Ext4ExtHandleUnwrittenExtentsFtraceEvent : public ::protozero::Message { uint32_t, Ext4ExtHandleUnwrittenExtentsFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Allocated kAllocated() { return {}; } + static constexpr FieldMetadata_Allocated kAllocated{}; void set_allocated(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Allocated::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -76069,14 +75137,7 @@ class Ext4ExtHandleUnwrittenExtentsFtraceEvent : public ::protozero::Message { uint64_t, Ext4ExtHandleUnwrittenExtentsFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Newblk kNewblk() { return {}; } + static constexpr FieldMetadata_Newblk kNewblk{}; void set_newblk(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Newblk::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -76140,14 +75201,7 @@ class Ext4ExtConvertToInitializedFastpathFtraceEvent : public ::protozero::Messa uint64_t, Ext4ExtConvertToInitializedFastpathFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Dev kDev() { return {}; } + static constexpr FieldMetadata_Dev kDev{}; void set_dev(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Dev::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -76165,14 +75219,7 @@ class Ext4ExtConvertToInitializedFastpathFtraceEvent : public ::protozero::Messa uint64_t, Ext4ExtConvertToInitializedFastpathFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ino kIno() { return {}; } + static constexpr FieldMetadata_Ino kIno{}; void set_ino(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Ino::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -76190,14 +75237,7 @@ class Ext4ExtConvertToInitializedFastpathFtraceEvent : public ::protozero::Messa uint32_t, Ext4ExtConvertToInitializedFastpathFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_MLblk kMLblk() { return {}; } + static constexpr FieldMetadata_MLblk kMLblk{}; void set_m_lblk(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_MLblk::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -76215,14 +75255,7 @@ class Ext4ExtConvertToInitializedFastpathFtraceEvent : public ::protozero::Messa uint32_t, Ext4ExtConvertToInitializedFastpathFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_MLen kMLen() { return {}; } + static constexpr FieldMetadata_MLen kMLen{}; void set_m_len(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_MLen::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -76240,14 +75273,7 @@ class Ext4ExtConvertToInitializedFastpathFtraceEvent : public ::protozero::Messa uint32_t, Ext4ExtConvertToInitializedFastpathFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ULblk kULblk() { return {}; } + static constexpr FieldMetadata_ULblk kULblk{}; void set_u_lblk(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_ULblk::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -76265,14 +75291,7 @@ class Ext4ExtConvertToInitializedFastpathFtraceEvent : public ::protozero::Messa uint32_t, Ext4ExtConvertToInitializedFastpathFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ULen kULen() { return {}; } + static constexpr FieldMetadata_ULen kULen{}; void set_u_len(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_ULen::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -76290,14 +75309,7 @@ class Ext4ExtConvertToInitializedFastpathFtraceEvent : public ::protozero::Messa uint64_t, Ext4ExtConvertToInitializedFastpathFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_UPblk kUPblk() { return {}; } + static constexpr FieldMetadata_UPblk kUPblk{}; void set_u_pblk(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_UPblk::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -76315,14 +75327,7 @@ class Ext4ExtConvertToInitializedFastpathFtraceEvent : public ::protozero::Messa uint32_t, Ext4ExtConvertToInitializedFastpathFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ILblk kILblk() { return {}; } + static constexpr FieldMetadata_ILblk kILblk{}; void set_i_lblk(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_ILblk::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -76340,14 +75345,7 @@ class Ext4ExtConvertToInitializedFastpathFtraceEvent : public ::protozero::Messa uint32_t, Ext4ExtConvertToInitializedFastpathFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ILen kILen() { return {}; } + static constexpr FieldMetadata_ILen kILen{}; void set_i_len(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_ILen::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -76365,14 +75363,7 @@ class Ext4ExtConvertToInitializedFastpathFtraceEvent : public ::protozero::Messa uint64_t, Ext4ExtConvertToInitializedFastpathFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_IPblk kIPblk() { return {}; } + static constexpr FieldMetadata_IPblk kIPblk{}; void set_i_pblk(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_IPblk::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -76427,14 +75418,7 @@ class Ext4ExtConvertToInitializedEnterFtraceEvent : public ::protozero::Message uint64_t, Ext4ExtConvertToInitializedEnterFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Dev kDev() { return {}; } + static constexpr FieldMetadata_Dev kDev{}; void set_dev(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Dev::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -76452,14 +75436,7 @@ class Ext4ExtConvertToInitializedEnterFtraceEvent : public ::protozero::Message uint64_t, Ext4ExtConvertToInitializedEnterFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ino kIno() { return {}; } + static constexpr FieldMetadata_Ino kIno{}; void set_ino(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Ino::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -76477,14 +75454,7 @@ class Ext4ExtConvertToInitializedEnterFtraceEvent : public ::protozero::Message uint32_t, Ext4ExtConvertToInitializedEnterFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_MLblk kMLblk() { return {}; } + static constexpr FieldMetadata_MLblk kMLblk{}; void set_m_lblk(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_MLblk::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -76502,14 +75472,7 @@ class Ext4ExtConvertToInitializedEnterFtraceEvent : public ::protozero::Message uint32_t, Ext4ExtConvertToInitializedEnterFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_MLen kMLen() { return {}; } + static constexpr FieldMetadata_MLen kMLen{}; void set_m_len(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_MLen::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -76527,14 +75490,7 @@ class Ext4ExtConvertToInitializedEnterFtraceEvent : public ::protozero::Message uint32_t, Ext4ExtConvertToInitializedEnterFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ULblk kULblk() { return {}; } + static constexpr FieldMetadata_ULblk kULblk{}; void set_u_lblk(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_ULblk::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -76552,14 +75508,7 @@ class Ext4ExtConvertToInitializedEnterFtraceEvent : public ::protozero::Message uint32_t, Ext4ExtConvertToInitializedEnterFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ULen kULen() { return {}; } + static constexpr FieldMetadata_ULen kULen{}; void set_u_len(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_ULen::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -76577,14 +75526,7 @@ class Ext4ExtConvertToInitializedEnterFtraceEvent : public ::protozero::Message uint64_t, Ext4ExtConvertToInitializedEnterFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_UPblk kUPblk() { return {}; } + static constexpr FieldMetadata_UPblk kUPblk{}; void set_u_pblk(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_UPblk::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -76627,14 +75569,7 @@ class Ext4EvictInodeFtraceEvent : public ::protozero::Message { uint64_t, Ext4EvictInodeFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Dev kDev() { return {}; } + static constexpr FieldMetadata_Dev kDev{}; void set_dev(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Dev::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -76652,14 +75587,7 @@ class Ext4EvictInodeFtraceEvent : public ::protozero::Message { uint64_t, Ext4EvictInodeFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ino kIno() { return {}; } + static constexpr FieldMetadata_Ino kIno{}; void set_ino(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Ino::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -76677,14 +75605,7 @@ class Ext4EvictInodeFtraceEvent : public ::protozero::Message { int32_t, Ext4EvictInodeFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Nlink kNlink() { return {}; } + static constexpr FieldMetadata_Nlink kNlink{}; void set_nlink(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Nlink::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -76727,14 +75648,7 @@ class Ext4EsShrinkScanExitFtraceEvent : public ::protozero::Message { uint64_t, Ext4EsShrinkScanExitFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Dev kDev() { return {}; } + static constexpr FieldMetadata_Dev kDev{}; void set_dev(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Dev::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -76752,14 +75666,7 @@ class Ext4EsShrinkScanExitFtraceEvent : public ::protozero::Message { int32_t, Ext4EsShrinkScanExitFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_NrShrunk kNrShrunk() { return {}; } + static constexpr FieldMetadata_NrShrunk kNrShrunk{}; void set_nr_shrunk(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_NrShrunk::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -76777,14 +75684,7 @@ class Ext4EsShrinkScanExitFtraceEvent : public ::protozero::Message { int32_t, Ext4EsShrinkScanExitFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_CacheCnt kCacheCnt() { return {}; } + static constexpr FieldMetadata_CacheCnt kCacheCnt{}; void set_cache_cnt(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_CacheCnt::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -76827,14 +75727,7 @@ class Ext4EsShrinkScanEnterFtraceEvent : public ::protozero::Message { uint64_t, Ext4EsShrinkScanEnterFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Dev kDev() { return {}; } + static constexpr FieldMetadata_Dev kDev{}; void set_dev(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Dev::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -76852,14 +75745,7 @@ class Ext4EsShrinkScanEnterFtraceEvent : public ::protozero::Message { int32_t, Ext4EsShrinkScanEnterFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_NrToScan kNrToScan() { return {}; } + static constexpr FieldMetadata_NrToScan kNrToScan{}; void set_nr_to_scan(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_NrToScan::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -76877,14 +75763,7 @@ class Ext4EsShrinkScanEnterFtraceEvent : public ::protozero::Message { int32_t, Ext4EsShrinkScanEnterFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_CacheCnt kCacheCnt() { return {}; } + static constexpr FieldMetadata_CacheCnt kCacheCnt{}; void set_cache_cnt(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_CacheCnt::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -76927,14 +75806,7 @@ class Ext4EsShrinkCountFtraceEvent : public ::protozero::Message { uint64_t, Ext4EsShrinkCountFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Dev kDev() { return {}; } + static constexpr FieldMetadata_Dev kDev{}; void set_dev(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Dev::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -76952,14 +75824,7 @@ class Ext4EsShrinkCountFtraceEvent : public ::protozero::Message { int32_t, Ext4EsShrinkCountFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_NrToScan kNrToScan() { return {}; } + static constexpr FieldMetadata_NrToScan kNrToScan{}; void set_nr_to_scan(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_NrToScan::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -76977,14 +75842,7 @@ class Ext4EsShrinkCountFtraceEvent : public ::protozero::Message { int32_t, Ext4EsShrinkCountFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_CacheCnt kCacheCnt() { return {}; } + static constexpr FieldMetadata_CacheCnt kCacheCnt{}; void set_cache_cnt(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_CacheCnt::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -77033,14 +75891,7 @@ class Ext4EsShrinkFtraceEvent : public ::protozero::Message { uint64_t, Ext4EsShrinkFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Dev kDev() { return {}; } + static constexpr FieldMetadata_Dev kDev{}; void set_dev(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Dev::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -77058,14 +75909,7 @@ class Ext4EsShrinkFtraceEvent : public ::protozero::Message { int32_t, Ext4EsShrinkFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_NrShrunk kNrShrunk() { return {}; } + static constexpr FieldMetadata_NrShrunk kNrShrunk{}; void set_nr_shrunk(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_NrShrunk::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -77083,14 +75927,7 @@ class Ext4EsShrinkFtraceEvent : public ::protozero::Message { uint64_t, Ext4EsShrinkFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ScanTime kScanTime() { return {}; } + static constexpr FieldMetadata_ScanTime kScanTime{}; void set_scan_time(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_ScanTime::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -77108,14 +75945,7 @@ class Ext4EsShrinkFtraceEvent : public ::protozero::Message { int32_t, Ext4EsShrinkFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_NrSkipped kNrSkipped() { return {}; } + static constexpr FieldMetadata_NrSkipped kNrSkipped{}; void set_nr_skipped(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_NrSkipped::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -77133,14 +75963,7 @@ class Ext4EsShrinkFtraceEvent : public ::protozero::Message { int32_t, Ext4EsShrinkFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Retried kRetried() { return {}; } + static constexpr FieldMetadata_Retried kRetried{}; void set_retried(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Retried::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -77186,14 +76009,7 @@ class Ext4EsRemoveExtentFtraceEvent : public ::protozero::Message { uint64_t, Ext4EsRemoveExtentFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Dev kDev() { return {}; } + static constexpr FieldMetadata_Dev kDev{}; void set_dev(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Dev::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -77211,14 +76027,7 @@ class Ext4EsRemoveExtentFtraceEvent : public ::protozero::Message { uint64_t, Ext4EsRemoveExtentFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ino kIno() { return {}; } + static constexpr FieldMetadata_Ino kIno{}; void set_ino(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Ino::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -77236,14 +76045,7 @@ class Ext4EsRemoveExtentFtraceEvent : public ::protozero::Message { int64_t, Ext4EsRemoveExtentFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Lblk kLblk() { return {}; } + static constexpr FieldMetadata_Lblk kLblk{}; void set_lblk(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_Lblk::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -77261,14 +76063,7 @@ class Ext4EsRemoveExtentFtraceEvent : public ::protozero::Message { int64_t, Ext4EsRemoveExtentFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Len kLen() { return {}; } + static constexpr FieldMetadata_Len kLen{}; void set_len(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_Len::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -77323,14 +76118,7 @@ class Ext4EsLookupExtentExitFtraceEvent : public ::protozero::Message { uint64_t, Ext4EsLookupExtentExitFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Dev kDev() { return {}; } + static constexpr FieldMetadata_Dev kDev{}; void set_dev(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Dev::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -77348,14 +76136,7 @@ class Ext4EsLookupExtentExitFtraceEvent : public ::protozero::Message { uint64_t, Ext4EsLookupExtentExitFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ino kIno() { return {}; } + static constexpr FieldMetadata_Ino kIno{}; void set_ino(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Ino::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -77373,14 +76154,7 @@ class Ext4EsLookupExtentExitFtraceEvent : public ::protozero::Message { uint32_t, Ext4EsLookupExtentExitFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Lblk kLblk() { return {}; } + static constexpr FieldMetadata_Lblk kLblk{}; void set_lblk(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Lblk::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -77398,14 +76172,7 @@ class Ext4EsLookupExtentExitFtraceEvent : public ::protozero::Message { uint32_t, Ext4EsLookupExtentExitFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Len kLen() { return {}; } + static constexpr FieldMetadata_Len kLen{}; void set_len(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Len::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -77423,14 +76190,7 @@ class Ext4EsLookupExtentExitFtraceEvent : public ::protozero::Message { uint64_t, Ext4EsLookupExtentExitFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Pblk kPblk() { return {}; } + static constexpr FieldMetadata_Pblk kPblk{}; void set_pblk(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Pblk::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -77448,14 +76208,7 @@ class Ext4EsLookupExtentExitFtraceEvent : public ::protozero::Message { uint64_t, Ext4EsLookupExtentExitFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Status kStatus() { return {}; } + static constexpr FieldMetadata_Status kStatus{}; void set_status(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Status::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -77473,14 +76226,7 @@ class Ext4EsLookupExtentExitFtraceEvent : public ::protozero::Message { int32_t, Ext4EsLookupExtentExitFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Found kFound() { return {}; } + static constexpr FieldMetadata_Found kFound{}; void set_found(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Found::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -77523,14 +76269,7 @@ class Ext4EsLookupExtentEnterFtraceEvent : public ::protozero::Message { uint64_t, Ext4EsLookupExtentEnterFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Dev kDev() { return {}; } + static constexpr FieldMetadata_Dev kDev{}; void set_dev(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Dev::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -77548,14 +76287,7 @@ class Ext4EsLookupExtentEnterFtraceEvent : public ::protozero::Message { uint64_t, Ext4EsLookupExtentEnterFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ino kIno() { return {}; } + static constexpr FieldMetadata_Ino kIno{}; void set_ino(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Ino::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -77573,14 +76305,7 @@ class Ext4EsLookupExtentEnterFtraceEvent : public ::protozero::Message { uint32_t, Ext4EsLookupExtentEnterFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Lblk kLblk() { return {}; } + static constexpr FieldMetadata_Lblk kLblk{}; void set_lblk(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Lblk::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -77632,14 +76357,7 @@ class Ext4EsInsertExtentFtraceEvent : public ::protozero::Message { uint64_t, Ext4EsInsertExtentFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Dev kDev() { return {}; } + static constexpr FieldMetadata_Dev kDev{}; void set_dev(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Dev::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -77657,14 +76375,7 @@ class Ext4EsInsertExtentFtraceEvent : public ::protozero::Message { uint64_t, Ext4EsInsertExtentFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ino kIno() { return {}; } + static constexpr FieldMetadata_Ino kIno{}; void set_ino(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Ino::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -77682,14 +76393,7 @@ class Ext4EsInsertExtentFtraceEvent : public ::protozero::Message { uint32_t, Ext4EsInsertExtentFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Lblk kLblk() { return {}; } + static constexpr FieldMetadata_Lblk kLblk{}; void set_lblk(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Lblk::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -77707,14 +76411,7 @@ class Ext4EsInsertExtentFtraceEvent : public ::protozero::Message { uint32_t, Ext4EsInsertExtentFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Len kLen() { return {}; } + static constexpr FieldMetadata_Len kLen{}; void set_len(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Len::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -77732,14 +76429,7 @@ class Ext4EsInsertExtentFtraceEvent : public ::protozero::Message { uint64_t, Ext4EsInsertExtentFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Pblk kPblk() { return {}; } + static constexpr FieldMetadata_Pblk kPblk{}; void set_pblk(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Pblk::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -77757,14 +76447,7 @@ class Ext4EsInsertExtentFtraceEvent : public ::protozero::Message { uint64_t, Ext4EsInsertExtentFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Status kStatus() { return {}; } + static constexpr FieldMetadata_Status kStatus{}; void set_status(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Status::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -77816,14 +76499,7 @@ class Ext4EsFindDelayedExtentRangeExitFtraceEvent : public ::protozero::Message uint64_t, Ext4EsFindDelayedExtentRangeExitFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Dev kDev() { return {}; } + static constexpr FieldMetadata_Dev kDev{}; void set_dev(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Dev::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -77841,14 +76517,7 @@ class Ext4EsFindDelayedExtentRangeExitFtraceEvent : public ::protozero::Message uint64_t, Ext4EsFindDelayedExtentRangeExitFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ino kIno() { return {}; } + static constexpr FieldMetadata_Ino kIno{}; void set_ino(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Ino::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -77866,14 +76535,7 @@ class Ext4EsFindDelayedExtentRangeExitFtraceEvent : public ::protozero::Message uint32_t, Ext4EsFindDelayedExtentRangeExitFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Lblk kLblk() { return {}; } + static constexpr FieldMetadata_Lblk kLblk{}; void set_lblk(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Lblk::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -77891,14 +76553,7 @@ class Ext4EsFindDelayedExtentRangeExitFtraceEvent : public ::protozero::Message uint32_t, Ext4EsFindDelayedExtentRangeExitFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Len kLen() { return {}; } + static constexpr FieldMetadata_Len kLen{}; void set_len(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Len::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -77916,14 +76571,7 @@ class Ext4EsFindDelayedExtentRangeExitFtraceEvent : public ::protozero::Message uint64_t, Ext4EsFindDelayedExtentRangeExitFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Pblk kPblk() { return {}; } + static constexpr FieldMetadata_Pblk kPblk{}; void set_pblk(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Pblk::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -77941,14 +76589,7 @@ class Ext4EsFindDelayedExtentRangeExitFtraceEvent : public ::protozero::Message uint64_t, Ext4EsFindDelayedExtentRangeExitFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Status kStatus() { return {}; } + static constexpr FieldMetadata_Status kStatus{}; void set_status(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Status::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -77991,14 +76632,7 @@ class Ext4EsFindDelayedExtentRangeEnterFtraceEvent : public ::protozero::Message uint64_t, Ext4EsFindDelayedExtentRangeEnterFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Dev kDev() { return {}; } + static constexpr FieldMetadata_Dev kDev{}; void set_dev(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Dev::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -78016,14 +76650,7 @@ class Ext4EsFindDelayedExtentRangeEnterFtraceEvent : public ::protozero::Message uint64_t, Ext4EsFindDelayedExtentRangeEnterFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ino kIno() { return {}; } + static constexpr FieldMetadata_Ino kIno{}; void set_ino(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Ino::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -78041,14 +76668,7 @@ class Ext4EsFindDelayedExtentRangeEnterFtraceEvent : public ::protozero::Message uint32_t, Ext4EsFindDelayedExtentRangeEnterFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Lblk kLblk() { return {}; } + static constexpr FieldMetadata_Lblk kLblk{}; void set_lblk(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Lblk::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -78100,14 +76720,7 @@ class Ext4EsCacheExtentFtraceEvent : public ::protozero::Message { uint64_t, Ext4EsCacheExtentFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Dev kDev() { return {}; } + static constexpr FieldMetadata_Dev kDev{}; void set_dev(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Dev::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -78125,14 +76738,7 @@ class Ext4EsCacheExtentFtraceEvent : public ::protozero::Message { uint64_t, Ext4EsCacheExtentFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ino kIno() { return {}; } + static constexpr FieldMetadata_Ino kIno{}; void set_ino(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Ino::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -78150,14 +76756,7 @@ class Ext4EsCacheExtentFtraceEvent : public ::protozero::Message { uint32_t, Ext4EsCacheExtentFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Lblk kLblk() { return {}; } + static constexpr FieldMetadata_Lblk kLblk{}; void set_lblk(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Lblk::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -78175,14 +76774,7 @@ class Ext4EsCacheExtentFtraceEvent : public ::protozero::Message { uint32_t, Ext4EsCacheExtentFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Len kLen() { return {}; } + static constexpr FieldMetadata_Len kLen{}; void set_len(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Len::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -78200,14 +76792,7 @@ class Ext4EsCacheExtentFtraceEvent : public ::protozero::Message { uint64_t, Ext4EsCacheExtentFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Pblk kPblk() { return {}; } + static constexpr FieldMetadata_Pblk kPblk{}; void set_pblk(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Pblk::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -78225,14 +76810,7 @@ class Ext4EsCacheExtentFtraceEvent : public ::protozero::Message { uint32_t, Ext4EsCacheExtentFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Status kStatus() { return {}; } + static constexpr FieldMetadata_Status kStatus{}; void set_status(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Status::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -78275,14 +76853,7 @@ class Ext4DropInodeFtraceEvent : public ::protozero::Message { uint64_t, Ext4DropInodeFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Dev kDev() { return {}; } + static constexpr FieldMetadata_Dev kDev{}; void set_dev(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Dev::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -78300,14 +76871,7 @@ class Ext4DropInodeFtraceEvent : public ::protozero::Message { uint64_t, Ext4DropInodeFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ino kIno() { return {}; } + static constexpr FieldMetadata_Ino kIno{}; void set_ino(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Ino::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -78325,14 +76889,7 @@ class Ext4DropInodeFtraceEvent : public ::protozero::Message { int32_t, Ext4DropInodeFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Drop kDrop() { return {}; } + static constexpr FieldMetadata_Drop kDrop{}; void set_drop(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Drop::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -78378,14 +76935,7 @@ class Ext4DiscardPreallocationsFtraceEvent : public ::protozero::Message { uint64_t, Ext4DiscardPreallocationsFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Dev kDev() { return {}; } + static constexpr FieldMetadata_Dev kDev{}; void set_dev(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Dev::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -78403,14 +76953,7 @@ class Ext4DiscardPreallocationsFtraceEvent : public ::protozero::Message { uint64_t, Ext4DiscardPreallocationsFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ino kIno() { return {}; } + static constexpr FieldMetadata_Ino kIno{}; void set_ino(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Ino::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -78428,14 +76971,7 @@ class Ext4DiscardPreallocationsFtraceEvent : public ::protozero::Message { uint32_t, Ext4DiscardPreallocationsFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Len kLen() { return {}; } + static constexpr FieldMetadata_Len kLen{}; void set_len(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Len::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -78453,14 +76989,7 @@ class Ext4DiscardPreallocationsFtraceEvent : public ::protozero::Message { uint32_t, Ext4DiscardPreallocationsFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Needed kNeeded() { return {}; } + static constexpr FieldMetadata_Needed kNeeded{}; void set_needed(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Needed::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -78503,14 +77032,7 @@ class Ext4DiscardBlocksFtraceEvent : public ::protozero::Message { uint64_t, Ext4DiscardBlocksFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Dev kDev() { return {}; } + static constexpr FieldMetadata_Dev kDev{}; void set_dev(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Dev::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -78528,14 +77050,7 @@ class Ext4DiscardBlocksFtraceEvent : public ::protozero::Message { uint64_t, Ext4DiscardBlocksFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Blk kBlk() { return {}; } + static constexpr FieldMetadata_Blk kBlk{}; void set_blk(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Blk::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -78553,14 +77068,7 @@ class Ext4DiscardBlocksFtraceEvent : public ::protozero::Message { uint64_t, Ext4DiscardBlocksFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Count kCount() { return {}; } + static constexpr FieldMetadata_Count kCount{}; void set_count(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Count::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -78612,14 +77120,7 @@ class Ext4DirectIOExitFtraceEvent : public ::protozero::Message { uint64_t, Ext4DirectIOExitFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Dev kDev() { return {}; } + static constexpr FieldMetadata_Dev kDev{}; void set_dev(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Dev::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -78637,14 +77138,7 @@ class Ext4DirectIOExitFtraceEvent : public ::protozero::Message { uint64_t, Ext4DirectIOExitFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ino kIno() { return {}; } + static constexpr FieldMetadata_Ino kIno{}; void set_ino(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Ino::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -78662,14 +77156,7 @@ class Ext4DirectIOExitFtraceEvent : public ::protozero::Message { int64_t, Ext4DirectIOExitFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Pos kPos() { return {}; } + static constexpr FieldMetadata_Pos kPos{}; void set_pos(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_Pos::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -78687,14 +77174,7 @@ class Ext4DirectIOExitFtraceEvent : public ::protozero::Message { uint64_t, Ext4DirectIOExitFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Len kLen() { return {}; } + static constexpr FieldMetadata_Len kLen{}; void set_len(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Len::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -78712,14 +77192,7 @@ class Ext4DirectIOExitFtraceEvent : public ::protozero::Message { int32_t, Ext4DirectIOExitFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Rw kRw() { return {}; } + static constexpr FieldMetadata_Rw kRw{}; void set_rw(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Rw::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -78737,14 +77210,7 @@ class Ext4DirectIOExitFtraceEvent : public ::protozero::Message { int32_t, Ext4DirectIOExitFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ret kRet() { return {}; } + static constexpr FieldMetadata_Ret kRet{}; void set_ret(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Ret::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -78793,14 +77259,7 @@ class Ext4DirectIOEnterFtraceEvent : public ::protozero::Message { uint64_t, Ext4DirectIOEnterFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Dev kDev() { return {}; } + static constexpr FieldMetadata_Dev kDev{}; void set_dev(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Dev::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -78818,14 +77277,7 @@ class Ext4DirectIOEnterFtraceEvent : public ::protozero::Message { uint64_t, Ext4DirectIOEnterFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ino kIno() { return {}; } + static constexpr FieldMetadata_Ino kIno{}; void set_ino(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Ino::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -78843,14 +77295,7 @@ class Ext4DirectIOEnterFtraceEvent : public ::protozero::Message { int64_t, Ext4DirectIOEnterFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Pos kPos() { return {}; } + static constexpr FieldMetadata_Pos kPos{}; void set_pos(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_Pos::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -78868,14 +77313,7 @@ class Ext4DirectIOEnterFtraceEvent : public ::protozero::Message { uint64_t, Ext4DirectIOEnterFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Len kLen() { return {}; } + static constexpr FieldMetadata_Len kLen{}; void set_len(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Len::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -78893,14 +77331,7 @@ class Ext4DirectIOEnterFtraceEvent : public ::protozero::Message { int32_t, Ext4DirectIOEnterFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Rw kRw() { return {}; } + static constexpr FieldMetadata_Rw kRw{}; void set_rw(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Rw::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -78949,14 +77380,7 @@ class Ext4DaWritePagesExtentFtraceEvent : public ::protozero::Message { uint64_t, Ext4DaWritePagesExtentFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Dev kDev() { return {}; } + static constexpr FieldMetadata_Dev kDev{}; void set_dev(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Dev::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -78974,14 +77398,7 @@ class Ext4DaWritePagesExtentFtraceEvent : public ::protozero::Message { uint64_t, Ext4DaWritePagesExtentFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ino kIno() { return {}; } + static constexpr FieldMetadata_Ino kIno{}; void set_ino(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Ino::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -78999,14 +77416,7 @@ class Ext4DaWritePagesExtentFtraceEvent : public ::protozero::Message { uint64_t, Ext4DaWritePagesExtentFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Lblk kLblk() { return {}; } + static constexpr FieldMetadata_Lblk kLblk{}; void set_lblk(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Lblk::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -79024,14 +77434,7 @@ class Ext4DaWritePagesExtentFtraceEvent : public ::protozero::Message { uint32_t, Ext4DaWritePagesExtentFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Len kLen() { return {}; } + static constexpr FieldMetadata_Len kLen{}; void set_len(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Len::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -79049,14 +77452,7 @@ class Ext4DaWritePagesExtentFtraceEvent : public ::protozero::Message { uint32_t, Ext4DaWritePagesExtentFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Flags kFlags() { return {}; } + static constexpr FieldMetadata_Flags kFlags{}; void set_flags(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Flags::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -79120,14 +77516,7 @@ class Ext4DaWritePagesFtraceEvent : public ::protozero::Message { uint64_t, Ext4DaWritePagesFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Dev kDev() { return {}; } + static constexpr FieldMetadata_Dev kDev{}; void set_dev(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Dev::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -79145,14 +77534,7 @@ class Ext4DaWritePagesFtraceEvent : public ::protozero::Message { uint64_t, Ext4DaWritePagesFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ino kIno() { return {}; } + static constexpr FieldMetadata_Ino kIno{}; void set_ino(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Ino::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -79170,14 +77552,7 @@ class Ext4DaWritePagesFtraceEvent : public ::protozero::Message { uint64_t, Ext4DaWritePagesFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_FirstPage kFirstPage() { return {}; } + static constexpr FieldMetadata_FirstPage kFirstPage{}; void set_first_page(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_FirstPage::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -79195,14 +77570,7 @@ class Ext4DaWritePagesFtraceEvent : public ::protozero::Message { int64_t, Ext4DaWritePagesFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_NrToWrite kNrToWrite() { return {}; } + static constexpr FieldMetadata_NrToWrite kNrToWrite{}; void set_nr_to_write(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_NrToWrite::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -79220,14 +77588,7 @@ class Ext4DaWritePagesFtraceEvent : public ::protozero::Message { int32_t, Ext4DaWritePagesFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_SyncMode kSyncMode() { return {}; } + static constexpr FieldMetadata_SyncMode kSyncMode{}; void set_sync_mode(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_SyncMode::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -79245,14 +77606,7 @@ class Ext4DaWritePagesFtraceEvent : public ::protozero::Message { uint64_t, Ext4DaWritePagesFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_BBlocknr kBBlocknr() { return {}; } + static constexpr FieldMetadata_BBlocknr kBBlocknr{}; void set_b_blocknr(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_BBlocknr::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -79270,14 +77624,7 @@ class Ext4DaWritePagesFtraceEvent : public ::protozero::Message { uint32_t, Ext4DaWritePagesFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_BSize kBSize() { return {}; } + static constexpr FieldMetadata_BSize kBSize{}; void set_b_size(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_BSize::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -79295,14 +77642,7 @@ class Ext4DaWritePagesFtraceEvent : public ::protozero::Message { uint32_t, Ext4DaWritePagesFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_BState kBState() { return {}; } + static constexpr FieldMetadata_BState kBState{}; void set_b_state(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_BState::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -79320,14 +77660,7 @@ class Ext4DaWritePagesFtraceEvent : public ::protozero::Message { int32_t, Ext4DaWritePagesFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_IoDone kIoDone() { return {}; } + static constexpr FieldMetadata_IoDone kIoDone{}; void set_io_done(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_IoDone::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -79345,14 +77678,7 @@ class Ext4DaWritePagesFtraceEvent : public ::protozero::Message { int32_t, Ext4DaWritePagesFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_PagesWritten kPagesWritten() { return {}; } + static constexpr FieldMetadata_PagesWritten kPagesWritten{}; void set_pages_written(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_PagesWritten::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -79413,14 +77739,7 @@ class Ext4DaUpdateReserveSpaceFtraceEvent : public ::protozero::Message { uint64_t, Ext4DaUpdateReserveSpaceFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Dev kDev() { return {}; } + static constexpr FieldMetadata_Dev kDev{}; void set_dev(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Dev::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -79438,14 +77757,7 @@ class Ext4DaUpdateReserveSpaceFtraceEvent : public ::protozero::Message { uint64_t, Ext4DaUpdateReserveSpaceFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ino kIno() { return {}; } + static constexpr FieldMetadata_Ino kIno{}; void set_ino(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Ino::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -79463,14 +77775,7 @@ class Ext4DaUpdateReserveSpaceFtraceEvent : public ::protozero::Message { uint64_t, Ext4DaUpdateReserveSpaceFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_IBlocks kIBlocks() { return {}; } + static constexpr FieldMetadata_IBlocks kIBlocks{}; void set_i_blocks(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_IBlocks::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -79488,14 +77793,7 @@ class Ext4DaUpdateReserveSpaceFtraceEvent : public ::protozero::Message { int32_t, Ext4DaUpdateReserveSpaceFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_UsedBlocks kUsedBlocks() { return {}; } + static constexpr FieldMetadata_UsedBlocks kUsedBlocks{}; void set_used_blocks(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_UsedBlocks::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -79513,14 +77811,7 @@ class Ext4DaUpdateReserveSpaceFtraceEvent : public ::protozero::Message { int32_t, Ext4DaUpdateReserveSpaceFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ReservedDataBlocks kReservedDataBlocks() { return {}; } + static constexpr FieldMetadata_ReservedDataBlocks kReservedDataBlocks{}; void set_reserved_data_blocks(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_ReservedDataBlocks::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -79538,14 +77829,7 @@ class Ext4DaUpdateReserveSpaceFtraceEvent : public ::protozero::Message { int32_t, Ext4DaUpdateReserveSpaceFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ReservedMetaBlocks kReservedMetaBlocks() { return {}; } + static constexpr FieldMetadata_ReservedMetaBlocks kReservedMetaBlocks{}; void set_reserved_meta_blocks(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_ReservedMetaBlocks::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -79563,14 +77847,7 @@ class Ext4DaUpdateReserveSpaceFtraceEvent : public ::protozero::Message { int32_t, Ext4DaUpdateReserveSpaceFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_AllocatedMetaBlocks kAllocatedMetaBlocks() { return {}; } + static constexpr FieldMetadata_AllocatedMetaBlocks kAllocatedMetaBlocks{}; void set_allocated_meta_blocks(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_AllocatedMetaBlocks::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -79588,14 +77865,7 @@ class Ext4DaUpdateReserveSpaceFtraceEvent : public ::protozero::Message { int32_t, Ext4DaUpdateReserveSpaceFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_QuotaClaim kQuotaClaim() { return {}; } + static constexpr FieldMetadata_QuotaClaim kQuotaClaim{}; void set_quota_claim(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_QuotaClaim::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -79613,14 +77883,7 @@ class Ext4DaUpdateReserveSpaceFtraceEvent : public ::protozero::Message { uint32_t, Ext4DaUpdateReserveSpaceFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Mode kMode() { return {}; } + static constexpr FieldMetadata_Mode kMode{}; void set_mode(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Mode::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -79675,14 +77938,7 @@ class Ext4DaReserveSpaceFtraceEvent : public ::protozero::Message { uint64_t, Ext4DaReserveSpaceFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Dev kDev() { return {}; } + static constexpr FieldMetadata_Dev kDev{}; void set_dev(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Dev::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -79700,14 +77956,7 @@ class Ext4DaReserveSpaceFtraceEvent : public ::protozero::Message { uint64_t, Ext4DaReserveSpaceFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ino kIno() { return {}; } + static constexpr FieldMetadata_Ino kIno{}; void set_ino(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Ino::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -79725,14 +77974,7 @@ class Ext4DaReserveSpaceFtraceEvent : public ::protozero::Message { uint64_t, Ext4DaReserveSpaceFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_IBlocks kIBlocks() { return {}; } + static constexpr FieldMetadata_IBlocks kIBlocks{}; void set_i_blocks(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_IBlocks::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -79750,14 +77992,7 @@ class Ext4DaReserveSpaceFtraceEvent : public ::protozero::Message { int32_t, Ext4DaReserveSpaceFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ReservedDataBlocks kReservedDataBlocks() { return {}; } + static constexpr FieldMetadata_ReservedDataBlocks kReservedDataBlocks{}; void set_reserved_data_blocks(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_ReservedDataBlocks::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -79775,14 +78010,7 @@ class Ext4DaReserveSpaceFtraceEvent : public ::protozero::Message { int32_t, Ext4DaReserveSpaceFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ReservedMetaBlocks kReservedMetaBlocks() { return {}; } + static constexpr FieldMetadata_ReservedMetaBlocks kReservedMetaBlocks{}; void set_reserved_meta_blocks(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_ReservedMetaBlocks::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -79800,14 +78028,7 @@ class Ext4DaReserveSpaceFtraceEvent : public ::protozero::Message { uint32_t, Ext4DaReserveSpaceFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Mode kMode() { return {}; } + static constexpr FieldMetadata_Mode kMode{}; void set_mode(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Mode::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -79825,14 +78046,7 @@ class Ext4DaReserveSpaceFtraceEvent : public ::protozero::Message { int32_t, Ext4DaReserveSpaceFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_MdNeeded kMdNeeded() { return {}; } + static constexpr FieldMetadata_MdNeeded kMdNeeded{}; void set_md_needed(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_MdNeeded::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -79890,14 +78104,7 @@ class Ext4DaReleaseSpaceFtraceEvent : public ::protozero::Message { uint64_t, Ext4DaReleaseSpaceFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Dev kDev() { return {}; } + static constexpr FieldMetadata_Dev kDev{}; void set_dev(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Dev::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -79915,14 +78122,7 @@ class Ext4DaReleaseSpaceFtraceEvent : public ::protozero::Message { uint64_t, Ext4DaReleaseSpaceFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ino kIno() { return {}; } + static constexpr FieldMetadata_Ino kIno{}; void set_ino(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Ino::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -79940,14 +78140,7 @@ class Ext4DaReleaseSpaceFtraceEvent : public ::protozero::Message { uint64_t, Ext4DaReleaseSpaceFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_IBlocks kIBlocks() { return {}; } + static constexpr FieldMetadata_IBlocks kIBlocks{}; void set_i_blocks(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_IBlocks::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -79965,14 +78158,7 @@ class Ext4DaReleaseSpaceFtraceEvent : public ::protozero::Message { int32_t, Ext4DaReleaseSpaceFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_FreedBlocks kFreedBlocks() { return {}; } + static constexpr FieldMetadata_FreedBlocks kFreedBlocks{}; void set_freed_blocks(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_FreedBlocks::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -79990,14 +78176,7 @@ class Ext4DaReleaseSpaceFtraceEvent : public ::protozero::Message { int32_t, Ext4DaReleaseSpaceFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ReservedDataBlocks kReservedDataBlocks() { return {}; } + static constexpr FieldMetadata_ReservedDataBlocks kReservedDataBlocks{}; void set_reserved_data_blocks(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_ReservedDataBlocks::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -80015,14 +78194,7 @@ class Ext4DaReleaseSpaceFtraceEvent : public ::protozero::Message { int32_t, Ext4DaReleaseSpaceFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ReservedMetaBlocks kReservedMetaBlocks() { return {}; } + static constexpr FieldMetadata_ReservedMetaBlocks kReservedMetaBlocks{}; void set_reserved_meta_blocks(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_ReservedMetaBlocks::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -80040,14 +78212,7 @@ class Ext4DaReleaseSpaceFtraceEvent : public ::protozero::Message { int32_t, Ext4DaReleaseSpaceFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_AllocatedMetaBlocks kAllocatedMetaBlocks() { return {}; } + static constexpr FieldMetadata_AllocatedMetaBlocks kAllocatedMetaBlocks{}; void set_allocated_meta_blocks(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_AllocatedMetaBlocks::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -80065,14 +78230,7 @@ class Ext4DaReleaseSpaceFtraceEvent : public ::protozero::Message { uint32_t, Ext4DaReleaseSpaceFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Mode kMode() { return {}; } + static constexpr FieldMetadata_Mode kMode{}; void set_mode(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Mode::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -80118,14 +78276,7 @@ class Ext4CollapseRangeFtraceEvent : public ::protozero::Message { uint64_t, Ext4CollapseRangeFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Dev kDev() { return {}; } + static constexpr FieldMetadata_Dev kDev{}; void set_dev(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Dev::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -80143,14 +78294,7 @@ class Ext4CollapseRangeFtraceEvent : public ::protozero::Message { uint64_t, Ext4CollapseRangeFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ino kIno() { return {}; } + static constexpr FieldMetadata_Ino kIno{}; void set_ino(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Ino::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -80168,14 +78312,7 @@ class Ext4CollapseRangeFtraceEvent : public ::protozero::Message { int64_t, Ext4CollapseRangeFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Offset kOffset() { return {}; } + static constexpr FieldMetadata_Offset kOffset{}; void set_offset(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_Offset::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -80193,14 +78330,7 @@ class Ext4CollapseRangeFtraceEvent : public ::protozero::Message { int64_t, Ext4CollapseRangeFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Len kLen() { return {}; } + static constexpr FieldMetadata_Len kLen{}; void set_len(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_Len::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -80243,14 +78373,7 @@ class Ext4BeginOrderedTruncateFtraceEvent : public ::protozero::Message { uint64_t, Ext4BeginOrderedTruncateFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Dev kDev() { return {}; } + static constexpr FieldMetadata_Dev kDev{}; void set_dev(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Dev::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -80268,14 +78391,7 @@ class Ext4BeginOrderedTruncateFtraceEvent : public ::protozero::Message { uint64_t, Ext4BeginOrderedTruncateFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ino kIno() { return {}; } + static constexpr FieldMetadata_Ino kIno{}; void set_ino(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Ino::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -80293,14 +78409,7 @@ class Ext4BeginOrderedTruncateFtraceEvent : public ::protozero::Message { int64_t, Ext4BeginOrderedTruncateFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_NewSize kNewSize() { return {}; } + static constexpr FieldMetadata_NewSize kNewSize{}; void set_new_size(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_NewSize::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -80346,14 +78455,7 @@ class Ext4AllocateInodeFtraceEvent : public ::protozero::Message { uint64_t, Ext4AllocateInodeFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Dev kDev() { return {}; } + static constexpr FieldMetadata_Dev kDev{}; void set_dev(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Dev::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -80371,14 +78473,7 @@ class Ext4AllocateInodeFtraceEvent : public ::protozero::Message { uint64_t, Ext4AllocateInodeFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ino kIno() { return {}; } + static constexpr FieldMetadata_Ino kIno{}; void set_ino(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Ino::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -80396,14 +78491,7 @@ class Ext4AllocateInodeFtraceEvent : public ::protozero::Message { uint64_t, Ext4AllocateInodeFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Dir kDir() { return {}; } + static constexpr FieldMetadata_Dir kDir{}; void set_dir(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Dir::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -80421,14 +78509,7 @@ class Ext4AllocateInodeFtraceEvent : public ::protozero::Message { uint32_t, Ext4AllocateInodeFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Mode kMode() { return {}; } + static constexpr FieldMetadata_Mode kMode{}; void set_mode(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Mode::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -80495,14 +78576,7 @@ class Ext4AllocateBlocksFtraceEvent : public ::protozero::Message { uint64_t, Ext4AllocateBlocksFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Dev kDev() { return {}; } + static constexpr FieldMetadata_Dev kDev{}; void set_dev(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Dev::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -80520,14 +78594,7 @@ class Ext4AllocateBlocksFtraceEvent : public ::protozero::Message { uint64_t, Ext4AllocateBlocksFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ino kIno() { return {}; } + static constexpr FieldMetadata_Ino kIno{}; void set_ino(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Ino::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -80545,14 +78612,7 @@ class Ext4AllocateBlocksFtraceEvent : public ::protozero::Message { uint64_t, Ext4AllocateBlocksFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Block kBlock() { return {}; } + static constexpr FieldMetadata_Block kBlock{}; void set_block(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Block::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -80570,14 +78630,7 @@ class Ext4AllocateBlocksFtraceEvent : public ::protozero::Message { uint32_t, Ext4AllocateBlocksFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Len kLen() { return {}; } + static constexpr FieldMetadata_Len kLen{}; void set_len(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Len::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -80595,14 +78648,7 @@ class Ext4AllocateBlocksFtraceEvent : public ::protozero::Message { uint32_t, Ext4AllocateBlocksFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Logical kLogical() { return {}; } + static constexpr FieldMetadata_Logical kLogical{}; void set_logical(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Logical::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -80620,14 +78666,7 @@ class Ext4AllocateBlocksFtraceEvent : public ::protozero::Message { uint32_t, Ext4AllocateBlocksFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Lleft kLleft() { return {}; } + static constexpr FieldMetadata_Lleft kLleft{}; void set_lleft(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Lleft::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -80645,14 +78684,7 @@ class Ext4AllocateBlocksFtraceEvent : public ::protozero::Message { uint32_t, Ext4AllocateBlocksFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Lright kLright() { return {}; } + static constexpr FieldMetadata_Lright kLright{}; void set_lright(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Lright::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -80670,14 +78702,7 @@ class Ext4AllocateBlocksFtraceEvent : public ::protozero::Message { uint64_t, Ext4AllocateBlocksFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Goal kGoal() { return {}; } + static constexpr FieldMetadata_Goal kGoal{}; void set_goal(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Goal::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -80695,14 +78720,7 @@ class Ext4AllocateBlocksFtraceEvent : public ::protozero::Message { uint64_t, Ext4AllocateBlocksFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Pleft kPleft() { return {}; } + static constexpr FieldMetadata_Pleft kPleft{}; void set_pleft(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Pleft::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -80720,14 +78738,7 @@ class Ext4AllocateBlocksFtraceEvent : public ::protozero::Message { uint64_t, Ext4AllocateBlocksFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Pright kPright() { return {}; } + static constexpr FieldMetadata_Pright kPright{}; void set_pright(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Pright::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -80745,14 +78756,7 @@ class Ext4AllocateBlocksFtraceEvent : public ::protozero::Message { uint32_t, Ext4AllocateBlocksFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Flags kFlags() { return {}; } + static constexpr FieldMetadata_Flags kFlags{}; void set_flags(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Flags::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -80798,14 +78802,7 @@ class Ext4AllocDaBlocksFtraceEvent : public ::protozero::Message { uint64_t, Ext4AllocDaBlocksFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Dev kDev() { return {}; } + static constexpr FieldMetadata_Dev kDev{}; void set_dev(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Dev::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -80823,14 +78820,7 @@ class Ext4AllocDaBlocksFtraceEvent : public ::protozero::Message { uint64_t, Ext4AllocDaBlocksFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ino kIno() { return {}; } + static constexpr FieldMetadata_Ino kIno{}; void set_ino(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Ino::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -80848,14 +78838,7 @@ class Ext4AllocDaBlocksFtraceEvent : public ::protozero::Message { uint32_t, Ext4AllocDaBlocksFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_DataBlocks kDataBlocks() { return {}; } + static constexpr FieldMetadata_DataBlocks kDataBlocks{}; void set_data_blocks(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_DataBlocks::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -80873,14 +78856,7 @@ class Ext4AllocDaBlocksFtraceEvent : public ::protozero::Message { uint32_t, Ext4AllocDaBlocksFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_MetaBlocks kMetaBlocks() { return {}; } + static constexpr FieldMetadata_MetaBlocks kMetaBlocks{}; void set_meta_blocks(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_MetaBlocks::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -80923,14 +78899,7 @@ class Ext4SyncFileExitFtraceEvent : public ::protozero::Message { uint64_t, Ext4SyncFileExitFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Dev kDev() { return {}; } + static constexpr FieldMetadata_Dev kDev{}; void set_dev(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Dev::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -80948,14 +78917,7 @@ class Ext4SyncFileExitFtraceEvent : public ::protozero::Message { uint64_t, Ext4SyncFileExitFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ino kIno() { return {}; } + static constexpr FieldMetadata_Ino kIno{}; void set_ino(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Ino::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -80973,14 +78935,7 @@ class Ext4SyncFileExitFtraceEvent : public ::protozero::Message { int32_t, Ext4SyncFileExitFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ret kRet() { return {}; } + static constexpr FieldMetadata_Ret kRet{}; void set_ret(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Ret::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -81026,14 +78981,7 @@ class Ext4SyncFileEnterFtraceEvent : public ::protozero::Message { uint64_t, Ext4SyncFileEnterFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Dev kDev() { return {}; } + static constexpr FieldMetadata_Dev kDev{}; void set_dev(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Dev::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -81051,14 +78999,7 @@ class Ext4SyncFileEnterFtraceEvent : public ::protozero::Message { uint64_t, Ext4SyncFileEnterFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ino kIno() { return {}; } + static constexpr FieldMetadata_Ino kIno{}; void set_ino(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Ino::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -81076,14 +79017,7 @@ class Ext4SyncFileEnterFtraceEvent : public ::protozero::Message { uint64_t, Ext4SyncFileEnterFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Parent kParent() { return {}; } + static constexpr FieldMetadata_Parent kParent{}; void set_parent(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Parent::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -81101,14 +79035,7 @@ class Ext4SyncFileEnterFtraceEvent : public ::protozero::Message { int32_t, Ext4SyncFileEnterFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Datasync kDatasync() { return {}; } + static constexpr FieldMetadata_Datasync kDatasync{}; void set_datasync(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Datasync::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -81157,14 +79084,7 @@ class Ext4DaWriteEndFtraceEvent : public ::protozero::Message { uint64_t, Ext4DaWriteEndFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Dev kDev() { return {}; } + static constexpr FieldMetadata_Dev kDev{}; void set_dev(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Dev::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -81182,14 +79102,7 @@ class Ext4DaWriteEndFtraceEvent : public ::protozero::Message { uint64_t, Ext4DaWriteEndFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ino kIno() { return {}; } + static constexpr FieldMetadata_Ino kIno{}; void set_ino(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Ino::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -81207,14 +79120,7 @@ class Ext4DaWriteEndFtraceEvent : public ::protozero::Message { int64_t, Ext4DaWriteEndFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Pos kPos() { return {}; } + static constexpr FieldMetadata_Pos kPos{}; void set_pos(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_Pos::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -81232,14 +79138,7 @@ class Ext4DaWriteEndFtraceEvent : public ::protozero::Message { uint32_t, Ext4DaWriteEndFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Len kLen() { return {}; } + static constexpr FieldMetadata_Len kLen{}; void set_len(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Len::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -81257,14 +79156,7 @@ class Ext4DaWriteEndFtraceEvent : public ::protozero::Message { uint32_t, Ext4DaWriteEndFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Copied kCopied() { return {}; } + static constexpr FieldMetadata_Copied kCopied{}; void set_copied(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Copied::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -81313,14 +79205,7 @@ class Ext4DaWriteBeginFtraceEvent : public ::protozero::Message { uint64_t, Ext4DaWriteBeginFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Dev kDev() { return {}; } + static constexpr FieldMetadata_Dev kDev{}; void set_dev(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Dev::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -81338,14 +79223,7 @@ class Ext4DaWriteBeginFtraceEvent : public ::protozero::Message { uint64_t, Ext4DaWriteBeginFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ino kIno() { return {}; } + static constexpr FieldMetadata_Ino kIno{}; void set_ino(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Ino::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -81363,14 +79241,7 @@ class Ext4DaWriteBeginFtraceEvent : public ::protozero::Message { int64_t, Ext4DaWriteBeginFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Pos kPos() { return {}; } + static constexpr FieldMetadata_Pos kPos{}; void set_pos(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_Pos::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -81388,14 +79259,7 @@ class Ext4DaWriteBeginFtraceEvent : public ::protozero::Message { uint32_t, Ext4DaWriteBeginFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Len kLen() { return {}; } + static constexpr FieldMetadata_Len kLen{}; void set_len(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Len::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -81413,14 +79277,7 @@ class Ext4DaWriteBeginFtraceEvent : public ::protozero::Message { uint32_t, Ext4DaWriteBeginFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Flags kFlags() { return {}; } + static constexpr FieldMetadata_Flags kFlags{}; void set_flags(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Flags::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -81562,14 +79419,7 @@ class F2fsIostatLatencyFtraceEvent : public ::protozero::Message { uint32_t, F2fsIostatLatencyFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_DRdAvg kDRdAvg() { return {}; } + static constexpr FieldMetadata_DRdAvg kDRdAvg{}; void set_d_rd_avg(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_DRdAvg::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -81587,14 +79437,7 @@ class F2fsIostatLatencyFtraceEvent : public ::protozero::Message { uint32_t, F2fsIostatLatencyFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_DRdCnt kDRdCnt() { return {}; } + static constexpr FieldMetadata_DRdCnt kDRdCnt{}; void set_d_rd_cnt(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_DRdCnt::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -81612,14 +79455,7 @@ class F2fsIostatLatencyFtraceEvent : public ::protozero::Message { uint32_t, F2fsIostatLatencyFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_DRdPeak kDRdPeak() { return {}; } + static constexpr FieldMetadata_DRdPeak kDRdPeak{}; void set_d_rd_peak(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_DRdPeak::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -81637,14 +79473,7 @@ class F2fsIostatLatencyFtraceEvent : public ::protozero::Message { uint32_t, F2fsIostatLatencyFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_DWrAsAvg kDWrAsAvg() { return {}; } + static constexpr FieldMetadata_DWrAsAvg kDWrAsAvg{}; void set_d_wr_as_avg(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_DWrAsAvg::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -81662,14 +79491,7 @@ class F2fsIostatLatencyFtraceEvent : public ::protozero::Message { uint32_t, F2fsIostatLatencyFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_DWrAsCnt kDWrAsCnt() { return {}; } + static constexpr FieldMetadata_DWrAsCnt kDWrAsCnt{}; void set_d_wr_as_cnt(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_DWrAsCnt::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -81687,14 +79509,7 @@ class F2fsIostatLatencyFtraceEvent : public ::protozero::Message { uint32_t, F2fsIostatLatencyFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_DWrAsPeak kDWrAsPeak() { return {}; } + static constexpr FieldMetadata_DWrAsPeak kDWrAsPeak{}; void set_d_wr_as_peak(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_DWrAsPeak::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -81712,14 +79527,7 @@ class F2fsIostatLatencyFtraceEvent : public ::protozero::Message { uint32_t, F2fsIostatLatencyFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_DWrSAvg kDWrSAvg() { return {}; } + static constexpr FieldMetadata_DWrSAvg kDWrSAvg{}; void set_d_wr_s_avg(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_DWrSAvg::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -81737,14 +79545,7 @@ class F2fsIostatLatencyFtraceEvent : public ::protozero::Message { uint32_t, F2fsIostatLatencyFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_DWrSCnt kDWrSCnt() { return {}; } + static constexpr FieldMetadata_DWrSCnt kDWrSCnt{}; void set_d_wr_s_cnt(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_DWrSCnt::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -81762,14 +79563,7 @@ class F2fsIostatLatencyFtraceEvent : public ::protozero::Message { uint32_t, F2fsIostatLatencyFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_DWrSPeak kDWrSPeak() { return {}; } + static constexpr FieldMetadata_DWrSPeak kDWrSPeak{}; void set_d_wr_s_peak(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_DWrSPeak::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -81787,14 +79581,7 @@ class F2fsIostatLatencyFtraceEvent : public ::protozero::Message { uint64_t, F2fsIostatLatencyFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Dev kDev() { return {}; } + static constexpr FieldMetadata_Dev kDev{}; void set_dev(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Dev::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -81812,14 +79599,7 @@ class F2fsIostatLatencyFtraceEvent : public ::protozero::Message { uint32_t, F2fsIostatLatencyFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_MRdAvg kMRdAvg() { return {}; } + static constexpr FieldMetadata_MRdAvg kMRdAvg{}; void set_m_rd_avg(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_MRdAvg::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -81837,14 +79617,7 @@ class F2fsIostatLatencyFtraceEvent : public ::protozero::Message { uint32_t, F2fsIostatLatencyFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_MRdCnt kMRdCnt() { return {}; } + static constexpr FieldMetadata_MRdCnt kMRdCnt{}; void set_m_rd_cnt(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_MRdCnt::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -81862,14 +79635,7 @@ class F2fsIostatLatencyFtraceEvent : public ::protozero::Message { uint32_t, F2fsIostatLatencyFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_MRdPeak kMRdPeak() { return {}; } + static constexpr FieldMetadata_MRdPeak kMRdPeak{}; void set_m_rd_peak(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_MRdPeak::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -81887,14 +79653,7 @@ class F2fsIostatLatencyFtraceEvent : public ::protozero::Message { uint32_t, F2fsIostatLatencyFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_MWrAsAvg kMWrAsAvg() { return {}; } + static constexpr FieldMetadata_MWrAsAvg kMWrAsAvg{}; void set_m_wr_as_avg(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_MWrAsAvg::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -81912,14 +79671,7 @@ class F2fsIostatLatencyFtraceEvent : public ::protozero::Message { uint32_t, F2fsIostatLatencyFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_MWrAsCnt kMWrAsCnt() { return {}; } + static constexpr FieldMetadata_MWrAsCnt kMWrAsCnt{}; void set_m_wr_as_cnt(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_MWrAsCnt::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -81937,14 +79689,7 @@ class F2fsIostatLatencyFtraceEvent : public ::protozero::Message { uint32_t, F2fsIostatLatencyFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_MWrAsPeak kMWrAsPeak() { return {}; } + static constexpr FieldMetadata_MWrAsPeak kMWrAsPeak{}; void set_m_wr_as_peak(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_MWrAsPeak::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -81962,14 +79707,7 @@ class F2fsIostatLatencyFtraceEvent : public ::protozero::Message { uint32_t, F2fsIostatLatencyFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_MWrSAvg kMWrSAvg() { return {}; } + static constexpr FieldMetadata_MWrSAvg kMWrSAvg{}; void set_m_wr_s_avg(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_MWrSAvg::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -81987,14 +79725,7 @@ class F2fsIostatLatencyFtraceEvent : public ::protozero::Message { uint32_t, F2fsIostatLatencyFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_MWrSCnt kMWrSCnt() { return {}; } + static constexpr FieldMetadata_MWrSCnt kMWrSCnt{}; void set_m_wr_s_cnt(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_MWrSCnt::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -82012,14 +79743,7 @@ class F2fsIostatLatencyFtraceEvent : public ::protozero::Message { uint32_t, F2fsIostatLatencyFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_MWrSPeak kMWrSPeak() { return {}; } + static constexpr FieldMetadata_MWrSPeak kMWrSPeak{}; void set_m_wr_s_peak(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_MWrSPeak::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -82037,14 +79761,7 @@ class F2fsIostatLatencyFtraceEvent : public ::protozero::Message { uint32_t, F2fsIostatLatencyFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_NRdAvg kNRdAvg() { return {}; } + static constexpr FieldMetadata_NRdAvg kNRdAvg{}; void set_n_rd_avg(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_NRdAvg::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -82062,14 +79779,7 @@ class F2fsIostatLatencyFtraceEvent : public ::protozero::Message { uint32_t, F2fsIostatLatencyFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_NRdCnt kNRdCnt() { return {}; } + static constexpr FieldMetadata_NRdCnt kNRdCnt{}; void set_n_rd_cnt(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_NRdCnt::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -82087,14 +79797,7 @@ class F2fsIostatLatencyFtraceEvent : public ::protozero::Message { uint32_t, F2fsIostatLatencyFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_NRdPeak kNRdPeak() { return {}; } + static constexpr FieldMetadata_NRdPeak kNRdPeak{}; void set_n_rd_peak(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_NRdPeak::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -82112,14 +79815,7 @@ class F2fsIostatLatencyFtraceEvent : public ::protozero::Message { uint32_t, F2fsIostatLatencyFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_NWrAsAvg kNWrAsAvg() { return {}; } + static constexpr FieldMetadata_NWrAsAvg kNWrAsAvg{}; void set_n_wr_as_avg(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_NWrAsAvg::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -82137,14 +79833,7 @@ class F2fsIostatLatencyFtraceEvent : public ::protozero::Message { uint32_t, F2fsIostatLatencyFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_NWrAsCnt kNWrAsCnt() { return {}; } + static constexpr FieldMetadata_NWrAsCnt kNWrAsCnt{}; void set_n_wr_as_cnt(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_NWrAsCnt::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -82162,14 +79851,7 @@ class F2fsIostatLatencyFtraceEvent : public ::protozero::Message { uint32_t, F2fsIostatLatencyFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_NWrAsPeak kNWrAsPeak() { return {}; } + static constexpr FieldMetadata_NWrAsPeak kNWrAsPeak{}; void set_n_wr_as_peak(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_NWrAsPeak::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -82187,14 +79869,7 @@ class F2fsIostatLatencyFtraceEvent : public ::protozero::Message { uint32_t, F2fsIostatLatencyFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_NWrSAvg kNWrSAvg() { return {}; } + static constexpr FieldMetadata_NWrSAvg kNWrSAvg{}; void set_n_wr_s_avg(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_NWrSAvg::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -82212,14 +79887,7 @@ class F2fsIostatLatencyFtraceEvent : public ::protozero::Message { uint32_t, F2fsIostatLatencyFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_NWrSCnt kNWrSCnt() { return {}; } + static constexpr FieldMetadata_NWrSCnt kNWrSCnt{}; void set_n_wr_s_cnt(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_NWrSCnt::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -82237,14 +79905,7 @@ class F2fsIostatLatencyFtraceEvent : public ::protozero::Message { uint32_t, F2fsIostatLatencyFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_NWrSPeak kNWrSPeak() { return {}; } + static constexpr FieldMetadata_NWrSPeak kNWrSPeak{}; void set_n_wr_s_peak(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_NWrSPeak::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -82347,14 +80008,7 @@ class F2fsIostatFtraceEvent : public ::protozero::Message { uint64_t, F2fsIostatFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_AppBio kAppBio() { return {}; } + static constexpr FieldMetadata_AppBio kAppBio{}; void set_app_bio(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_AppBio::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -82372,14 +80026,7 @@ class F2fsIostatFtraceEvent : public ::protozero::Message { uint64_t, F2fsIostatFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_AppBrio kAppBrio() { return {}; } + static constexpr FieldMetadata_AppBrio kAppBrio{}; void set_app_brio(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_AppBrio::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -82397,14 +80044,7 @@ class F2fsIostatFtraceEvent : public ::protozero::Message { uint64_t, F2fsIostatFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_AppDio kAppDio() { return {}; } + static constexpr FieldMetadata_AppDio kAppDio{}; void set_app_dio(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_AppDio::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -82422,14 +80062,7 @@ class F2fsIostatFtraceEvent : public ::protozero::Message { uint64_t, F2fsIostatFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_AppDrio kAppDrio() { return {}; } + static constexpr FieldMetadata_AppDrio kAppDrio{}; void set_app_drio(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_AppDrio::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -82447,14 +80080,7 @@ class F2fsIostatFtraceEvent : public ::protozero::Message { uint64_t, F2fsIostatFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_AppMio kAppMio() { return {}; } + static constexpr FieldMetadata_AppMio kAppMio{}; void set_app_mio(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_AppMio::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -82472,14 +80098,7 @@ class F2fsIostatFtraceEvent : public ::protozero::Message { uint64_t, F2fsIostatFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_AppMrio kAppMrio() { return {}; } + static constexpr FieldMetadata_AppMrio kAppMrio{}; void set_app_mrio(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_AppMrio::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -82497,14 +80116,7 @@ class F2fsIostatFtraceEvent : public ::protozero::Message { uint64_t, F2fsIostatFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_AppRio kAppRio() { return {}; } + static constexpr FieldMetadata_AppRio kAppRio{}; void set_app_rio(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_AppRio::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -82522,14 +80134,7 @@ class F2fsIostatFtraceEvent : public ::protozero::Message { uint64_t, F2fsIostatFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_AppWio kAppWio() { return {}; } + static constexpr FieldMetadata_AppWio kAppWio{}; void set_app_wio(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_AppWio::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -82547,14 +80152,7 @@ class F2fsIostatFtraceEvent : public ::protozero::Message { uint64_t, F2fsIostatFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Dev kDev() { return {}; } + static constexpr FieldMetadata_Dev kDev{}; void set_dev(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Dev::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -82572,14 +80170,7 @@ class F2fsIostatFtraceEvent : public ::protozero::Message { uint64_t, F2fsIostatFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_FsCdrio kFsCdrio() { return {}; } + static constexpr FieldMetadata_FsCdrio kFsCdrio{}; void set_fs_cdrio(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_FsCdrio::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -82597,14 +80188,7 @@ class F2fsIostatFtraceEvent : public ::protozero::Message { uint64_t, F2fsIostatFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_FsCpDio kFsCpDio() { return {}; } + static constexpr FieldMetadata_FsCpDio kFsCpDio{}; void set_fs_cp_dio(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_FsCpDio::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -82622,14 +80206,7 @@ class F2fsIostatFtraceEvent : public ::protozero::Message { uint64_t, F2fsIostatFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_FsCpMio kFsCpMio() { return {}; } + static constexpr FieldMetadata_FsCpMio kFsCpMio{}; void set_fs_cp_mio(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_FsCpMio::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -82647,14 +80224,7 @@ class F2fsIostatFtraceEvent : public ::protozero::Message { uint64_t, F2fsIostatFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_FsCpNio kFsCpNio() { return {}; } + static constexpr FieldMetadata_FsCpNio kFsCpNio{}; void set_fs_cp_nio(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_FsCpNio::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -82672,14 +80242,7 @@ class F2fsIostatFtraceEvent : public ::protozero::Message { uint64_t, F2fsIostatFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_FsDio kFsDio() { return {}; } + static constexpr FieldMetadata_FsDio kFsDio{}; void set_fs_dio(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_FsDio::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -82697,14 +80260,7 @@ class F2fsIostatFtraceEvent : public ::protozero::Message { uint64_t, F2fsIostatFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_FsDiscard kFsDiscard() { return {}; } + static constexpr FieldMetadata_FsDiscard kFsDiscard{}; void set_fs_discard(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_FsDiscard::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -82722,14 +80278,7 @@ class F2fsIostatFtraceEvent : public ::protozero::Message { uint64_t, F2fsIostatFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_FsDrio kFsDrio() { return {}; } + static constexpr FieldMetadata_FsDrio kFsDrio{}; void set_fs_drio(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_FsDrio::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -82747,14 +80296,7 @@ class F2fsIostatFtraceEvent : public ::protozero::Message { uint64_t, F2fsIostatFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_FsGcDio kFsGcDio() { return {}; } + static constexpr FieldMetadata_FsGcDio kFsGcDio{}; void set_fs_gc_dio(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_FsGcDio::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -82772,14 +80314,7 @@ class F2fsIostatFtraceEvent : public ::protozero::Message { uint64_t, F2fsIostatFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_FsGcNio kFsGcNio() { return {}; } + static constexpr FieldMetadata_FsGcNio kFsGcNio{}; void set_fs_gc_nio(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_FsGcNio::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -82797,14 +80332,7 @@ class F2fsIostatFtraceEvent : public ::protozero::Message { uint64_t, F2fsIostatFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_FsGdrio kFsGdrio() { return {}; } + static constexpr FieldMetadata_FsGdrio kFsGdrio{}; void set_fs_gdrio(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_FsGdrio::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -82822,14 +80350,7 @@ class F2fsIostatFtraceEvent : public ::protozero::Message { uint64_t, F2fsIostatFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_FsMio kFsMio() { return {}; } + static constexpr FieldMetadata_FsMio kFsMio{}; void set_fs_mio(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_FsMio::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -82847,14 +80368,7 @@ class F2fsIostatFtraceEvent : public ::protozero::Message { uint64_t, F2fsIostatFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_FsMrio kFsMrio() { return {}; } + static constexpr FieldMetadata_FsMrio kFsMrio{}; void set_fs_mrio(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_FsMrio::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -82872,14 +80386,7 @@ class F2fsIostatFtraceEvent : public ::protozero::Message { uint64_t, F2fsIostatFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_FsNio kFsNio() { return {}; } + static constexpr FieldMetadata_FsNio kFsNio{}; void set_fs_nio(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_FsNio::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -82897,14 +80404,7 @@ class F2fsIostatFtraceEvent : public ::protozero::Message { uint64_t, F2fsIostatFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_FsNrio kFsNrio() { return {}; } + static constexpr FieldMetadata_FsNrio kFsNrio{}; void set_fs_nrio(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_FsNrio::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -82953,14 +80453,7 @@ class F2fsWriteEndFtraceEvent : public ::protozero::Message { uint64_t, F2fsWriteEndFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Dev kDev() { return {}; } + static constexpr FieldMetadata_Dev kDev{}; void set_dev(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Dev::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -82978,14 +80471,7 @@ class F2fsWriteEndFtraceEvent : public ::protozero::Message { uint64_t, F2fsWriteEndFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ino kIno() { return {}; } + static constexpr FieldMetadata_Ino kIno{}; void set_ino(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Ino::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -83003,14 +80489,7 @@ class F2fsWriteEndFtraceEvent : public ::protozero::Message { int64_t, F2fsWriteEndFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Pos kPos() { return {}; } + static constexpr FieldMetadata_Pos kPos{}; void set_pos(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_Pos::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -83028,14 +80507,7 @@ class F2fsWriteEndFtraceEvent : public ::protozero::Message { uint32_t, F2fsWriteEndFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Len kLen() { return {}; } + static constexpr FieldMetadata_Len kLen{}; void set_len(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Len::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -83053,14 +80525,7 @@ class F2fsWriteEndFtraceEvent : public ::protozero::Message { uint32_t, F2fsWriteEndFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Copied kCopied() { return {}; } + static constexpr FieldMetadata_Copied kCopied{}; void set_copied(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Copied::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -83106,14 +80571,7 @@ class F2fsWriteCheckpointFtraceEvent : public ::protozero::Message { uint64_t, F2fsWriteCheckpointFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Dev kDev() { return {}; } + static constexpr FieldMetadata_Dev kDev{}; void set_dev(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Dev::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -83131,14 +80589,7 @@ class F2fsWriteCheckpointFtraceEvent : public ::protozero::Message { uint32_t, F2fsWriteCheckpointFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_IsUmount kIsUmount() { return {}; } + static constexpr FieldMetadata_IsUmount kIsUmount{}; void set_is_umount(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_IsUmount::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -83156,17 +80607,13 @@ class F2fsWriteCheckpointFtraceEvent : public ::protozero::Message { std::string, F2fsWriteCheckpointFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Msg kMsg() { return {}; } + static constexpr FieldMetadata_Msg kMsg{}; void set_msg(const char* data, size_t size) { AppendBytes(FieldMetadata_Msg::kFieldId, data, size); } + void set_msg(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Msg::kFieldId, chars.data, chars.size); + } void set_msg(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Msg::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -83184,14 +80631,7 @@ class F2fsWriteCheckpointFtraceEvent : public ::protozero::Message { int32_t, F2fsWriteCheckpointFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Reason kReason() { return {}; } + static constexpr FieldMetadata_Reason kReason{}; void set_reason(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Reason::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -83240,14 +80680,7 @@ class F2fsWriteBeginFtraceEvent : public ::protozero::Message { uint64_t, F2fsWriteBeginFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Dev kDev() { return {}; } + static constexpr FieldMetadata_Dev kDev{}; void set_dev(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Dev::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -83265,14 +80698,7 @@ class F2fsWriteBeginFtraceEvent : public ::protozero::Message { uint64_t, F2fsWriteBeginFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ino kIno() { return {}; } + static constexpr FieldMetadata_Ino kIno{}; void set_ino(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Ino::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -83290,14 +80716,7 @@ class F2fsWriteBeginFtraceEvent : public ::protozero::Message { int64_t, F2fsWriteBeginFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Pos kPos() { return {}; } + static constexpr FieldMetadata_Pos kPos{}; void set_pos(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_Pos::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -83315,14 +80734,7 @@ class F2fsWriteBeginFtraceEvent : public ::protozero::Message { uint32_t, F2fsWriteBeginFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Len kLen() { return {}; } + static constexpr FieldMetadata_Len kLen{}; void set_len(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Len::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -83340,14 +80752,7 @@ class F2fsWriteBeginFtraceEvent : public ::protozero::Message { uint32_t, F2fsWriteBeginFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Flags kFlags() { return {}; } + static constexpr FieldMetadata_Flags kFlags{}; void set_flags(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Flags::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -83402,14 +80807,7 @@ class F2fsVmPageMkwriteFtraceEvent : public ::protozero::Message { uint64_t, F2fsVmPageMkwriteFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Dev kDev() { return {}; } + static constexpr FieldMetadata_Dev kDev{}; void set_dev(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Dev::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -83427,14 +80825,7 @@ class F2fsVmPageMkwriteFtraceEvent : public ::protozero::Message { uint64_t, F2fsVmPageMkwriteFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ino kIno() { return {}; } + static constexpr FieldMetadata_Ino kIno{}; void set_ino(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Ino::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -83452,14 +80843,7 @@ class F2fsVmPageMkwriteFtraceEvent : public ::protozero::Message { int32_t, F2fsVmPageMkwriteFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Type kType() { return {}; } + static constexpr FieldMetadata_Type kType{}; void set_type(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Type::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -83477,14 +80861,7 @@ class F2fsVmPageMkwriteFtraceEvent : public ::protozero::Message { int32_t, F2fsVmPageMkwriteFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Dir kDir() { return {}; } + static constexpr FieldMetadata_Dir kDir{}; void set_dir(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Dir::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -83502,14 +80879,7 @@ class F2fsVmPageMkwriteFtraceEvent : public ::protozero::Message { uint64_t, F2fsVmPageMkwriteFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Index kIndex() { return {}; } + static constexpr FieldMetadata_Index kIndex{}; void set_index(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Index::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -83527,14 +80897,7 @@ class F2fsVmPageMkwriteFtraceEvent : public ::protozero::Message { int32_t, F2fsVmPageMkwriteFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Dirty kDirty() { return {}; } + static constexpr FieldMetadata_Dirty kDirty{}; void set_dirty(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Dirty::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -83552,14 +80915,7 @@ class F2fsVmPageMkwriteFtraceEvent : public ::protozero::Message { int32_t, F2fsVmPageMkwriteFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Uptodate kUptodate() { return {}; } + static constexpr FieldMetadata_Uptodate kUptodate{}; void set_uptodate(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Uptodate::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -83602,14 +80958,7 @@ class F2fsUnlinkExitFtraceEvent : public ::protozero::Message { uint64_t, F2fsUnlinkExitFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Dev kDev() { return {}; } + static constexpr FieldMetadata_Dev kDev{}; void set_dev(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Dev::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -83627,14 +80976,7 @@ class F2fsUnlinkExitFtraceEvent : public ::protozero::Message { uint64_t, F2fsUnlinkExitFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ino kIno() { return {}; } + static constexpr FieldMetadata_Ino kIno{}; void set_ino(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Ino::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -83652,14 +80994,7 @@ class F2fsUnlinkExitFtraceEvent : public ::protozero::Message { int32_t, F2fsUnlinkExitFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ret kRet() { return {}; } + static constexpr FieldMetadata_Ret kRet{}; void set_ret(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Ret::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -83708,14 +81043,7 @@ class F2fsUnlinkEnterFtraceEvent : public ::protozero::Message { uint64_t, F2fsUnlinkEnterFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Dev kDev() { return {}; } + static constexpr FieldMetadata_Dev kDev{}; void set_dev(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Dev::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -83733,14 +81061,7 @@ class F2fsUnlinkEnterFtraceEvent : public ::protozero::Message { uint64_t, F2fsUnlinkEnterFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ino kIno() { return {}; } + static constexpr FieldMetadata_Ino kIno{}; void set_ino(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Ino::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -83758,14 +81079,7 @@ class F2fsUnlinkEnterFtraceEvent : public ::protozero::Message { int64_t, F2fsUnlinkEnterFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Size kSize() { return {}; } + static constexpr FieldMetadata_Size kSize{}; void set_size(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_Size::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -83783,14 +81097,7 @@ class F2fsUnlinkEnterFtraceEvent : public ::protozero::Message { uint64_t, F2fsUnlinkEnterFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Blocks kBlocks() { return {}; } + static constexpr FieldMetadata_Blocks kBlocks{}; void set_blocks(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Blocks::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -83808,17 +81115,13 @@ class F2fsUnlinkEnterFtraceEvent : public ::protozero::Message { std::string, F2fsUnlinkEnterFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Name kName() { return {}; } + static constexpr FieldMetadata_Name kName{}; void set_name(const char* data, size_t size) { AppendBytes(FieldMetadata_Name::kFieldId, data, size); } + void set_name(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Name::kFieldId, chars.data, chars.size); + } void set_name(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Name::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -83867,14 +81170,7 @@ class F2fsTruncatePartialNodesFtraceEvent : public ::protozero::Message { uint64_t, F2fsTruncatePartialNodesFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Dev kDev() { return {}; } + static constexpr FieldMetadata_Dev kDev{}; void set_dev(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Dev::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -83892,14 +81188,7 @@ class F2fsTruncatePartialNodesFtraceEvent : public ::protozero::Message { uint64_t, F2fsTruncatePartialNodesFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ino kIno() { return {}; } + static constexpr FieldMetadata_Ino kIno{}; void set_ino(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Ino::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -83917,14 +81206,7 @@ class F2fsTruncatePartialNodesFtraceEvent : public ::protozero::Message { uint32_t, F2fsTruncatePartialNodesFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Nid kNid() { return {}; } + static constexpr FieldMetadata_Nid kNid{}; void set_nid(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Nid::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -83942,14 +81224,7 @@ class F2fsTruncatePartialNodesFtraceEvent : public ::protozero::Message { int32_t, F2fsTruncatePartialNodesFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Depth kDepth() { return {}; } + static constexpr FieldMetadata_Depth kDepth{}; void set_depth(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Depth::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -83967,14 +81242,7 @@ class F2fsTruncatePartialNodesFtraceEvent : public ::protozero::Message { int32_t, F2fsTruncatePartialNodesFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Err kErr() { return {}; } + static constexpr FieldMetadata_Err kErr{}; void set_err(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Err::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -84017,14 +81285,7 @@ class F2fsTruncateNodesExitFtraceEvent : public ::protozero::Message { uint64_t, F2fsTruncateNodesExitFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Dev kDev() { return {}; } + static constexpr FieldMetadata_Dev kDev{}; void set_dev(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Dev::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -84042,14 +81303,7 @@ class F2fsTruncateNodesExitFtraceEvent : public ::protozero::Message { uint64_t, F2fsTruncateNodesExitFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ino kIno() { return {}; } + static constexpr FieldMetadata_Ino kIno{}; void set_ino(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Ino::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -84067,14 +81321,7 @@ class F2fsTruncateNodesExitFtraceEvent : public ::protozero::Message { int32_t, F2fsTruncateNodesExitFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ret kRet() { return {}; } + static constexpr FieldMetadata_Ret kRet{}; void set_ret(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Ret::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -84120,14 +81367,7 @@ class F2fsTruncateNodesEnterFtraceEvent : public ::protozero::Message { uint64_t, F2fsTruncateNodesEnterFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Dev kDev() { return {}; } + static constexpr FieldMetadata_Dev kDev{}; void set_dev(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Dev::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -84145,14 +81385,7 @@ class F2fsTruncateNodesEnterFtraceEvent : public ::protozero::Message { uint64_t, F2fsTruncateNodesEnterFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ino kIno() { return {}; } + static constexpr FieldMetadata_Ino kIno{}; void set_ino(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Ino::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -84170,14 +81403,7 @@ class F2fsTruncateNodesEnterFtraceEvent : public ::protozero::Message { uint32_t, F2fsTruncateNodesEnterFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Nid kNid() { return {}; } + static constexpr FieldMetadata_Nid kNid{}; void set_nid(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Nid::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -84195,14 +81421,7 @@ class F2fsTruncateNodesEnterFtraceEvent : public ::protozero::Message { uint32_t, F2fsTruncateNodesEnterFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_BlkAddr kBlkAddr() { return {}; } + static constexpr FieldMetadata_BlkAddr kBlkAddr{}; void set_blk_addr(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_BlkAddr::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -84248,14 +81467,7 @@ class F2fsTruncateNodeFtraceEvent : public ::protozero::Message { uint64_t, F2fsTruncateNodeFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Dev kDev() { return {}; } + static constexpr FieldMetadata_Dev kDev{}; void set_dev(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Dev::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -84273,14 +81485,7 @@ class F2fsTruncateNodeFtraceEvent : public ::protozero::Message { uint64_t, F2fsTruncateNodeFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ino kIno() { return {}; } + static constexpr FieldMetadata_Ino kIno{}; void set_ino(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Ino::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -84298,14 +81503,7 @@ class F2fsTruncateNodeFtraceEvent : public ::protozero::Message { uint32_t, F2fsTruncateNodeFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Nid kNid() { return {}; } + static constexpr FieldMetadata_Nid kNid{}; void set_nid(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Nid::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -84323,14 +81521,7 @@ class F2fsTruncateNodeFtraceEvent : public ::protozero::Message { uint32_t, F2fsTruncateNodeFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_BlkAddr kBlkAddr() { return {}; } + static constexpr FieldMetadata_BlkAddr kBlkAddr{}; void set_blk_addr(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_BlkAddr::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -84373,14 +81564,7 @@ class F2fsTruncateInodeBlocksExitFtraceEvent : public ::protozero::Message { uint64_t, F2fsTruncateInodeBlocksExitFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Dev kDev() { return {}; } + static constexpr FieldMetadata_Dev kDev{}; void set_dev(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Dev::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -84398,14 +81582,7 @@ class F2fsTruncateInodeBlocksExitFtraceEvent : public ::protozero::Message { uint64_t, F2fsTruncateInodeBlocksExitFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ino kIno() { return {}; } + static constexpr FieldMetadata_Ino kIno{}; void set_ino(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Ino::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -84423,14 +81600,7 @@ class F2fsTruncateInodeBlocksExitFtraceEvent : public ::protozero::Message { int32_t, F2fsTruncateInodeBlocksExitFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ret kRet() { return {}; } + static constexpr FieldMetadata_Ret kRet{}; void set_ret(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Ret::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -84479,14 +81649,7 @@ class F2fsTruncateInodeBlocksEnterFtraceEvent : public ::protozero::Message { uint64_t, F2fsTruncateInodeBlocksEnterFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Dev kDev() { return {}; } + static constexpr FieldMetadata_Dev kDev{}; void set_dev(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Dev::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -84504,14 +81667,7 @@ class F2fsTruncateInodeBlocksEnterFtraceEvent : public ::protozero::Message { uint64_t, F2fsTruncateInodeBlocksEnterFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ino kIno() { return {}; } + static constexpr FieldMetadata_Ino kIno{}; void set_ino(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Ino::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -84529,14 +81685,7 @@ class F2fsTruncateInodeBlocksEnterFtraceEvent : public ::protozero::Message { int64_t, F2fsTruncateInodeBlocksEnterFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Size kSize() { return {}; } + static constexpr FieldMetadata_Size kSize{}; void set_size(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_Size::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -84554,14 +81703,7 @@ class F2fsTruncateInodeBlocksEnterFtraceEvent : public ::protozero::Message { uint64_t, F2fsTruncateInodeBlocksEnterFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Blocks kBlocks() { return {}; } + static constexpr FieldMetadata_Blocks kBlocks{}; void set_blocks(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Blocks::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -84579,14 +81721,7 @@ class F2fsTruncateInodeBlocksEnterFtraceEvent : public ::protozero::Message { uint64_t, F2fsTruncateInodeBlocksEnterFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_From kFrom() { return {}; } + static constexpr FieldMetadata_From kFrom{}; void set_from(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_From::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -84635,14 +81770,7 @@ class F2fsTruncateDataBlocksRangeFtraceEvent : public ::protozero::Message { uint64_t, F2fsTruncateDataBlocksRangeFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Dev kDev() { return {}; } + static constexpr FieldMetadata_Dev kDev{}; void set_dev(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Dev::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -84660,14 +81788,7 @@ class F2fsTruncateDataBlocksRangeFtraceEvent : public ::protozero::Message { uint64_t, F2fsTruncateDataBlocksRangeFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ino kIno() { return {}; } + static constexpr FieldMetadata_Ino kIno{}; void set_ino(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Ino::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -84685,14 +81806,7 @@ class F2fsTruncateDataBlocksRangeFtraceEvent : public ::protozero::Message { uint32_t, F2fsTruncateDataBlocksRangeFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Nid kNid() { return {}; } + static constexpr FieldMetadata_Nid kNid{}; void set_nid(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Nid::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -84710,14 +81824,7 @@ class F2fsTruncateDataBlocksRangeFtraceEvent : public ::protozero::Message { uint32_t, F2fsTruncateDataBlocksRangeFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ofs kOfs() { return {}; } + static constexpr FieldMetadata_Ofs kOfs{}; void set_ofs(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Ofs::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -84735,14 +81842,7 @@ class F2fsTruncateDataBlocksRangeFtraceEvent : public ::protozero::Message { int32_t, F2fsTruncateDataBlocksRangeFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Free kFree() { return {}; } + static constexpr FieldMetadata_Free kFree{}; void set_free(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Free::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -84785,14 +81885,7 @@ class F2fsTruncateBlocksExitFtraceEvent : public ::protozero::Message { uint64_t, F2fsTruncateBlocksExitFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Dev kDev() { return {}; } + static constexpr FieldMetadata_Dev kDev{}; void set_dev(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Dev::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -84810,14 +81903,7 @@ class F2fsTruncateBlocksExitFtraceEvent : public ::protozero::Message { uint64_t, F2fsTruncateBlocksExitFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ino kIno() { return {}; } + static constexpr FieldMetadata_Ino kIno{}; void set_ino(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Ino::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -84835,14 +81921,7 @@ class F2fsTruncateBlocksExitFtraceEvent : public ::protozero::Message { int32_t, F2fsTruncateBlocksExitFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ret kRet() { return {}; } + static constexpr FieldMetadata_Ret kRet{}; void set_ret(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Ret::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -84891,14 +81970,7 @@ class F2fsTruncateBlocksEnterFtraceEvent : public ::protozero::Message { uint64_t, F2fsTruncateBlocksEnterFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Dev kDev() { return {}; } + static constexpr FieldMetadata_Dev kDev{}; void set_dev(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Dev::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -84916,14 +81988,7 @@ class F2fsTruncateBlocksEnterFtraceEvent : public ::protozero::Message { uint64_t, F2fsTruncateBlocksEnterFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ino kIno() { return {}; } + static constexpr FieldMetadata_Ino kIno{}; void set_ino(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Ino::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -84941,14 +82006,7 @@ class F2fsTruncateBlocksEnterFtraceEvent : public ::protozero::Message { int64_t, F2fsTruncateBlocksEnterFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Size kSize() { return {}; } + static constexpr FieldMetadata_Size kSize{}; void set_size(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_Size::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -84966,14 +82024,7 @@ class F2fsTruncateBlocksEnterFtraceEvent : public ::protozero::Message { uint64_t, F2fsTruncateBlocksEnterFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Blocks kBlocks() { return {}; } + static constexpr FieldMetadata_Blocks kBlocks{}; void set_blocks(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Blocks::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -84991,14 +82042,7 @@ class F2fsTruncateBlocksEnterFtraceEvent : public ::protozero::Message { uint64_t, F2fsTruncateBlocksEnterFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_From kFrom() { return {}; } + static constexpr FieldMetadata_From kFrom{}; void set_from(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_From::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -85056,14 +82100,7 @@ class F2fsTruncateFtraceEvent : public ::protozero::Message { uint64_t, F2fsTruncateFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Dev kDev() { return {}; } + static constexpr FieldMetadata_Dev kDev{}; void set_dev(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Dev::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -85081,14 +82118,7 @@ class F2fsTruncateFtraceEvent : public ::protozero::Message { uint64_t, F2fsTruncateFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ino kIno() { return {}; } + static constexpr FieldMetadata_Ino kIno{}; void set_ino(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Ino::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -85106,14 +82136,7 @@ class F2fsTruncateFtraceEvent : public ::protozero::Message { uint64_t, F2fsTruncateFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Pino kPino() { return {}; } + static constexpr FieldMetadata_Pino kPino{}; void set_pino(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Pino::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -85131,14 +82154,7 @@ class F2fsTruncateFtraceEvent : public ::protozero::Message { uint32_t, F2fsTruncateFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Mode kMode() { return {}; } + static constexpr FieldMetadata_Mode kMode{}; void set_mode(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Mode::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -85156,14 +82172,7 @@ class F2fsTruncateFtraceEvent : public ::protozero::Message { int64_t, F2fsTruncateFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Size kSize() { return {}; } + static constexpr FieldMetadata_Size kSize{}; void set_size(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_Size::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -85181,14 +82190,7 @@ class F2fsTruncateFtraceEvent : public ::protozero::Message { uint32_t, F2fsTruncateFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Nlink kNlink() { return {}; } + static constexpr FieldMetadata_Nlink kNlink{}; void set_nlink(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Nlink::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -85206,14 +82208,7 @@ class F2fsTruncateFtraceEvent : public ::protozero::Message { uint64_t, F2fsTruncateFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Blocks kBlocks() { return {}; } + static constexpr FieldMetadata_Blocks kBlocks{}; void set_blocks(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Blocks::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -85231,14 +82226,7 @@ class F2fsTruncateFtraceEvent : public ::protozero::Message { uint32_t, F2fsTruncateFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Advise kAdvise() { return {}; } + static constexpr FieldMetadata_Advise kAdvise{}; void set_advise(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Advise::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -85281,14 +82269,7 @@ class F2fsSyncFsFtraceEvent : public ::protozero::Message { uint64_t, F2fsSyncFsFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Dev kDev() { return {}; } + static constexpr FieldMetadata_Dev kDev{}; void set_dev(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Dev::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -85306,14 +82287,7 @@ class F2fsSyncFsFtraceEvent : public ::protozero::Message { int32_t, F2fsSyncFsFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Dirty kDirty() { return {}; } + static constexpr FieldMetadata_Dirty kDirty{}; void set_dirty(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Dirty::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -85331,14 +82305,7 @@ class F2fsSyncFsFtraceEvent : public ::protozero::Message { int32_t, F2fsSyncFsFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Wait kWait() { return {}; } + static constexpr FieldMetadata_Wait kWait{}; void set_wait(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Wait::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -85390,14 +82357,7 @@ class F2fsSyncFileExitFtraceEvent : public ::protozero::Message { uint64_t, F2fsSyncFileExitFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Dev kDev() { return {}; } + static constexpr FieldMetadata_Dev kDev{}; void set_dev(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Dev::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -85415,14 +82375,7 @@ class F2fsSyncFileExitFtraceEvent : public ::protozero::Message { uint64_t, F2fsSyncFileExitFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ino kIno() { return {}; } + static constexpr FieldMetadata_Ino kIno{}; void set_ino(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Ino::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -85440,14 +82393,7 @@ class F2fsSyncFileExitFtraceEvent : public ::protozero::Message { uint32_t, F2fsSyncFileExitFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_NeedCp kNeedCp() { return {}; } + static constexpr FieldMetadata_NeedCp kNeedCp{}; void set_need_cp(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_NeedCp::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -85465,14 +82411,7 @@ class F2fsSyncFileExitFtraceEvent : public ::protozero::Message { int32_t, F2fsSyncFileExitFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Datasync kDatasync() { return {}; } + static constexpr FieldMetadata_Datasync kDatasync{}; void set_datasync(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Datasync::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -85490,14 +82429,7 @@ class F2fsSyncFileExitFtraceEvent : public ::protozero::Message { int32_t, F2fsSyncFileExitFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ret kRet() { return {}; } + static constexpr FieldMetadata_Ret kRet{}; void set_ret(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Ret::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -85515,14 +82447,7 @@ class F2fsSyncFileExitFtraceEvent : public ::protozero::Message { int32_t, F2fsSyncFileExitFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_CpReason kCpReason() { return {}; } + static constexpr FieldMetadata_CpReason kCpReason{}; void set_cp_reason(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_CpReason::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -85580,14 +82505,7 @@ class F2fsSyncFileEnterFtraceEvent : public ::protozero::Message { uint64_t, F2fsSyncFileEnterFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Dev kDev() { return {}; } + static constexpr FieldMetadata_Dev kDev{}; void set_dev(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Dev::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -85605,14 +82523,7 @@ class F2fsSyncFileEnterFtraceEvent : public ::protozero::Message { uint64_t, F2fsSyncFileEnterFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ino kIno() { return {}; } + static constexpr FieldMetadata_Ino kIno{}; void set_ino(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Ino::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -85630,14 +82541,7 @@ class F2fsSyncFileEnterFtraceEvent : public ::protozero::Message { uint64_t, F2fsSyncFileEnterFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Pino kPino() { return {}; } + static constexpr FieldMetadata_Pino kPino{}; void set_pino(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Pino::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -85655,14 +82559,7 @@ class F2fsSyncFileEnterFtraceEvent : public ::protozero::Message { uint32_t, F2fsSyncFileEnterFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Mode kMode() { return {}; } + static constexpr FieldMetadata_Mode kMode{}; void set_mode(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Mode::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -85680,14 +82577,7 @@ class F2fsSyncFileEnterFtraceEvent : public ::protozero::Message { int64_t, F2fsSyncFileEnterFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Size kSize() { return {}; } + static constexpr FieldMetadata_Size kSize{}; void set_size(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_Size::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -85705,14 +82595,7 @@ class F2fsSyncFileEnterFtraceEvent : public ::protozero::Message { uint32_t, F2fsSyncFileEnterFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Nlink kNlink() { return {}; } + static constexpr FieldMetadata_Nlink kNlink{}; void set_nlink(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Nlink::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -85730,14 +82613,7 @@ class F2fsSyncFileEnterFtraceEvent : public ::protozero::Message { uint64_t, F2fsSyncFileEnterFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Blocks kBlocks() { return {}; } + static constexpr FieldMetadata_Blocks kBlocks{}; void set_blocks(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Blocks::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -85755,14 +82631,7 @@ class F2fsSyncFileEnterFtraceEvent : public ::protozero::Message { uint32_t, F2fsSyncFileEnterFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Advise kAdvise() { return {}; } + static constexpr FieldMetadata_Advise kAdvise{}; void set_advise(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Advise::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -85811,14 +82680,7 @@ class F2fsSubmitWritePageFtraceEvent : public ::protozero::Message { uint64_t, F2fsSubmitWritePageFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Dev kDev() { return {}; } + static constexpr FieldMetadata_Dev kDev{}; void set_dev(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Dev::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -85836,14 +82698,7 @@ class F2fsSubmitWritePageFtraceEvent : public ::protozero::Message { uint64_t, F2fsSubmitWritePageFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ino kIno() { return {}; } + static constexpr FieldMetadata_Ino kIno{}; void set_ino(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Ino::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -85861,14 +82716,7 @@ class F2fsSubmitWritePageFtraceEvent : public ::protozero::Message { int32_t, F2fsSubmitWritePageFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Type kType() { return {}; } + static constexpr FieldMetadata_Type kType{}; void set_type(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Type::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -85886,14 +82734,7 @@ class F2fsSubmitWritePageFtraceEvent : public ::protozero::Message { uint64_t, F2fsSubmitWritePageFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Index kIndex() { return {}; } + static constexpr FieldMetadata_Index kIndex{}; void set_index(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Index::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -85911,14 +82752,7 @@ class F2fsSubmitWritePageFtraceEvent : public ::protozero::Message { uint32_t, F2fsSubmitWritePageFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Block kBlock() { return {}; } + static constexpr FieldMetadata_Block kBlock{}; void set_block(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Block::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -85973,14 +82807,7 @@ class F2fsSetPageDirtyFtraceEvent : public ::protozero::Message { uint64_t, F2fsSetPageDirtyFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Dev kDev() { return {}; } + static constexpr FieldMetadata_Dev kDev{}; void set_dev(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Dev::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -85998,14 +82825,7 @@ class F2fsSetPageDirtyFtraceEvent : public ::protozero::Message { uint64_t, F2fsSetPageDirtyFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ino kIno() { return {}; } + static constexpr FieldMetadata_Ino kIno{}; void set_ino(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Ino::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -86023,14 +82843,7 @@ class F2fsSetPageDirtyFtraceEvent : public ::protozero::Message { int32_t, F2fsSetPageDirtyFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Type kType() { return {}; } + static constexpr FieldMetadata_Type kType{}; void set_type(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Type::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -86048,14 +82861,7 @@ class F2fsSetPageDirtyFtraceEvent : public ::protozero::Message { int32_t, F2fsSetPageDirtyFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Dir kDir() { return {}; } + static constexpr FieldMetadata_Dir kDir{}; void set_dir(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Dir::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -86073,14 +82879,7 @@ class F2fsSetPageDirtyFtraceEvent : public ::protozero::Message { uint64_t, F2fsSetPageDirtyFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Index kIndex() { return {}; } + static constexpr FieldMetadata_Index kIndex{}; void set_index(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Index::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -86098,14 +82897,7 @@ class F2fsSetPageDirtyFtraceEvent : public ::protozero::Message { int32_t, F2fsSetPageDirtyFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Dirty kDirty() { return {}; } + static constexpr FieldMetadata_Dirty kDirty{}; void set_dirty(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Dirty::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -86123,14 +82915,7 @@ class F2fsSetPageDirtyFtraceEvent : public ::protozero::Message { int32_t, F2fsSetPageDirtyFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Uptodate kUptodate() { return {}; } + static constexpr FieldMetadata_Uptodate kUptodate{}; void set_uptodate(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Uptodate::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -86173,14 +82958,7 @@ class F2fsReserveNewBlockFtraceEvent : public ::protozero::Message { uint64_t, F2fsReserveNewBlockFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Dev kDev() { return {}; } + static constexpr FieldMetadata_Dev kDev{}; void set_dev(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Dev::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -86198,14 +82976,7 @@ class F2fsReserveNewBlockFtraceEvent : public ::protozero::Message { uint32_t, F2fsReserveNewBlockFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Nid kNid() { return {}; } + static constexpr FieldMetadata_Nid kNid{}; void set_nid(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Nid::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -86223,14 +82994,7 @@ class F2fsReserveNewBlockFtraceEvent : public ::protozero::Message { uint32_t, F2fsReserveNewBlockFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_OfsInNode kOfsInNode() { return {}; } + static constexpr FieldMetadata_OfsInNode kOfsInNode{}; void set_ofs_in_node(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_OfsInNode::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -86288,14 +83052,7 @@ class F2fsReadpageFtraceEvent : public ::protozero::Message { uint64_t, F2fsReadpageFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Dev kDev() { return {}; } + static constexpr FieldMetadata_Dev kDev{}; void set_dev(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Dev::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -86313,14 +83070,7 @@ class F2fsReadpageFtraceEvent : public ::protozero::Message { uint64_t, F2fsReadpageFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ino kIno() { return {}; } + static constexpr FieldMetadata_Ino kIno{}; void set_ino(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Ino::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -86338,14 +83088,7 @@ class F2fsReadpageFtraceEvent : public ::protozero::Message { uint64_t, F2fsReadpageFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Index kIndex() { return {}; } + static constexpr FieldMetadata_Index kIndex{}; void set_index(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Index::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -86363,14 +83106,7 @@ class F2fsReadpageFtraceEvent : public ::protozero::Message { uint64_t, F2fsReadpageFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Blkaddr kBlkaddr() { return {}; } + static constexpr FieldMetadata_Blkaddr kBlkaddr{}; void set_blkaddr(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Blkaddr::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -86388,14 +83124,7 @@ class F2fsReadpageFtraceEvent : public ::protozero::Message { int32_t, F2fsReadpageFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Type kType() { return {}; } + static constexpr FieldMetadata_Type kType{}; void set_type(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Type::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -86413,14 +83142,7 @@ class F2fsReadpageFtraceEvent : public ::protozero::Message { int32_t, F2fsReadpageFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Dir kDir() { return {}; } + static constexpr FieldMetadata_Dir kDir{}; void set_dir(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Dir::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -86438,14 +83160,7 @@ class F2fsReadpageFtraceEvent : public ::protozero::Message { int32_t, F2fsReadpageFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Dirty kDirty() { return {}; } + static constexpr FieldMetadata_Dirty kDirty{}; void set_dirty(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Dirty::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -86463,14 +83178,7 @@ class F2fsReadpageFtraceEvent : public ::protozero::Message { int32_t, F2fsReadpageFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Uptodate kUptodate() { return {}; } + static constexpr FieldMetadata_Uptodate kUptodate{}; void set_uptodate(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Uptodate::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -86513,14 +83221,7 @@ class F2fsNewInodeFtraceEvent : public ::protozero::Message { uint64_t, F2fsNewInodeFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Dev kDev() { return {}; } + static constexpr FieldMetadata_Dev kDev{}; void set_dev(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Dev::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -86538,14 +83239,7 @@ class F2fsNewInodeFtraceEvent : public ::protozero::Message { uint64_t, F2fsNewInodeFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ino kIno() { return {}; } + static constexpr FieldMetadata_Ino kIno{}; void set_ino(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Ino::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -86563,14 +83257,7 @@ class F2fsNewInodeFtraceEvent : public ::protozero::Message { int32_t, F2fsNewInodeFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ret kRet() { return {}; } + static constexpr FieldMetadata_Ret kRet{}; void set_ret(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Ret::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -86613,14 +83300,7 @@ class F2fsIgetExitFtraceEvent : public ::protozero::Message { uint64_t, F2fsIgetExitFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Dev kDev() { return {}; } + static constexpr FieldMetadata_Dev kDev{}; void set_dev(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Dev::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -86638,14 +83318,7 @@ class F2fsIgetExitFtraceEvent : public ::protozero::Message { uint64_t, F2fsIgetExitFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ino kIno() { return {}; } + static constexpr FieldMetadata_Ino kIno{}; void set_ino(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Ino::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -86663,14 +83336,7 @@ class F2fsIgetExitFtraceEvent : public ::protozero::Message { int32_t, F2fsIgetExitFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ret kRet() { return {}; } + static constexpr FieldMetadata_Ret kRet{}; void set_ret(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Ret::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -86728,14 +83394,7 @@ class F2fsIgetFtraceEvent : public ::protozero::Message { uint64_t, F2fsIgetFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Dev kDev() { return {}; } + static constexpr FieldMetadata_Dev kDev{}; void set_dev(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Dev::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -86753,14 +83412,7 @@ class F2fsIgetFtraceEvent : public ::protozero::Message { uint64_t, F2fsIgetFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ino kIno() { return {}; } + static constexpr FieldMetadata_Ino kIno{}; void set_ino(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Ino::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -86778,14 +83430,7 @@ class F2fsIgetFtraceEvent : public ::protozero::Message { uint64_t, F2fsIgetFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Pino kPino() { return {}; } + static constexpr FieldMetadata_Pino kPino{}; void set_pino(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Pino::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -86803,14 +83448,7 @@ class F2fsIgetFtraceEvent : public ::protozero::Message { uint32_t, F2fsIgetFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Mode kMode() { return {}; } + static constexpr FieldMetadata_Mode kMode{}; void set_mode(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Mode::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -86828,14 +83466,7 @@ class F2fsIgetFtraceEvent : public ::protozero::Message { int64_t, F2fsIgetFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Size kSize() { return {}; } + static constexpr FieldMetadata_Size kSize{}; void set_size(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_Size::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -86853,14 +83484,7 @@ class F2fsIgetFtraceEvent : public ::protozero::Message { uint32_t, F2fsIgetFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Nlink kNlink() { return {}; } + static constexpr FieldMetadata_Nlink kNlink{}; void set_nlink(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Nlink::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -86878,14 +83502,7 @@ class F2fsIgetFtraceEvent : public ::protozero::Message { uint64_t, F2fsIgetFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Blocks kBlocks() { return {}; } + static constexpr FieldMetadata_Blocks kBlocks{}; void set_blocks(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Blocks::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -86903,14 +83520,7 @@ class F2fsIgetFtraceEvent : public ::protozero::Message { uint32_t, F2fsIgetFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Advise kAdvise() { return {}; } + static constexpr FieldMetadata_Advise kAdvise{}; void set_advise(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Advise::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -86977,14 +83587,7 @@ class F2fsGetVictimFtraceEvent : public ::protozero::Message { uint64_t, F2fsGetVictimFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Dev kDev() { return {}; } + static constexpr FieldMetadata_Dev kDev{}; void set_dev(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Dev::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -87002,14 +83605,7 @@ class F2fsGetVictimFtraceEvent : public ::protozero::Message { int32_t, F2fsGetVictimFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Type kType() { return {}; } + static constexpr FieldMetadata_Type kType{}; void set_type(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Type::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -87027,14 +83623,7 @@ class F2fsGetVictimFtraceEvent : public ::protozero::Message { int32_t, F2fsGetVictimFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_GcType kGcType() { return {}; } + static constexpr FieldMetadata_GcType kGcType{}; void set_gc_type(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_GcType::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -87052,14 +83641,7 @@ class F2fsGetVictimFtraceEvent : public ::protozero::Message { int32_t, F2fsGetVictimFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_AllocMode kAllocMode() { return {}; } + static constexpr FieldMetadata_AllocMode kAllocMode{}; void set_alloc_mode(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_AllocMode::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -87077,14 +83659,7 @@ class F2fsGetVictimFtraceEvent : public ::protozero::Message { int32_t, F2fsGetVictimFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_GcMode kGcMode() { return {}; } + static constexpr FieldMetadata_GcMode kGcMode{}; void set_gc_mode(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_GcMode::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -87102,14 +83677,7 @@ class F2fsGetVictimFtraceEvent : public ::protozero::Message { uint32_t, F2fsGetVictimFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Victim kVictim() { return {}; } + static constexpr FieldMetadata_Victim kVictim{}; void set_victim(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Victim::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -87127,14 +83695,7 @@ class F2fsGetVictimFtraceEvent : public ::protozero::Message { uint32_t, F2fsGetVictimFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_OfsUnit kOfsUnit() { return {}; } + static constexpr FieldMetadata_OfsUnit kOfsUnit{}; void set_ofs_unit(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_OfsUnit::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -87152,14 +83713,7 @@ class F2fsGetVictimFtraceEvent : public ::protozero::Message { uint32_t, F2fsGetVictimFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_PreVictim kPreVictim() { return {}; } + static constexpr FieldMetadata_PreVictim kPreVictim{}; void set_pre_victim(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_PreVictim::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -87177,14 +83731,7 @@ class F2fsGetVictimFtraceEvent : public ::protozero::Message { uint32_t, F2fsGetVictimFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Prefree kPrefree() { return {}; } + static constexpr FieldMetadata_Prefree kPrefree{}; void set_prefree(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Prefree::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -87202,14 +83749,7 @@ class F2fsGetVictimFtraceEvent : public ::protozero::Message { uint32_t, F2fsGetVictimFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Free kFree() { return {}; } + static constexpr FieldMetadata_Free kFree{}; void set_free(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Free::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -87227,14 +83767,7 @@ class F2fsGetVictimFtraceEvent : public ::protozero::Message { uint32_t, F2fsGetVictimFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Cost kCost() { return {}; } + static constexpr FieldMetadata_Cost kCost{}; void set_cost(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Cost::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -87286,14 +83819,7 @@ class F2fsGetDataBlockFtraceEvent : public ::protozero::Message { uint64_t, F2fsGetDataBlockFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Dev kDev() { return {}; } + static constexpr FieldMetadata_Dev kDev{}; void set_dev(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Dev::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -87311,14 +83837,7 @@ class F2fsGetDataBlockFtraceEvent : public ::protozero::Message { uint64_t, F2fsGetDataBlockFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ino kIno() { return {}; } + static constexpr FieldMetadata_Ino kIno{}; void set_ino(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Ino::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -87336,14 +83855,7 @@ class F2fsGetDataBlockFtraceEvent : public ::protozero::Message { uint64_t, F2fsGetDataBlockFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Iblock kIblock() { return {}; } + static constexpr FieldMetadata_Iblock kIblock{}; void set_iblock(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Iblock::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -87361,14 +83873,7 @@ class F2fsGetDataBlockFtraceEvent : public ::protozero::Message { uint64_t, F2fsGetDataBlockFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_BhStart kBhStart() { return {}; } + static constexpr FieldMetadata_BhStart kBhStart{}; void set_bh_start(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_BhStart::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -87386,14 +83891,7 @@ class F2fsGetDataBlockFtraceEvent : public ::protozero::Message { uint64_t, F2fsGetDataBlockFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_BhSize kBhSize() { return {}; } + static constexpr FieldMetadata_BhSize kBhSize{}; void set_bh_size(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_BhSize::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -87411,14 +83909,7 @@ class F2fsGetDataBlockFtraceEvent : public ::protozero::Message { int32_t, F2fsGetDataBlockFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ret kRet() { return {}; } + static constexpr FieldMetadata_Ret kRet{}; void set_ret(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Ret::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -87476,14 +83967,7 @@ class F2fsFallocateFtraceEvent : public ::protozero::Message { uint64_t, F2fsFallocateFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Dev kDev() { return {}; } + static constexpr FieldMetadata_Dev kDev{}; void set_dev(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Dev::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -87501,14 +83985,7 @@ class F2fsFallocateFtraceEvent : public ::protozero::Message { uint64_t, F2fsFallocateFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ino kIno() { return {}; } + static constexpr FieldMetadata_Ino kIno{}; void set_ino(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Ino::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -87526,14 +84003,7 @@ class F2fsFallocateFtraceEvent : public ::protozero::Message { int32_t, F2fsFallocateFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Mode kMode() { return {}; } + static constexpr FieldMetadata_Mode kMode{}; void set_mode(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Mode::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -87551,14 +84021,7 @@ class F2fsFallocateFtraceEvent : public ::protozero::Message { int64_t, F2fsFallocateFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Offset kOffset() { return {}; } + static constexpr FieldMetadata_Offset kOffset{}; void set_offset(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_Offset::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -87576,14 +84039,7 @@ class F2fsFallocateFtraceEvent : public ::protozero::Message { int64_t, F2fsFallocateFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Len kLen() { return {}; } + static constexpr FieldMetadata_Len kLen{}; void set_len(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_Len::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -87601,14 +84057,7 @@ class F2fsFallocateFtraceEvent : public ::protozero::Message { int64_t, F2fsFallocateFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Size kSize() { return {}; } + static constexpr FieldMetadata_Size kSize{}; void set_size(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_Size::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -87626,14 +84075,7 @@ class F2fsFallocateFtraceEvent : public ::protozero::Message { uint64_t, F2fsFallocateFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Blocks kBlocks() { return {}; } + static constexpr FieldMetadata_Blocks kBlocks{}; void set_blocks(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Blocks::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -87651,14 +84093,7 @@ class F2fsFallocateFtraceEvent : public ::protozero::Message { int32_t, F2fsFallocateFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ret kRet() { return {}; } + static constexpr FieldMetadata_Ret kRet{}; void set_ret(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Ret::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -87716,14 +84151,7 @@ class F2fsEvictInodeFtraceEvent : public ::protozero::Message { uint64_t, F2fsEvictInodeFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Dev kDev() { return {}; } + static constexpr FieldMetadata_Dev kDev{}; void set_dev(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Dev::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -87741,14 +84169,7 @@ class F2fsEvictInodeFtraceEvent : public ::protozero::Message { uint64_t, F2fsEvictInodeFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ino kIno() { return {}; } + static constexpr FieldMetadata_Ino kIno{}; void set_ino(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Ino::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -87766,14 +84187,7 @@ class F2fsEvictInodeFtraceEvent : public ::protozero::Message { uint64_t, F2fsEvictInodeFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Pino kPino() { return {}; } + static constexpr FieldMetadata_Pino kPino{}; void set_pino(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Pino::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -87791,14 +84205,7 @@ class F2fsEvictInodeFtraceEvent : public ::protozero::Message { uint32_t, F2fsEvictInodeFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Mode kMode() { return {}; } + static constexpr FieldMetadata_Mode kMode{}; void set_mode(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Mode::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -87816,14 +84223,7 @@ class F2fsEvictInodeFtraceEvent : public ::protozero::Message { int64_t, F2fsEvictInodeFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Size kSize() { return {}; } + static constexpr FieldMetadata_Size kSize{}; void set_size(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_Size::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -87841,14 +84241,7 @@ class F2fsEvictInodeFtraceEvent : public ::protozero::Message { uint32_t, F2fsEvictInodeFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Nlink kNlink() { return {}; } + static constexpr FieldMetadata_Nlink kNlink{}; void set_nlink(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Nlink::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -87866,14 +84259,7 @@ class F2fsEvictInodeFtraceEvent : public ::protozero::Message { uint64_t, F2fsEvictInodeFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Blocks kBlocks() { return {}; } + static constexpr FieldMetadata_Blocks kBlocks{}; void set_blocks(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Blocks::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -87891,14 +84277,7 @@ class F2fsEvictInodeFtraceEvent : public ::protozero::Message { uint32_t, F2fsEvictInodeFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Advise kAdvise() { return {}; } + static constexpr FieldMetadata_Advise kAdvise{}; void set_advise(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Advise::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -87947,14 +84326,7 @@ class F2fsDoSubmitBioFtraceEvent : public ::protozero::Message { uint64_t, F2fsDoSubmitBioFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Dev kDev() { return {}; } + static constexpr FieldMetadata_Dev kDev{}; void set_dev(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Dev::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -87972,14 +84344,7 @@ class F2fsDoSubmitBioFtraceEvent : public ::protozero::Message { int32_t, F2fsDoSubmitBioFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Btype kBtype() { return {}; } + static constexpr FieldMetadata_Btype kBtype{}; void set_btype(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Btype::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -87997,14 +84362,7 @@ class F2fsDoSubmitBioFtraceEvent : public ::protozero::Message { uint32_t, F2fsDoSubmitBioFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Sync kSync() { return {}; } + static constexpr FieldMetadata_Sync kSync{}; void set_sync(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Sync::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -88022,14 +84380,7 @@ class F2fsDoSubmitBioFtraceEvent : public ::protozero::Message { uint64_t, F2fsDoSubmitBioFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Sector kSector() { return {}; } + static constexpr FieldMetadata_Sector kSector{}; void set_sector(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Sector::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -88047,14 +84398,7 @@ class F2fsDoSubmitBioFtraceEvent : public ::protozero::Message { uint32_t, F2fsDoSubmitBioFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Size kSize() { return {}; } + static constexpr FieldMetadata_Size kSize{}; void set_size(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Size::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -88121,14 +84465,7 @@ class FastrpcDmaStatFtraceEvent : public ::protozero::Message { int32_t, FastrpcDmaStatFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Cid kCid() { return {}; } + static constexpr FieldMetadata_Cid kCid{}; void set_cid(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Cid::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -88146,14 +84483,7 @@ class FastrpcDmaStatFtraceEvent : public ::protozero::Message { int64_t, FastrpcDmaStatFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Len kLen() { return {}; } + static constexpr FieldMetadata_Len kLen{}; void set_len(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_Len::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -88171,14 +84501,7 @@ class FastrpcDmaStatFtraceEvent : public ::protozero::Message { uint64_t, FastrpcDmaStatFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_TotalAllocated kTotalAllocated() { return {}; } + static constexpr FieldMetadata_TotalAllocated kTotalAllocated{}; void set_total_allocated(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_TotalAllocated::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -88248,14 +84571,7 @@ class FenceSignaledFtraceEvent : public ::protozero::Message { uint32_t, FenceSignaledFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Context kContext() { return {}; } + static constexpr FieldMetadata_Context kContext{}; void set_context(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Context::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -88273,17 +84589,13 @@ class FenceSignaledFtraceEvent : public ::protozero::Message { std::string, FenceSignaledFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Driver kDriver() { return {}; } + static constexpr FieldMetadata_Driver kDriver{}; void set_driver(const char* data, size_t size) { AppendBytes(FieldMetadata_Driver::kFieldId, data, size); } + void set_driver(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Driver::kFieldId, chars.data, chars.size); + } void set_driver(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Driver::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -88301,14 +84613,7 @@ class FenceSignaledFtraceEvent : public ::protozero::Message { uint32_t, FenceSignaledFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Seqno kSeqno() { return {}; } + static constexpr FieldMetadata_Seqno kSeqno{}; void set_seqno(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Seqno::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -88326,17 +84631,13 @@ class FenceSignaledFtraceEvent : public ::protozero::Message { std::string, FenceSignaledFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Timeline kTimeline() { return {}; } + static constexpr FieldMetadata_Timeline kTimeline{}; void set_timeline(const char* data, size_t size) { AppendBytes(FieldMetadata_Timeline::kFieldId, data, size); } + void set_timeline(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Timeline::kFieldId, chars.data, chars.size); + } void set_timeline(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Timeline::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -88382,14 +84683,7 @@ class FenceEnableSignalFtraceEvent : public ::protozero::Message { uint32_t, FenceEnableSignalFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Context kContext() { return {}; } + static constexpr FieldMetadata_Context kContext{}; void set_context(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Context::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -88407,17 +84701,13 @@ class FenceEnableSignalFtraceEvent : public ::protozero::Message { std::string, FenceEnableSignalFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Driver kDriver() { return {}; } + static constexpr FieldMetadata_Driver kDriver{}; void set_driver(const char* data, size_t size) { AppendBytes(FieldMetadata_Driver::kFieldId, data, size); } + void set_driver(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Driver::kFieldId, chars.data, chars.size); + } void set_driver(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Driver::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -88435,14 +84725,7 @@ class FenceEnableSignalFtraceEvent : public ::protozero::Message { uint32_t, FenceEnableSignalFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Seqno kSeqno() { return {}; } + static constexpr FieldMetadata_Seqno kSeqno{}; void set_seqno(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Seqno::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -88460,17 +84743,13 @@ class FenceEnableSignalFtraceEvent : public ::protozero::Message { std::string, FenceEnableSignalFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Timeline kTimeline() { return {}; } + static constexpr FieldMetadata_Timeline kTimeline{}; void set_timeline(const char* data, size_t size) { AppendBytes(FieldMetadata_Timeline::kFieldId, data, size); } + void set_timeline(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Timeline::kFieldId, chars.data, chars.size); + } void set_timeline(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Timeline::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -88516,14 +84795,7 @@ class FenceDestroyFtraceEvent : public ::protozero::Message { uint32_t, FenceDestroyFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Context kContext() { return {}; } + static constexpr FieldMetadata_Context kContext{}; void set_context(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Context::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -88541,17 +84813,13 @@ class FenceDestroyFtraceEvent : public ::protozero::Message { std::string, FenceDestroyFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Driver kDriver() { return {}; } + static constexpr FieldMetadata_Driver kDriver{}; void set_driver(const char* data, size_t size) { AppendBytes(FieldMetadata_Driver::kFieldId, data, size); } + void set_driver(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Driver::kFieldId, chars.data, chars.size); + } void set_driver(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Driver::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -88569,14 +84837,7 @@ class FenceDestroyFtraceEvent : public ::protozero::Message { uint32_t, FenceDestroyFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Seqno kSeqno() { return {}; } + static constexpr FieldMetadata_Seqno kSeqno{}; void set_seqno(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Seqno::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -88594,17 +84855,13 @@ class FenceDestroyFtraceEvent : public ::protozero::Message { std::string, FenceDestroyFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Timeline kTimeline() { return {}; } + static constexpr FieldMetadata_Timeline kTimeline{}; void set_timeline(const char* data, size_t size) { AppendBytes(FieldMetadata_Timeline::kFieldId, data, size); } + void set_timeline(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Timeline::kFieldId, chars.data, chars.size); + } void set_timeline(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Timeline::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -88650,14 +84907,7 @@ class FenceInitFtraceEvent : public ::protozero::Message { uint32_t, FenceInitFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Context kContext() { return {}; } + static constexpr FieldMetadata_Context kContext{}; void set_context(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Context::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -88675,17 +84925,13 @@ class FenceInitFtraceEvent : public ::protozero::Message { std::string, FenceInitFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Driver kDriver() { return {}; } + static constexpr FieldMetadata_Driver kDriver{}; void set_driver(const char* data, size_t size) { AppendBytes(FieldMetadata_Driver::kFieldId, data, size); } + void set_driver(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Driver::kFieldId, chars.data, chars.size); + } void set_driver(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Driver::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -88703,14 +84949,7 @@ class FenceInitFtraceEvent : public ::protozero::Message { uint32_t, FenceInitFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Seqno kSeqno() { return {}; } + static constexpr FieldMetadata_Seqno kSeqno{}; void set_seqno(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Seqno::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -88728,17 +84967,13 @@ class FenceInitFtraceEvent : public ::protozero::Message { std::string, FenceInitFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Timeline kTimeline() { return {}; } + static constexpr FieldMetadata_Timeline kTimeline{}; void set_timeline(const char* data, size_t size) { AppendBytes(FieldMetadata_Timeline::kFieldId, data, size); } + void set_timeline(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Timeline::kFieldId, chars.data, chars.size); + } void set_timeline(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Timeline::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -88811,14 +85046,7 @@ class MmFilemapDeleteFromPageCacheFtraceEvent : public ::protozero::Message { uint64_t, MmFilemapDeleteFromPageCacheFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Pfn kPfn() { return {}; } + static constexpr FieldMetadata_Pfn kPfn{}; void set_pfn(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Pfn::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -88836,14 +85064,7 @@ class MmFilemapDeleteFromPageCacheFtraceEvent : public ::protozero::Message { uint64_t, MmFilemapDeleteFromPageCacheFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_IIno kIIno() { return {}; } + static constexpr FieldMetadata_IIno kIIno{}; void set_i_ino(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_IIno::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -88861,14 +85082,7 @@ class MmFilemapDeleteFromPageCacheFtraceEvent : public ::protozero::Message { uint64_t, MmFilemapDeleteFromPageCacheFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Index kIndex() { return {}; } + static constexpr FieldMetadata_Index kIndex{}; void set_index(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Index::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -88886,14 +85100,7 @@ class MmFilemapDeleteFromPageCacheFtraceEvent : public ::protozero::Message { uint64_t, MmFilemapDeleteFromPageCacheFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_SDev kSDev() { return {}; } + static constexpr FieldMetadata_SDev kSDev{}; void set_s_dev(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_SDev::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -88911,14 +85118,7 @@ class MmFilemapDeleteFromPageCacheFtraceEvent : public ::protozero::Message { uint64_t, MmFilemapDeleteFromPageCacheFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Page kPage() { return {}; } + static constexpr FieldMetadata_Page kPage{}; void set_page(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Page::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -88967,14 +85167,7 @@ class MmFilemapAddToPageCacheFtraceEvent : public ::protozero::Message { uint64_t, MmFilemapAddToPageCacheFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Pfn kPfn() { return {}; } + static constexpr FieldMetadata_Pfn kPfn{}; void set_pfn(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Pfn::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -88992,14 +85185,7 @@ class MmFilemapAddToPageCacheFtraceEvent : public ::protozero::Message { uint64_t, MmFilemapAddToPageCacheFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_IIno kIIno() { return {}; } + static constexpr FieldMetadata_IIno kIIno{}; void set_i_ino(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_IIno::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -89017,14 +85203,7 @@ class MmFilemapAddToPageCacheFtraceEvent : public ::protozero::Message { uint64_t, MmFilemapAddToPageCacheFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Index kIndex() { return {}; } + static constexpr FieldMetadata_Index kIndex{}; void set_index(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Index::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -89042,14 +85221,7 @@ class MmFilemapAddToPageCacheFtraceEvent : public ::protozero::Message { uint64_t, MmFilemapAddToPageCacheFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_SDev kSDev() { return {}; } + static constexpr FieldMetadata_SDev kSDev{}; void set_s_dev(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_SDev::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -89067,14 +85239,7 @@ class MmFilemapAddToPageCacheFtraceEvent : public ::protozero::Message { uint64_t, MmFilemapAddToPageCacheFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Page kPage() { return {}; } + static constexpr FieldMetadata_Page kPage{}; void set_page(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Page::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -89109,6 +85274,185 @@ namespace protos { namespace pbzero { +class FuncgraphExitFtraceEvent_Decoder : public ::protozero::TypedProtoDecoder { + public: + FuncgraphExitFtraceEvent_Decoder(const uint8_t* data, size_t len) : TypedProtoDecoder(data, len) {} + explicit FuncgraphExitFtraceEvent_Decoder(const std::string& raw) : TypedProtoDecoder(reinterpret_cast(raw.data()), raw.size()) {} + explicit FuncgraphExitFtraceEvent_Decoder(const ::protozero::ConstBytes& raw) : TypedProtoDecoder(raw.data, raw.size) {} + bool has_calltime() const { return at<1>().valid(); } + uint64_t calltime() const { return at<1>().as_uint64(); } + bool has_depth() const { return at<2>().valid(); } + int32_t depth() const { return at<2>().as_int32(); } + bool has_func() const { return at<3>().valid(); } + uint64_t func() const { return at<3>().as_uint64(); } + bool has_overrun() const { return at<4>().valid(); } + uint64_t overrun() const { return at<4>().as_uint64(); } + bool has_rettime() const { return at<5>().valid(); } + uint64_t rettime() const { return at<5>().as_uint64(); } +}; + +class FuncgraphExitFtraceEvent : public ::protozero::Message { + public: + using Decoder = FuncgraphExitFtraceEvent_Decoder; + enum : int32_t { + kCalltimeFieldNumber = 1, + kDepthFieldNumber = 2, + kFuncFieldNumber = 3, + kOverrunFieldNumber = 4, + kRettimeFieldNumber = 5, + }; + static constexpr const char* GetName() { return ".perfetto.protos.FuncgraphExitFtraceEvent"; } + + + using FieldMetadata_Calltime = + ::protozero::proto_utils::FieldMetadata< + 1, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint64, + uint64_t, + FuncgraphExitFtraceEvent>; + + static constexpr FieldMetadata_Calltime kCalltime{}; + void set_calltime(uint64_t value) { + static constexpr uint32_t field_id = FieldMetadata_Calltime::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint64> + ::Append(*this, field_id, value); + } + + using FieldMetadata_Depth = + ::protozero::proto_utils::FieldMetadata< + 2, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kInt32, + int32_t, + FuncgraphExitFtraceEvent>; + + static constexpr FieldMetadata_Depth kDepth{}; + void set_depth(int32_t value) { + static constexpr uint32_t field_id = FieldMetadata_Depth::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kInt32> + ::Append(*this, field_id, value); + } + + using FieldMetadata_Func = + ::protozero::proto_utils::FieldMetadata< + 3, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint64, + uint64_t, + FuncgraphExitFtraceEvent>; + + static constexpr FieldMetadata_Func kFunc{}; + void set_func(uint64_t value) { + static constexpr uint32_t field_id = FieldMetadata_Func::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint64> + ::Append(*this, field_id, value); + } + + using FieldMetadata_Overrun = + ::protozero::proto_utils::FieldMetadata< + 4, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint64, + uint64_t, + FuncgraphExitFtraceEvent>; + + static constexpr FieldMetadata_Overrun kOverrun{}; + void set_overrun(uint64_t value) { + static constexpr uint32_t field_id = FieldMetadata_Overrun::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint64> + ::Append(*this, field_id, value); + } + + using FieldMetadata_Rettime = + ::protozero::proto_utils::FieldMetadata< + 5, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint64, + uint64_t, + FuncgraphExitFtraceEvent>; + + static constexpr FieldMetadata_Rettime kRettime{}; + void set_rettime(uint64_t value) { + static constexpr uint32_t field_id = FieldMetadata_Rettime::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint64> + ::Append(*this, field_id, value); + } +}; + +class FuncgraphEntryFtraceEvent_Decoder : public ::protozero::TypedProtoDecoder { + public: + FuncgraphEntryFtraceEvent_Decoder(const uint8_t* data, size_t len) : TypedProtoDecoder(data, len) {} + explicit FuncgraphEntryFtraceEvent_Decoder(const std::string& raw) : TypedProtoDecoder(reinterpret_cast(raw.data()), raw.size()) {} + explicit FuncgraphEntryFtraceEvent_Decoder(const ::protozero::ConstBytes& raw) : TypedProtoDecoder(raw.data, raw.size) {} + bool has_depth() const { return at<1>().valid(); } + int32_t depth() const { return at<1>().as_int32(); } + bool has_func() const { return at<2>().valid(); } + uint64_t func() const { return at<2>().as_uint64(); } +}; + +class FuncgraphEntryFtraceEvent : public ::protozero::Message { + public: + using Decoder = FuncgraphEntryFtraceEvent_Decoder; + enum : int32_t { + kDepthFieldNumber = 1, + kFuncFieldNumber = 2, + }; + static constexpr const char* GetName() { return ".perfetto.protos.FuncgraphEntryFtraceEvent"; } + + + using FieldMetadata_Depth = + ::protozero::proto_utils::FieldMetadata< + 1, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kInt32, + int32_t, + FuncgraphEntryFtraceEvent>; + + static constexpr FieldMetadata_Depth kDepth{}; + void set_depth(int32_t value) { + static constexpr uint32_t field_id = FieldMetadata_Depth::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kInt32> + ::Append(*this, field_id, value); + } + + using FieldMetadata_Func = + ::protozero::proto_utils::FieldMetadata< + 2, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint64, + uint64_t, + FuncgraphEntryFtraceEvent>; + + static constexpr FieldMetadata_Func kFunc{}; + void set_func(uint64_t value) { + static constexpr uint32_t field_id = FieldMetadata_Func::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint64> + ::Append(*this, field_id, value); + } +}; + class PrintFtraceEvent_Decoder : public ::protozero::TypedProtoDecoder { public: PrintFtraceEvent_Decoder(const uint8_t* data, size_t len) : TypedProtoDecoder(data, len) {} @@ -89138,14 +85482,7 @@ class PrintFtraceEvent : public ::protozero::Message { uint64_t, PrintFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ip kIp() { return {}; } + static constexpr FieldMetadata_Ip kIp{}; void set_ip(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Ip::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -89163,17 +85500,13 @@ class PrintFtraceEvent : public ::protozero::Message { std::string, PrintFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Buf kBuf() { return {}; } + static constexpr FieldMetadata_Buf kBuf{}; void set_buf(const char* data, size_t size) { AppendBytes(FieldMetadata_Buf::kFieldId, data, size); } + void set_buf(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Buf::kFieldId, chars.data, chars.size); + } void set_buf(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Buf::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -89243,14 +85576,7 @@ class G2dTracingMarkWriteFtraceEvent : public ::protozero::Message { int32_t, G2dTracingMarkWriteFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Pid kPid() { return {}; } + static constexpr FieldMetadata_Pid kPid{}; void set_pid(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Pid::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -89268,17 +85594,13 @@ class G2dTracingMarkWriteFtraceEvent : public ::protozero::Message { std::string, G2dTracingMarkWriteFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Name kName() { return {}; } + static constexpr FieldMetadata_Name kName{}; void set_name(const char* data, size_t size) { AppendBytes(FieldMetadata_Name::kFieldId, data, size); } + void set_name(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Name::kFieldId, chars.data, chars.size); + } void set_name(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Name::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -89296,14 +85618,7 @@ class G2dTracingMarkWriteFtraceEvent : public ::protozero::Message { uint32_t, G2dTracingMarkWriteFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Type kType() { return {}; } + static constexpr FieldMetadata_Type kType{}; void set_type(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Type::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -89321,14 +85636,7 @@ class G2dTracingMarkWriteFtraceEvent : public ::protozero::Message { int32_t, G2dTracingMarkWriteFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Value kValue() { return {}; } + static constexpr FieldMetadata_Value kValue{}; void set_value(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Value::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -89395,14 +85703,7 @@ class GpuMemTotalFtraceEvent : public ::protozero::Message { uint32_t, GpuMemTotalFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_GpuId kGpuId() { return {}; } + static constexpr FieldMetadata_GpuId kGpuId{}; void set_gpu_id(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_GpuId::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -89420,14 +85721,7 @@ class GpuMemTotalFtraceEvent : public ::protozero::Message { uint32_t, GpuMemTotalFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Pid kPid() { return {}; } + static constexpr FieldMetadata_Pid kPid{}; void set_pid(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Pid::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -89445,14 +85739,7 @@ class GpuMemTotalFtraceEvent : public ::protozero::Message { uint64_t, GpuMemTotalFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Size kSize() { return {}; } + static constexpr FieldMetadata_Size kSize{}; void set_size(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Size::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -89513,14 +85800,7 @@ class DrmSchedProcessJobFtraceEvent : public ::protozero::Message { uint64_t, DrmSchedProcessJobFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Fence kFence() { return {}; } + static constexpr FieldMetadata_Fence kFence{}; void set_fence(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Fence::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -89572,14 +85852,7 @@ class DrmRunJobFtraceEvent : public ::protozero::Message { uint64_t, DrmRunJobFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Entity kEntity() { return {}; } + static constexpr FieldMetadata_Entity kEntity{}; void set_entity(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Entity::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -89597,14 +85870,7 @@ class DrmRunJobFtraceEvent : public ::protozero::Message { uint64_t, DrmRunJobFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Fence kFence() { return {}; } + static constexpr FieldMetadata_Fence kFence{}; void set_fence(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Fence::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -89622,14 +85888,7 @@ class DrmRunJobFtraceEvent : public ::protozero::Message { int32_t, DrmRunJobFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_HwJobCount kHwJobCount() { return {}; } + static constexpr FieldMetadata_HwJobCount kHwJobCount{}; void set_hw_job_count(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_HwJobCount::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -89647,14 +85906,7 @@ class DrmRunJobFtraceEvent : public ::protozero::Message { uint64_t, DrmRunJobFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Id kId() { return {}; } + static constexpr FieldMetadata_Id kId{}; void set_id(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Id::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -89672,14 +85924,7 @@ class DrmRunJobFtraceEvent : public ::protozero::Message { uint32_t, DrmRunJobFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_JobCount kJobCount() { return {}; } + static constexpr FieldMetadata_JobCount kJobCount{}; void set_job_count(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_JobCount::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -89697,17 +85942,13 @@ class DrmRunJobFtraceEvent : public ::protozero::Message { std::string, DrmRunJobFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Name kName() { return {}; } + static constexpr FieldMetadata_Name kName{}; void set_name(const char* data, size_t size) { AppendBytes(FieldMetadata_Name::kFieldId, data, size); } + void set_name(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Name::kFieldId, chars.data, chars.size); + } void set_name(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Name::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -89759,14 +86000,7 @@ class DrmSchedJobFtraceEvent : public ::protozero::Message { uint64_t, DrmSchedJobFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Entity kEntity() { return {}; } + static constexpr FieldMetadata_Entity kEntity{}; void set_entity(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Entity::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -89784,14 +86018,7 @@ class DrmSchedJobFtraceEvent : public ::protozero::Message { uint64_t, DrmSchedJobFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Fence kFence() { return {}; } + static constexpr FieldMetadata_Fence kFence{}; void set_fence(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Fence::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -89809,14 +86036,7 @@ class DrmSchedJobFtraceEvent : public ::protozero::Message { int32_t, DrmSchedJobFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_HwJobCount kHwJobCount() { return {}; } + static constexpr FieldMetadata_HwJobCount kHwJobCount{}; void set_hw_job_count(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_HwJobCount::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -89834,14 +86054,7 @@ class DrmSchedJobFtraceEvent : public ::protozero::Message { uint64_t, DrmSchedJobFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Id kId() { return {}; } + static constexpr FieldMetadata_Id kId{}; void set_id(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Id::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -89859,14 +86072,7 @@ class DrmSchedJobFtraceEvent : public ::protozero::Message { uint32_t, DrmSchedJobFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_JobCount kJobCount() { return {}; } + static constexpr FieldMetadata_JobCount kJobCount{}; void set_job_count(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_JobCount::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -89884,17 +86090,13 @@ class DrmSchedJobFtraceEvent : public ::protozero::Message { std::string, DrmSchedJobFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Name kName() { return {}; } + static constexpr FieldMetadata_Name kName{}; void set_name(const char* data, size_t size) { AppendBytes(FieldMetadata_Name::kFieldId, data, size); } + void set_name(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Name::kFieldId, chars.data, chars.size); + } void set_name(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Name::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -89905,6 +86107,232 @@ class DrmSchedJobFtraceEvent : public ::protozero::Message { } }; +} // Namespace. +} // Namespace. +} // Namespace. +#endif // Include guard. +// gen_amalgamated begin header: gen/protos/perfetto/trace/ftrace/hyp.pbzero.h +// Autogenerated by the ProtoZero compiler plugin. DO NOT EDIT. + +#ifndef PERFETTO_PROTOS_PROTOS_PERFETTO_TRACE_FTRACE_HYP_PROTO_H_ +#define PERFETTO_PROTOS_PROTOS_PERFETTO_TRACE_FTRACE_HYP_PROTO_H_ + +#include +#include + +// gen_amalgamated expanded: #include "perfetto/protozero/field_writer.h" +// gen_amalgamated expanded: #include "perfetto/protozero/message.h" +// gen_amalgamated expanded: #include "perfetto/protozero/packed_repeated_fields.h" +// gen_amalgamated expanded: #include "perfetto/protozero/proto_decoder.h" +// gen_amalgamated expanded: #include "perfetto/protozero/proto_utils.h" + +namespace perfetto { +namespace protos { +namespace pbzero { + + +class HostMemAbortFtraceEvent_Decoder : public ::protozero::TypedProtoDecoder { + public: + HostMemAbortFtraceEvent_Decoder(const uint8_t* data, size_t len) : TypedProtoDecoder(data, len) {} + explicit HostMemAbortFtraceEvent_Decoder(const std::string& raw) : TypedProtoDecoder(reinterpret_cast(raw.data()), raw.size()) {} + explicit HostMemAbortFtraceEvent_Decoder(const ::protozero::ConstBytes& raw) : TypedProtoDecoder(raw.data, raw.size) {} + bool has_esr() const { return at<1>().valid(); } + uint64_t esr() const { return at<1>().as_uint64(); } + bool has_addr() const { return at<2>().valid(); } + uint64_t addr() const { return at<2>().as_uint64(); } +}; + +class HostMemAbortFtraceEvent : public ::protozero::Message { + public: + using Decoder = HostMemAbortFtraceEvent_Decoder; + enum : int32_t { + kEsrFieldNumber = 1, + kAddrFieldNumber = 2, + }; + static constexpr const char* GetName() { return ".perfetto.protos.HostMemAbortFtraceEvent"; } + + + using FieldMetadata_Esr = + ::protozero::proto_utils::FieldMetadata< + 1, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint64, + uint64_t, + HostMemAbortFtraceEvent>; + + static constexpr FieldMetadata_Esr kEsr{}; + void set_esr(uint64_t value) { + static constexpr uint32_t field_id = FieldMetadata_Esr::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint64> + ::Append(*this, field_id, value); + } + + using FieldMetadata_Addr = + ::protozero::proto_utils::FieldMetadata< + 2, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint64, + uint64_t, + HostMemAbortFtraceEvent>; + + static constexpr FieldMetadata_Addr kAddr{}; + void set_addr(uint64_t value) { + static constexpr uint32_t field_id = FieldMetadata_Addr::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint64> + ::Append(*this, field_id, value); + } +}; + +class HostSmcFtraceEvent_Decoder : public ::protozero::TypedProtoDecoder { + public: + HostSmcFtraceEvent_Decoder(const uint8_t* data, size_t len) : TypedProtoDecoder(data, len) {} + explicit HostSmcFtraceEvent_Decoder(const std::string& raw) : TypedProtoDecoder(reinterpret_cast(raw.data()), raw.size()) {} + explicit HostSmcFtraceEvent_Decoder(const ::protozero::ConstBytes& raw) : TypedProtoDecoder(raw.data, raw.size) {} + bool has_id() const { return at<1>().valid(); } + uint64_t id() const { return at<1>().as_uint64(); } + bool has_forwarded() const { return at<2>().valid(); } + uint32_t forwarded() const { return at<2>().as_uint32(); } +}; + +class HostSmcFtraceEvent : public ::protozero::Message { + public: + using Decoder = HostSmcFtraceEvent_Decoder; + enum : int32_t { + kIdFieldNumber = 1, + kForwardedFieldNumber = 2, + }; + static constexpr const char* GetName() { return ".perfetto.protos.HostSmcFtraceEvent"; } + + + using FieldMetadata_Id = + ::protozero::proto_utils::FieldMetadata< + 1, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint64, + uint64_t, + HostSmcFtraceEvent>; + + static constexpr FieldMetadata_Id kId{}; + void set_id(uint64_t value) { + static constexpr uint32_t field_id = FieldMetadata_Id::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint64> + ::Append(*this, field_id, value); + } + + using FieldMetadata_Forwarded = + ::protozero::proto_utils::FieldMetadata< + 2, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint32, + uint32_t, + HostSmcFtraceEvent>; + + static constexpr FieldMetadata_Forwarded kForwarded{}; + void set_forwarded(uint32_t value) { + static constexpr uint32_t field_id = FieldMetadata_Forwarded::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint32> + ::Append(*this, field_id, value); + } +}; + +class HostHcallFtraceEvent_Decoder : public ::protozero::TypedProtoDecoder { + public: + HostHcallFtraceEvent_Decoder(const uint8_t* data, size_t len) : TypedProtoDecoder(data, len) {} + explicit HostHcallFtraceEvent_Decoder(const std::string& raw) : TypedProtoDecoder(reinterpret_cast(raw.data()), raw.size()) {} + explicit HostHcallFtraceEvent_Decoder(const ::protozero::ConstBytes& raw) : TypedProtoDecoder(raw.data, raw.size) {} + bool has_id() const { return at<1>().valid(); } + uint32_t id() const { return at<1>().as_uint32(); } + bool has_invalid() const { return at<2>().valid(); } + uint32_t invalid() const { return at<2>().as_uint32(); } +}; + +class HostHcallFtraceEvent : public ::protozero::Message { + public: + using Decoder = HostHcallFtraceEvent_Decoder; + enum : int32_t { + kIdFieldNumber = 1, + kInvalidFieldNumber = 2, + }; + static constexpr const char* GetName() { return ".perfetto.protos.HostHcallFtraceEvent"; } + + + using FieldMetadata_Id = + ::protozero::proto_utils::FieldMetadata< + 1, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint32, + uint32_t, + HostHcallFtraceEvent>; + + static constexpr FieldMetadata_Id kId{}; + void set_id(uint32_t value) { + static constexpr uint32_t field_id = FieldMetadata_Id::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint32> + ::Append(*this, field_id, value); + } + + using FieldMetadata_Invalid = + ::protozero::proto_utils::FieldMetadata< + 2, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint32, + uint32_t, + HostHcallFtraceEvent>; + + static constexpr FieldMetadata_Invalid kInvalid{}; + void set_invalid(uint32_t value) { + static constexpr uint32_t field_id = FieldMetadata_Invalid::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint32> + ::Append(*this, field_id, value); + } +}; + +class HypExitFtraceEvent_Decoder : public ::protozero::TypedProtoDecoder { + public: + HypExitFtraceEvent_Decoder(const uint8_t* data, size_t len) : TypedProtoDecoder(data, len) {} + explicit HypExitFtraceEvent_Decoder(const std::string& raw) : TypedProtoDecoder(reinterpret_cast(raw.data()), raw.size()) {} + explicit HypExitFtraceEvent_Decoder(const ::protozero::ConstBytes& raw) : TypedProtoDecoder(raw.data, raw.size) {} +}; + +class HypExitFtraceEvent : public ::protozero::Message { + public: + using Decoder = HypExitFtraceEvent_Decoder; + static constexpr const char* GetName() { return ".perfetto.protos.HypExitFtraceEvent"; } + +}; + +class HypEnterFtraceEvent_Decoder : public ::protozero::TypedProtoDecoder { + public: + HypEnterFtraceEvent_Decoder(const uint8_t* data, size_t len) : TypedProtoDecoder(data, len) {} + explicit HypEnterFtraceEvent_Decoder(const std::string& raw) : TypedProtoDecoder(reinterpret_cast(raw.data()), raw.size()) {} + explicit HypEnterFtraceEvent_Decoder(const ::protozero::ConstBytes& raw) : TypedProtoDecoder(raw.data, raw.size) {} +}; + +class HypEnterFtraceEvent : public ::protozero::Message { + public: + using Decoder = HypEnterFtraceEvent_Decoder; + static constexpr const char* GetName() { return ".perfetto.protos.HypEnterFtraceEvent"; } + +}; + } // Namespace. } // Namespace. } // Namespace. @@ -89970,14 +86398,7 @@ class SmbusReplyFtraceEvent : public ::protozero::Message { int32_t, SmbusReplyFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_AdapterNr kAdapterNr() { return {}; } + static constexpr FieldMetadata_AdapterNr kAdapterNr{}; void set_adapter_nr(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_AdapterNr::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -89995,14 +86416,7 @@ class SmbusReplyFtraceEvent : public ::protozero::Message { uint32_t, SmbusReplyFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Addr kAddr() { return {}; } + static constexpr FieldMetadata_Addr kAddr{}; void set_addr(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Addr::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -90020,14 +86434,7 @@ class SmbusReplyFtraceEvent : public ::protozero::Message { uint32_t, SmbusReplyFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Flags kFlags() { return {}; } + static constexpr FieldMetadata_Flags kFlags{}; void set_flags(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Flags::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -90045,14 +86452,7 @@ class SmbusReplyFtraceEvent : public ::protozero::Message { uint32_t, SmbusReplyFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Command kCommand() { return {}; } + static constexpr FieldMetadata_Command kCommand{}; void set_command(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Command::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -90070,14 +86470,7 @@ class SmbusReplyFtraceEvent : public ::protozero::Message { uint32_t, SmbusReplyFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Len kLen() { return {}; } + static constexpr FieldMetadata_Len kLen{}; void set_len(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Len::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -90095,14 +86488,7 @@ class SmbusReplyFtraceEvent : public ::protozero::Message { uint32_t, SmbusReplyFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Protocol kProtocol() { return {}; } + static constexpr FieldMetadata_Protocol kProtocol{}; void set_protocol(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Protocol::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -90157,14 +86543,7 @@ class SmbusResultFtraceEvent : public ::protozero::Message { int32_t, SmbusResultFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_AdapterNr kAdapterNr() { return {}; } + static constexpr FieldMetadata_AdapterNr kAdapterNr{}; void set_adapter_nr(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_AdapterNr::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -90182,14 +86561,7 @@ class SmbusResultFtraceEvent : public ::protozero::Message { uint32_t, SmbusResultFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Addr kAddr() { return {}; } + static constexpr FieldMetadata_Addr kAddr{}; void set_addr(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Addr::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -90207,14 +86579,7 @@ class SmbusResultFtraceEvent : public ::protozero::Message { uint32_t, SmbusResultFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Flags kFlags() { return {}; } + static constexpr FieldMetadata_Flags kFlags{}; void set_flags(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Flags::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -90232,14 +86597,7 @@ class SmbusResultFtraceEvent : public ::protozero::Message { uint32_t, SmbusResultFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ReadWrite kReadWrite() { return {}; } + static constexpr FieldMetadata_ReadWrite kReadWrite{}; void set_read_write(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_ReadWrite::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -90257,14 +86615,7 @@ class SmbusResultFtraceEvent : public ::protozero::Message { uint32_t, SmbusResultFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Command kCommand() { return {}; } + static constexpr FieldMetadata_Command kCommand{}; void set_command(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Command::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -90282,14 +86633,7 @@ class SmbusResultFtraceEvent : public ::protozero::Message { int32_t, SmbusResultFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Res kRes() { return {}; } + static constexpr FieldMetadata_Res kRes{}; void set_res(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Res::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -90307,14 +86651,7 @@ class SmbusResultFtraceEvent : public ::protozero::Message { uint32_t, SmbusResultFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Protocol kProtocol() { return {}; } + static constexpr FieldMetadata_Protocol kProtocol{}; void set_protocol(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Protocol::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -90366,14 +86703,7 @@ class SmbusWriteFtraceEvent : public ::protozero::Message { int32_t, SmbusWriteFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_AdapterNr kAdapterNr() { return {}; } + static constexpr FieldMetadata_AdapterNr kAdapterNr{}; void set_adapter_nr(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_AdapterNr::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -90391,14 +86721,7 @@ class SmbusWriteFtraceEvent : public ::protozero::Message { uint32_t, SmbusWriteFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Addr kAddr() { return {}; } + static constexpr FieldMetadata_Addr kAddr{}; void set_addr(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Addr::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -90416,14 +86739,7 @@ class SmbusWriteFtraceEvent : public ::protozero::Message { uint32_t, SmbusWriteFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Flags kFlags() { return {}; } + static constexpr FieldMetadata_Flags kFlags{}; void set_flags(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Flags::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -90441,14 +86757,7 @@ class SmbusWriteFtraceEvent : public ::protozero::Message { uint32_t, SmbusWriteFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Command kCommand() { return {}; } + static constexpr FieldMetadata_Command kCommand{}; void set_command(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Command::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -90466,14 +86775,7 @@ class SmbusWriteFtraceEvent : public ::protozero::Message { uint32_t, SmbusWriteFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Len kLen() { return {}; } + static constexpr FieldMetadata_Len kLen{}; void set_len(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Len::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -90491,14 +86793,7 @@ class SmbusWriteFtraceEvent : public ::protozero::Message { uint32_t, SmbusWriteFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Protocol kProtocol() { return {}; } + static constexpr FieldMetadata_Protocol kProtocol{}; void set_protocol(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Protocol::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -90547,14 +86842,7 @@ class SmbusReadFtraceEvent : public ::protozero::Message { int32_t, SmbusReadFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_AdapterNr kAdapterNr() { return {}; } + static constexpr FieldMetadata_AdapterNr kAdapterNr{}; void set_adapter_nr(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_AdapterNr::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -90572,14 +86860,7 @@ class SmbusReadFtraceEvent : public ::protozero::Message { uint32_t, SmbusReadFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Flags kFlags() { return {}; } + static constexpr FieldMetadata_Flags kFlags{}; void set_flags(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Flags::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -90597,14 +86878,7 @@ class SmbusReadFtraceEvent : public ::protozero::Message { uint32_t, SmbusReadFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Addr kAddr() { return {}; } + static constexpr FieldMetadata_Addr kAddr{}; void set_addr(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Addr::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -90622,14 +86896,7 @@ class SmbusReadFtraceEvent : public ::protozero::Message { uint32_t, SmbusReadFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Command kCommand() { return {}; } + static constexpr FieldMetadata_Command kCommand{}; void set_command(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Command::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -90647,14 +86914,7 @@ class SmbusReadFtraceEvent : public ::protozero::Message { uint32_t, SmbusReadFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Protocol kProtocol() { return {}; } + static constexpr FieldMetadata_Protocol kProtocol{}; void set_protocol(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Protocol::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -90706,14 +86966,7 @@ class I2cReplyFtraceEvent : public ::protozero::Message { int32_t, I2cReplyFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_AdapterNr kAdapterNr() { return {}; } + static constexpr FieldMetadata_AdapterNr kAdapterNr{}; void set_adapter_nr(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_AdapterNr::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -90731,14 +86984,7 @@ class I2cReplyFtraceEvent : public ::protozero::Message { uint32_t, I2cReplyFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_MsgNr kMsgNr() { return {}; } + static constexpr FieldMetadata_MsgNr kMsgNr{}; void set_msg_nr(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_MsgNr::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -90756,14 +87002,7 @@ class I2cReplyFtraceEvent : public ::protozero::Message { uint32_t, I2cReplyFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Addr kAddr() { return {}; } + static constexpr FieldMetadata_Addr kAddr{}; void set_addr(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Addr::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -90781,14 +87020,7 @@ class I2cReplyFtraceEvent : public ::protozero::Message { uint32_t, I2cReplyFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Flags kFlags() { return {}; } + static constexpr FieldMetadata_Flags kFlags{}; void set_flags(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Flags::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -90806,14 +87038,7 @@ class I2cReplyFtraceEvent : public ::protozero::Message { uint32_t, I2cReplyFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Len kLen() { return {}; } + static constexpr FieldMetadata_Len kLen{}; void set_len(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Len::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -90831,14 +87056,7 @@ class I2cReplyFtraceEvent : public ::protozero::Message { uint32_t, I2cReplyFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Buf kBuf() { return {}; } + static constexpr FieldMetadata_Buf kBuf{}; void set_buf(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Buf::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -90881,14 +87099,7 @@ class I2cResultFtraceEvent : public ::protozero::Message { int32_t, I2cResultFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_AdapterNr kAdapterNr() { return {}; } + static constexpr FieldMetadata_AdapterNr kAdapterNr{}; void set_adapter_nr(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_AdapterNr::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -90906,14 +87117,7 @@ class I2cResultFtraceEvent : public ::protozero::Message { uint32_t, I2cResultFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_NrMsgs kNrMsgs() { return {}; } + static constexpr FieldMetadata_NrMsgs kNrMsgs{}; void set_nr_msgs(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_NrMsgs::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -90931,14 +87135,7 @@ class I2cResultFtraceEvent : public ::protozero::Message { int32_t, I2cResultFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ret kRet() { return {}; } + static constexpr FieldMetadata_Ret kRet{}; void set_ret(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Ret::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -90990,14 +87187,7 @@ class I2cWriteFtraceEvent : public ::protozero::Message { int32_t, I2cWriteFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_AdapterNr kAdapterNr() { return {}; } + static constexpr FieldMetadata_AdapterNr kAdapterNr{}; void set_adapter_nr(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_AdapterNr::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -91015,14 +87205,7 @@ class I2cWriteFtraceEvent : public ::protozero::Message { uint32_t, I2cWriteFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_MsgNr kMsgNr() { return {}; } + static constexpr FieldMetadata_MsgNr kMsgNr{}; void set_msg_nr(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_MsgNr::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -91040,14 +87223,7 @@ class I2cWriteFtraceEvent : public ::protozero::Message { uint32_t, I2cWriteFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Addr kAddr() { return {}; } + static constexpr FieldMetadata_Addr kAddr{}; void set_addr(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Addr::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -91065,14 +87241,7 @@ class I2cWriteFtraceEvent : public ::protozero::Message { uint32_t, I2cWriteFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Flags kFlags() { return {}; } + static constexpr FieldMetadata_Flags kFlags{}; void set_flags(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Flags::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -91090,14 +87259,7 @@ class I2cWriteFtraceEvent : public ::protozero::Message { uint32_t, I2cWriteFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Len kLen() { return {}; } + static constexpr FieldMetadata_Len kLen{}; void set_len(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Len::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -91115,14 +87277,7 @@ class I2cWriteFtraceEvent : public ::protozero::Message { uint32_t, I2cWriteFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Buf kBuf() { return {}; } + static constexpr FieldMetadata_Buf kBuf{}; void set_buf(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Buf::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -91171,14 +87326,7 @@ class I2cReadFtraceEvent : public ::protozero::Message { int32_t, I2cReadFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_AdapterNr kAdapterNr() { return {}; } + static constexpr FieldMetadata_AdapterNr kAdapterNr{}; void set_adapter_nr(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_AdapterNr::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -91196,14 +87344,7 @@ class I2cReadFtraceEvent : public ::protozero::Message { uint32_t, I2cReadFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_MsgNr kMsgNr() { return {}; } + static constexpr FieldMetadata_MsgNr kMsgNr{}; void set_msg_nr(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_MsgNr::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -91221,14 +87362,7 @@ class I2cReadFtraceEvent : public ::protozero::Message { uint32_t, I2cReadFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Addr kAddr() { return {}; } + static constexpr FieldMetadata_Addr kAddr{}; void set_addr(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Addr::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -91246,14 +87380,7 @@ class I2cReadFtraceEvent : public ::protozero::Message { uint32_t, I2cReadFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Flags kFlags() { return {}; } + static constexpr FieldMetadata_Flags kFlags{}; void set_flags(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Flags::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -91271,14 +87398,7 @@ class I2cReadFtraceEvent : public ::protozero::Message { uint32_t, I2cReadFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Len kLen() { return {}; } + static constexpr FieldMetadata_Len kLen{}; void set_len(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Len::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -91345,14 +87465,7 @@ class IonStatFtraceEvent : public ::protozero::Message { uint32_t, IonStatFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_BufferId kBufferId() { return {}; } + static constexpr FieldMetadata_BufferId kBufferId{}; void set_buffer_id(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_BufferId::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -91370,14 +87483,7 @@ class IonStatFtraceEvent : public ::protozero::Message { int64_t, IonStatFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Len kLen() { return {}; } + static constexpr FieldMetadata_Len kLen{}; void set_len(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_Len::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -91395,14 +87501,7 @@ class IonStatFtraceEvent : public ::protozero::Message { uint64_t, IonStatFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_TotalAllocated kTotalAllocated() { return {}; } + static constexpr FieldMetadata_TotalAllocated kTotalAllocated{}; void set_total_allocated(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_TotalAllocated::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -91466,14 +87565,7 @@ class IpiRaiseFtraceEvent : public ::protozero::Message { uint32_t, IpiRaiseFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_TargetCpus kTargetCpus() { return {}; } + static constexpr FieldMetadata_TargetCpus kTargetCpus{}; void set_target_cpus(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_TargetCpus::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -91491,17 +87583,13 @@ class IpiRaiseFtraceEvent : public ::protozero::Message { std::string, IpiRaiseFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Reason kReason() { return {}; } + static constexpr FieldMetadata_Reason kReason{}; void set_reason(const char* data, size_t size) { AppendBytes(FieldMetadata_Reason::kFieldId, data, size); } + void set_reason(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Reason::kFieldId, chars.data, chars.size); + } void set_reason(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Reason::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -91538,17 +87626,13 @@ class IpiExitFtraceEvent : public ::protozero::Message { std::string, IpiExitFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Reason kReason() { return {}; } + static constexpr FieldMetadata_Reason kReason{}; void set_reason(const char* data, size_t size) { AppendBytes(FieldMetadata_Reason::kFieldId, data, size); } + void set_reason(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Reason::kFieldId, chars.data, chars.size); + } void set_reason(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Reason::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -91585,17 +87669,13 @@ class IpiEntryFtraceEvent : public ::protozero::Message { std::string, IpiEntryFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Reason kReason() { return {}; } + static constexpr FieldMetadata_Reason kReason{}; void set_reason(const char* data, size_t size) { AppendBytes(FieldMetadata_Reason::kFieldId, data, size); } + void set_reason(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Reason::kFieldId, chars.data, chars.size); + } void set_reason(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Reason::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -91659,14 +87739,7 @@ class IrqHandlerExitFtraceEvent : public ::protozero::Message { int32_t, IrqHandlerExitFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Irq kIrq() { return {}; } + static constexpr FieldMetadata_Irq kIrq{}; void set_irq(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Irq::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -91684,14 +87757,7 @@ class IrqHandlerExitFtraceEvent : public ::protozero::Message { int32_t, IrqHandlerExitFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ret kRet() { return {}; } + static constexpr FieldMetadata_Ret kRet{}; void set_ret(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Ret::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -91734,14 +87800,7 @@ class IrqHandlerEntryFtraceEvent : public ::protozero::Message { int32_t, IrqHandlerEntryFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Irq kIrq() { return {}; } + static constexpr FieldMetadata_Irq kIrq{}; void set_irq(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Irq::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -91759,17 +87818,13 @@ class IrqHandlerEntryFtraceEvent : public ::protozero::Message { std::string, IrqHandlerEntryFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Name kName() { return {}; } + static constexpr FieldMetadata_Name kName{}; void set_name(const char* data, size_t size) { AppendBytes(FieldMetadata_Name::kFieldId, data, size); } + void set_name(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Name::kFieldId, chars.data, chars.size); + } void set_name(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Name::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -91787,14 +87842,7 @@ class IrqHandlerEntryFtraceEvent : public ::protozero::Message { uint32_t, IrqHandlerEntryFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Handler kHandler() { return {}; } + static constexpr FieldMetadata_Handler kHandler{}; void set_handler(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Handler::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -91831,14 +87879,7 @@ class SoftirqRaiseFtraceEvent : public ::protozero::Message { uint32_t, SoftirqRaiseFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Vec kVec() { return {}; } + static constexpr FieldMetadata_Vec kVec{}; void set_vec(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Vec::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -91875,14 +87916,7 @@ class SoftirqExitFtraceEvent : public ::protozero::Message { uint32_t, SoftirqExitFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Vec kVec() { return {}; } + static constexpr FieldMetadata_Vec kVec{}; void set_vec(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Vec::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -91919,14 +87953,7 @@ class SoftirqEntryFtraceEvent : public ::protozero::Message { uint32_t, SoftirqEntryFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Vec kVec() { return {}; } + static constexpr FieldMetadata_Vec kVec{}; void set_vec(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Vec::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -91990,14 +88017,7 @@ class IonBufferDestroyFtraceEvent : public ::protozero::Message { uint64_t, IonBufferDestroyFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Addr kAddr() { return {}; } + static constexpr FieldMetadata_Addr kAddr{}; void set_addr(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Addr::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -92015,14 +88035,7 @@ class IonBufferDestroyFtraceEvent : public ::protozero::Message { uint64_t, IonBufferDestroyFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Len kLen() { return {}; } + static constexpr FieldMetadata_Len kLen{}; void set_len(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Len::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -92062,14 +88075,7 @@ class IonBufferCreateFtraceEvent : public ::protozero::Message { uint64_t, IonBufferCreateFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Addr kAddr() { return {}; } + static constexpr FieldMetadata_Addr kAddr{}; void set_addr(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Addr::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -92087,14 +88093,7 @@ class IonBufferCreateFtraceEvent : public ::protozero::Message { uint64_t, IonBufferCreateFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Len kLen() { return {}; } + static constexpr FieldMetadata_Len kLen{}; void set_len(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Len::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -92137,17 +88136,13 @@ class IonHeapGrowFtraceEvent : public ::protozero::Message { std::string, IonHeapGrowFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_HeapName kHeapName() { return {}; } + static constexpr FieldMetadata_HeapName kHeapName{}; void set_heap_name(const char* data, size_t size) { AppendBytes(FieldMetadata_HeapName::kFieldId, data, size); } + void set_heap_name(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_HeapName::kFieldId, chars.data, chars.size); + } void set_heap_name(std::string value) { static constexpr uint32_t field_id = FieldMetadata_HeapName::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -92165,14 +88160,7 @@ class IonHeapGrowFtraceEvent : public ::protozero::Message { uint64_t, IonHeapGrowFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Len kLen() { return {}; } + static constexpr FieldMetadata_Len kLen{}; void set_len(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Len::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -92190,14 +88178,7 @@ class IonHeapGrowFtraceEvent : public ::protozero::Message { int64_t, IonHeapGrowFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_TotalAllocated kTotalAllocated() { return {}; } + static constexpr FieldMetadata_TotalAllocated kTotalAllocated{}; void set_total_allocated(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_TotalAllocated::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -92240,17 +88221,13 @@ class IonHeapShrinkFtraceEvent : public ::protozero::Message { std::string, IonHeapShrinkFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_HeapName kHeapName() { return {}; } + static constexpr FieldMetadata_HeapName kHeapName{}; void set_heap_name(const char* data, size_t size) { AppendBytes(FieldMetadata_HeapName::kFieldId, data, size); } + void set_heap_name(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_HeapName::kFieldId, chars.data, chars.size); + } void set_heap_name(std::string value) { static constexpr uint32_t field_id = FieldMetadata_HeapName::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -92268,14 +88245,7 @@ class IonHeapShrinkFtraceEvent : public ::protozero::Message { uint64_t, IonHeapShrinkFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Len kLen() { return {}; } + static constexpr FieldMetadata_Len kLen{}; void set_len(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Len::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -92293,14 +88263,7 @@ class IonHeapShrinkFtraceEvent : public ::protozero::Message { int64_t, IonHeapShrinkFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_TotalAllocated kTotalAllocated() { return {}; } + static constexpr FieldMetadata_TotalAllocated kTotalAllocated{}; void set_total_allocated(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_TotalAllocated::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -92346,14 +88309,7 @@ class RssStatFtraceEvent : public ::protozero::Message { int32_t, RssStatFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Member kMember() { return {}; } + static constexpr FieldMetadata_Member kMember{}; void set_member(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Member::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -92371,14 +88327,7 @@ class RssStatFtraceEvent : public ::protozero::Message { int64_t, RssStatFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Size kSize() { return {}; } + static constexpr FieldMetadata_Size kSize{}; void set_size(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_Size::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -92396,14 +88345,7 @@ class RssStatFtraceEvent : public ::protozero::Message { uint32_t, RssStatFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Curr kCurr() { return {}; } + static constexpr FieldMetadata_Curr kCurr{}; void set_curr(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Curr::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -92421,14 +88363,7 @@ class RssStatFtraceEvent : public ::protozero::Message { uint32_t, RssStatFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_MmId kMmId() { return {}; } + static constexpr FieldMetadata_MmId kMmId{}; void set_mm_id(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_MmId::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -92474,14 +88409,7 @@ class MmPagePcpuDrainFtraceEvent : public ::protozero::Message { int32_t, MmPagePcpuDrainFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Migratetype kMigratetype() { return {}; } + static constexpr FieldMetadata_Migratetype kMigratetype{}; void set_migratetype(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Migratetype::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -92499,14 +88427,7 @@ class MmPagePcpuDrainFtraceEvent : public ::protozero::Message { uint32_t, MmPagePcpuDrainFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Order kOrder() { return {}; } + static constexpr FieldMetadata_Order kOrder{}; void set_order(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Order::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -92524,14 +88445,7 @@ class MmPagePcpuDrainFtraceEvent : public ::protozero::Message { uint64_t, MmPagePcpuDrainFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Page kPage() { return {}; } + static constexpr FieldMetadata_Page kPage{}; void set_page(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Page::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -92549,14 +88463,7 @@ class MmPagePcpuDrainFtraceEvent : public ::protozero::Message { uint64_t, MmPagePcpuDrainFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Pfn kPfn() { return {}; } + static constexpr FieldMetadata_Pfn kPfn{}; void set_pfn(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Pfn::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -92599,14 +88506,7 @@ class MmPageFreeBatchedFtraceEvent : public ::protozero::Message { int32_t, MmPageFreeBatchedFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Cold kCold() { return {}; } + static constexpr FieldMetadata_Cold kCold{}; void set_cold(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Cold::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -92624,14 +88524,7 @@ class MmPageFreeBatchedFtraceEvent : public ::protozero::Message { uint64_t, MmPageFreeBatchedFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Page kPage() { return {}; } + static constexpr FieldMetadata_Page kPage{}; void set_page(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Page::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -92649,14 +88542,7 @@ class MmPageFreeBatchedFtraceEvent : public ::protozero::Message { uint64_t, MmPageFreeBatchedFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Pfn kPfn() { return {}; } + static constexpr FieldMetadata_Pfn kPfn{}; void set_pfn(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Pfn::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -92699,14 +88585,7 @@ class MmPageFreeFtraceEvent : public ::protozero::Message { uint32_t, MmPageFreeFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Order kOrder() { return {}; } + static constexpr FieldMetadata_Order kOrder{}; void set_order(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Order::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -92724,14 +88603,7 @@ class MmPageFreeFtraceEvent : public ::protozero::Message { uint64_t, MmPageFreeFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Page kPage() { return {}; } + static constexpr FieldMetadata_Page kPage{}; void set_page(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Page::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -92749,14 +88621,7 @@ class MmPageFreeFtraceEvent : public ::protozero::Message { uint64_t, MmPageFreeFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Pfn kPfn() { return {}; } + static constexpr FieldMetadata_Pfn kPfn{}; void set_pfn(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Pfn::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -92802,14 +88667,7 @@ class MmPageAllocZoneLockedFtraceEvent : public ::protozero::Message { int32_t, MmPageAllocZoneLockedFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Migratetype kMigratetype() { return {}; } + static constexpr FieldMetadata_Migratetype kMigratetype{}; void set_migratetype(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Migratetype::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -92827,14 +88685,7 @@ class MmPageAllocZoneLockedFtraceEvent : public ::protozero::Message { uint32_t, MmPageAllocZoneLockedFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Order kOrder() { return {}; } + static constexpr FieldMetadata_Order kOrder{}; void set_order(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Order::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -92852,14 +88703,7 @@ class MmPageAllocZoneLockedFtraceEvent : public ::protozero::Message { uint64_t, MmPageAllocZoneLockedFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Page kPage() { return {}; } + static constexpr FieldMetadata_Page kPage{}; void set_page(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Page::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -92877,14 +88721,7 @@ class MmPageAllocZoneLockedFtraceEvent : public ::protozero::Message { uint64_t, MmPageAllocZoneLockedFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Pfn kPfn() { return {}; } + static constexpr FieldMetadata_Pfn kPfn{}; void set_pfn(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Pfn::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -92939,14 +88776,7 @@ class MmPageAllocExtfragFtraceEvent : public ::protozero::Message { int32_t, MmPageAllocExtfragFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_AllocMigratetype kAllocMigratetype() { return {}; } + static constexpr FieldMetadata_AllocMigratetype kAllocMigratetype{}; void set_alloc_migratetype(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_AllocMigratetype::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -92964,14 +88794,7 @@ class MmPageAllocExtfragFtraceEvent : public ::protozero::Message { int32_t, MmPageAllocExtfragFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_AllocOrder kAllocOrder() { return {}; } + static constexpr FieldMetadata_AllocOrder kAllocOrder{}; void set_alloc_order(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_AllocOrder::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -92989,14 +88812,7 @@ class MmPageAllocExtfragFtraceEvent : public ::protozero::Message { int32_t, MmPageAllocExtfragFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_FallbackMigratetype kFallbackMigratetype() { return {}; } + static constexpr FieldMetadata_FallbackMigratetype kFallbackMigratetype{}; void set_fallback_migratetype(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_FallbackMigratetype::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -93014,14 +88830,7 @@ class MmPageAllocExtfragFtraceEvent : public ::protozero::Message { int32_t, MmPageAllocExtfragFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_FallbackOrder kFallbackOrder() { return {}; } + static constexpr FieldMetadata_FallbackOrder kFallbackOrder{}; void set_fallback_order(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_FallbackOrder::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -93039,14 +88848,7 @@ class MmPageAllocExtfragFtraceEvent : public ::protozero::Message { uint64_t, MmPageAllocExtfragFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Page kPage() { return {}; } + static constexpr FieldMetadata_Page kPage{}; void set_page(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Page::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -93064,14 +88866,7 @@ class MmPageAllocExtfragFtraceEvent : public ::protozero::Message { int32_t, MmPageAllocExtfragFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ChangeOwnership kChangeOwnership() { return {}; } + static constexpr FieldMetadata_ChangeOwnership kChangeOwnership{}; void set_change_ownership(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_ChangeOwnership::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -93089,14 +88884,7 @@ class MmPageAllocExtfragFtraceEvent : public ::protozero::Message { uint64_t, MmPageAllocExtfragFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Pfn kPfn() { return {}; } + static constexpr FieldMetadata_Pfn kPfn{}; void set_pfn(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Pfn::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -93145,14 +88933,7 @@ class MmPageAllocFtraceEvent : public ::protozero::Message { uint32_t, MmPageAllocFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_GfpFlags kGfpFlags() { return {}; } + static constexpr FieldMetadata_GfpFlags kGfpFlags{}; void set_gfp_flags(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_GfpFlags::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -93170,14 +88951,7 @@ class MmPageAllocFtraceEvent : public ::protozero::Message { int32_t, MmPageAllocFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Migratetype kMigratetype() { return {}; } + static constexpr FieldMetadata_Migratetype kMigratetype{}; void set_migratetype(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Migratetype::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -93195,14 +88969,7 @@ class MmPageAllocFtraceEvent : public ::protozero::Message { uint32_t, MmPageAllocFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Order kOrder() { return {}; } + static constexpr FieldMetadata_Order kOrder{}; void set_order(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Order::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -93220,14 +88987,7 @@ class MmPageAllocFtraceEvent : public ::protozero::Message { uint64_t, MmPageAllocFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Page kPage() { return {}; } + static constexpr FieldMetadata_Page kPage{}; void set_page(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Page::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -93245,14 +89005,7 @@ class MmPageAllocFtraceEvent : public ::protozero::Message { uint64_t, MmPageAllocFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Pfn kPfn() { return {}; } + static constexpr FieldMetadata_Pfn kPfn{}; void set_pfn(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Pfn::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -93289,14 +89042,7 @@ class MigrateRetryFtraceEvent : public ::protozero::Message { int32_t, MigrateRetryFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Tries kTries() { return {}; } + static constexpr FieldMetadata_Tries kTries{}; void set_tries(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Tries::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -93333,14 +89079,7 @@ class MigratePagesStartFtraceEvent : public ::protozero::Message { int32_t, MigratePagesStartFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Mode kMode() { return {}; } + static constexpr FieldMetadata_Mode kMode{}; void set_mode(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Mode::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -93377,14 +89116,7 @@ class MigratePagesEndFtraceEvent : public ::protozero::Message { int32_t, MigratePagesEndFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Mode kMode() { return {}; } + static constexpr FieldMetadata_Mode kMode{}; void set_mode(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Mode::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -93424,14 +89156,7 @@ class KmemCacheFreeFtraceEvent : public ::protozero::Message { uint64_t, KmemCacheFreeFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_CallSite kCallSite() { return {}; } + static constexpr FieldMetadata_CallSite kCallSite{}; void set_call_site(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_CallSite::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -93449,14 +89174,7 @@ class KmemCacheFreeFtraceEvent : public ::protozero::Message { uint64_t, KmemCacheFreeFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ptr kPtr() { return {}; } + static constexpr FieldMetadata_Ptr kPtr{}; void set_ptr(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Ptr::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -93508,14 +89226,7 @@ class KmemCacheAllocNodeFtraceEvent : public ::protozero::Message { uint64_t, KmemCacheAllocNodeFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_BytesAlloc kBytesAlloc() { return {}; } + static constexpr FieldMetadata_BytesAlloc kBytesAlloc{}; void set_bytes_alloc(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_BytesAlloc::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -93533,14 +89244,7 @@ class KmemCacheAllocNodeFtraceEvent : public ::protozero::Message { uint64_t, KmemCacheAllocNodeFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_BytesReq kBytesReq() { return {}; } + static constexpr FieldMetadata_BytesReq kBytesReq{}; void set_bytes_req(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_BytesReq::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -93558,14 +89262,7 @@ class KmemCacheAllocNodeFtraceEvent : public ::protozero::Message { uint64_t, KmemCacheAllocNodeFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_CallSite kCallSite() { return {}; } + static constexpr FieldMetadata_CallSite kCallSite{}; void set_call_site(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_CallSite::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -93583,14 +89280,7 @@ class KmemCacheAllocNodeFtraceEvent : public ::protozero::Message { uint32_t, KmemCacheAllocNodeFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_GfpFlags kGfpFlags() { return {}; } + static constexpr FieldMetadata_GfpFlags kGfpFlags{}; void set_gfp_flags(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_GfpFlags::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -93608,14 +89298,7 @@ class KmemCacheAllocNodeFtraceEvent : public ::protozero::Message { int32_t, KmemCacheAllocNodeFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Node kNode() { return {}; } + static constexpr FieldMetadata_Node kNode{}; void set_node(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Node::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -93633,14 +89316,7 @@ class KmemCacheAllocNodeFtraceEvent : public ::protozero::Message { uint64_t, KmemCacheAllocNodeFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ptr kPtr() { return {}; } + static constexpr FieldMetadata_Ptr kPtr{}; void set_ptr(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Ptr::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -93689,14 +89365,7 @@ class KmemCacheAllocFtraceEvent : public ::protozero::Message { uint64_t, KmemCacheAllocFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_BytesAlloc kBytesAlloc() { return {}; } + static constexpr FieldMetadata_BytesAlloc kBytesAlloc{}; void set_bytes_alloc(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_BytesAlloc::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -93714,14 +89383,7 @@ class KmemCacheAllocFtraceEvent : public ::protozero::Message { uint64_t, KmemCacheAllocFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_BytesReq kBytesReq() { return {}; } + static constexpr FieldMetadata_BytesReq kBytesReq{}; void set_bytes_req(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_BytesReq::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -93739,14 +89401,7 @@ class KmemCacheAllocFtraceEvent : public ::protozero::Message { uint64_t, KmemCacheAllocFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_CallSite kCallSite() { return {}; } + static constexpr FieldMetadata_CallSite kCallSite{}; void set_call_site(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_CallSite::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -93764,14 +89419,7 @@ class KmemCacheAllocFtraceEvent : public ::protozero::Message { uint32_t, KmemCacheAllocFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_GfpFlags kGfpFlags() { return {}; } + static constexpr FieldMetadata_GfpFlags kGfpFlags{}; void set_gfp_flags(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_GfpFlags::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -93789,14 +89437,7 @@ class KmemCacheAllocFtraceEvent : public ::protozero::Message { uint64_t, KmemCacheAllocFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ptr kPtr() { return {}; } + static constexpr FieldMetadata_Ptr kPtr{}; void set_ptr(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Ptr::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -93848,14 +89489,7 @@ class KmallocNodeFtraceEvent : public ::protozero::Message { uint64_t, KmallocNodeFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_BytesAlloc kBytesAlloc() { return {}; } + static constexpr FieldMetadata_BytesAlloc kBytesAlloc{}; void set_bytes_alloc(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_BytesAlloc::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -93873,14 +89507,7 @@ class KmallocNodeFtraceEvent : public ::protozero::Message { uint64_t, KmallocNodeFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_BytesReq kBytesReq() { return {}; } + static constexpr FieldMetadata_BytesReq kBytesReq{}; void set_bytes_req(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_BytesReq::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -93898,14 +89525,7 @@ class KmallocNodeFtraceEvent : public ::protozero::Message { uint64_t, KmallocNodeFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_CallSite kCallSite() { return {}; } + static constexpr FieldMetadata_CallSite kCallSite{}; void set_call_site(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_CallSite::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -93923,14 +89543,7 @@ class KmallocNodeFtraceEvent : public ::protozero::Message { uint32_t, KmallocNodeFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_GfpFlags kGfpFlags() { return {}; } + static constexpr FieldMetadata_GfpFlags kGfpFlags{}; void set_gfp_flags(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_GfpFlags::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -93948,14 +89561,7 @@ class KmallocNodeFtraceEvent : public ::protozero::Message { int32_t, KmallocNodeFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Node kNode() { return {}; } + static constexpr FieldMetadata_Node kNode{}; void set_node(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Node::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -93973,14 +89579,7 @@ class KmallocNodeFtraceEvent : public ::protozero::Message { uint64_t, KmallocNodeFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ptr kPtr() { return {}; } + static constexpr FieldMetadata_Ptr kPtr{}; void set_ptr(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Ptr::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -94029,14 +89628,7 @@ class KmallocFtraceEvent : public ::protozero::Message { uint64_t, KmallocFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_BytesAlloc kBytesAlloc() { return {}; } + static constexpr FieldMetadata_BytesAlloc kBytesAlloc{}; void set_bytes_alloc(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_BytesAlloc::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -94054,14 +89646,7 @@ class KmallocFtraceEvent : public ::protozero::Message { uint64_t, KmallocFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_BytesReq kBytesReq() { return {}; } + static constexpr FieldMetadata_BytesReq kBytesReq{}; void set_bytes_req(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_BytesReq::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -94079,14 +89664,7 @@ class KmallocFtraceEvent : public ::protozero::Message { uint64_t, KmallocFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_CallSite kCallSite() { return {}; } + static constexpr FieldMetadata_CallSite kCallSite{}; void set_call_site(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_CallSite::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -94104,14 +89682,7 @@ class KmallocFtraceEvent : public ::protozero::Message { uint32_t, KmallocFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_GfpFlags kGfpFlags() { return {}; } + static constexpr FieldMetadata_GfpFlags kGfpFlags{}; void set_gfp_flags(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_GfpFlags::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -94129,14 +89700,7 @@ class KmallocFtraceEvent : public ::protozero::Message { uint64_t, KmallocFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ptr kPtr() { return {}; } + static constexpr FieldMetadata_Ptr kPtr{}; void set_ptr(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Ptr::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -94176,14 +89740,7 @@ class KfreeFtraceEvent : public ::protozero::Message { uint64_t, KfreeFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_CallSite kCallSite() { return {}; } + static constexpr FieldMetadata_CallSite kCallSite{}; void set_call_site(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_CallSite::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -94201,14 +89758,7 @@ class KfreeFtraceEvent : public ::protozero::Message { uint64_t, KfreeFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ptr kPtr() { return {}; } + static constexpr FieldMetadata_Ptr kPtr{}; void set_ptr(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Ptr::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -94248,14 +89798,7 @@ class IonSecureCmaShrinkPoolStartFtraceEvent : public ::protozero::Message { uint64_t, IonSecureCmaShrinkPoolStartFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_DrainedSize kDrainedSize() { return {}; } + static constexpr FieldMetadata_DrainedSize kDrainedSize{}; void set_drained_size(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_DrainedSize::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -94273,14 +89816,7 @@ class IonSecureCmaShrinkPoolStartFtraceEvent : public ::protozero::Message { uint64_t, IonSecureCmaShrinkPoolStartFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_SkippedSize kSkippedSize() { return {}; } + static constexpr FieldMetadata_SkippedSize kSkippedSize{}; void set_skipped_size(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_SkippedSize::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -94320,14 +89856,7 @@ class IonSecureCmaShrinkPoolEndFtraceEvent : public ::protozero::Message { uint64_t, IonSecureCmaShrinkPoolEndFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_DrainedSize kDrainedSize() { return {}; } + static constexpr FieldMetadata_DrainedSize kDrainedSize{}; void set_drained_size(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_DrainedSize::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -94345,14 +89874,7 @@ class IonSecureCmaShrinkPoolEndFtraceEvent : public ::protozero::Message { uint64_t, IonSecureCmaShrinkPoolEndFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_SkippedSize kSkippedSize() { return {}; } + static constexpr FieldMetadata_SkippedSize kSkippedSize{}; void set_skipped_size(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_SkippedSize::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -94398,14 +89920,7 @@ class IonSecureCmaAllocateStartFtraceEvent : public ::protozero::Message { uint64_t, IonSecureCmaAllocateStartFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Align kAlign() { return {}; } + static constexpr FieldMetadata_Align kAlign{}; void set_align(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Align::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -94423,14 +89938,7 @@ class IonSecureCmaAllocateStartFtraceEvent : public ::protozero::Message { uint64_t, IonSecureCmaAllocateStartFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Flags kFlags() { return {}; } + static constexpr FieldMetadata_Flags kFlags{}; void set_flags(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Flags::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -94448,17 +89956,13 @@ class IonSecureCmaAllocateStartFtraceEvent : public ::protozero::Message { std::string, IonSecureCmaAllocateStartFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_HeapName kHeapName() { return {}; } + static constexpr FieldMetadata_HeapName kHeapName{}; void set_heap_name(const char* data, size_t size) { AppendBytes(FieldMetadata_HeapName::kFieldId, data, size); } + void set_heap_name(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_HeapName::kFieldId, chars.data, chars.size); + } void set_heap_name(std::string value) { static constexpr uint32_t field_id = FieldMetadata_HeapName::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -94476,14 +89980,7 @@ class IonSecureCmaAllocateStartFtraceEvent : public ::protozero::Message { uint64_t, IonSecureCmaAllocateStartFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Len kLen() { return {}; } + static constexpr FieldMetadata_Len kLen{}; void set_len(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Len::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -94529,14 +90026,7 @@ class IonSecureCmaAllocateEndFtraceEvent : public ::protozero::Message { uint64_t, IonSecureCmaAllocateEndFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Align kAlign() { return {}; } + static constexpr FieldMetadata_Align kAlign{}; void set_align(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Align::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -94554,14 +90044,7 @@ class IonSecureCmaAllocateEndFtraceEvent : public ::protozero::Message { uint64_t, IonSecureCmaAllocateEndFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Flags kFlags() { return {}; } + static constexpr FieldMetadata_Flags kFlags{}; void set_flags(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Flags::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -94579,17 +90062,13 @@ class IonSecureCmaAllocateEndFtraceEvent : public ::protozero::Message { std::string, IonSecureCmaAllocateEndFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_HeapName kHeapName() { return {}; } + static constexpr FieldMetadata_HeapName kHeapName{}; void set_heap_name(const char* data, size_t size) { AppendBytes(FieldMetadata_HeapName::kFieldId, data, size); } + void set_heap_name(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_HeapName::kFieldId, chars.data, chars.size); + } void set_heap_name(std::string value) { static constexpr uint32_t field_id = FieldMetadata_HeapName::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -94607,14 +90086,7 @@ class IonSecureCmaAllocateEndFtraceEvent : public ::protozero::Message { uint64_t, IonSecureCmaAllocateEndFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Len kLen() { return {}; } + static constexpr FieldMetadata_Len kLen{}; void set_len(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Len::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -94657,14 +90129,7 @@ class IonSecureCmaAddToPoolStartFtraceEvent : public ::protozero::Message { uint32_t, IonSecureCmaAddToPoolStartFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_IsPrefetch kIsPrefetch() { return {}; } + static constexpr FieldMetadata_IsPrefetch kIsPrefetch{}; void set_is_prefetch(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_IsPrefetch::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -94682,14 +90147,7 @@ class IonSecureCmaAddToPoolStartFtraceEvent : public ::protozero::Message { uint64_t, IonSecureCmaAddToPoolStartFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Len kLen() { return {}; } + static constexpr FieldMetadata_Len kLen{}; void set_len(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Len::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -94707,14 +90165,7 @@ class IonSecureCmaAddToPoolStartFtraceEvent : public ::protozero::Message { int32_t, IonSecureCmaAddToPoolStartFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_PoolTotal kPoolTotal() { return {}; } + static constexpr FieldMetadata_PoolTotal kPoolTotal{}; void set_pool_total(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_PoolTotal::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -94757,14 +90208,7 @@ class IonSecureCmaAddToPoolEndFtraceEvent : public ::protozero::Message { uint32_t, IonSecureCmaAddToPoolEndFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_IsPrefetch kIsPrefetch() { return {}; } + static constexpr FieldMetadata_IsPrefetch kIsPrefetch{}; void set_is_prefetch(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_IsPrefetch::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -94782,14 +90226,7 @@ class IonSecureCmaAddToPoolEndFtraceEvent : public ::protozero::Message { uint64_t, IonSecureCmaAddToPoolEndFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Len kLen() { return {}; } + static constexpr FieldMetadata_Len kLen{}; void set_len(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Len::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -94807,14 +90244,7 @@ class IonSecureCmaAddToPoolEndFtraceEvent : public ::protozero::Message { int32_t, IonSecureCmaAddToPoolEndFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_PoolTotal kPoolTotal() { return {}; } + static constexpr FieldMetadata_PoolTotal kPoolTotal{}; void set_pool_total(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_PoolTotal::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -94851,14 +90281,7 @@ class IonPrefetchingFtraceEvent : public ::protozero::Message { uint64_t, IonPrefetchingFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Len kLen() { return {}; } + static constexpr FieldMetadata_Len kLen{}; void set_len(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Len::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -94904,14 +90327,7 @@ class IonCpSecureBufferStartFtraceEvent : public ::protozero::Message { uint64_t, IonCpSecureBufferStartFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Align kAlign() { return {}; } + static constexpr FieldMetadata_Align kAlign{}; void set_align(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Align::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -94929,14 +90345,7 @@ class IonCpSecureBufferStartFtraceEvent : public ::protozero::Message { uint64_t, IonCpSecureBufferStartFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Flags kFlags() { return {}; } + static constexpr FieldMetadata_Flags kFlags{}; void set_flags(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Flags::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -94954,17 +90363,13 @@ class IonCpSecureBufferStartFtraceEvent : public ::protozero::Message { std::string, IonCpSecureBufferStartFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_HeapName kHeapName() { return {}; } + static constexpr FieldMetadata_HeapName kHeapName{}; void set_heap_name(const char* data, size_t size) { AppendBytes(FieldMetadata_HeapName::kFieldId, data, size); } + void set_heap_name(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_HeapName::kFieldId, chars.data, chars.size); + } void set_heap_name(std::string value) { static constexpr uint32_t field_id = FieldMetadata_HeapName::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -94982,14 +90387,7 @@ class IonCpSecureBufferStartFtraceEvent : public ::protozero::Message { uint64_t, IonCpSecureBufferStartFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Len kLen() { return {}; } + static constexpr FieldMetadata_Len kLen{}; void set_len(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Len::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -95035,14 +90433,7 @@ class IonCpSecureBufferEndFtraceEvent : public ::protozero::Message { uint64_t, IonCpSecureBufferEndFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Align kAlign() { return {}; } + static constexpr FieldMetadata_Align kAlign{}; void set_align(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Align::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -95060,14 +90451,7 @@ class IonCpSecureBufferEndFtraceEvent : public ::protozero::Message { uint64_t, IonCpSecureBufferEndFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Flags kFlags() { return {}; } + static constexpr FieldMetadata_Flags kFlags{}; void set_flags(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Flags::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -95085,17 +90469,13 @@ class IonCpSecureBufferEndFtraceEvent : public ::protozero::Message { std::string, IonCpSecureBufferEndFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_HeapName kHeapName() { return {}; } + static constexpr FieldMetadata_HeapName kHeapName{}; void set_heap_name(const char* data, size_t size) { AppendBytes(FieldMetadata_HeapName::kFieldId, data, size); } + void set_heap_name(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_HeapName::kFieldId, chars.data, chars.size); + } void set_heap_name(std::string value) { static constexpr uint32_t field_id = FieldMetadata_HeapName::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -95113,14 +90493,7 @@ class IonCpSecureBufferEndFtraceEvent : public ::protozero::Message { uint64_t, IonCpSecureBufferEndFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Len kLen() { return {}; } + static constexpr FieldMetadata_Len kLen{}; void set_len(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Len::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -95157,14 +90530,7 @@ class IonCpAllocRetryFtraceEvent : public ::protozero::Message { int32_t, IonCpAllocRetryFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Tries kTries() { return {}; } + static constexpr FieldMetadata_Tries kTries{}; void set_tries(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Tries::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -95213,17 +90579,13 @@ class IonAllocBufferStartFtraceEvent : public ::protozero::Message { std::string, IonAllocBufferStartFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ClientName kClientName() { return {}; } + static constexpr FieldMetadata_ClientName kClientName{}; void set_client_name(const char* data, size_t size) { AppendBytes(FieldMetadata_ClientName::kFieldId, data, size); } + void set_client_name(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_ClientName::kFieldId, chars.data, chars.size); + } void set_client_name(std::string value) { static constexpr uint32_t field_id = FieldMetadata_ClientName::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -95241,14 +90603,7 @@ class IonAllocBufferStartFtraceEvent : public ::protozero::Message { uint32_t, IonAllocBufferStartFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Flags kFlags() { return {}; } + static constexpr FieldMetadata_Flags kFlags{}; void set_flags(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Flags::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -95266,17 +90621,13 @@ class IonAllocBufferStartFtraceEvent : public ::protozero::Message { std::string, IonAllocBufferStartFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_HeapName kHeapName() { return {}; } + static constexpr FieldMetadata_HeapName kHeapName{}; void set_heap_name(const char* data, size_t size) { AppendBytes(FieldMetadata_HeapName::kFieldId, data, size); } + void set_heap_name(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_HeapName::kFieldId, chars.data, chars.size); + } void set_heap_name(std::string value) { static constexpr uint32_t field_id = FieldMetadata_HeapName::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -95294,14 +90645,7 @@ class IonAllocBufferStartFtraceEvent : public ::protozero::Message { uint64_t, IonAllocBufferStartFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Len kLen() { return {}; } + static constexpr FieldMetadata_Len kLen{}; void set_len(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Len::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -95319,14 +90663,7 @@ class IonAllocBufferStartFtraceEvent : public ::protozero::Message { uint32_t, IonAllocBufferStartFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Mask kMask() { return {}; } + static constexpr FieldMetadata_Mask kMask{}; void set_mask(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Mask::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -95378,17 +90715,13 @@ class IonAllocBufferFallbackFtraceEvent : public ::protozero::Message { std::string, IonAllocBufferFallbackFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ClientName kClientName() { return {}; } + static constexpr FieldMetadata_ClientName kClientName{}; void set_client_name(const char* data, size_t size) { AppendBytes(FieldMetadata_ClientName::kFieldId, data, size); } + void set_client_name(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_ClientName::kFieldId, chars.data, chars.size); + } void set_client_name(std::string value) { static constexpr uint32_t field_id = FieldMetadata_ClientName::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -95406,14 +90739,7 @@ class IonAllocBufferFallbackFtraceEvent : public ::protozero::Message { int64_t, IonAllocBufferFallbackFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Error kError() { return {}; } + static constexpr FieldMetadata_Error kError{}; void set_error(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_Error::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -95431,14 +90757,7 @@ class IonAllocBufferFallbackFtraceEvent : public ::protozero::Message { uint32_t, IonAllocBufferFallbackFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Flags kFlags() { return {}; } + static constexpr FieldMetadata_Flags kFlags{}; void set_flags(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Flags::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -95456,17 +90775,13 @@ class IonAllocBufferFallbackFtraceEvent : public ::protozero::Message { std::string, IonAllocBufferFallbackFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_HeapName kHeapName() { return {}; } + static constexpr FieldMetadata_HeapName kHeapName{}; void set_heap_name(const char* data, size_t size) { AppendBytes(FieldMetadata_HeapName::kFieldId, data, size); } + void set_heap_name(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_HeapName::kFieldId, chars.data, chars.size); + } void set_heap_name(std::string value) { static constexpr uint32_t field_id = FieldMetadata_HeapName::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -95484,14 +90799,7 @@ class IonAllocBufferFallbackFtraceEvent : public ::protozero::Message { uint64_t, IonAllocBufferFallbackFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Len kLen() { return {}; } + static constexpr FieldMetadata_Len kLen{}; void set_len(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Len::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -95509,14 +90817,7 @@ class IonAllocBufferFallbackFtraceEvent : public ::protozero::Message { uint32_t, IonAllocBufferFallbackFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Mask kMask() { return {}; } + static constexpr FieldMetadata_Mask kMask{}; void set_mask(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Mask::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -95568,17 +90869,13 @@ class IonAllocBufferFailFtraceEvent : public ::protozero::Message { std::string, IonAllocBufferFailFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ClientName kClientName() { return {}; } + static constexpr FieldMetadata_ClientName kClientName{}; void set_client_name(const char* data, size_t size) { AppendBytes(FieldMetadata_ClientName::kFieldId, data, size); } + void set_client_name(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_ClientName::kFieldId, chars.data, chars.size); + } void set_client_name(std::string value) { static constexpr uint32_t field_id = FieldMetadata_ClientName::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -95596,14 +90893,7 @@ class IonAllocBufferFailFtraceEvent : public ::protozero::Message { int64_t, IonAllocBufferFailFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Error kError() { return {}; } + static constexpr FieldMetadata_Error kError{}; void set_error(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_Error::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -95621,14 +90911,7 @@ class IonAllocBufferFailFtraceEvent : public ::protozero::Message { uint32_t, IonAllocBufferFailFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Flags kFlags() { return {}; } + static constexpr FieldMetadata_Flags kFlags{}; void set_flags(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Flags::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -95646,17 +90929,13 @@ class IonAllocBufferFailFtraceEvent : public ::protozero::Message { std::string, IonAllocBufferFailFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_HeapName kHeapName() { return {}; } + static constexpr FieldMetadata_HeapName kHeapName{}; void set_heap_name(const char* data, size_t size) { AppendBytes(FieldMetadata_HeapName::kFieldId, data, size); } + void set_heap_name(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_HeapName::kFieldId, chars.data, chars.size); + } void set_heap_name(std::string value) { static constexpr uint32_t field_id = FieldMetadata_HeapName::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -95674,14 +90953,7 @@ class IonAllocBufferFailFtraceEvent : public ::protozero::Message { uint64_t, IonAllocBufferFailFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Len kLen() { return {}; } + static constexpr FieldMetadata_Len kLen{}; void set_len(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Len::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -95699,14 +90971,7 @@ class IonAllocBufferFailFtraceEvent : public ::protozero::Message { uint32_t, IonAllocBufferFailFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Mask kMask() { return {}; } + static constexpr FieldMetadata_Mask kMask{}; void set_mask(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Mask::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -95755,17 +91020,13 @@ class IonAllocBufferEndFtraceEvent : public ::protozero::Message { std::string, IonAllocBufferEndFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ClientName kClientName() { return {}; } + static constexpr FieldMetadata_ClientName kClientName{}; void set_client_name(const char* data, size_t size) { AppendBytes(FieldMetadata_ClientName::kFieldId, data, size); } + void set_client_name(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_ClientName::kFieldId, chars.data, chars.size); + } void set_client_name(std::string value) { static constexpr uint32_t field_id = FieldMetadata_ClientName::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -95783,14 +91044,7 @@ class IonAllocBufferEndFtraceEvent : public ::protozero::Message { uint32_t, IonAllocBufferEndFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Flags kFlags() { return {}; } + static constexpr FieldMetadata_Flags kFlags{}; void set_flags(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Flags::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -95808,17 +91062,13 @@ class IonAllocBufferEndFtraceEvent : public ::protozero::Message { std::string, IonAllocBufferEndFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_HeapName kHeapName() { return {}; } + static constexpr FieldMetadata_HeapName kHeapName{}; void set_heap_name(const char* data, size_t size) { AppendBytes(FieldMetadata_HeapName::kFieldId, data, size); } + void set_heap_name(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_HeapName::kFieldId, chars.data, chars.size); + } void set_heap_name(std::string value) { static constexpr uint32_t field_id = FieldMetadata_HeapName::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -95836,14 +91086,7 @@ class IonAllocBufferEndFtraceEvent : public ::protozero::Message { uint64_t, IonAllocBufferEndFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Len kLen() { return {}; } + static constexpr FieldMetadata_Len kLen{}; void set_len(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Len::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -95861,14 +91104,7 @@ class IonAllocBufferEndFtraceEvent : public ::protozero::Message { uint32_t, IonAllocBufferEndFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Mask kMask() { return {}; } + static constexpr FieldMetadata_Mask kMask{}; void set_mask(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Mask::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -95917,14 +91153,7 @@ class IommuSecPtblMapRangeStartFtraceEvent : public ::protozero::Message { uint64_t, IommuSecPtblMapRangeStartFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Len kLen() { return {}; } + static constexpr FieldMetadata_Len kLen{}; void set_len(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Len::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -95942,14 +91171,7 @@ class IommuSecPtblMapRangeStartFtraceEvent : public ::protozero::Message { int32_t, IommuSecPtblMapRangeStartFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Num kNum() { return {}; } + static constexpr FieldMetadata_Num kNum{}; void set_num(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Num::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -95967,14 +91189,7 @@ class IommuSecPtblMapRangeStartFtraceEvent : public ::protozero::Message { uint32_t, IommuSecPtblMapRangeStartFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Pa kPa() { return {}; } + static constexpr FieldMetadata_Pa kPa{}; void set_pa(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Pa::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -95992,14 +91207,7 @@ class IommuSecPtblMapRangeStartFtraceEvent : public ::protozero::Message { int32_t, IommuSecPtblMapRangeStartFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_SecId kSecId() { return {}; } + static constexpr FieldMetadata_SecId kSecId{}; void set_sec_id(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_SecId::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -96017,14 +91225,7 @@ class IommuSecPtblMapRangeStartFtraceEvent : public ::protozero::Message { uint64_t, IommuSecPtblMapRangeStartFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Va kVa() { return {}; } + static constexpr FieldMetadata_Va kVa{}; void set_va(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Va::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -96073,14 +91274,7 @@ class IommuSecPtblMapRangeEndFtraceEvent : public ::protozero::Message { uint64_t, IommuSecPtblMapRangeEndFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Len kLen() { return {}; } + static constexpr FieldMetadata_Len kLen{}; void set_len(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Len::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -96098,14 +91292,7 @@ class IommuSecPtblMapRangeEndFtraceEvent : public ::protozero::Message { int32_t, IommuSecPtblMapRangeEndFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Num kNum() { return {}; } + static constexpr FieldMetadata_Num kNum{}; void set_num(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Num::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -96123,14 +91310,7 @@ class IommuSecPtblMapRangeEndFtraceEvent : public ::protozero::Message { uint32_t, IommuSecPtblMapRangeEndFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Pa kPa() { return {}; } + static constexpr FieldMetadata_Pa kPa{}; void set_pa(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Pa::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -96148,14 +91328,7 @@ class IommuSecPtblMapRangeEndFtraceEvent : public ::protozero::Message { int32_t, IommuSecPtblMapRangeEndFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_SecId kSecId() { return {}; } + static constexpr FieldMetadata_SecId kSecId{}; void set_sec_id(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_SecId::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -96173,14 +91346,7 @@ class IommuSecPtblMapRangeEndFtraceEvent : public ::protozero::Message { uint64_t, IommuSecPtblMapRangeEndFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Va kVa() { return {}; } + static constexpr FieldMetadata_Va kVa{}; void set_va(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Va::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -96226,14 +91392,7 @@ class IommuMapRangeFtraceEvent : public ::protozero::Message { uint64_t, IommuMapRangeFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ChunkSize kChunkSize() { return {}; } + static constexpr FieldMetadata_ChunkSize kChunkSize{}; void set_chunk_size(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_ChunkSize::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -96251,14 +91410,7 @@ class IommuMapRangeFtraceEvent : public ::protozero::Message { uint64_t, IommuMapRangeFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Len kLen() { return {}; } + static constexpr FieldMetadata_Len kLen{}; void set_len(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Len::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -96276,14 +91428,7 @@ class IommuMapRangeFtraceEvent : public ::protozero::Message { uint64_t, IommuMapRangeFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Pa kPa() { return {}; } + static constexpr FieldMetadata_Pa kPa{}; void set_pa(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Pa::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -96301,14 +91446,7 @@ class IommuMapRangeFtraceEvent : public ::protozero::Message { uint64_t, IommuMapRangeFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Va kVa() { return {}; } + static constexpr FieldMetadata_Va kVa{}; void set_va(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Va::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -96345,14 +91483,7 @@ class DmaAllocContiguousRetryFtraceEvent : public ::protozero::Message { int32_t, DmaAllocContiguousRetryFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Tries kTries() { return {}; } + static constexpr FieldMetadata_Tries kTries{}; void set_tries(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Tries::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -96392,14 +91523,7 @@ class AllocPagesSysStartFtraceEvent : public ::protozero::Message { uint32_t, AllocPagesSysStartFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_GfpFlags kGfpFlags() { return {}; } + static constexpr FieldMetadata_GfpFlags kGfpFlags{}; void set_gfp_flags(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_GfpFlags::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -96417,14 +91541,7 @@ class AllocPagesSysStartFtraceEvent : public ::protozero::Message { uint32_t, AllocPagesSysStartFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Order kOrder() { return {}; } + static constexpr FieldMetadata_Order kOrder{}; void set_order(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Order::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -96464,14 +91581,7 @@ class AllocPagesSysFailFtraceEvent : public ::protozero::Message { uint32_t, AllocPagesSysFailFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_GfpFlags kGfpFlags() { return {}; } + static constexpr FieldMetadata_GfpFlags kGfpFlags{}; void set_gfp_flags(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_GfpFlags::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -96489,14 +91599,7 @@ class AllocPagesSysFailFtraceEvent : public ::protozero::Message { uint32_t, AllocPagesSysFailFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Order kOrder() { return {}; } + static constexpr FieldMetadata_Order kOrder{}; void set_order(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Order::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -96536,14 +91639,7 @@ class AllocPagesSysEndFtraceEvent : public ::protozero::Message { uint32_t, AllocPagesSysEndFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_GfpFlags kGfpFlags() { return {}; } + static constexpr FieldMetadata_GfpFlags kGfpFlags{}; void set_gfp_flags(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_GfpFlags::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -96561,14 +91657,7 @@ class AllocPagesSysEndFtraceEvent : public ::protozero::Message { uint32_t, AllocPagesSysEndFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Order kOrder() { return {}; } + static constexpr FieldMetadata_Order kOrder{}; void set_order(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Order::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -96608,14 +91697,7 @@ class AllocPagesIommuStartFtraceEvent : public ::protozero::Message { uint32_t, AllocPagesIommuStartFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_GfpFlags kGfpFlags() { return {}; } + static constexpr FieldMetadata_GfpFlags kGfpFlags{}; void set_gfp_flags(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_GfpFlags::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -96633,14 +91715,7 @@ class AllocPagesIommuStartFtraceEvent : public ::protozero::Message { uint32_t, AllocPagesIommuStartFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Order kOrder() { return {}; } + static constexpr FieldMetadata_Order kOrder{}; void set_order(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Order::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -96680,14 +91755,7 @@ class AllocPagesIommuFailFtraceEvent : public ::protozero::Message { uint32_t, AllocPagesIommuFailFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_GfpFlags kGfpFlags() { return {}; } + static constexpr FieldMetadata_GfpFlags kGfpFlags{}; void set_gfp_flags(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_GfpFlags::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -96705,14 +91773,7 @@ class AllocPagesIommuFailFtraceEvent : public ::protozero::Message { uint32_t, AllocPagesIommuFailFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Order kOrder() { return {}; } + static constexpr FieldMetadata_Order kOrder{}; void set_order(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Order::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -96752,14 +91813,7 @@ class AllocPagesIommuEndFtraceEvent : public ::protozero::Message { uint32_t, AllocPagesIommuEndFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_GfpFlags kGfpFlags() { return {}; } + static constexpr FieldMetadata_GfpFlags kGfpFlags{}; void set_gfp_flags(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_GfpFlags::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -96777,14 +91831,7 @@ class AllocPagesIommuEndFtraceEvent : public ::protozero::Message { uint32_t, AllocPagesIommuEndFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Order kOrder() { return {}; } + static constexpr FieldMetadata_Order kOrder{}; void set_order(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Order::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -96851,14 +91898,7 @@ class VgicUpdateIrqPendingFtraceEvent : public ::protozero::Message { uint32_t, VgicUpdateIrqPendingFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Irq kIrq() { return {}; } + static constexpr FieldMetadata_Irq kIrq{}; void set_irq(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Irq::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -96876,14 +91916,7 @@ class VgicUpdateIrqPendingFtraceEvent : public ::protozero::Message { uint32_t, VgicUpdateIrqPendingFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Level kLevel() { return {}; } + static constexpr FieldMetadata_Level kLevel{}; void set_level(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Level::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -96901,14 +91934,7 @@ class VgicUpdateIrqPendingFtraceEvent : public ::protozero::Message { uint64_t, VgicUpdateIrqPendingFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_VcpuId kVcpuId() { return {}; } + static constexpr FieldMetadata_VcpuId kVcpuId{}; void set_vcpu_id(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_VcpuId::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -96954,17 +91980,13 @@ class TrapRegFtraceEvent : public ::protozero::Message { std::string, TrapRegFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Fn kFn() { return {}; } + static constexpr FieldMetadata_Fn kFn{}; void set_fn(const char* data, size_t size) { AppendBytes(FieldMetadata_Fn::kFieldId, data, size); } + void set_fn(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Fn::kFieldId, chars.data, chars.size); + } void set_fn(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Fn::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -96982,14 +92004,7 @@ class TrapRegFtraceEvent : public ::protozero::Message { uint32_t, TrapRegFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_IsWrite kIsWrite() { return {}; } + static constexpr FieldMetadata_IsWrite kIsWrite{}; void set_is_write(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_IsWrite::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -97007,14 +92022,7 @@ class TrapRegFtraceEvent : public ::protozero::Message { int32_t, TrapRegFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Reg kReg() { return {}; } + static constexpr FieldMetadata_Reg kReg{}; void set_reg(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Reg::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -97032,14 +92040,7 @@ class TrapRegFtraceEvent : public ::protozero::Message { uint64_t, TrapRegFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_WriteValue kWriteValue() { return {}; } + static constexpr FieldMetadata_WriteValue kWriteValue{}; void set_write_value(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_WriteValue::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -97079,14 +92080,7 @@ class KvmWfxArm64FtraceEvent : public ::protozero::Message { uint32_t, KvmWfxArm64FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_IsWfe kIsWfe() { return {}; } + static constexpr FieldMetadata_IsWfe kIsWfe{}; void set_is_wfe(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_IsWfe::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -97104,14 +92098,7 @@ class KvmWfxArm64FtraceEvent : public ::protozero::Message { uint64_t, KvmWfxArm64FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_VcpuPc kVcpuPc() { return {}; } + static constexpr FieldMetadata_VcpuPc kVcpuPc{}; void set_vcpu_pc(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_VcpuPc::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -97154,14 +92141,7 @@ class KvmVcpuWakeupFtraceEvent : public ::protozero::Message { uint64_t, KvmVcpuWakeupFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ns kNs() { return {}; } + static constexpr FieldMetadata_Ns kNs{}; void set_ns(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Ns::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -97179,14 +92159,7 @@ class KvmVcpuWakeupFtraceEvent : public ::protozero::Message { uint32_t, KvmVcpuWakeupFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Valid kValid() { return {}; } + static constexpr FieldMetadata_Valid kValid{}; void set_valid(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Valid::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -97204,14 +92177,7 @@ class KvmVcpuWakeupFtraceEvent : public ::protozero::Message { uint32_t, KvmVcpuWakeupFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Waited kWaited() { return {}; } + static constexpr FieldMetadata_Waited kWaited{}; void set_waited(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Waited::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -97248,14 +92214,7 @@ class KvmUserspaceExitFtraceEvent : public ::protozero::Message { uint32_t, KvmUserspaceExitFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Reason kReason() { return {}; } + static constexpr FieldMetadata_Reason kReason{}; void set_reason(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Reason::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -97295,14 +92254,7 @@ class KvmUnmapHvaRangeFtraceEvent : public ::protozero::Message { uint64_t, KvmUnmapHvaRangeFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_End kEnd() { return {}; } + static constexpr FieldMetadata_End kEnd{}; void set_end(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_End::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -97320,14 +92272,7 @@ class KvmUnmapHvaRangeFtraceEvent : public ::protozero::Message { uint64_t, KvmUnmapHvaRangeFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Start kStart() { return {}; } + static constexpr FieldMetadata_Start kStart{}; void set_start(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Start::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -97370,14 +92315,7 @@ class KvmToggleCacheFtraceEvent : public ::protozero::Message { uint32_t, KvmToggleCacheFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Now kNow() { return {}; } + static constexpr FieldMetadata_Now kNow{}; void set_now(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Now::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -97395,14 +92333,7 @@ class KvmToggleCacheFtraceEvent : public ::protozero::Message { uint64_t, KvmToggleCacheFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_VcpuPc kVcpuPc() { return {}; } + static constexpr FieldMetadata_VcpuPc kVcpuPc{}; void set_vcpu_pc(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_VcpuPc::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -97420,14 +92351,7 @@ class KvmToggleCacheFtraceEvent : public ::protozero::Message { uint32_t, KvmToggleCacheFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Was kWas() { return {}; } + static constexpr FieldMetadata_Was kWas{}; void set_was(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Was::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -97470,14 +92394,7 @@ class KvmTimerUpdateIrqFtraceEvent : public ::protozero::Message { uint32_t, KvmTimerUpdateIrqFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Irq kIrq() { return {}; } + static constexpr FieldMetadata_Irq kIrq{}; void set_irq(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Irq::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -97495,14 +92412,7 @@ class KvmTimerUpdateIrqFtraceEvent : public ::protozero::Message { int32_t, KvmTimerUpdateIrqFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Level kLevel() { return {}; } + static constexpr FieldMetadata_Level kLevel{}; void set_level(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Level::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -97520,14 +92430,7 @@ class KvmTimerUpdateIrqFtraceEvent : public ::protozero::Message { uint64_t, KvmTimerUpdateIrqFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_VcpuId kVcpuId() { return {}; } + static constexpr FieldMetadata_VcpuId kVcpuId{}; void set_vcpu_id(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_VcpuId::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -97570,14 +92473,7 @@ class KvmTimerSaveStateFtraceEvent : public ::protozero::Message { uint64_t, KvmTimerSaveStateFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ctl kCtl() { return {}; } + static constexpr FieldMetadata_Ctl kCtl{}; void set_ctl(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Ctl::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -97595,14 +92491,7 @@ class KvmTimerSaveStateFtraceEvent : public ::protozero::Message { uint64_t, KvmTimerSaveStateFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Cval kCval() { return {}; } + static constexpr FieldMetadata_Cval kCval{}; void set_cval(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Cval::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -97620,14 +92509,7 @@ class KvmTimerSaveStateFtraceEvent : public ::protozero::Message { int32_t, KvmTimerSaveStateFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_TimerIdx kTimerIdx() { return {}; } + static constexpr FieldMetadata_TimerIdx kTimerIdx{}; void set_timer_idx(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_TimerIdx::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -97670,14 +92552,7 @@ class KvmTimerRestoreStateFtraceEvent : public ::protozero::Message { uint64_t, KvmTimerRestoreStateFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ctl kCtl() { return {}; } + static constexpr FieldMetadata_Ctl kCtl{}; void set_ctl(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Ctl::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -97695,14 +92570,7 @@ class KvmTimerRestoreStateFtraceEvent : public ::protozero::Message { uint64_t, KvmTimerRestoreStateFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Cval kCval() { return {}; } + static constexpr FieldMetadata_Cval kCval{}; void set_cval(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Cval::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -97720,14 +92588,7 @@ class KvmTimerRestoreStateFtraceEvent : public ::protozero::Message { int32_t, KvmTimerRestoreStateFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_TimerIdx kTimerIdx() { return {}; } + static constexpr FieldMetadata_TimerIdx kTimerIdx{}; void set_timer_idx(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_TimerIdx::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -97764,14 +92625,7 @@ class KvmTimerHrtimerExpireFtraceEvent : public ::protozero::Message { int32_t, KvmTimerHrtimerExpireFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_TimerIdx kTimerIdx() { return {}; } + static constexpr FieldMetadata_TimerIdx kTimerIdx{}; void set_timer_idx(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_TimerIdx::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -97811,14 +92665,7 @@ class KvmTimerEmulateFtraceEvent : public ::protozero::Message { uint32_t, KvmTimerEmulateFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ShouldFire kShouldFire() { return {}; } + static constexpr FieldMetadata_ShouldFire kShouldFire{}; void set_should_fire(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_ShouldFire::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -97836,14 +92683,7 @@ class KvmTimerEmulateFtraceEvent : public ::protozero::Message { int32_t, KvmTimerEmulateFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_TimerIdx kTimerIdx() { return {}; } + static constexpr FieldMetadata_TimerIdx kTimerIdx{}; void set_timer_idx(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_TimerIdx::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -97880,14 +92720,7 @@ class KvmTestAgeHvaFtraceEvent : public ::protozero::Message { uint64_t, KvmTestAgeHvaFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Hva kHva() { return {}; } + static constexpr FieldMetadata_Hva kHva{}; void set_hva(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Hva::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -97945,14 +92778,7 @@ class KvmSysAccessFtraceEvent : public ::protozero::Message { uint32_t, KvmSysAccessFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_CRm kCRm() { return {}; } + static constexpr FieldMetadata_CRm kCRm{}; void set_crm(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_CRm::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -97970,14 +92796,7 @@ class KvmSysAccessFtraceEvent : public ::protozero::Message { uint32_t, KvmSysAccessFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_CRn kCRn() { return {}; } + static constexpr FieldMetadata_CRn kCRn{}; void set_crn(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_CRn::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -97995,14 +92814,7 @@ class KvmSysAccessFtraceEvent : public ::protozero::Message { uint32_t, KvmSysAccessFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Op0 kOp0() { return {}; } + static constexpr FieldMetadata_Op0 kOp0{}; void set_op0(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Op0::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -98020,14 +92832,7 @@ class KvmSysAccessFtraceEvent : public ::protozero::Message { uint32_t, KvmSysAccessFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Op1 kOp1() { return {}; } + static constexpr FieldMetadata_Op1 kOp1{}; void set_op1(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Op1::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -98045,14 +92850,7 @@ class KvmSysAccessFtraceEvent : public ::protozero::Message { uint32_t, KvmSysAccessFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Op2 kOp2() { return {}; } + static constexpr FieldMetadata_Op2 kOp2{}; void set_op2(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Op2::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -98070,14 +92868,7 @@ class KvmSysAccessFtraceEvent : public ::protozero::Message { uint32_t, KvmSysAccessFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_IsWrite kIsWrite() { return {}; } + static constexpr FieldMetadata_IsWrite kIsWrite{}; void set_is_write(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_IsWrite::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -98095,17 +92886,13 @@ class KvmSysAccessFtraceEvent : public ::protozero::Message { std::string, KvmSysAccessFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Name kName() { return {}; } + static constexpr FieldMetadata_Name kName{}; void set_name(const char* data, size_t size) { AppendBytes(FieldMetadata_Name::kFieldId, data, size); } + void set_name(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Name::kFieldId, chars.data, chars.size); + } void set_name(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Name::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -98123,14 +92910,7 @@ class KvmSysAccessFtraceEvent : public ::protozero::Message { uint64_t, KvmSysAccessFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_VcpuPc kVcpuPc() { return {}; } + static constexpr FieldMetadata_VcpuPc kVcpuPc{}; void set_vcpu_pc(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_VcpuPc::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -98170,14 +92950,7 @@ class KvmSetWayFlushFtraceEvent : public ::protozero::Message { uint32_t, KvmSetWayFlushFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Cache kCache() { return {}; } + static constexpr FieldMetadata_Cache kCache{}; void set_cache(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Cache::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -98195,14 +92968,7 @@ class KvmSetWayFlushFtraceEvent : public ::protozero::Message { uint64_t, KvmSetWayFlushFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_VcpuPc kVcpuPc() { return {}; } + static constexpr FieldMetadata_VcpuPc kVcpuPc{}; void set_vcpu_pc(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_VcpuPc::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -98239,14 +93005,7 @@ class KvmSetSpteHvaFtraceEvent : public ::protozero::Message { uint64_t, KvmSetSpteHvaFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Hva kHva() { return {}; } + static constexpr FieldMetadata_Hva kHva{}; void set_hva(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Hva::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -98289,14 +93048,7 @@ class KvmSetIrqFtraceEvent : public ::protozero::Message { uint32_t, KvmSetIrqFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Gsi kGsi() { return {}; } + static constexpr FieldMetadata_Gsi kGsi{}; void set_gsi(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Gsi::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -98314,14 +93066,7 @@ class KvmSetIrqFtraceEvent : public ::protozero::Message { int32_t, KvmSetIrqFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_IrqSourceId kIrqSourceId() { return {}; } + static constexpr FieldMetadata_IrqSourceId kIrqSourceId{}; void set_irq_source_id(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_IrqSourceId::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -98339,14 +93084,7 @@ class KvmSetIrqFtraceEvent : public ::protozero::Message { int32_t, KvmSetIrqFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Level kLevel() { return {}; } + static constexpr FieldMetadata_Level kLevel{}; void set_level(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Level::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -98386,14 +93124,7 @@ class KvmSetGuestDebugFtraceEvent : public ::protozero::Message { uint32_t, KvmSetGuestDebugFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_GuestDebug kGuestDebug() { return {}; } + static constexpr FieldMetadata_GuestDebug kGuestDebug{}; void set_guest_debug(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_GuestDebug::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -98411,14 +93142,7 @@ class KvmSetGuestDebugFtraceEvent : public ::protozero::Message { uint64_t, KvmSetGuestDebugFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Vcpu kVcpu() { return {}; } + static constexpr FieldMetadata_Vcpu kVcpu{}; void set_vcpu(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Vcpu::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -98461,14 +93185,7 @@ class KvmMmioEmulateFtraceEvent : public ::protozero::Message { uint64_t, KvmMmioEmulateFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Cpsr kCpsr() { return {}; } + static constexpr FieldMetadata_Cpsr kCpsr{}; void set_cpsr(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Cpsr::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -98486,14 +93203,7 @@ class KvmMmioEmulateFtraceEvent : public ::protozero::Message { uint64_t, KvmMmioEmulateFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Instr kInstr() { return {}; } + static constexpr FieldMetadata_Instr kInstr{}; void set_instr(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Instr::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -98511,14 +93221,7 @@ class KvmMmioEmulateFtraceEvent : public ::protozero::Message { uint64_t, KvmMmioEmulateFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_VcpuPc kVcpuPc() { return {}; } + static constexpr FieldMetadata_VcpuPc kVcpuPc{}; void set_vcpu_pc(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_VcpuPc::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -98564,14 +93267,7 @@ class KvmMmioFtraceEvent : public ::protozero::Message { uint64_t, KvmMmioFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Gpa kGpa() { return {}; } + static constexpr FieldMetadata_Gpa kGpa{}; void set_gpa(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Gpa::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -98589,14 +93285,7 @@ class KvmMmioFtraceEvent : public ::protozero::Message { uint32_t, KvmMmioFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Len kLen() { return {}; } + static constexpr FieldMetadata_Len kLen{}; void set_len(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Len::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -98614,14 +93303,7 @@ class KvmMmioFtraceEvent : public ::protozero::Message { uint32_t, KvmMmioFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Type kType() { return {}; } + static constexpr FieldMetadata_Type kType{}; void set_type(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Type::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -98639,14 +93321,7 @@ class KvmMmioFtraceEvent : public ::protozero::Message { uint64_t, KvmMmioFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Val kVal() { return {}; } + static constexpr FieldMetadata_Val kVal{}; void set_val(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Val::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -98692,14 +93367,7 @@ class KvmIrqLineFtraceEvent : public ::protozero::Message { int32_t, KvmIrqLineFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_IrqNum kIrqNum() { return {}; } + static constexpr FieldMetadata_IrqNum kIrqNum{}; void set_irq_num(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_IrqNum::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -98717,14 +93385,7 @@ class KvmIrqLineFtraceEvent : public ::protozero::Message { int32_t, KvmIrqLineFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Level kLevel() { return {}; } + static constexpr FieldMetadata_Level kLevel{}; void set_level(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Level::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -98742,14 +93403,7 @@ class KvmIrqLineFtraceEvent : public ::protozero::Message { uint32_t, KvmIrqLineFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Type kType() { return {}; } + static constexpr FieldMetadata_Type kType{}; void set_type(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Type::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -98767,14 +93421,7 @@ class KvmIrqLineFtraceEvent : public ::protozero::Message { int32_t, KvmIrqLineFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_VcpuIdx kVcpuIdx() { return {}; } + static constexpr FieldMetadata_VcpuIdx kVcpuIdx{}; void set_vcpu_idx(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_VcpuIdx::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -98817,14 +93464,7 @@ class KvmHvcArm64FtraceEvent : public ::protozero::Message { uint64_t, KvmHvcArm64FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Imm kImm() { return {}; } + static constexpr FieldMetadata_Imm kImm{}; void set_imm(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Imm::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -98842,14 +93482,7 @@ class KvmHvcArm64FtraceEvent : public ::protozero::Message { uint64_t, KvmHvcArm64FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_R0 kR0() { return {}; } + static constexpr FieldMetadata_R0 kR0{}; void set_r0(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_R0::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -98867,14 +93500,7 @@ class KvmHvcArm64FtraceEvent : public ::protozero::Message { uint64_t, KvmHvcArm64FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_VcpuPc kVcpuPc() { return {}; } + static constexpr FieldMetadata_VcpuPc kVcpuPc{}; void set_vcpu_pc(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_VcpuPc::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -98911,14 +93537,7 @@ class KvmHandleSysRegFtraceEvent : public ::protozero::Message { uint64_t, KvmHandleSysRegFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Hsr kHsr() { return {}; } + static constexpr FieldMetadata_Hsr kHsr{}; void set_hsr(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Hsr::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -98964,14 +93583,7 @@ class KvmGuestFaultFtraceEvent : public ::protozero::Message { uint64_t, KvmGuestFaultFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Hsr kHsr() { return {}; } + static constexpr FieldMetadata_Hsr kHsr{}; void set_hsr(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Hsr::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -98989,14 +93601,7 @@ class KvmGuestFaultFtraceEvent : public ::protozero::Message { uint64_t, KvmGuestFaultFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Hxfar kHxfar() { return {}; } + static constexpr FieldMetadata_Hxfar kHxfar{}; void set_hxfar(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Hxfar::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -99014,14 +93619,7 @@ class KvmGuestFaultFtraceEvent : public ::protozero::Message { uint64_t, KvmGuestFaultFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ipa kIpa() { return {}; } + static constexpr FieldMetadata_Ipa kIpa{}; void set_ipa(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Ipa::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -99039,14 +93637,7 @@ class KvmGuestFaultFtraceEvent : public ::protozero::Message { uint64_t, KvmGuestFaultFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_VcpuPc kVcpuPc() { return {}; } + static constexpr FieldMetadata_VcpuPc kVcpuPc{}; void set_vcpu_pc(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_VcpuPc::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -99092,14 +93683,7 @@ class KvmGetTimerMapFtraceEvent : public ::protozero::Message { int32_t, KvmGetTimerMapFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_DirectPtimer kDirectPtimer() { return {}; } + static constexpr FieldMetadata_DirectPtimer kDirectPtimer{}; void set_direct_ptimer(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_DirectPtimer::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -99117,14 +93701,7 @@ class KvmGetTimerMapFtraceEvent : public ::protozero::Message { int32_t, KvmGetTimerMapFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_DirectVtimer kDirectVtimer() { return {}; } + static constexpr FieldMetadata_DirectVtimer kDirectVtimer{}; void set_direct_vtimer(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_DirectVtimer::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -99142,14 +93719,7 @@ class KvmGetTimerMapFtraceEvent : public ::protozero::Message { int32_t, KvmGetTimerMapFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_EmulPtimer kEmulPtimer() { return {}; } + static constexpr FieldMetadata_EmulPtimer kEmulPtimer{}; void set_emul_ptimer(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_EmulPtimer::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -99167,14 +93737,7 @@ class KvmGetTimerMapFtraceEvent : public ::protozero::Message { uint64_t, KvmGetTimerMapFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_VcpuId kVcpuId() { return {}; } + static constexpr FieldMetadata_VcpuId kVcpuId{}; void set_vcpu_id(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_VcpuId::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -99211,14 +93774,7 @@ class KvmFpuFtraceEvent : public ::protozero::Message { uint32_t, KvmFpuFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Load kLoad() { return {}; } + static constexpr FieldMetadata_Load kLoad{}; void set_load(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Load::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -99261,14 +93817,7 @@ class KvmExitFtraceEvent : public ::protozero::Message { uint32_t, KvmExitFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_EsrEc kEsrEc() { return {}; } + static constexpr FieldMetadata_EsrEc kEsrEc{}; void set_esr_ec(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_EsrEc::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -99286,14 +93835,7 @@ class KvmExitFtraceEvent : public ::protozero::Message { int32_t, KvmExitFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ret kRet() { return {}; } + static constexpr FieldMetadata_Ret kRet{}; void set_ret(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Ret::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -99311,14 +93853,7 @@ class KvmExitFtraceEvent : public ::protozero::Message { uint64_t, KvmExitFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_VcpuPc kVcpuPc() { return {}; } + static constexpr FieldMetadata_VcpuPc kVcpuPc{}; void set_vcpu_pc(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_VcpuPc::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -99355,14 +93890,7 @@ class KvmEntryFtraceEvent : public ::protozero::Message { uint64_t, KvmEntryFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_VcpuPc kVcpuPc() { return {}; } + static constexpr FieldMetadata_VcpuPc kVcpuPc{}; void set_vcpu_pc(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_VcpuPc::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -99402,14 +93930,7 @@ class KvmArmSetupDebugFtraceEvent : public ::protozero::Message { uint32_t, KvmArmSetupDebugFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_GuestDebug kGuestDebug() { return {}; } + static constexpr FieldMetadata_GuestDebug kGuestDebug{}; void set_guest_debug(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_GuestDebug::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -99427,14 +93948,7 @@ class KvmArmSetupDebugFtraceEvent : public ::protozero::Message { uint64_t, KvmArmSetupDebugFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Vcpu kVcpu() { return {}; } + static constexpr FieldMetadata_Vcpu kVcpu{}; void set_vcpu(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Vcpu::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -99474,14 +93988,7 @@ class KvmArmSetRegsetFtraceEvent : public ::protozero::Message { int32_t, KvmArmSetRegsetFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Len kLen() { return {}; } + static constexpr FieldMetadata_Len kLen{}; void set_len(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Len::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -99499,17 +94006,13 @@ class KvmArmSetRegsetFtraceEvent : public ::protozero::Message { std::string, KvmArmSetRegsetFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Name kName() { return {}; } + static constexpr FieldMetadata_Name kName{}; void set_name(const char* data, size_t size) { AppendBytes(FieldMetadata_Name::kFieldId, data, size); } + void set_name(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Name::kFieldId, chars.data, chars.size); + } void set_name(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Name::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -99549,17 +94052,13 @@ class KvmArmSetDreg32FtraceEvent : public ::protozero::Message { std::string, KvmArmSetDreg32FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Name kName() { return {}; } + static constexpr FieldMetadata_Name kName{}; void set_name(const char* data, size_t size) { AppendBytes(FieldMetadata_Name::kFieldId, data, size); } + void set_name(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Name::kFieldId, chars.data, chars.size); + } void set_name(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Name::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -99577,14 +94076,7 @@ class KvmArmSetDreg32FtraceEvent : public ::protozero::Message { uint32_t, KvmArmSetDreg32FtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Value kValue() { return {}; } + static constexpr FieldMetadata_Value kValue{}; void set_value(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Value::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -99621,14 +94113,7 @@ class KvmArmClearDebugFtraceEvent : public ::protozero::Message { uint32_t, KvmArmClearDebugFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_GuestDebug kGuestDebug() { return {}; } + static constexpr FieldMetadata_GuestDebug kGuestDebug{}; void set_guest_debug(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_GuestDebug::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -99674,14 +94159,7 @@ class KvmAgePageFtraceEvent : public ::protozero::Message { uint64_t, KvmAgePageFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Gfn kGfn() { return {}; } + static constexpr FieldMetadata_Gfn kGfn{}; void set_gfn(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Gfn::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -99699,14 +94177,7 @@ class KvmAgePageFtraceEvent : public ::protozero::Message { uint64_t, KvmAgePageFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Hva kHva() { return {}; } + static constexpr FieldMetadata_Hva kHva{}; void set_hva(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Hva::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -99724,14 +94195,7 @@ class KvmAgePageFtraceEvent : public ::protozero::Message { uint32_t, KvmAgePageFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Level kLevel() { return {}; } + static constexpr FieldMetadata_Level kLevel{}; void set_level(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Level::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -99749,14 +94213,7 @@ class KvmAgePageFtraceEvent : public ::protozero::Message { uint32_t, KvmAgePageFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Referenced kReferenced() { return {}; } + static constexpr FieldMetadata_Referenced kReferenced{}; void set_referenced(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Referenced::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -99796,14 +94253,7 @@ class KvmAgeHvaFtraceEvent : public ::protozero::Message { uint64_t, KvmAgeHvaFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_End kEnd() { return {}; } + static constexpr FieldMetadata_End kEnd{}; void set_end(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_End::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -99821,14 +94271,7 @@ class KvmAgeHvaFtraceEvent : public ::protozero::Message { uint64_t, KvmAgeHvaFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Start kStart() { return {}; } + static constexpr FieldMetadata_Start kStart{}; void set_start(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Start::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -99868,14 +94311,7 @@ class KvmAckIrqFtraceEvent : public ::protozero::Message { uint32_t, KvmAckIrqFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Irqchip kIrqchip() { return {}; } + static constexpr FieldMetadata_Irqchip kIrqchip{}; void set_irqchip(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Irqchip::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -99893,14 +94329,7 @@ class KvmAckIrqFtraceEvent : public ::protozero::Message { uint32_t, KvmAckIrqFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Pin kPin() { return {}; } + static constexpr FieldMetadata_Pin kPin{}; void set_pin(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Pin::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -99937,14 +94366,7 @@ class KvmAccessFaultFtraceEvent : public ::protozero::Message { uint64_t, KvmAccessFaultFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ipa kIpa() { return {}; } + static constexpr FieldMetadata_Ipa kIpa{}; void set_ipa(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Ipa::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -100017,17 +94439,13 @@ class LowmemoryKillFtraceEvent : public ::protozero::Message { std::string, LowmemoryKillFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Comm kComm() { return {}; } + static constexpr FieldMetadata_Comm kComm{}; void set_comm(const char* data, size_t size) { AppendBytes(FieldMetadata_Comm::kFieldId, data, size); } + void set_comm(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Comm::kFieldId, chars.data, chars.size); + } void set_comm(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Comm::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -100045,14 +94463,7 @@ class LowmemoryKillFtraceEvent : public ::protozero::Message { int32_t, LowmemoryKillFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Pid kPid() { return {}; } + static constexpr FieldMetadata_Pid kPid{}; void set_pid(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Pid::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -100070,14 +94481,7 @@ class LowmemoryKillFtraceEvent : public ::protozero::Message { int64_t, LowmemoryKillFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_PagecacheSize kPagecacheSize() { return {}; } + static constexpr FieldMetadata_PagecacheSize kPagecacheSize{}; void set_pagecache_size(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_PagecacheSize::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -100095,14 +94499,7 @@ class LowmemoryKillFtraceEvent : public ::protozero::Message { int64_t, LowmemoryKillFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_PagecacheLimit kPagecacheLimit() { return {}; } + static constexpr FieldMetadata_PagecacheLimit kPagecacheLimit{}; void set_pagecache_limit(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_PagecacheLimit::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -100120,14 +94517,7 @@ class LowmemoryKillFtraceEvent : public ::protozero::Message { int64_t, LowmemoryKillFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Free kFree() { return {}; } + static constexpr FieldMetadata_Free kFree{}; void set_free(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_Free::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -100138,6 +94528,163 @@ class LowmemoryKillFtraceEvent : public ::protozero::Message { } }; +} // Namespace. +} // Namespace. +} // Namespace. +#endif // Include guard. +// gen_amalgamated begin header: gen/protos/perfetto/trace/ftrace/lwis.pbzero.h +// Autogenerated by the ProtoZero compiler plugin. DO NOT EDIT. + +#ifndef PERFETTO_PROTOS_PROTOS_PERFETTO_TRACE_FTRACE_LWIS_PROTO_H_ +#define PERFETTO_PROTOS_PROTOS_PERFETTO_TRACE_FTRACE_LWIS_PROTO_H_ + +#include +#include + +// gen_amalgamated expanded: #include "perfetto/protozero/field_writer.h" +// gen_amalgamated expanded: #include "perfetto/protozero/message.h" +// gen_amalgamated expanded: #include "perfetto/protozero/packed_repeated_fields.h" +// gen_amalgamated expanded: #include "perfetto/protozero/proto_decoder.h" +// gen_amalgamated expanded: #include "perfetto/protozero/proto_utils.h" + +namespace perfetto { +namespace protos { +namespace pbzero { + + +class LwisTracingMarkWriteFtraceEvent_Decoder : public ::protozero::TypedProtoDecoder { + public: + LwisTracingMarkWriteFtraceEvent_Decoder(const uint8_t* data, size_t len) : TypedProtoDecoder(data, len) {} + explicit LwisTracingMarkWriteFtraceEvent_Decoder(const std::string& raw) : TypedProtoDecoder(reinterpret_cast(raw.data()), raw.size()) {} + explicit LwisTracingMarkWriteFtraceEvent_Decoder(const ::protozero::ConstBytes& raw) : TypedProtoDecoder(raw.data, raw.size) {} + bool has_lwis_name() const { return at<1>().valid(); } + ::protozero::ConstChars lwis_name() const { return at<1>().as_string(); } + bool has_type() const { return at<2>().valid(); } + uint32_t type() const { return at<2>().as_uint32(); } + bool has_pid() const { return at<3>().valid(); } + int32_t pid() const { return at<3>().as_int32(); } + bool has_func_name() const { return at<4>().valid(); } + ::protozero::ConstChars func_name() const { return at<4>().as_string(); } + bool has_value() const { return at<5>().valid(); } + int64_t value() const { return at<5>().as_int64(); } +}; + +class LwisTracingMarkWriteFtraceEvent : public ::protozero::Message { + public: + using Decoder = LwisTracingMarkWriteFtraceEvent_Decoder; + enum : int32_t { + kLwisNameFieldNumber = 1, + kTypeFieldNumber = 2, + kPidFieldNumber = 3, + kFuncNameFieldNumber = 4, + kValueFieldNumber = 5, + }; + static constexpr const char* GetName() { return ".perfetto.protos.LwisTracingMarkWriteFtraceEvent"; } + + + using FieldMetadata_LwisName = + ::protozero::proto_utils::FieldMetadata< + 1, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kString, + std::string, + LwisTracingMarkWriteFtraceEvent>; + + static constexpr FieldMetadata_LwisName kLwisName{}; + void set_lwis_name(const char* data, size_t size) { + AppendBytes(FieldMetadata_LwisName::kFieldId, data, size); + } + void set_lwis_name(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_LwisName::kFieldId, chars.data, chars.size); + } + void set_lwis_name(std::string value) { + static constexpr uint32_t field_id = FieldMetadata_LwisName::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kString> + ::Append(*this, field_id, value); + } + + using FieldMetadata_Type = + ::protozero::proto_utils::FieldMetadata< + 2, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint32, + uint32_t, + LwisTracingMarkWriteFtraceEvent>; + + static constexpr FieldMetadata_Type kType{}; + void set_type(uint32_t value) { + static constexpr uint32_t field_id = FieldMetadata_Type::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint32> + ::Append(*this, field_id, value); + } + + using FieldMetadata_Pid = + ::protozero::proto_utils::FieldMetadata< + 3, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kInt32, + int32_t, + LwisTracingMarkWriteFtraceEvent>; + + static constexpr FieldMetadata_Pid kPid{}; + void set_pid(int32_t value) { + static constexpr uint32_t field_id = FieldMetadata_Pid::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kInt32> + ::Append(*this, field_id, value); + } + + using FieldMetadata_FuncName = + ::protozero::proto_utils::FieldMetadata< + 4, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kString, + std::string, + LwisTracingMarkWriteFtraceEvent>; + + static constexpr FieldMetadata_FuncName kFuncName{}; + void set_func_name(const char* data, size_t size) { + AppendBytes(FieldMetadata_FuncName::kFieldId, data, size); + } + void set_func_name(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_FuncName::kFieldId, chars.data, chars.size); + } + void set_func_name(std::string value) { + static constexpr uint32_t field_id = FieldMetadata_FuncName::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kString> + ::Append(*this, field_id, value); + } + + using FieldMetadata_Value = + ::protozero::proto_utils::FieldMetadata< + 5, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kInt64, + int64_t, + LwisTracingMarkWriteFtraceEvent>; + + static constexpr FieldMetadata_Value kValue{}; + void set_value(int64_t value) { + static constexpr uint32_t field_id = FieldMetadata_Value::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kInt64> + ::Append(*this, field_id, value); + } +}; + } // Namespace. } // Namespace. } // Namespace. @@ -100162,6 +94709,890 @@ namespace protos { namespace pbzero { +class MaliMaliCSFINTERRUPTENDFtraceEvent_Decoder : public ::protozero::TypedProtoDecoder { + public: + MaliMaliCSFINTERRUPTENDFtraceEvent_Decoder(const uint8_t* data, size_t len) : TypedProtoDecoder(data, len) {} + explicit MaliMaliCSFINTERRUPTENDFtraceEvent_Decoder(const std::string& raw) : TypedProtoDecoder(reinterpret_cast(raw.data()), raw.size()) {} + explicit MaliMaliCSFINTERRUPTENDFtraceEvent_Decoder(const ::protozero::ConstBytes& raw) : TypedProtoDecoder(raw.data, raw.size) {} + bool has_kctx_tgid() const { return at<1>().valid(); } + int32_t kctx_tgid() const { return at<1>().as_int32(); } + bool has_kctx_id() const { return at<2>().valid(); } + uint32_t kctx_id() const { return at<2>().as_uint32(); } + bool has_info_val() const { return at<3>().valid(); } + uint64_t info_val() const { return at<3>().as_uint64(); } +}; + +class MaliMaliCSFINTERRUPTENDFtraceEvent : public ::protozero::Message { + public: + using Decoder = MaliMaliCSFINTERRUPTENDFtraceEvent_Decoder; + enum : int32_t { + kKctxTgidFieldNumber = 1, + kKctxIdFieldNumber = 2, + kInfoValFieldNumber = 3, + }; + static constexpr const char* GetName() { return ".perfetto.protos.MaliMaliCSFINTERRUPTENDFtraceEvent"; } + + + using FieldMetadata_KctxTgid = + ::protozero::proto_utils::FieldMetadata< + 1, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kInt32, + int32_t, + MaliMaliCSFINTERRUPTENDFtraceEvent>; + + static constexpr FieldMetadata_KctxTgid kKctxTgid{}; + void set_kctx_tgid(int32_t value) { + static constexpr uint32_t field_id = FieldMetadata_KctxTgid::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kInt32> + ::Append(*this, field_id, value); + } + + using FieldMetadata_KctxId = + ::protozero::proto_utils::FieldMetadata< + 2, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint32, + uint32_t, + MaliMaliCSFINTERRUPTENDFtraceEvent>; + + static constexpr FieldMetadata_KctxId kKctxId{}; + void set_kctx_id(uint32_t value) { + static constexpr uint32_t field_id = FieldMetadata_KctxId::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint32> + ::Append(*this, field_id, value); + } + + using FieldMetadata_InfoVal = + ::protozero::proto_utils::FieldMetadata< + 3, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint64, + uint64_t, + MaliMaliCSFINTERRUPTENDFtraceEvent>; + + static constexpr FieldMetadata_InfoVal kInfoVal{}; + void set_info_val(uint64_t value) { + static constexpr uint32_t field_id = FieldMetadata_InfoVal::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint64> + ::Append(*this, field_id, value); + } +}; + +class MaliMaliCSFINTERRUPTSTARTFtraceEvent_Decoder : public ::protozero::TypedProtoDecoder { + public: + MaliMaliCSFINTERRUPTSTARTFtraceEvent_Decoder(const uint8_t* data, size_t len) : TypedProtoDecoder(data, len) {} + explicit MaliMaliCSFINTERRUPTSTARTFtraceEvent_Decoder(const std::string& raw) : TypedProtoDecoder(reinterpret_cast(raw.data()), raw.size()) {} + explicit MaliMaliCSFINTERRUPTSTARTFtraceEvent_Decoder(const ::protozero::ConstBytes& raw) : TypedProtoDecoder(raw.data, raw.size) {} + bool has_kctx_tgid() const { return at<1>().valid(); } + int32_t kctx_tgid() const { return at<1>().as_int32(); } + bool has_kctx_id() const { return at<2>().valid(); } + uint32_t kctx_id() const { return at<2>().as_uint32(); } + bool has_info_val() const { return at<3>().valid(); } + uint64_t info_val() const { return at<3>().as_uint64(); } +}; + +class MaliMaliCSFINTERRUPTSTARTFtraceEvent : public ::protozero::Message { + public: + using Decoder = MaliMaliCSFINTERRUPTSTARTFtraceEvent_Decoder; + enum : int32_t { + kKctxTgidFieldNumber = 1, + kKctxIdFieldNumber = 2, + kInfoValFieldNumber = 3, + }; + static constexpr const char* GetName() { return ".perfetto.protos.MaliMaliCSFINTERRUPTSTARTFtraceEvent"; } + + + using FieldMetadata_KctxTgid = + ::protozero::proto_utils::FieldMetadata< + 1, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kInt32, + int32_t, + MaliMaliCSFINTERRUPTSTARTFtraceEvent>; + + static constexpr FieldMetadata_KctxTgid kKctxTgid{}; + void set_kctx_tgid(int32_t value) { + static constexpr uint32_t field_id = FieldMetadata_KctxTgid::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kInt32> + ::Append(*this, field_id, value); + } + + using FieldMetadata_KctxId = + ::protozero::proto_utils::FieldMetadata< + 2, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint32, + uint32_t, + MaliMaliCSFINTERRUPTSTARTFtraceEvent>; + + static constexpr FieldMetadata_KctxId kKctxId{}; + void set_kctx_id(uint32_t value) { + static constexpr uint32_t field_id = FieldMetadata_KctxId::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint32> + ::Append(*this, field_id, value); + } + + using FieldMetadata_InfoVal = + ::protozero::proto_utils::FieldMetadata< + 3, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint64, + uint64_t, + MaliMaliCSFINTERRUPTSTARTFtraceEvent>; + + static constexpr FieldMetadata_InfoVal kInfoVal{}; + void set_info_val(uint64_t value) { + static constexpr uint32_t field_id = FieldMetadata_InfoVal::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint64> + ::Append(*this, field_id, value); + } +}; + +class MaliMaliKCPUFENCEWAITENDFtraceEvent_Decoder : public ::protozero::TypedProtoDecoder { + public: + MaliMaliKCPUFENCEWAITENDFtraceEvent_Decoder(const uint8_t* data, size_t len) : TypedProtoDecoder(data, len) {} + explicit MaliMaliKCPUFENCEWAITENDFtraceEvent_Decoder(const std::string& raw) : TypedProtoDecoder(reinterpret_cast(raw.data()), raw.size()) {} + explicit MaliMaliKCPUFENCEWAITENDFtraceEvent_Decoder(const ::protozero::ConstBytes& raw) : TypedProtoDecoder(raw.data, raw.size) {} + bool has_info_val1() const { return at<1>().valid(); } + uint64_t info_val1() const { return at<1>().as_uint64(); } + bool has_info_val2() const { return at<2>().valid(); } + uint64_t info_val2() const { return at<2>().as_uint64(); } + bool has_kctx_tgid() const { return at<3>().valid(); } + int32_t kctx_tgid() const { return at<3>().as_int32(); } + bool has_kctx_id() const { return at<4>().valid(); } + uint32_t kctx_id() const { return at<4>().as_uint32(); } + bool has_id() const { return at<5>().valid(); } + uint32_t id() const { return at<5>().as_uint32(); } +}; + +class MaliMaliKCPUFENCEWAITENDFtraceEvent : public ::protozero::Message { + public: + using Decoder = MaliMaliKCPUFENCEWAITENDFtraceEvent_Decoder; + enum : int32_t { + kInfoVal1FieldNumber = 1, + kInfoVal2FieldNumber = 2, + kKctxTgidFieldNumber = 3, + kKctxIdFieldNumber = 4, + kIdFieldNumber = 5, + }; + static constexpr const char* GetName() { return ".perfetto.protos.MaliMaliKCPUFENCEWAITENDFtraceEvent"; } + + + using FieldMetadata_InfoVal1 = + ::protozero::proto_utils::FieldMetadata< + 1, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint64, + uint64_t, + MaliMaliKCPUFENCEWAITENDFtraceEvent>; + + static constexpr FieldMetadata_InfoVal1 kInfoVal1{}; + void set_info_val1(uint64_t value) { + static constexpr uint32_t field_id = FieldMetadata_InfoVal1::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint64> + ::Append(*this, field_id, value); + } + + using FieldMetadata_InfoVal2 = + ::protozero::proto_utils::FieldMetadata< + 2, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint64, + uint64_t, + MaliMaliKCPUFENCEWAITENDFtraceEvent>; + + static constexpr FieldMetadata_InfoVal2 kInfoVal2{}; + void set_info_val2(uint64_t value) { + static constexpr uint32_t field_id = FieldMetadata_InfoVal2::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint64> + ::Append(*this, field_id, value); + } + + using FieldMetadata_KctxTgid = + ::protozero::proto_utils::FieldMetadata< + 3, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kInt32, + int32_t, + MaliMaliKCPUFENCEWAITENDFtraceEvent>; + + static constexpr FieldMetadata_KctxTgid kKctxTgid{}; + void set_kctx_tgid(int32_t value) { + static constexpr uint32_t field_id = FieldMetadata_KctxTgid::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kInt32> + ::Append(*this, field_id, value); + } + + using FieldMetadata_KctxId = + ::protozero::proto_utils::FieldMetadata< + 4, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint32, + uint32_t, + MaliMaliKCPUFENCEWAITENDFtraceEvent>; + + static constexpr FieldMetadata_KctxId kKctxId{}; + void set_kctx_id(uint32_t value) { + static constexpr uint32_t field_id = FieldMetadata_KctxId::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint32> + ::Append(*this, field_id, value); + } + + using FieldMetadata_Id = + ::protozero::proto_utils::FieldMetadata< + 5, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint32, + uint32_t, + MaliMaliKCPUFENCEWAITENDFtraceEvent>; + + static constexpr FieldMetadata_Id kId{}; + void set_id(uint32_t value) { + static constexpr uint32_t field_id = FieldMetadata_Id::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint32> + ::Append(*this, field_id, value); + } +}; + +class MaliMaliKCPUFENCEWAITSTARTFtraceEvent_Decoder : public ::protozero::TypedProtoDecoder { + public: + MaliMaliKCPUFENCEWAITSTARTFtraceEvent_Decoder(const uint8_t* data, size_t len) : TypedProtoDecoder(data, len) {} + explicit MaliMaliKCPUFENCEWAITSTARTFtraceEvent_Decoder(const std::string& raw) : TypedProtoDecoder(reinterpret_cast(raw.data()), raw.size()) {} + explicit MaliMaliKCPUFENCEWAITSTARTFtraceEvent_Decoder(const ::protozero::ConstBytes& raw) : TypedProtoDecoder(raw.data, raw.size) {} + bool has_info_val1() const { return at<1>().valid(); } + uint64_t info_val1() const { return at<1>().as_uint64(); } + bool has_info_val2() const { return at<2>().valid(); } + uint64_t info_val2() const { return at<2>().as_uint64(); } + bool has_kctx_tgid() const { return at<3>().valid(); } + int32_t kctx_tgid() const { return at<3>().as_int32(); } + bool has_kctx_id() const { return at<4>().valid(); } + uint32_t kctx_id() const { return at<4>().as_uint32(); } + bool has_id() const { return at<5>().valid(); } + uint32_t id() const { return at<5>().as_uint32(); } +}; + +class MaliMaliKCPUFENCEWAITSTARTFtraceEvent : public ::protozero::Message { + public: + using Decoder = MaliMaliKCPUFENCEWAITSTARTFtraceEvent_Decoder; + enum : int32_t { + kInfoVal1FieldNumber = 1, + kInfoVal2FieldNumber = 2, + kKctxTgidFieldNumber = 3, + kKctxIdFieldNumber = 4, + kIdFieldNumber = 5, + }; + static constexpr const char* GetName() { return ".perfetto.protos.MaliMaliKCPUFENCEWAITSTARTFtraceEvent"; } + + + using FieldMetadata_InfoVal1 = + ::protozero::proto_utils::FieldMetadata< + 1, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint64, + uint64_t, + MaliMaliKCPUFENCEWAITSTARTFtraceEvent>; + + static constexpr FieldMetadata_InfoVal1 kInfoVal1{}; + void set_info_val1(uint64_t value) { + static constexpr uint32_t field_id = FieldMetadata_InfoVal1::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint64> + ::Append(*this, field_id, value); + } + + using FieldMetadata_InfoVal2 = + ::protozero::proto_utils::FieldMetadata< + 2, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint64, + uint64_t, + MaliMaliKCPUFENCEWAITSTARTFtraceEvent>; + + static constexpr FieldMetadata_InfoVal2 kInfoVal2{}; + void set_info_val2(uint64_t value) { + static constexpr uint32_t field_id = FieldMetadata_InfoVal2::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint64> + ::Append(*this, field_id, value); + } + + using FieldMetadata_KctxTgid = + ::protozero::proto_utils::FieldMetadata< + 3, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kInt32, + int32_t, + MaliMaliKCPUFENCEWAITSTARTFtraceEvent>; + + static constexpr FieldMetadata_KctxTgid kKctxTgid{}; + void set_kctx_tgid(int32_t value) { + static constexpr uint32_t field_id = FieldMetadata_KctxTgid::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kInt32> + ::Append(*this, field_id, value); + } + + using FieldMetadata_KctxId = + ::protozero::proto_utils::FieldMetadata< + 4, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint32, + uint32_t, + MaliMaliKCPUFENCEWAITSTARTFtraceEvent>; + + static constexpr FieldMetadata_KctxId kKctxId{}; + void set_kctx_id(uint32_t value) { + static constexpr uint32_t field_id = FieldMetadata_KctxId::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint32> + ::Append(*this, field_id, value); + } + + using FieldMetadata_Id = + ::protozero::proto_utils::FieldMetadata< + 5, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint32, + uint32_t, + MaliMaliKCPUFENCEWAITSTARTFtraceEvent>; + + static constexpr FieldMetadata_Id kId{}; + void set_id(uint32_t value) { + static constexpr uint32_t field_id = FieldMetadata_Id::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint32> + ::Append(*this, field_id, value); + } +}; + +class MaliMaliKCPUFENCESIGNALFtraceEvent_Decoder : public ::protozero::TypedProtoDecoder { + public: + MaliMaliKCPUFENCESIGNALFtraceEvent_Decoder(const uint8_t* data, size_t len) : TypedProtoDecoder(data, len) {} + explicit MaliMaliKCPUFENCESIGNALFtraceEvent_Decoder(const std::string& raw) : TypedProtoDecoder(reinterpret_cast(raw.data()), raw.size()) {} + explicit MaliMaliKCPUFENCESIGNALFtraceEvent_Decoder(const ::protozero::ConstBytes& raw) : TypedProtoDecoder(raw.data, raw.size) {} + bool has_info_val1() const { return at<1>().valid(); } + uint64_t info_val1() const { return at<1>().as_uint64(); } + bool has_info_val2() const { return at<2>().valid(); } + uint64_t info_val2() const { return at<2>().as_uint64(); } + bool has_kctx_tgid() const { return at<3>().valid(); } + int32_t kctx_tgid() const { return at<3>().as_int32(); } + bool has_kctx_id() const { return at<4>().valid(); } + uint32_t kctx_id() const { return at<4>().as_uint32(); } + bool has_id() const { return at<5>().valid(); } + uint32_t id() const { return at<5>().as_uint32(); } +}; + +class MaliMaliKCPUFENCESIGNALFtraceEvent : public ::protozero::Message { + public: + using Decoder = MaliMaliKCPUFENCESIGNALFtraceEvent_Decoder; + enum : int32_t { + kInfoVal1FieldNumber = 1, + kInfoVal2FieldNumber = 2, + kKctxTgidFieldNumber = 3, + kKctxIdFieldNumber = 4, + kIdFieldNumber = 5, + }; + static constexpr const char* GetName() { return ".perfetto.protos.MaliMaliKCPUFENCESIGNALFtraceEvent"; } + + + using FieldMetadata_InfoVal1 = + ::protozero::proto_utils::FieldMetadata< + 1, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint64, + uint64_t, + MaliMaliKCPUFENCESIGNALFtraceEvent>; + + static constexpr FieldMetadata_InfoVal1 kInfoVal1{}; + void set_info_val1(uint64_t value) { + static constexpr uint32_t field_id = FieldMetadata_InfoVal1::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint64> + ::Append(*this, field_id, value); + } + + using FieldMetadata_InfoVal2 = + ::protozero::proto_utils::FieldMetadata< + 2, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint64, + uint64_t, + MaliMaliKCPUFENCESIGNALFtraceEvent>; + + static constexpr FieldMetadata_InfoVal2 kInfoVal2{}; + void set_info_val2(uint64_t value) { + static constexpr uint32_t field_id = FieldMetadata_InfoVal2::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint64> + ::Append(*this, field_id, value); + } + + using FieldMetadata_KctxTgid = + ::protozero::proto_utils::FieldMetadata< + 3, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kInt32, + int32_t, + MaliMaliKCPUFENCESIGNALFtraceEvent>; + + static constexpr FieldMetadata_KctxTgid kKctxTgid{}; + void set_kctx_tgid(int32_t value) { + static constexpr uint32_t field_id = FieldMetadata_KctxTgid::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kInt32> + ::Append(*this, field_id, value); + } + + using FieldMetadata_KctxId = + ::protozero::proto_utils::FieldMetadata< + 4, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint32, + uint32_t, + MaliMaliKCPUFENCESIGNALFtraceEvent>; + + static constexpr FieldMetadata_KctxId kKctxId{}; + void set_kctx_id(uint32_t value) { + static constexpr uint32_t field_id = FieldMetadata_KctxId::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint32> + ::Append(*this, field_id, value); + } + + using FieldMetadata_Id = + ::protozero::proto_utils::FieldMetadata< + 5, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint32, + uint32_t, + MaliMaliKCPUFENCESIGNALFtraceEvent>; + + static constexpr FieldMetadata_Id kId{}; + void set_id(uint32_t value) { + static constexpr uint32_t field_id = FieldMetadata_Id::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint32> + ::Append(*this, field_id, value); + } +}; + +class MaliMaliKCPUCQSWAITENDFtraceEvent_Decoder : public ::protozero::TypedProtoDecoder { + public: + MaliMaliKCPUCQSWAITENDFtraceEvent_Decoder(const uint8_t* data, size_t len) : TypedProtoDecoder(data, len) {} + explicit MaliMaliKCPUCQSWAITENDFtraceEvent_Decoder(const std::string& raw) : TypedProtoDecoder(reinterpret_cast(raw.data()), raw.size()) {} + explicit MaliMaliKCPUCQSWAITENDFtraceEvent_Decoder(const ::protozero::ConstBytes& raw) : TypedProtoDecoder(raw.data, raw.size) {} + bool has_id() const { return at<1>().valid(); } + uint32_t id() const { return at<1>().as_uint32(); } + bool has_info_val1() const { return at<2>().valid(); } + uint64_t info_val1() const { return at<2>().as_uint64(); } + bool has_info_val2() const { return at<3>().valid(); } + uint64_t info_val2() const { return at<3>().as_uint64(); } + bool has_kctx_id() const { return at<4>().valid(); } + uint32_t kctx_id() const { return at<4>().as_uint32(); } + bool has_kctx_tgid() const { return at<5>().valid(); } + int32_t kctx_tgid() const { return at<5>().as_int32(); } +}; + +class MaliMaliKCPUCQSWAITENDFtraceEvent : public ::protozero::Message { + public: + using Decoder = MaliMaliKCPUCQSWAITENDFtraceEvent_Decoder; + enum : int32_t { + kIdFieldNumber = 1, + kInfoVal1FieldNumber = 2, + kInfoVal2FieldNumber = 3, + kKctxIdFieldNumber = 4, + kKctxTgidFieldNumber = 5, + }; + static constexpr const char* GetName() { return ".perfetto.protos.MaliMaliKCPUCQSWAITENDFtraceEvent"; } + + + using FieldMetadata_Id = + ::protozero::proto_utils::FieldMetadata< + 1, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint32, + uint32_t, + MaliMaliKCPUCQSWAITENDFtraceEvent>; + + static constexpr FieldMetadata_Id kId{}; + void set_id(uint32_t value) { + static constexpr uint32_t field_id = FieldMetadata_Id::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint32> + ::Append(*this, field_id, value); + } + + using FieldMetadata_InfoVal1 = + ::protozero::proto_utils::FieldMetadata< + 2, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint64, + uint64_t, + MaliMaliKCPUCQSWAITENDFtraceEvent>; + + static constexpr FieldMetadata_InfoVal1 kInfoVal1{}; + void set_info_val1(uint64_t value) { + static constexpr uint32_t field_id = FieldMetadata_InfoVal1::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint64> + ::Append(*this, field_id, value); + } + + using FieldMetadata_InfoVal2 = + ::protozero::proto_utils::FieldMetadata< + 3, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint64, + uint64_t, + MaliMaliKCPUCQSWAITENDFtraceEvent>; + + static constexpr FieldMetadata_InfoVal2 kInfoVal2{}; + void set_info_val2(uint64_t value) { + static constexpr uint32_t field_id = FieldMetadata_InfoVal2::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint64> + ::Append(*this, field_id, value); + } + + using FieldMetadata_KctxId = + ::protozero::proto_utils::FieldMetadata< + 4, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint32, + uint32_t, + MaliMaliKCPUCQSWAITENDFtraceEvent>; + + static constexpr FieldMetadata_KctxId kKctxId{}; + void set_kctx_id(uint32_t value) { + static constexpr uint32_t field_id = FieldMetadata_KctxId::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint32> + ::Append(*this, field_id, value); + } + + using FieldMetadata_KctxTgid = + ::protozero::proto_utils::FieldMetadata< + 5, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kInt32, + int32_t, + MaliMaliKCPUCQSWAITENDFtraceEvent>; + + static constexpr FieldMetadata_KctxTgid kKctxTgid{}; + void set_kctx_tgid(int32_t value) { + static constexpr uint32_t field_id = FieldMetadata_KctxTgid::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kInt32> + ::Append(*this, field_id, value); + } +}; + +class MaliMaliKCPUCQSWAITSTARTFtraceEvent_Decoder : public ::protozero::TypedProtoDecoder { + public: + MaliMaliKCPUCQSWAITSTARTFtraceEvent_Decoder(const uint8_t* data, size_t len) : TypedProtoDecoder(data, len) {} + explicit MaliMaliKCPUCQSWAITSTARTFtraceEvent_Decoder(const std::string& raw) : TypedProtoDecoder(reinterpret_cast(raw.data()), raw.size()) {} + explicit MaliMaliKCPUCQSWAITSTARTFtraceEvent_Decoder(const ::protozero::ConstBytes& raw) : TypedProtoDecoder(raw.data, raw.size) {} + bool has_id() const { return at<1>().valid(); } + uint32_t id() const { return at<1>().as_uint32(); } + bool has_info_val1() const { return at<2>().valid(); } + uint64_t info_val1() const { return at<2>().as_uint64(); } + bool has_info_val2() const { return at<3>().valid(); } + uint64_t info_val2() const { return at<3>().as_uint64(); } + bool has_kctx_id() const { return at<4>().valid(); } + uint32_t kctx_id() const { return at<4>().as_uint32(); } + bool has_kctx_tgid() const { return at<5>().valid(); } + int32_t kctx_tgid() const { return at<5>().as_int32(); } +}; + +class MaliMaliKCPUCQSWAITSTARTFtraceEvent : public ::protozero::Message { + public: + using Decoder = MaliMaliKCPUCQSWAITSTARTFtraceEvent_Decoder; + enum : int32_t { + kIdFieldNumber = 1, + kInfoVal1FieldNumber = 2, + kInfoVal2FieldNumber = 3, + kKctxIdFieldNumber = 4, + kKctxTgidFieldNumber = 5, + }; + static constexpr const char* GetName() { return ".perfetto.protos.MaliMaliKCPUCQSWAITSTARTFtraceEvent"; } + + + using FieldMetadata_Id = + ::protozero::proto_utils::FieldMetadata< + 1, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint32, + uint32_t, + MaliMaliKCPUCQSWAITSTARTFtraceEvent>; + + static constexpr FieldMetadata_Id kId{}; + void set_id(uint32_t value) { + static constexpr uint32_t field_id = FieldMetadata_Id::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint32> + ::Append(*this, field_id, value); + } + + using FieldMetadata_InfoVal1 = + ::protozero::proto_utils::FieldMetadata< + 2, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint64, + uint64_t, + MaliMaliKCPUCQSWAITSTARTFtraceEvent>; + + static constexpr FieldMetadata_InfoVal1 kInfoVal1{}; + void set_info_val1(uint64_t value) { + static constexpr uint32_t field_id = FieldMetadata_InfoVal1::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint64> + ::Append(*this, field_id, value); + } + + using FieldMetadata_InfoVal2 = + ::protozero::proto_utils::FieldMetadata< + 3, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint64, + uint64_t, + MaliMaliKCPUCQSWAITSTARTFtraceEvent>; + + static constexpr FieldMetadata_InfoVal2 kInfoVal2{}; + void set_info_val2(uint64_t value) { + static constexpr uint32_t field_id = FieldMetadata_InfoVal2::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint64> + ::Append(*this, field_id, value); + } + + using FieldMetadata_KctxId = + ::protozero::proto_utils::FieldMetadata< + 4, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint32, + uint32_t, + MaliMaliKCPUCQSWAITSTARTFtraceEvent>; + + static constexpr FieldMetadata_KctxId kKctxId{}; + void set_kctx_id(uint32_t value) { + static constexpr uint32_t field_id = FieldMetadata_KctxId::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint32> + ::Append(*this, field_id, value); + } + + using FieldMetadata_KctxTgid = + ::protozero::proto_utils::FieldMetadata< + 5, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kInt32, + int32_t, + MaliMaliKCPUCQSWAITSTARTFtraceEvent>; + + static constexpr FieldMetadata_KctxTgid kKctxTgid{}; + void set_kctx_tgid(int32_t value) { + static constexpr uint32_t field_id = FieldMetadata_KctxTgid::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kInt32> + ::Append(*this, field_id, value); + } +}; + +class MaliMaliKCPUCQSSETFtraceEvent_Decoder : public ::protozero::TypedProtoDecoder { + public: + MaliMaliKCPUCQSSETFtraceEvent_Decoder(const uint8_t* data, size_t len) : TypedProtoDecoder(data, len) {} + explicit MaliMaliKCPUCQSSETFtraceEvent_Decoder(const std::string& raw) : TypedProtoDecoder(reinterpret_cast(raw.data()), raw.size()) {} + explicit MaliMaliKCPUCQSSETFtraceEvent_Decoder(const ::protozero::ConstBytes& raw) : TypedProtoDecoder(raw.data, raw.size) {} + bool has_id() const { return at<1>().valid(); } + uint32_t id() const { return at<1>().as_uint32(); } + bool has_info_val1() const { return at<2>().valid(); } + uint64_t info_val1() const { return at<2>().as_uint64(); } + bool has_info_val2() const { return at<3>().valid(); } + uint64_t info_val2() const { return at<3>().as_uint64(); } + bool has_kctx_id() const { return at<4>().valid(); } + uint32_t kctx_id() const { return at<4>().as_uint32(); } + bool has_kctx_tgid() const { return at<5>().valid(); } + int32_t kctx_tgid() const { return at<5>().as_int32(); } +}; + +class MaliMaliKCPUCQSSETFtraceEvent : public ::protozero::Message { + public: + using Decoder = MaliMaliKCPUCQSSETFtraceEvent_Decoder; + enum : int32_t { + kIdFieldNumber = 1, + kInfoVal1FieldNumber = 2, + kInfoVal2FieldNumber = 3, + kKctxIdFieldNumber = 4, + kKctxTgidFieldNumber = 5, + }; + static constexpr const char* GetName() { return ".perfetto.protos.MaliMaliKCPUCQSSETFtraceEvent"; } + + + using FieldMetadata_Id = + ::protozero::proto_utils::FieldMetadata< + 1, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint32, + uint32_t, + MaliMaliKCPUCQSSETFtraceEvent>; + + static constexpr FieldMetadata_Id kId{}; + void set_id(uint32_t value) { + static constexpr uint32_t field_id = FieldMetadata_Id::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint32> + ::Append(*this, field_id, value); + } + + using FieldMetadata_InfoVal1 = + ::protozero::proto_utils::FieldMetadata< + 2, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint64, + uint64_t, + MaliMaliKCPUCQSSETFtraceEvent>; + + static constexpr FieldMetadata_InfoVal1 kInfoVal1{}; + void set_info_val1(uint64_t value) { + static constexpr uint32_t field_id = FieldMetadata_InfoVal1::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint64> + ::Append(*this, field_id, value); + } + + using FieldMetadata_InfoVal2 = + ::protozero::proto_utils::FieldMetadata< + 3, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint64, + uint64_t, + MaliMaliKCPUCQSSETFtraceEvent>; + + static constexpr FieldMetadata_InfoVal2 kInfoVal2{}; + void set_info_val2(uint64_t value) { + static constexpr uint32_t field_id = FieldMetadata_InfoVal2::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint64> + ::Append(*this, field_id, value); + } + + using FieldMetadata_KctxId = + ::protozero::proto_utils::FieldMetadata< + 4, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint32, + uint32_t, + MaliMaliKCPUCQSSETFtraceEvent>; + + static constexpr FieldMetadata_KctxId kKctxId{}; + void set_kctx_id(uint32_t value) { + static constexpr uint32_t field_id = FieldMetadata_KctxId::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint32> + ::Append(*this, field_id, value); + } + + using FieldMetadata_KctxTgid = + ::protozero::proto_utils::FieldMetadata< + 5, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kInt32, + int32_t, + MaliMaliKCPUCQSSETFtraceEvent>; + + static constexpr FieldMetadata_KctxTgid kKctxTgid{}; + void set_kctx_tgid(int32_t value) { + static constexpr uint32_t field_id = FieldMetadata_KctxTgid::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kInt32> + ::Append(*this, field_id, value); + } +}; + class MaliTracingMarkWriteFtraceEvent_Decoder : public ::protozero::TypedProtoDecoder { public: MaliTracingMarkWriteFtraceEvent_Decoder(const uint8_t* data, size_t len) : TypedProtoDecoder(data, len) {} @@ -100197,17 +95628,13 @@ class MaliTracingMarkWriteFtraceEvent : public ::protozero::Message { std::string, MaliTracingMarkWriteFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Name kName() { return {}; } + static constexpr FieldMetadata_Name kName{}; void set_name(const char* data, size_t size) { AppendBytes(FieldMetadata_Name::kFieldId, data, size); } + void set_name(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Name::kFieldId, chars.data, chars.size); + } void set_name(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Name::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -100225,14 +95652,7 @@ class MaliTracingMarkWriteFtraceEvent : public ::protozero::Message { int32_t, MaliTracingMarkWriteFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Pid kPid() { return {}; } + static constexpr FieldMetadata_Pid kPid{}; void set_pid(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Pid::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -100250,14 +95670,7 @@ class MaliTracingMarkWriteFtraceEvent : public ::protozero::Message { uint32_t, MaliTracingMarkWriteFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Type kType() { return {}; } + static constexpr FieldMetadata_Type kType{}; void set_type(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Type::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -100275,14 +95688,7 @@ class MaliTracingMarkWriteFtraceEvent : public ::protozero::Message { int32_t, MaliTracingMarkWriteFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Value kValue() { return {}; } + static constexpr FieldMetadata_Value kValue{}; void set_value(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Value::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -100343,14 +95749,7 @@ class RotatorBwAoAsContextFtraceEvent : public ::protozero::Message { uint32_t, RotatorBwAoAsContextFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_State kState() { return {}; } + static constexpr FieldMetadata_State kState{}; void set_state(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_State::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -100393,14 +95792,7 @@ class MdpPerfUpdateBusFtraceEvent : public ::protozero::Message { int32_t, MdpPerfUpdateBusFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Client kClient() { return {}; } + static constexpr FieldMetadata_Client kClient{}; void set_client(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Client::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -100418,14 +95810,7 @@ class MdpPerfUpdateBusFtraceEvent : public ::protozero::Message { uint64_t, MdpPerfUpdateBusFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_AbQuota kAbQuota() { return {}; } + static constexpr FieldMetadata_AbQuota kAbQuota{}; void set_ab_quota(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_AbQuota::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -100443,14 +95828,7 @@ class MdpPerfUpdateBusFtraceEvent : public ::protozero::Message { uint64_t, MdpPerfUpdateBusFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_IbQuota kIbQuota() { return {}; } + static constexpr FieldMetadata_IbQuota kIbQuota{}; void set_ib_quota(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_IbQuota::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -100514,14 +95892,7 @@ class MdpPerfPrefillCalcFtraceEvent : public ::protozero::Message { uint32_t, MdpPerfPrefillCalcFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Pnum kPnum() { return {}; } + static constexpr FieldMetadata_Pnum kPnum{}; void set_pnum(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Pnum::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -100539,14 +95910,7 @@ class MdpPerfPrefillCalcFtraceEvent : public ::protozero::Message { uint32_t, MdpPerfPrefillCalcFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_LatencyBuf kLatencyBuf() { return {}; } + static constexpr FieldMetadata_LatencyBuf kLatencyBuf{}; void set_latency_buf(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_LatencyBuf::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -100564,14 +95928,7 @@ class MdpPerfPrefillCalcFtraceEvent : public ::protozero::Message { uint32_t, MdpPerfPrefillCalcFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ot kOt() { return {}; } + static constexpr FieldMetadata_Ot kOt{}; void set_ot(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Ot::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -100589,14 +95946,7 @@ class MdpPerfPrefillCalcFtraceEvent : public ::protozero::Message { uint32_t, MdpPerfPrefillCalcFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_YBuf kYBuf() { return {}; } + static constexpr FieldMetadata_YBuf kYBuf{}; void set_y_buf(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_YBuf::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -100614,14 +95964,7 @@ class MdpPerfPrefillCalcFtraceEvent : public ::protozero::Message { uint32_t, MdpPerfPrefillCalcFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_YScaler kYScaler() { return {}; } + static constexpr FieldMetadata_YScaler kYScaler{}; void set_y_scaler(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_YScaler::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -100639,14 +95982,7 @@ class MdpPerfPrefillCalcFtraceEvent : public ::protozero::Message { uint32_t, MdpPerfPrefillCalcFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_PpLines kPpLines() { return {}; } + static constexpr FieldMetadata_PpLines kPpLines{}; void set_pp_lines(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_PpLines::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -100664,14 +96000,7 @@ class MdpPerfPrefillCalcFtraceEvent : public ::protozero::Message { uint32_t, MdpPerfPrefillCalcFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_PpBytes kPpBytes() { return {}; } + static constexpr FieldMetadata_PpBytes kPpBytes{}; void set_pp_bytes(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_PpBytes::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -100689,14 +96018,7 @@ class MdpPerfPrefillCalcFtraceEvent : public ::protozero::Message { uint32_t, MdpPerfPrefillCalcFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_PostSc kPostSc() { return {}; } + static constexpr FieldMetadata_PostSc kPostSc{}; void set_post_sc(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_PostSc::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -100714,14 +96036,7 @@ class MdpPerfPrefillCalcFtraceEvent : public ::protozero::Message { uint32_t, MdpPerfPrefillCalcFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_FbcBytes kFbcBytes() { return {}; } + static constexpr FieldMetadata_FbcBytes kFbcBytes{}; void set_fbc_bytes(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_FbcBytes::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -100739,14 +96054,7 @@ class MdpPerfPrefillCalcFtraceEvent : public ::protozero::Message { uint32_t, MdpPerfPrefillCalcFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_PrefillBytes kPrefillBytes() { return {}; } + static constexpr FieldMetadata_PrefillBytes kPrefillBytes{}; void set_prefill_bytes(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_PrefillBytes::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -100786,14 +96094,7 @@ class MdpCmdWaitPingpongFtraceEvent : public ::protozero::Message { uint32_t, MdpCmdWaitPingpongFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_CtlNum kCtlNum() { return {}; } + static constexpr FieldMetadata_CtlNum kCtlNum{}; void set_ctl_num(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_CtlNum::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -100811,14 +96112,7 @@ class MdpCmdWaitPingpongFtraceEvent : public ::protozero::Message { int32_t, MdpCmdWaitPingpongFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_KickoffCnt kKickoffCnt() { return {}; } + static constexpr FieldMetadata_KickoffCnt kKickoffCnt{}; void set_kickoff_cnt(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_KickoffCnt::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -100858,14 +96152,7 @@ class MdpVideoUnderrunDoneFtraceEvent : public ::protozero::Message { uint32_t, MdpVideoUnderrunDoneFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_CtlNum kCtlNum() { return {}; } + static constexpr FieldMetadata_CtlNum kCtlNum{}; void set_ctl_num(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_CtlNum::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -100883,14 +96170,7 @@ class MdpVideoUnderrunDoneFtraceEvent : public ::protozero::Message { uint32_t, MdpVideoUnderrunDoneFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_UnderrunCnt kUnderrunCnt() { return {}; } + static constexpr FieldMetadata_UnderrunCnt kUnderrunCnt{}; void set_underrun_cnt(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_UnderrunCnt::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -100948,14 +96228,7 @@ class MdpPerfSetWmLevelsFtraceEvent : public ::protozero::Message { uint32_t, MdpPerfSetWmLevelsFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Pnum kPnum() { return {}; } + static constexpr FieldMetadata_Pnum kPnum{}; void set_pnum(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Pnum::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -100973,14 +96246,7 @@ class MdpPerfSetWmLevelsFtraceEvent : public ::protozero::Message { uint32_t, MdpPerfSetWmLevelsFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_UseSpace kUseSpace() { return {}; } + static constexpr FieldMetadata_UseSpace kUseSpace{}; void set_use_space(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_UseSpace::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -100998,14 +96264,7 @@ class MdpPerfSetWmLevelsFtraceEvent : public ::protozero::Message { uint32_t, MdpPerfSetWmLevelsFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_PriorityBytes kPriorityBytes() { return {}; } + static constexpr FieldMetadata_PriorityBytes kPriorityBytes{}; void set_priority_bytes(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_PriorityBytes::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -101023,14 +96282,7 @@ class MdpPerfSetWmLevelsFtraceEvent : public ::protozero::Message { uint32_t, MdpPerfSetWmLevelsFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Wm0 kWm0() { return {}; } + static constexpr FieldMetadata_Wm0 kWm0{}; void set_wm0(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Wm0::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -101048,14 +96300,7 @@ class MdpPerfSetWmLevelsFtraceEvent : public ::protozero::Message { uint32_t, MdpPerfSetWmLevelsFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Wm1 kWm1() { return {}; } + static constexpr FieldMetadata_Wm1 kWm1{}; void set_wm1(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Wm1::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -101073,14 +96318,7 @@ class MdpPerfSetWmLevelsFtraceEvent : public ::protozero::Message { uint32_t, MdpPerfSetWmLevelsFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Wm2 kWm2() { return {}; } + static constexpr FieldMetadata_Wm2 kWm2{}; void set_wm2(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Wm2::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -101098,14 +96336,7 @@ class MdpPerfSetWmLevelsFtraceEvent : public ::protozero::Message { uint32_t, MdpPerfSetWmLevelsFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_MbCnt kMbCnt() { return {}; } + static constexpr FieldMetadata_MbCnt kMbCnt{}; void set_mb_cnt(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_MbCnt::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -101123,14 +96354,7 @@ class MdpPerfSetWmLevelsFtraceEvent : public ::protozero::Message { uint32_t, MdpPerfSetWmLevelsFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_MbSize kMbSize() { return {}; } + static constexpr FieldMetadata_MbSize kMbSize{}; void set_mb_size(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_MbSize::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -101167,14 +96391,7 @@ class MdpMixerUpdateFtraceEvent : public ::protozero::Message { uint32_t, MdpMixerUpdateFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_MixerNum kMixerNum() { return {}; } + static constexpr FieldMetadata_MixerNum kMixerNum{}; void set_mixer_num(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_MixerNum::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -101211,14 +96428,7 @@ class MdpCmdReleaseBwFtraceEvent : public ::protozero::Message { uint32_t, MdpCmdReleaseBwFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_CtlNum kCtlNum() { return {}; } + static constexpr FieldMetadata_CtlNum kCtlNum{}; void set_ctl_num(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_CtlNum::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -101261,14 +96471,7 @@ class MdpTraceCounterFtraceEvent : public ::protozero::Message { int32_t, MdpTraceCounterFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Pid kPid() { return {}; } + static constexpr FieldMetadata_Pid kPid{}; void set_pid(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Pid::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -101286,17 +96489,13 @@ class MdpTraceCounterFtraceEvent : public ::protozero::Message { std::string, MdpTraceCounterFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_CounterName kCounterName() { return {}; } + static constexpr FieldMetadata_CounterName kCounterName{}; void set_counter_name(const char* data, size_t size) { AppendBytes(FieldMetadata_CounterName::kFieldId, data, size); } + void set_counter_name(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_CounterName::kFieldId, chars.data, chars.size); + } void set_counter_name(std::string value) { static constexpr uint32_t field_id = FieldMetadata_CounterName::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -101314,14 +96513,7 @@ class MdpTraceCounterFtraceEvent : public ::protozero::Message { int32_t, MdpTraceCounterFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Value kValue() { return {}; } + static constexpr FieldMetadata_Value kValue{}; void set_value(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Value::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -101376,14 +96568,7 @@ class MdpPerfSetQosLutsFtraceEvent : public ::protozero::Message { uint32_t, MdpPerfSetQosLutsFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Pnum kPnum() { return {}; } + static constexpr FieldMetadata_Pnum kPnum{}; void set_pnum(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Pnum::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -101401,14 +96586,7 @@ class MdpPerfSetQosLutsFtraceEvent : public ::protozero::Message { uint32_t, MdpPerfSetQosLutsFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Fmt kFmt() { return {}; } + static constexpr FieldMetadata_Fmt kFmt{}; void set_fmt(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Fmt::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -101426,14 +96604,7 @@ class MdpPerfSetQosLutsFtraceEvent : public ::protozero::Message { uint32_t, MdpPerfSetQosLutsFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Intf kIntf() { return {}; } + static constexpr FieldMetadata_Intf kIntf{}; void set_intf(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Intf::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -101451,14 +96622,7 @@ class MdpPerfSetQosLutsFtraceEvent : public ::protozero::Message { uint32_t, MdpPerfSetQosLutsFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Rot kRot() { return {}; } + static constexpr FieldMetadata_Rot kRot{}; void set_rot(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Rot::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -101476,14 +96640,7 @@ class MdpPerfSetQosLutsFtraceEvent : public ::protozero::Message { uint32_t, MdpPerfSetQosLutsFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Fl kFl() { return {}; } + static constexpr FieldMetadata_Fl kFl{}; void set_fl(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Fl::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -101501,14 +96658,7 @@ class MdpPerfSetQosLutsFtraceEvent : public ::protozero::Message { uint32_t, MdpPerfSetQosLutsFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Lut kLut() { return {}; } + static constexpr FieldMetadata_Lut kLut{}; void set_lut(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Lut::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -101526,14 +96676,7 @@ class MdpPerfSetQosLutsFtraceEvent : public ::protozero::Message { uint32_t, MdpPerfSetQosLutsFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Linear kLinear() { return {}; } + static constexpr FieldMetadata_Linear kLinear{}; void set_linear(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Linear::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -101576,14 +96719,7 @@ class MdpMisrCrcFtraceEvent : public ::protozero::Message { uint32_t, MdpMisrCrcFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_BlockId kBlockId() { return {}; } + static constexpr FieldMetadata_BlockId kBlockId{}; void set_block_id(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_BlockId::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -101601,14 +96737,7 @@ class MdpMisrCrcFtraceEvent : public ::protozero::Message { uint32_t, MdpMisrCrcFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_VsyncCnt kVsyncCnt() { return {}; } + static constexpr FieldMetadata_VsyncCnt kVsyncCnt{}; void set_vsync_cnt(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_VsyncCnt::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -101626,14 +96755,7 @@ class MdpMisrCrcFtraceEvent : public ::protozero::Message { uint32_t, MdpMisrCrcFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Crc kCrc() { return {}; } + static constexpr FieldMetadata_Crc kCrc{}; void set_crc(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Crc::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -101673,14 +96795,7 @@ class MdpCmdReadptrDoneFtraceEvent : public ::protozero::Message { uint32_t, MdpCmdReadptrDoneFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_CtlNum kCtlNum() { return {}; } + static constexpr FieldMetadata_CtlNum kCtlNum{}; void set_ctl_num(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_CtlNum::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -101698,14 +96813,7 @@ class MdpCmdReadptrDoneFtraceEvent : public ::protozero::Message { int32_t, MdpCmdReadptrDoneFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_KoffCnt kKoffCnt() { return {}; } + static constexpr FieldMetadata_KoffCnt kKoffCnt{}; void set_koff_cnt(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_KoffCnt::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -101787,14 +96895,7 @@ class MdpSsppSetFtraceEvent : public ::protozero::Message { uint32_t, MdpSsppSetFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Num kNum() { return {}; } + static constexpr FieldMetadata_Num kNum{}; void set_num(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Num::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -101812,14 +96913,7 @@ class MdpSsppSetFtraceEvent : public ::protozero::Message { uint32_t, MdpSsppSetFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_PlayCnt kPlayCnt() { return {}; } + static constexpr FieldMetadata_PlayCnt kPlayCnt{}; void set_play_cnt(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_PlayCnt::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -101837,14 +96931,7 @@ class MdpSsppSetFtraceEvent : public ::protozero::Message { uint32_t, MdpSsppSetFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Mixer kMixer() { return {}; } + static constexpr FieldMetadata_Mixer kMixer{}; void set_mixer(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Mixer::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -101862,14 +96949,7 @@ class MdpSsppSetFtraceEvent : public ::protozero::Message { uint32_t, MdpSsppSetFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Stage kStage() { return {}; } + static constexpr FieldMetadata_Stage kStage{}; void set_stage(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Stage::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -101887,14 +96967,7 @@ class MdpSsppSetFtraceEvent : public ::protozero::Message { uint32_t, MdpSsppSetFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Flags kFlags() { return {}; } + static constexpr FieldMetadata_Flags kFlags{}; void set_flags(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Flags::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -101912,14 +96985,7 @@ class MdpSsppSetFtraceEvent : public ::protozero::Message { uint32_t, MdpSsppSetFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Format kFormat() { return {}; } + static constexpr FieldMetadata_Format kFormat{}; void set_format(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Format::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -101937,14 +97003,7 @@ class MdpSsppSetFtraceEvent : public ::protozero::Message { uint32_t, MdpSsppSetFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ImgW kImgW() { return {}; } + static constexpr FieldMetadata_ImgW kImgW{}; void set_img_w(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_ImgW::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -101962,14 +97021,7 @@ class MdpSsppSetFtraceEvent : public ::protozero::Message { uint32_t, MdpSsppSetFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ImgH kImgH() { return {}; } + static constexpr FieldMetadata_ImgH kImgH{}; void set_img_h(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_ImgH::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -101987,14 +97039,7 @@ class MdpSsppSetFtraceEvent : public ::protozero::Message { uint32_t, MdpSsppSetFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_SrcX kSrcX() { return {}; } + static constexpr FieldMetadata_SrcX kSrcX{}; void set_src_x(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_SrcX::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -102012,14 +97057,7 @@ class MdpSsppSetFtraceEvent : public ::protozero::Message { uint32_t, MdpSsppSetFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_SrcY kSrcY() { return {}; } + static constexpr FieldMetadata_SrcY kSrcY{}; void set_src_y(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_SrcY::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -102037,14 +97075,7 @@ class MdpSsppSetFtraceEvent : public ::protozero::Message { uint32_t, MdpSsppSetFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_SrcW kSrcW() { return {}; } + static constexpr FieldMetadata_SrcW kSrcW{}; void set_src_w(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_SrcW::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -102062,14 +97093,7 @@ class MdpSsppSetFtraceEvent : public ::protozero::Message { uint32_t, MdpSsppSetFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_SrcH kSrcH() { return {}; } + static constexpr FieldMetadata_SrcH kSrcH{}; void set_src_h(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_SrcH::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -102087,14 +97111,7 @@ class MdpSsppSetFtraceEvent : public ::protozero::Message { uint32_t, MdpSsppSetFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_DstX kDstX() { return {}; } + static constexpr FieldMetadata_DstX kDstX{}; void set_dst_x(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_DstX::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -102112,14 +97129,7 @@ class MdpSsppSetFtraceEvent : public ::protozero::Message { uint32_t, MdpSsppSetFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_DstY kDstY() { return {}; } + static constexpr FieldMetadata_DstY kDstY{}; void set_dst_y(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_DstY::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -102137,14 +97147,7 @@ class MdpSsppSetFtraceEvent : public ::protozero::Message { uint32_t, MdpSsppSetFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_DstW kDstW() { return {}; } + static constexpr FieldMetadata_DstW kDstW{}; void set_dst_w(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_DstW::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -102162,14 +97165,7 @@ class MdpSsppSetFtraceEvent : public ::protozero::Message { uint32_t, MdpSsppSetFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_DstH kDstH() { return {}; } + static constexpr FieldMetadata_DstH kDstH{}; void set_dst_h(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_DstH::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -102218,14 +97214,7 @@ class MdpPerfSetPanicLutsFtraceEvent : public ::protozero::Message { uint32_t, MdpPerfSetPanicLutsFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Pnum kPnum() { return {}; } + static constexpr FieldMetadata_Pnum kPnum{}; void set_pnum(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Pnum::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -102243,14 +97232,7 @@ class MdpPerfSetPanicLutsFtraceEvent : public ::protozero::Message { uint32_t, MdpPerfSetPanicLutsFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Fmt kFmt() { return {}; } + static constexpr FieldMetadata_Fmt kFmt{}; void set_fmt(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Fmt::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -102268,14 +97250,7 @@ class MdpPerfSetPanicLutsFtraceEvent : public ::protozero::Message { uint32_t, MdpPerfSetPanicLutsFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Mode kMode() { return {}; } + static constexpr FieldMetadata_Mode kMode{}; void set_mode(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Mode::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -102293,14 +97268,7 @@ class MdpPerfSetPanicLutsFtraceEvent : public ::protozero::Message { uint32_t, MdpPerfSetPanicLutsFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_PanicLut kPanicLut() { return {}; } + static constexpr FieldMetadata_PanicLut kPanicLut{}; void set_panic_lut(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_PanicLut::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -102318,14 +97286,7 @@ class MdpPerfSetPanicLutsFtraceEvent : public ::protozero::Message { uint32_t, MdpPerfSetPanicLutsFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_RobustLut kRobustLut() { return {}; } + static constexpr FieldMetadata_RobustLut kRobustLut{}; void set_robust_lut(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_RobustLut::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -102383,14 +97344,7 @@ class MdpCompareBwFtraceEvent : public ::protozero::Message { uint64_t, MdpCompareBwFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_NewAb kNewAb() { return {}; } + static constexpr FieldMetadata_NewAb kNewAb{}; void set_new_ab(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_NewAb::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -102408,14 +97362,7 @@ class MdpCompareBwFtraceEvent : public ::protozero::Message { uint64_t, MdpCompareBwFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_NewIb kNewIb() { return {}; } + static constexpr FieldMetadata_NewIb kNewIb{}; void set_new_ib(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_NewIb::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -102433,14 +97380,7 @@ class MdpCompareBwFtraceEvent : public ::protozero::Message { uint64_t, MdpCompareBwFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_NewWb kNewWb() { return {}; } + static constexpr FieldMetadata_NewWb kNewWb{}; void set_new_wb(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_NewWb::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -102458,14 +97398,7 @@ class MdpCompareBwFtraceEvent : public ::protozero::Message { uint64_t, MdpCompareBwFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_OldAb kOldAb() { return {}; } + static constexpr FieldMetadata_OldAb kOldAb{}; void set_old_ab(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_OldAb::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -102483,14 +97416,7 @@ class MdpCompareBwFtraceEvent : public ::protozero::Message { uint64_t, MdpCompareBwFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_OldIb kOldIb() { return {}; } + static constexpr FieldMetadata_OldIb kOldIb{}; void set_old_ib(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_OldIb::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -102508,14 +97434,7 @@ class MdpCompareBwFtraceEvent : public ::protozero::Message { uint64_t, MdpCompareBwFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_OldWb kOldWb() { return {}; } + static constexpr FieldMetadata_OldWb kOldWb{}; void set_old_wb(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_OldWb::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -102533,14 +97452,7 @@ class MdpCompareBwFtraceEvent : public ::protozero::Message { uint32_t, MdpCompareBwFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ParamsChanged kParamsChanged() { return {}; } + static constexpr FieldMetadata_ParamsChanged kParamsChanged{}; void set_params_changed(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_ParamsChanged::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -102558,14 +97470,7 @@ class MdpCompareBwFtraceEvent : public ::protozero::Message { uint32_t, MdpCompareBwFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_UpdateBw kUpdateBw() { return {}; } + static constexpr FieldMetadata_UpdateBw kUpdateBw{}; void set_update_bw(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_UpdateBw::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -102611,14 +97516,7 @@ class MdpCmdPingpongDoneFtraceEvent : public ::protozero::Message { uint32_t, MdpCmdPingpongDoneFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_CtlNum kCtlNum() { return {}; } + static constexpr FieldMetadata_CtlNum kCtlNum{}; void set_ctl_num(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_CtlNum::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -102636,14 +97534,7 @@ class MdpCmdPingpongDoneFtraceEvent : public ::protozero::Message { uint32_t, MdpCmdPingpongDoneFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_IntfNum kIntfNum() { return {}; } + static constexpr FieldMetadata_IntfNum kIntfNum{}; void set_intf_num(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_IntfNum::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -102661,14 +97552,7 @@ class MdpCmdPingpongDoneFtraceEvent : public ::protozero::Message { uint32_t, MdpCmdPingpongDoneFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_PpNum kPpNum() { return {}; } + static constexpr FieldMetadata_PpNum kPpNum{}; void set_pp_num(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_PpNum::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -102686,14 +97570,7 @@ class MdpCmdPingpongDoneFtraceEvent : public ::protozero::Message { int32_t, MdpCmdPingpongDoneFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_KoffCnt kKoffCnt() { return {}; } + static constexpr FieldMetadata_KoffCnt kKoffCnt{}; void set_koff_cnt(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_KoffCnt::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -102736,14 +97613,7 @@ class TracingMarkWriteFtraceEvent : public ::protozero::Message { int32_t, TracingMarkWriteFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Pid kPid() { return {}; } + static constexpr FieldMetadata_Pid kPid{}; void set_pid(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Pid::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -102761,17 +97631,13 @@ class TracingMarkWriteFtraceEvent : public ::protozero::Message { std::string, TracingMarkWriteFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_TraceName kTraceName() { return {}; } + static constexpr FieldMetadata_TraceName kTraceName{}; void set_trace_name(const char* data, size_t size) { AppendBytes(FieldMetadata_TraceName::kFieldId, data, size); } + void set_trace_name(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_TraceName::kFieldId, chars.data, chars.size); + } void set_trace_name(std::string value) { static constexpr uint32_t field_id = FieldMetadata_TraceName::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -102789,14 +97655,7 @@ class TracingMarkWriteFtraceEvent : public ::protozero::Message { uint32_t, TracingMarkWriteFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_TraceBegin kTraceBegin() { return {}; } + static constexpr FieldMetadata_TraceBegin kTraceBegin{}; void set_trace_begin(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_TraceBegin::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -102878,14 +97737,7 @@ class MdpSsppChangeFtraceEvent : public ::protozero::Message { uint32_t, MdpSsppChangeFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Num kNum() { return {}; } + static constexpr FieldMetadata_Num kNum{}; void set_num(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Num::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -102903,14 +97755,7 @@ class MdpSsppChangeFtraceEvent : public ::protozero::Message { uint32_t, MdpSsppChangeFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_PlayCnt kPlayCnt() { return {}; } + static constexpr FieldMetadata_PlayCnt kPlayCnt{}; void set_play_cnt(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_PlayCnt::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -102928,14 +97773,7 @@ class MdpSsppChangeFtraceEvent : public ::protozero::Message { uint32_t, MdpSsppChangeFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Mixer kMixer() { return {}; } + static constexpr FieldMetadata_Mixer kMixer{}; void set_mixer(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Mixer::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -102953,14 +97791,7 @@ class MdpSsppChangeFtraceEvent : public ::protozero::Message { uint32_t, MdpSsppChangeFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Stage kStage() { return {}; } + static constexpr FieldMetadata_Stage kStage{}; void set_stage(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Stage::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -102978,14 +97809,7 @@ class MdpSsppChangeFtraceEvent : public ::protozero::Message { uint32_t, MdpSsppChangeFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Flags kFlags() { return {}; } + static constexpr FieldMetadata_Flags kFlags{}; void set_flags(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Flags::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -103003,14 +97827,7 @@ class MdpSsppChangeFtraceEvent : public ::protozero::Message { uint32_t, MdpSsppChangeFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Format kFormat() { return {}; } + static constexpr FieldMetadata_Format kFormat{}; void set_format(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Format::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -103028,14 +97845,7 @@ class MdpSsppChangeFtraceEvent : public ::protozero::Message { uint32_t, MdpSsppChangeFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ImgW kImgW() { return {}; } + static constexpr FieldMetadata_ImgW kImgW{}; void set_img_w(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_ImgW::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -103053,14 +97863,7 @@ class MdpSsppChangeFtraceEvent : public ::protozero::Message { uint32_t, MdpSsppChangeFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ImgH kImgH() { return {}; } + static constexpr FieldMetadata_ImgH kImgH{}; void set_img_h(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_ImgH::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -103078,14 +97881,7 @@ class MdpSsppChangeFtraceEvent : public ::protozero::Message { uint32_t, MdpSsppChangeFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_SrcX kSrcX() { return {}; } + static constexpr FieldMetadata_SrcX kSrcX{}; void set_src_x(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_SrcX::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -103103,14 +97899,7 @@ class MdpSsppChangeFtraceEvent : public ::protozero::Message { uint32_t, MdpSsppChangeFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_SrcY kSrcY() { return {}; } + static constexpr FieldMetadata_SrcY kSrcY{}; void set_src_y(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_SrcY::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -103128,14 +97917,7 @@ class MdpSsppChangeFtraceEvent : public ::protozero::Message { uint32_t, MdpSsppChangeFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_SrcW kSrcW() { return {}; } + static constexpr FieldMetadata_SrcW kSrcW{}; void set_src_w(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_SrcW::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -103153,14 +97935,7 @@ class MdpSsppChangeFtraceEvent : public ::protozero::Message { uint32_t, MdpSsppChangeFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_SrcH kSrcH() { return {}; } + static constexpr FieldMetadata_SrcH kSrcH{}; void set_src_h(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_SrcH::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -103178,14 +97953,7 @@ class MdpSsppChangeFtraceEvent : public ::protozero::Message { uint32_t, MdpSsppChangeFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_DstX kDstX() { return {}; } + static constexpr FieldMetadata_DstX kDstX{}; void set_dst_x(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_DstX::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -103203,14 +97971,7 @@ class MdpSsppChangeFtraceEvent : public ::protozero::Message { uint32_t, MdpSsppChangeFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_DstY kDstY() { return {}; } + static constexpr FieldMetadata_DstY kDstY{}; void set_dst_y(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_DstY::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -103228,14 +97989,7 @@ class MdpSsppChangeFtraceEvent : public ::protozero::Message { uint32_t, MdpSsppChangeFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_DstW kDstW() { return {}; } + static constexpr FieldMetadata_DstW kDstW{}; void set_dst_w(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_DstW::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -103253,14 +98007,7 @@ class MdpSsppChangeFtraceEvent : public ::protozero::Message { uint32_t, MdpSsppChangeFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_DstH kDstH() { return {}; } + static constexpr FieldMetadata_DstH kDstH{}; void set_dst_h(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_DstH::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -103306,14 +98053,7 @@ class MdpPerfSetOtFtraceEvent : public ::protozero::Message { uint32_t, MdpPerfSetOtFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Pnum kPnum() { return {}; } + static constexpr FieldMetadata_Pnum kPnum{}; void set_pnum(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Pnum::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -103331,14 +98071,7 @@ class MdpPerfSetOtFtraceEvent : public ::protozero::Message { uint32_t, MdpPerfSetOtFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_XinId kXinId() { return {}; } + static constexpr FieldMetadata_XinId kXinId{}; void set_xin_id(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_XinId::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -103356,14 +98089,7 @@ class MdpPerfSetOtFtraceEvent : public ::protozero::Message { uint32_t, MdpPerfSetOtFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_RdLim kRdLim() { return {}; } + static constexpr FieldMetadata_RdLim kRdLim{}; void set_rd_lim(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_RdLim::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -103381,14 +98107,7 @@ class MdpPerfSetOtFtraceEvent : public ::protozero::Message { uint32_t, MdpPerfSetOtFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_IsVbifRt kIsVbifRt() { return {}; } + static constexpr FieldMetadata_IsVbifRt kIsVbifRt{}; void set_is_vbif_rt(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_IsVbifRt::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -103434,14 +98153,7 @@ class MdpCommitFtraceEvent : public ::protozero::Message { uint32_t, MdpCommitFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Num kNum() { return {}; } + static constexpr FieldMetadata_Num kNum{}; void set_num(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Num::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -103459,14 +98171,7 @@ class MdpCommitFtraceEvent : public ::protozero::Message { uint32_t, MdpCommitFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_PlayCnt kPlayCnt() { return {}; } + static constexpr FieldMetadata_PlayCnt kPlayCnt{}; void set_play_cnt(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_PlayCnt::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -103484,14 +98189,7 @@ class MdpCommitFtraceEvent : public ::protozero::Message { uint32_t, MdpCommitFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ClkRate kClkRate() { return {}; } + static constexpr FieldMetadata_ClkRate kClkRate{}; void set_clk_rate(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_ClkRate::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -103509,14 +98207,7 @@ class MdpCommitFtraceEvent : public ::protozero::Message { uint64_t, MdpCommitFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Bandwidth kBandwidth() { return {}; } + static constexpr FieldMetadata_Bandwidth kBandwidth{}; void set_bandwidth(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Bandwidth::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -103556,14 +98247,7 @@ class MdpCmdKickoffFtraceEvent : public ::protozero::Message { uint32_t, MdpCmdKickoffFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_CtlNum kCtlNum() { return {}; } + static constexpr FieldMetadata_CtlNum kCtlNum{}; void set_ctl_num(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_CtlNum::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -103581,14 +98265,7 @@ class MdpCmdKickoffFtraceEvent : public ::protozero::Message { int32_t, MdpCmdKickoffFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_KickoffCnt kKickoffCnt() { return {}; } + static constexpr FieldMetadata_KickoffCnt kKickoffCnt{}; void set_kickoff_cnt(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_KickoffCnt::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -103658,14 +98335,7 @@ class MmEventRecordFtraceEvent : public ::protozero::Message { uint32_t, MmEventRecordFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_AvgLat kAvgLat() { return {}; } + static constexpr FieldMetadata_AvgLat kAvgLat{}; void set_avg_lat(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_AvgLat::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -103683,14 +98353,7 @@ class MmEventRecordFtraceEvent : public ::protozero::Message { uint32_t, MmEventRecordFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Count kCount() { return {}; } + static constexpr FieldMetadata_Count kCount{}; void set_count(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Count::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -103708,14 +98371,7 @@ class MmEventRecordFtraceEvent : public ::protozero::Message { uint32_t, MmEventRecordFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_MaxLat kMaxLat() { return {}; } + static constexpr FieldMetadata_MaxLat kMaxLat{}; void set_max_lat(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_MaxLat::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -103733,14 +98389,7 @@ class MmEventRecordFtraceEvent : public ::protozero::Message { uint32_t, MmEventRecordFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Type kType() { return {}; } + static constexpr FieldMetadata_Type kType{}; void set_type(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Type::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -103801,14 +98450,7 @@ class NapiGroReceiveExitFtraceEvent : public ::protozero::Message { int32_t, NapiGroReceiveExitFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ret kRet() { return {}; } + static constexpr FieldMetadata_Ret kRet{}; void set_ret(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Ret::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -103899,14 +98541,7 @@ class NapiGroReceiveEntryFtraceEvent : public ::protozero::Message { uint32_t, NapiGroReceiveEntryFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_DataLen kDataLen() { return {}; } + static constexpr FieldMetadata_DataLen kDataLen{}; void set_data_len(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_DataLen::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -103924,14 +98559,7 @@ class NapiGroReceiveEntryFtraceEvent : public ::protozero::Message { uint32_t, NapiGroReceiveEntryFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_GsoSize kGsoSize() { return {}; } + static constexpr FieldMetadata_GsoSize kGsoSize{}; void set_gso_size(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_GsoSize::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -103949,14 +98577,7 @@ class NapiGroReceiveEntryFtraceEvent : public ::protozero::Message { uint32_t, NapiGroReceiveEntryFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_GsoType kGsoType() { return {}; } + static constexpr FieldMetadata_GsoType kGsoType{}; void set_gso_type(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_GsoType::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -103974,14 +98595,7 @@ class NapiGroReceiveEntryFtraceEvent : public ::protozero::Message { uint32_t, NapiGroReceiveEntryFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Hash kHash() { return {}; } + static constexpr FieldMetadata_Hash kHash{}; void set_hash(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Hash::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -103999,14 +98613,7 @@ class NapiGroReceiveEntryFtraceEvent : public ::protozero::Message { uint32_t, NapiGroReceiveEntryFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_IpSummed kIpSummed() { return {}; } + static constexpr FieldMetadata_IpSummed kIpSummed{}; void set_ip_summed(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_IpSummed::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -104024,14 +98631,7 @@ class NapiGroReceiveEntryFtraceEvent : public ::protozero::Message { uint32_t, NapiGroReceiveEntryFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_L4Hash kL4Hash() { return {}; } + static constexpr FieldMetadata_L4Hash kL4Hash{}; void set_l4_hash(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_L4Hash::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -104049,14 +98649,7 @@ class NapiGroReceiveEntryFtraceEvent : public ::protozero::Message { uint32_t, NapiGroReceiveEntryFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Len kLen() { return {}; } + static constexpr FieldMetadata_Len kLen{}; void set_len(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Len::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -104074,14 +98667,7 @@ class NapiGroReceiveEntryFtraceEvent : public ::protozero::Message { int32_t, NapiGroReceiveEntryFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_MacHeader kMacHeader() { return {}; } + static constexpr FieldMetadata_MacHeader kMacHeader{}; void set_mac_header(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_MacHeader::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -104099,14 +98685,7 @@ class NapiGroReceiveEntryFtraceEvent : public ::protozero::Message { uint32_t, NapiGroReceiveEntryFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_MacHeaderValid kMacHeaderValid() { return {}; } + static constexpr FieldMetadata_MacHeaderValid kMacHeaderValid{}; void set_mac_header_valid(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_MacHeaderValid::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -104124,17 +98703,13 @@ class NapiGroReceiveEntryFtraceEvent : public ::protozero::Message { std::string, NapiGroReceiveEntryFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Name kName() { return {}; } + static constexpr FieldMetadata_Name kName{}; void set_name(const char* data, size_t size) { AppendBytes(FieldMetadata_Name::kFieldId, data, size); } + void set_name(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Name::kFieldId, chars.data, chars.size); + } void set_name(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Name::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -104152,14 +98727,7 @@ class NapiGroReceiveEntryFtraceEvent : public ::protozero::Message { uint32_t, NapiGroReceiveEntryFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_NapiId kNapiId() { return {}; } + static constexpr FieldMetadata_NapiId kNapiId{}; void set_napi_id(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_NapiId::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -104177,14 +98745,7 @@ class NapiGroReceiveEntryFtraceEvent : public ::protozero::Message { uint32_t, NapiGroReceiveEntryFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_NrFrags kNrFrags() { return {}; } + static constexpr FieldMetadata_NrFrags kNrFrags{}; void set_nr_frags(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_NrFrags::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -104202,14 +98763,7 @@ class NapiGroReceiveEntryFtraceEvent : public ::protozero::Message { uint32_t, NapiGroReceiveEntryFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Protocol kProtocol() { return {}; } + static constexpr FieldMetadata_Protocol kProtocol{}; void set_protocol(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Protocol::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -104227,14 +98781,7 @@ class NapiGroReceiveEntryFtraceEvent : public ::protozero::Message { uint32_t, NapiGroReceiveEntryFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_QueueMapping kQueueMapping() { return {}; } + static constexpr FieldMetadata_QueueMapping kQueueMapping{}; void set_queue_mapping(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_QueueMapping::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -104252,14 +98799,7 @@ class NapiGroReceiveEntryFtraceEvent : public ::protozero::Message { uint64_t, NapiGroReceiveEntryFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Skbaddr kSkbaddr() { return {}; } + static constexpr FieldMetadata_Skbaddr kSkbaddr{}; void set_skbaddr(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Skbaddr::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -104277,14 +98817,7 @@ class NapiGroReceiveEntryFtraceEvent : public ::protozero::Message { uint32_t, NapiGroReceiveEntryFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Truesize kTruesize() { return {}; } + static constexpr FieldMetadata_Truesize kTruesize{}; void set_truesize(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Truesize::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -104302,14 +98835,7 @@ class NapiGroReceiveEntryFtraceEvent : public ::protozero::Message { uint32_t, NapiGroReceiveEntryFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_VlanProto kVlanProto() { return {}; } + static constexpr FieldMetadata_VlanProto kVlanProto{}; void set_vlan_proto(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_VlanProto::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -104327,14 +98853,7 @@ class NapiGroReceiveEntryFtraceEvent : public ::protozero::Message { uint32_t, NapiGroReceiveEntryFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_VlanTagged kVlanTagged() { return {}; } + static constexpr FieldMetadata_VlanTagged kVlanTagged{}; void set_vlan_tagged(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_VlanTagged::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -104352,14 +98871,7 @@ class NapiGroReceiveEntryFtraceEvent : public ::protozero::Message { uint32_t, NapiGroReceiveEntryFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_VlanTci kVlanTci() { return {}; } + static constexpr FieldMetadata_VlanTci kVlanTci{}; void set_vlan_tci(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_VlanTci::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -104405,14 +98917,7 @@ class NetDevXmitFtraceEvent : public ::protozero::Message { uint32_t, NetDevXmitFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Len kLen() { return {}; } + static constexpr FieldMetadata_Len kLen{}; void set_len(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Len::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -104430,17 +98935,13 @@ class NetDevXmitFtraceEvent : public ::protozero::Message { std::string, NetDevXmitFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Name kName() { return {}; } + static constexpr FieldMetadata_Name kName{}; void set_name(const char* data, size_t size) { AppendBytes(FieldMetadata_Name::kFieldId, data, size); } + void set_name(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Name::kFieldId, chars.data, chars.size); + } void set_name(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Name::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -104458,14 +98959,7 @@ class NetDevXmitFtraceEvent : public ::protozero::Message { int32_t, NetDevXmitFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Rc kRc() { return {}; } + static constexpr FieldMetadata_Rc kRc{}; void set_rc(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Rc::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -104483,14 +98977,7 @@ class NetDevXmitFtraceEvent : public ::protozero::Message { uint64_t, NetDevXmitFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Skbaddr kSkbaddr() { return {}; } + static constexpr FieldMetadata_Skbaddr kSkbaddr{}; void set_skbaddr(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Skbaddr::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -104533,14 +99020,7 @@ class NetifReceiveSkbFtraceEvent : public ::protozero::Message { uint32_t, NetifReceiveSkbFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Len kLen() { return {}; } + static constexpr FieldMetadata_Len kLen{}; void set_len(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Len::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -104558,17 +99038,13 @@ class NetifReceiveSkbFtraceEvent : public ::protozero::Message { std::string, NetifReceiveSkbFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Name kName() { return {}; } + static constexpr FieldMetadata_Name kName{}; void set_name(const char* data, size_t size) { AppendBytes(FieldMetadata_Name::kFieldId, data, size); } + void set_name(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Name::kFieldId, chars.data, chars.size); + } void set_name(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Name::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -104586,14 +99062,7 @@ class NetifReceiveSkbFtraceEvent : public ::protozero::Message { uint64_t, NetifReceiveSkbFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Skbaddr kSkbaddr() { return {}; } + static constexpr FieldMetadata_Skbaddr kSkbaddr{}; void set_skbaddr(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Skbaddr::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -104654,14 +99123,7 @@ class MarkVictimFtraceEvent : public ::protozero::Message { int32_t, MarkVictimFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Pid kPid() { return {}; } + static constexpr FieldMetadata_Pid kPid{}; void set_pid(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Pid::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -104704,17 +99166,13 @@ class OomScoreAdjUpdateFtraceEvent : public ::protozero::Message { std::string, OomScoreAdjUpdateFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Comm kComm() { return {}; } + static constexpr FieldMetadata_Comm kComm{}; void set_comm(const char* data, size_t size) { AppendBytes(FieldMetadata_Comm::kFieldId, data, size); } + void set_comm(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Comm::kFieldId, chars.data, chars.size); + } void set_comm(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Comm::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -104732,14 +99190,7 @@ class OomScoreAdjUpdateFtraceEvent : public ::protozero::Message { int32_t, OomScoreAdjUpdateFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_OomScoreAdj kOomScoreAdj() { return {}; } + static constexpr FieldMetadata_OomScoreAdj kOomScoreAdj{}; void set_oom_score_adj(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_OomScoreAdj::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -104757,14 +99208,7 @@ class OomScoreAdjUpdateFtraceEvent : public ::protozero::Message { int32_t, OomScoreAdjUpdateFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Pid kPid() { return {}; } + static constexpr FieldMetadata_Pid kPid{}; void set_pid(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Pid::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -104775,6 +99219,225 @@ class OomScoreAdjUpdateFtraceEvent : public ::protozero::Message { } }; +} // Namespace. +} // Namespace. +} // Namespace. +#endif // Include guard. +// gen_amalgamated begin header: gen/protos/perfetto/trace/ftrace/panel.pbzero.h +// Autogenerated by the ProtoZero compiler plugin. DO NOT EDIT. + +#ifndef PERFETTO_PROTOS_PROTOS_PERFETTO_TRACE_FTRACE_PANEL_PROTO_H_ +#define PERFETTO_PROTOS_PROTOS_PERFETTO_TRACE_FTRACE_PANEL_PROTO_H_ + +#include +#include + +// gen_amalgamated expanded: #include "perfetto/protozero/field_writer.h" +// gen_amalgamated expanded: #include "perfetto/protozero/message.h" +// gen_amalgamated expanded: #include "perfetto/protozero/packed_repeated_fields.h" +// gen_amalgamated expanded: #include "perfetto/protozero/proto_decoder.h" +// gen_amalgamated expanded: #include "perfetto/protozero/proto_utils.h" + +namespace perfetto { +namespace protos { +namespace pbzero { + + +class DsiTxFtraceEvent_Decoder : public ::protozero::TypedProtoDecoder { + public: + DsiTxFtraceEvent_Decoder(const uint8_t* data, size_t len) : TypedProtoDecoder(data, len) {} + explicit DsiTxFtraceEvent_Decoder(const std::string& raw) : TypedProtoDecoder(reinterpret_cast(raw.data()), raw.size()) {} + explicit DsiTxFtraceEvent_Decoder(const ::protozero::ConstBytes& raw) : TypedProtoDecoder(raw.data, raw.size) {} + bool has_last() const { return at<1>().valid(); } + uint32_t last() const { return at<1>().as_uint32(); } + bool has_tx_buf() const { return at<2>().valid(); } + uint32_t tx_buf() const { return at<2>().as_uint32(); } + bool has_type() const { return at<3>().valid(); } + uint32_t type() const { return at<3>().as_uint32(); } +}; + +class DsiTxFtraceEvent : public ::protozero::Message { + public: + using Decoder = DsiTxFtraceEvent_Decoder; + enum : int32_t { + kLastFieldNumber = 1, + kTxBufFieldNumber = 2, + kTypeFieldNumber = 3, + }; + static constexpr const char* GetName() { return ".perfetto.protos.DsiTxFtraceEvent"; } + + + using FieldMetadata_Last = + ::protozero::proto_utils::FieldMetadata< + 1, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint32, + uint32_t, + DsiTxFtraceEvent>; + + static constexpr FieldMetadata_Last kLast{}; + void set_last(uint32_t value) { + static constexpr uint32_t field_id = FieldMetadata_Last::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint32> + ::Append(*this, field_id, value); + } + + using FieldMetadata_TxBuf = + ::protozero::proto_utils::FieldMetadata< + 2, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint32, + uint32_t, + DsiTxFtraceEvent>; + + static constexpr FieldMetadata_TxBuf kTxBuf{}; + void set_tx_buf(uint32_t value) { + static constexpr uint32_t field_id = FieldMetadata_TxBuf::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint32> + ::Append(*this, field_id, value); + } + + using FieldMetadata_Type = + ::protozero::proto_utils::FieldMetadata< + 3, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint32, + uint32_t, + DsiTxFtraceEvent>; + + static constexpr FieldMetadata_Type kType{}; + void set_type(uint32_t value) { + static constexpr uint32_t field_id = FieldMetadata_Type::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint32> + ::Append(*this, field_id, value); + } +}; + +class DsiRxFtraceEvent_Decoder : public ::protozero::TypedProtoDecoder { + public: + DsiRxFtraceEvent_Decoder(const uint8_t* data, size_t len) : TypedProtoDecoder(data, len) {} + explicit DsiRxFtraceEvent_Decoder(const std::string& raw) : TypedProtoDecoder(reinterpret_cast(raw.data()), raw.size()) {} + explicit DsiRxFtraceEvent_Decoder(const ::protozero::ConstBytes& raw) : TypedProtoDecoder(raw.data, raw.size) {} + bool has_cmd() const { return at<1>().valid(); } + uint32_t cmd() const { return at<1>().as_uint32(); } + bool has_rx_buf() const { return at<2>().valid(); } + uint32_t rx_buf() const { return at<2>().as_uint32(); } +}; + +class DsiRxFtraceEvent : public ::protozero::Message { + public: + using Decoder = DsiRxFtraceEvent_Decoder; + enum : int32_t { + kCmdFieldNumber = 1, + kRxBufFieldNumber = 2, + }; + static constexpr const char* GetName() { return ".perfetto.protos.DsiRxFtraceEvent"; } + + + using FieldMetadata_Cmd = + ::protozero::proto_utils::FieldMetadata< + 1, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint32, + uint32_t, + DsiRxFtraceEvent>; + + static constexpr FieldMetadata_Cmd kCmd{}; + void set_cmd(uint32_t value) { + static constexpr uint32_t field_id = FieldMetadata_Cmd::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint32> + ::Append(*this, field_id, value); + } + + using FieldMetadata_RxBuf = + ::protozero::proto_utils::FieldMetadata< + 2, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint32, + uint32_t, + DsiRxFtraceEvent>; + + static constexpr FieldMetadata_RxBuf kRxBuf{}; + void set_rx_buf(uint32_t value) { + static constexpr uint32_t field_id = FieldMetadata_RxBuf::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint32> + ::Append(*this, field_id, value); + } +}; + +class DsiCmdFifoStatusFtraceEvent_Decoder : public ::protozero::TypedProtoDecoder { + public: + DsiCmdFifoStatusFtraceEvent_Decoder(const uint8_t* data, size_t len) : TypedProtoDecoder(data, len) {} + explicit DsiCmdFifoStatusFtraceEvent_Decoder(const std::string& raw) : TypedProtoDecoder(reinterpret_cast(raw.data()), raw.size()) {} + explicit DsiCmdFifoStatusFtraceEvent_Decoder(const ::protozero::ConstBytes& raw) : TypedProtoDecoder(raw.data, raw.size) {} + bool has_header() const { return at<1>().valid(); } + uint32_t header() const { return at<1>().as_uint32(); } + bool has_payload() const { return at<2>().valid(); } + uint32_t payload() const { return at<2>().as_uint32(); } +}; + +class DsiCmdFifoStatusFtraceEvent : public ::protozero::Message { + public: + using Decoder = DsiCmdFifoStatusFtraceEvent_Decoder; + enum : int32_t { + kHeaderFieldNumber = 1, + kPayloadFieldNumber = 2, + }; + static constexpr const char* GetName() { return ".perfetto.protos.DsiCmdFifoStatusFtraceEvent"; } + + + using FieldMetadata_Header = + ::protozero::proto_utils::FieldMetadata< + 1, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint32, + uint32_t, + DsiCmdFifoStatusFtraceEvent>; + + static constexpr FieldMetadata_Header kHeader{}; + void set_header(uint32_t value) { + static constexpr uint32_t field_id = FieldMetadata_Header::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint32> + ::Append(*this, field_id, value); + } + + using FieldMetadata_Payload = + ::protozero::proto_utils::FieldMetadata< + 2, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint32, + uint32_t, + DsiCmdFifoStatusFtraceEvent>; + + static constexpr FieldMetadata_Payload kPayload{}; + void set_payload(uint32_t value) { + static constexpr uint32_t field_id = FieldMetadata_Payload::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint32> + ::Append(*this, field_id, value); + } +}; + } // Namespace. } // Namespace. } // Namespace. @@ -104828,17 +99491,13 @@ class WakeupSourceDeactivateFtraceEvent : public ::protozero::Message { std::string, WakeupSourceDeactivateFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Name kName() { return {}; } + static constexpr FieldMetadata_Name kName{}; void set_name(const char* data, size_t size) { AppendBytes(FieldMetadata_Name::kFieldId, data, size); } + void set_name(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Name::kFieldId, chars.data, chars.size); + } void set_name(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Name::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -104856,14 +99515,7 @@ class WakeupSourceDeactivateFtraceEvent : public ::protozero::Message { uint64_t, WakeupSourceDeactivateFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_State kState() { return {}; } + static constexpr FieldMetadata_State kState{}; void set_state(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_State::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -104903,17 +99555,13 @@ class WakeupSourceActivateFtraceEvent : public ::protozero::Message { std::string, WakeupSourceActivateFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Name kName() { return {}; } + static constexpr FieldMetadata_Name kName{}; void set_name(const char* data, size_t size) { AppendBytes(FieldMetadata_Name::kFieldId, data, size); } + void set_name(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Name::kFieldId, chars.data, chars.size); + } void set_name(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Name::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -104931,14 +99579,7 @@ class WakeupSourceActivateFtraceEvent : public ::protozero::Message { uint64_t, WakeupSourceActivateFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_State kState() { return {}; } + static constexpr FieldMetadata_State kState{}; void set_state(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_State::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -104978,14 +99619,7 @@ class GpuFrequencyFtraceEvent : public ::protozero::Message { uint32_t, GpuFrequencyFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_GpuId kGpuId() { return {}; } + static constexpr FieldMetadata_GpuId kGpuId{}; void set_gpu_id(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_GpuId::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -105003,14 +99637,7 @@ class GpuFrequencyFtraceEvent : public ::protozero::Message { uint32_t, GpuFrequencyFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_State kState() { return {}; } + static constexpr FieldMetadata_State kState{}; void set_state(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_State::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -105053,17 +99680,13 @@ class SuspendResumeFtraceEvent : public ::protozero::Message { std::string, SuspendResumeFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Action kAction() { return {}; } + static constexpr FieldMetadata_Action kAction{}; void set_action(const char* data, size_t size) { AppendBytes(FieldMetadata_Action::kFieldId, data, size); } + void set_action(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Action::kFieldId, chars.data, chars.size); + } void set_action(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Action::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -105081,14 +99704,7 @@ class SuspendResumeFtraceEvent : public ::protozero::Message { int32_t, SuspendResumeFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Val kVal() { return {}; } + static constexpr FieldMetadata_Val kVal{}; void set_val(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Val::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -105106,14 +99722,7 @@ class SuspendResumeFtraceEvent : public ::protozero::Message { uint32_t, SuspendResumeFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Start kStart() { return {}; } + static constexpr FieldMetadata_Start kStart{}; void set_start(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Start::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -105156,17 +99765,13 @@ class ClockSetRateFtraceEvent : public ::protozero::Message { std::string, ClockSetRateFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Name kName() { return {}; } + static constexpr FieldMetadata_Name kName{}; void set_name(const char* data, size_t size) { AppendBytes(FieldMetadata_Name::kFieldId, data, size); } + void set_name(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Name::kFieldId, chars.data, chars.size); + } void set_name(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Name::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -105184,14 +99789,7 @@ class ClockSetRateFtraceEvent : public ::protozero::Message { uint64_t, ClockSetRateFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_State kState() { return {}; } + static constexpr FieldMetadata_State kState{}; void set_state(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_State::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -105209,14 +99807,7 @@ class ClockSetRateFtraceEvent : public ::protozero::Message { uint64_t, ClockSetRateFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_CpuId kCpuId() { return {}; } + static constexpr FieldMetadata_CpuId kCpuId{}; void set_cpu_id(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_CpuId::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -105259,17 +99850,13 @@ class ClockDisableFtraceEvent : public ::protozero::Message { std::string, ClockDisableFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Name kName() { return {}; } + static constexpr FieldMetadata_Name kName{}; void set_name(const char* data, size_t size) { AppendBytes(FieldMetadata_Name::kFieldId, data, size); } + void set_name(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Name::kFieldId, chars.data, chars.size); + } void set_name(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Name::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -105287,14 +99874,7 @@ class ClockDisableFtraceEvent : public ::protozero::Message { uint64_t, ClockDisableFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_State kState() { return {}; } + static constexpr FieldMetadata_State kState{}; void set_state(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_State::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -105312,14 +99892,7 @@ class ClockDisableFtraceEvent : public ::protozero::Message { uint64_t, ClockDisableFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_CpuId kCpuId() { return {}; } + static constexpr FieldMetadata_CpuId kCpuId{}; void set_cpu_id(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_CpuId::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -105362,17 +99935,13 @@ class ClockEnableFtraceEvent : public ::protozero::Message { std::string, ClockEnableFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Name kName() { return {}; } + static constexpr FieldMetadata_Name kName{}; void set_name(const char* data, size_t size) { AppendBytes(FieldMetadata_Name::kFieldId, data, size); } + void set_name(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Name::kFieldId, chars.data, chars.size); + } void set_name(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Name::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -105390,14 +99959,7 @@ class ClockEnableFtraceEvent : public ::protozero::Message { uint64_t, ClockEnableFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_State kState() { return {}; } + static constexpr FieldMetadata_State kState{}; void set_state(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_State::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -105415,14 +99977,7 @@ class ClockEnableFtraceEvent : public ::protozero::Message { uint64_t, ClockEnableFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_CpuId kCpuId() { return {}; } + static constexpr FieldMetadata_CpuId kCpuId{}; void set_cpu_id(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_CpuId::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -105462,14 +100017,7 @@ class CpuIdleFtraceEvent : public ::protozero::Message { uint32_t, CpuIdleFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_State kState() { return {}; } + static constexpr FieldMetadata_State kState{}; void set_state(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_State::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -105487,14 +100035,7 @@ class CpuIdleFtraceEvent : public ::protozero::Message { uint32_t, CpuIdleFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_CpuId kCpuId() { return {}; } + static constexpr FieldMetadata_CpuId kCpuId{}; void set_cpu_id(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_CpuId::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -105537,14 +100078,7 @@ class CpuFrequencyLimitsFtraceEvent : public ::protozero::Message { uint32_t, CpuFrequencyLimitsFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_MinFreq kMinFreq() { return {}; } + static constexpr FieldMetadata_MinFreq kMinFreq{}; void set_min_freq(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_MinFreq::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -105562,14 +100096,7 @@ class CpuFrequencyLimitsFtraceEvent : public ::protozero::Message { uint32_t, CpuFrequencyLimitsFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_MaxFreq kMaxFreq() { return {}; } + static constexpr FieldMetadata_MaxFreq kMaxFreq{}; void set_max_freq(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_MaxFreq::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -105587,14 +100114,7 @@ class CpuFrequencyLimitsFtraceEvent : public ::protozero::Message { uint32_t, CpuFrequencyLimitsFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_CpuId kCpuId() { return {}; } + static constexpr FieldMetadata_CpuId kCpuId{}; void set_cpu_id(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_CpuId::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -105634,14 +100154,7 @@ class CpuFrequencyFtraceEvent : public ::protozero::Message { uint32_t, CpuFrequencyFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_State kState() { return {}; } + static constexpr FieldMetadata_State kState{}; void set_state(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_State::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -105659,14 +100172,7 @@ class CpuFrequencyFtraceEvent : public ::protozero::Message { uint32_t, CpuFrequencyFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_CpuId kCpuId() { return {}; } + static constexpr FieldMetadata_CpuId kCpuId{}; void set_cpu_id(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_CpuId::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -105727,17 +100233,13 @@ class ConsoleFtraceEvent : public ::protozero::Message { std::string, ConsoleFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Msg kMsg() { return {}; } + static constexpr FieldMetadata_Msg kMsg{}; void set_msg(const char* data, size_t size) { AppendBytes(FieldMetadata_Msg::kFieldId, data, size); } + void set_msg(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Msg::kFieldId, chars.data, chars.size); + } void set_msg(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Msg::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -105801,14 +100303,7 @@ class SysExitFtraceEvent : public ::protozero::Message { int64_t, SysExitFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Id kId() { return {}; } + static constexpr FieldMetadata_Id kId{}; void set_id(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_Id::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -105826,14 +100321,7 @@ class SysExitFtraceEvent : public ::protozero::Message { int64_t, SysExitFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ret kRet() { return {}; } + static constexpr FieldMetadata_Ret kRet{}; void set_ret(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_Ret::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -105844,13 +100332,15 @@ class SysExitFtraceEvent : public ::protozero::Message { } }; -class SysEnterFtraceEvent_Decoder : public ::protozero::TypedProtoDecoder { +class SysEnterFtraceEvent_Decoder : public ::protozero::TypedProtoDecoder { public: SysEnterFtraceEvent_Decoder(const uint8_t* data, size_t len) : TypedProtoDecoder(data, len) {} explicit SysEnterFtraceEvent_Decoder(const std::string& raw) : TypedProtoDecoder(reinterpret_cast(raw.data()), raw.size()) {} explicit SysEnterFtraceEvent_Decoder(const ::protozero::ConstBytes& raw) : TypedProtoDecoder(raw.data, raw.size) {} bool has_id() const { return at<1>().valid(); } int64_t id() const { return at<1>().as_int64(); } + bool has_args() const { return at<2>().valid(); } + ::protozero::RepeatedFieldIterator args() const { return GetRepeated(2); } }; class SysEnterFtraceEvent : public ::protozero::Message { @@ -105858,6 +100348,7 @@ class SysEnterFtraceEvent : public ::protozero::Message { using Decoder = SysEnterFtraceEvent_Decoder; enum : int32_t { kIdFieldNumber = 1, + kArgsFieldNumber = 2, }; static constexpr const char* GetName() { return ".perfetto.protos.SysEnterFtraceEvent"; } @@ -105870,14 +100361,7 @@ class SysEnterFtraceEvent : public ::protozero::Message { int64_t, SysEnterFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Id kId() { return {}; } + static constexpr FieldMetadata_Id kId{}; void set_id(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_Id::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -105886,6 +100370,24 @@ class SysEnterFtraceEvent : public ::protozero::Message { ::protozero::proto_utils::ProtoSchemaType::kInt64> ::Append(*this, field_id, value); } + + using FieldMetadata_Args = + ::protozero::proto_utils::FieldMetadata< + 2, + ::protozero::proto_utils::RepetitionType::kRepeatedNotPacked, + ::protozero::proto_utils::ProtoSchemaType::kUint64, + uint64_t, + SysEnterFtraceEvent>; + + static constexpr FieldMetadata_Args kArgs{}; + void add_args(uint64_t value) { + static constexpr uint32_t field_id = FieldMetadata_Args::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint64> + ::Append(*this, field_id, value); + } }; } // Namespace. @@ -105941,17 +100443,13 @@ class RegulatorSetVoltageCompleteFtraceEvent : public ::protozero::Message { std::string, RegulatorSetVoltageCompleteFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Name kName() { return {}; } + static constexpr FieldMetadata_Name kName{}; void set_name(const char* data, size_t size) { AppendBytes(FieldMetadata_Name::kFieldId, data, size); } + void set_name(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Name::kFieldId, chars.data, chars.size); + } void set_name(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Name::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -105969,14 +100467,7 @@ class RegulatorSetVoltageCompleteFtraceEvent : public ::protozero::Message { uint32_t, RegulatorSetVoltageCompleteFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Val kVal() { return {}; } + static constexpr FieldMetadata_Val kVal{}; void set_val(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Val::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -106019,17 +100510,13 @@ class RegulatorSetVoltageFtraceEvent : public ::protozero::Message { std::string, RegulatorSetVoltageFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Name kName() { return {}; } + static constexpr FieldMetadata_Name kName{}; void set_name(const char* data, size_t size) { AppendBytes(FieldMetadata_Name::kFieldId, data, size); } + void set_name(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Name::kFieldId, chars.data, chars.size); + } void set_name(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Name::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -106047,14 +100534,7 @@ class RegulatorSetVoltageFtraceEvent : public ::protozero::Message { int32_t, RegulatorSetVoltageFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Min kMin() { return {}; } + static constexpr FieldMetadata_Min kMin{}; void set_min(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Min::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -106072,14 +100552,7 @@ class RegulatorSetVoltageFtraceEvent : public ::protozero::Message { int32_t, RegulatorSetVoltageFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Max kMax() { return {}; } + static constexpr FieldMetadata_Max kMax{}; void set_max(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Max::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -106116,17 +100589,13 @@ class RegulatorEnableDelayFtraceEvent : public ::protozero::Message { std::string, RegulatorEnableDelayFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Name kName() { return {}; } + static constexpr FieldMetadata_Name kName{}; void set_name(const char* data, size_t size) { AppendBytes(FieldMetadata_Name::kFieldId, data, size); } + void set_name(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Name::kFieldId, chars.data, chars.size); + } void set_name(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Name::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -106163,17 +100632,13 @@ class RegulatorEnableCompleteFtraceEvent : public ::protozero::Message { std::string, RegulatorEnableCompleteFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Name kName() { return {}; } + static constexpr FieldMetadata_Name kName{}; void set_name(const char* data, size_t size) { AppendBytes(FieldMetadata_Name::kFieldId, data, size); } + void set_name(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Name::kFieldId, chars.data, chars.size); + } void set_name(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Name::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -106210,17 +100675,13 @@ class RegulatorEnableFtraceEvent : public ::protozero::Message { std::string, RegulatorEnableFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Name kName() { return {}; } + static constexpr FieldMetadata_Name kName{}; void set_name(const char* data, size_t size) { AppendBytes(FieldMetadata_Name::kFieldId, data, size); } + void set_name(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Name::kFieldId, chars.data, chars.size); + } void set_name(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Name::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -106257,17 +100718,13 @@ class RegulatorDisableCompleteFtraceEvent : public ::protozero::Message { std::string, RegulatorDisableCompleteFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Name kName() { return {}; } + static constexpr FieldMetadata_Name kName{}; void set_name(const char* data, size_t size) { AppendBytes(FieldMetadata_Name::kFieldId, data, size); } + void set_name(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Name::kFieldId, chars.data, chars.size); + } void set_name(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Name::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -106304,17 +100761,13 @@ class RegulatorDisableFtraceEvent : public ::protozero::Message { std::string, RegulatorDisableFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Name kName() { return {}; } + static constexpr FieldMetadata_Name kName{}; void set_name(const char* data, size_t size) { AppendBytes(FieldMetadata_Name::kFieldId, data, size); } + void set_name(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Name::kFieldId, chars.data, chars.size); + } void set_name(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Name::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -106349,6 +100802,337 @@ namespace protos { namespace pbzero { +class SchedCpuUtilCfsFtraceEvent_Decoder : public ::protozero::TypedProtoDecoder { + public: + SchedCpuUtilCfsFtraceEvent_Decoder(const uint8_t* data, size_t len) : TypedProtoDecoder(data, len) {} + explicit SchedCpuUtilCfsFtraceEvent_Decoder(const std::string& raw) : TypedProtoDecoder(reinterpret_cast(raw.data()), raw.size()) {} + explicit SchedCpuUtilCfsFtraceEvent_Decoder(const ::protozero::ConstBytes& raw) : TypedProtoDecoder(raw.data, raw.size) {} + bool has_active() const { return at<1>().valid(); } + int32_t active() const { return at<1>().as_int32(); } + bool has_capacity() const { return at<2>().valid(); } + uint64_t capacity() const { return at<2>().as_uint64(); } + bool has_capacity_orig() const { return at<3>().valid(); } + uint64_t capacity_orig() const { return at<3>().as_uint64(); } + bool has_cpu() const { return at<4>().valid(); } + uint32_t cpu() const { return at<4>().as_uint32(); } + bool has_cpu_importance() const { return at<5>().valid(); } + uint64_t cpu_importance() const { return at<5>().as_uint64(); } + bool has_cpu_util() const { return at<6>().valid(); } + uint64_t cpu_util() const { return at<6>().as_uint64(); } + bool has_exit_lat() const { return at<7>().valid(); } + uint32_t exit_lat() const { return at<7>().as_uint32(); } + bool has_group_capacity() const { return at<8>().valid(); } + uint64_t group_capacity() const { return at<8>().as_uint64(); } + bool has_grp_overutilized() const { return at<9>().valid(); } + uint32_t grp_overutilized() const { return at<9>().as_uint32(); } + bool has_idle_cpu() const { return at<10>().valid(); } + uint32_t idle_cpu() const { return at<10>().as_uint32(); } + bool has_nr_running() const { return at<11>().valid(); } + uint32_t nr_running() const { return at<11>().as_uint32(); } + bool has_spare_cap() const { return at<12>().valid(); } + int64_t spare_cap() const { return at<12>().as_int64(); } + bool has_task_fits() const { return at<13>().valid(); } + uint32_t task_fits() const { return at<13>().as_uint32(); } + bool has_wake_group_util() const { return at<14>().valid(); } + uint64_t wake_group_util() const { return at<14>().as_uint64(); } + bool has_wake_util() const { return at<15>().valid(); } + uint64_t wake_util() const { return at<15>().as_uint64(); } +}; + +class SchedCpuUtilCfsFtraceEvent : public ::protozero::Message { + public: + using Decoder = SchedCpuUtilCfsFtraceEvent_Decoder; + enum : int32_t { + kActiveFieldNumber = 1, + kCapacityFieldNumber = 2, + kCapacityOrigFieldNumber = 3, + kCpuFieldNumber = 4, + kCpuImportanceFieldNumber = 5, + kCpuUtilFieldNumber = 6, + kExitLatFieldNumber = 7, + kGroupCapacityFieldNumber = 8, + kGrpOverutilizedFieldNumber = 9, + kIdleCpuFieldNumber = 10, + kNrRunningFieldNumber = 11, + kSpareCapFieldNumber = 12, + kTaskFitsFieldNumber = 13, + kWakeGroupUtilFieldNumber = 14, + kWakeUtilFieldNumber = 15, + }; + static constexpr const char* GetName() { return ".perfetto.protos.SchedCpuUtilCfsFtraceEvent"; } + + + using FieldMetadata_Active = + ::protozero::proto_utils::FieldMetadata< + 1, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kInt32, + int32_t, + SchedCpuUtilCfsFtraceEvent>; + + static constexpr FieldMetadata_Active kActive{}; + void set_active(int32_t value) { + static constexpr uint32_t field_id = FieldMetadata_Active::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kInt32> + ::Append(*this, field_id, value); + } + + using FieldMetadata_Capacity = + ::protozero::proto_utils::FieldMetadata< + 2, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint64, + uint64_t, + SchedCpuUtilCfsFtraceEvent>; + + static constexpr FieldMetadata_Capacity kCapacity{}; + void set_capacity(uint64_t value) { + static constexpr uint32_t field_id = FieldMetadata_Capacity::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint64> + ::Append(*this, field_id, value); + } + + using FieldMetadata_CapacityOrig = + ::protozero::proto_utils::FieldMetadata< + 3, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint64, + uint64_t, + SchedCpuUtilCfsFtraceEvent>; + + static constexpr FieldMetadata_CapacityOrig kCapacityOrig{}; + void set_capacity_orig(uint64_t value) { + static constexpr uint32_t field_id = FieldMetadata_CapacityOrig::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint64> + ::Append(*this, field_id, value); + } + + using FieldMetadata_Cpu = + ::protozero::proto_utils::FieldMetadata< + 4, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint32, + uint32_t, + SchedCpuUtilCfsFtraceEvent>; + + static constexpr FieldMetadata_Cpu kCpu{}; + void set_cpu(uint32_t value) { + static constexpr uint32_t field_id = FieldMetadata_Cpu::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint32> + ::Append(*this, field_id, value); + } + + using FieldMetadata_CpuImportance = + ::protozero::proto_utils::FieldMetadata< + 5, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint64, + uint64_t, + SchedCpuUtilCfsFtraceEvent>; + + static constexpr FieldMetadata_CpuImportance kCpuImportance{}; + void set_cpu_importance(uint64_t value) { + static constexpr uint32_t field_id = FieldMetadata_CpuImportance::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint64> + ::Append(*this, field_id, value); + } + + using FieldMetadata_CpuUtil = + ::protozero::proto_utils::FieldMetadata< + 6, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint64, + uint64_t, + SchedCpuUtilCfsFtraceEvent>; + + static constexpr FieldMetadata_CpuUtil kCpuUtil{}; + void set_cpu_util(uint64_t value) { + static constexpr uint32_t field_id = FieldMetadata_CpuUtil::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint64> + ::Append(*this, field_id, value); + } + + using FieldMetadata_ExitLat = + ::protozero::proto_utils::FieldMetadata< + 7, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint32, + uint32_t, + SchedCpuUtilCfsFtraceEvent>; + + static constexpr FieldMetadata_ExitLat kExitLat{}; + void set_exit_lat(uint32_t value) { + static constexpr uint32_t field_id = FieldMetadata_ExitLat::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint32> + ::Append(*this, field_id, value); + } + + using FieldMetadata_GroupCapacity = + ::protozero::proto_utils::FieldMetadata< + 8, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint64, + uint64_t, + SchedCpuUtilCfsFtraceEvent>; + + static constexpr FieldMetadata_GroupCapacity kGroupCapacity{}; + void set_group_capacity(uint64_t value) { + static constexpr uint32_t field_id = FieldMetadata_GroupCapacity::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint64> + ::Append(*this, field_id, value); + } + + using FieldMetadata_GrpOverutilized = + ::protozero::proto_utils::FieldMetadata< + 9, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint32, + uint32_t, + SchedCpuUtilCfsFtraceEvent>; + + static constexpr FieldMetadata_GrpOverutilized kGrpOverutilized{}; + void set_grp_overutilized(uint32_t value) { + static constexpr uint32_t field_id = FieldMetadata_GrpOverutilized::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint32> + ::Append(*this, field_id, value); + } + + using FieldMetadata_IdleCpu = + ::protozero::proto_utils::FieldMetadata< + 10, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint32, + uint32_t, + SchedCpuUtilCfsFtraceEvent>; + + static constexpr FieldMetadata_IdleCpu kIdleCpu{}; + void set_idle_cpu(uint32_t value) { + static constexpr uint32_t field_id = FieldMetadata_IdleCpu::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint32> + ::Append(*this, field_id, value); + } + + using FieldMetadata_NrRunning = + ::protozero::proto_utils::FieldMetadata< + 11, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint32, + uint32_t, + SchedCpuUtilCfsFtraceEvent>; + + static constexpr FieldMetadata_NrRunning kNrRunning{}; + void set_nr_running(uint32_t value) { + static constexpr uint32_t field_id = FieldMetadata_NrRunning::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint32> + ::Append(*this, field_id, value); + } + + using FieldMetadata_SpareCap = + ::protozero::proto_utils::FieldMetadata< + 12, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kInt64, + int64_t, + SchedCpuUtilCfsFtraceEvent>; + + static constexpr FieldMetadata_SpareCap kSpareCap{}; + void set_spare_cap(int64_t value) { + static constexpr uint32_t field_id = FieldMetadata_SpareCap::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kInt64> + ::Append(*this, field_id, value); + } + + using FieldMetadata_TaskFits = + ::protozero::proto_utils::FieldMetadata< + 13, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint32, + uint32_t, + SchedCpuUtilCfsFtraceEvent>; + + static constexpr FieldMetadata_TaskFits kTaskFits{}; + void set_task_fits(uint32_t value) { + static constexpr uint32_t field_id = FieldMetadata_TaskFits::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint32> + ::Append(*this, field_id, value); + } + + using FieldMetadata_WakeGroupUtil = + ::protozero::proto_utils::FieldMetadata< + 14, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint64, + uint64_t, + SchedCpuUtilCfsFtraceEvent>; + + static constexpr FieldMetadata_WakeGroupUtil kWakeGroupUtil{}; + void set_wake_group_util(uint64_t value) { + static constexpr uint32_t field_id = FieldMetadata_WakeGroupUtil::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint64> + ::Append(*this, field_id, value); + } + + using FieldMetadata_WakeUtil = + ::protozero::proto_utils::FieldMetadata< + 15, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint64, + uint64_t, + SchedCpuUtilCfsFtraceEvent>; + + static constexpr FieldMetadata_WakeUtil kWakeUtil{}; + void set_wake_util(uint64_t value) { + static constexpr uint32_t field_id = FieldMetadata_WakeUtil::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint64> + ::Append(*this, field_id, value); + } +}; + class SchedPiSetprioFtraceEvent_Decoder : public ::protozero::TypedProtoDecoder { public: SchedPiSetprioFtraceEvent_Decoder(const uint8_t* data, size_t len) : TypedProtoDecoder(data, len) {} @@ -106384,17 +101168,13 @@ class SchedPiSetprioFtraceEvent : public ::protozero::Message { std::string, SchedPiSetprioFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Comm kComm() { return {}; } + static constexpr FieldMetadata_Comm kComm{}; void set_comm(const char* data, size_t size) { AppendBytes(FieldMetadata_Comm::kFieldId, data, size); } + void set_comm(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Comm::kFieldId, chars.data, chars.size); + } void set_comm(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Comm::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -106412,14 +101192,7 @@ class SchedPiSetprioFtraceEvent : public ::protozero::Message { int32_t, SchedPiSetprioFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Newprio kNewprio() { return {}; } + static constexpr FieldMetadata_Newprio kNewprio{}; void set_newprio(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Newprio::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -106437,14 +101210,7 @@ class SchedPiSetprioFtraceEvent : public ::protozero::Message { int32_t, SchedPiSetprioFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Oldprio kOldprio() { return {}; } + static constexpr FieldMetadata_Oldprio kOldprio{}; void set_oldprio(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Oldprio::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -106462,14 +101228,7 @@ class SchedPiSetprioFtraceEvent : public ::protozero::Message { int32_t, SchedPiSetprioFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Pid kPid() { return {}; } + static constexpr FieldMetadata_Pid kPid{}; void set_pid(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Pid::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -106512,17 +101271,13 @@ class SchedProcessWaitFtraceEvent : public ::protozero::Message { std::string, SchedProcessWaitFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Comm kComm() { return {}; } + static constexpr FieldMetadata_Comm kComm{}; void set_comm(const char* data, size_t size) { AppendBytes(FieldMetadata_Comm::kFieldId, data, size); } + void set_comm(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Comm::kFieldId, chars.data, chars.size); + } void set_comm(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Comm::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -106540,14 +101295,7 @@ class SchedProcessWaitFtraceEvent : public ::protozero::Message { int32_t, SchedProcessWaitFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Pid kPid() { return {}; } + static constexpr FieldMetadata_Pid kPid{}; void set_pid(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Pid::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -106565,14 +101313,7 @@ class SchedProcessWaitFtraceEvent : public ::protozero::Message { int32_t, SchedProcessWaitFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Prio kPrio() { return {}; } + static constexpr FieldMetadata_Prio kPrio{}; void set_prio(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Prio::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -106612,17 +101353,13 @@ class SchedProcessHangFtraceEvent : public ::protozero::Message { std::string, SchedProcessHangFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Comm kComm() { return {}; } + static constexpr FieldMetadata_Comm kComm{}; void set_comm(const char* data, size_t size) { AppendBytes(FieldMetadata_Comm::kFieldId, data, size); } + void set_comm(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Comm::kFieldId, chars.data, chars.size); + } void set_comm(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Comm::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -106640,14 +101377,7 @@ class SchedProcessHangFtraceEvent : public ::protozero::Message { int32_t, SchedProcessHangFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Pid kPid() { return {}; } + static constexpr FieldMetadata_Pid kPid{}; void set_pid(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Pid::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -106690,17 +101420,13 @@ class SchedProcessFreeFtraceEvent : public ::protozero::Message { std::string, SchedProcessFreeFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Comm kComm() { return {}; } + static constexpr FieldMetadata_Comm kComm{}; void set_comm(const char* data, size_t size) { AppendBytes(FieldMetadata_Comm::kFieldId, data, size); } + void set_comm(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Comm::kFieldId, chars.data, chars.size); + } void set_comm(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Comm::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -106718,14 +101444,7 @@ class SchedProcessFreeFtraceEvent : public ::protozero::Message { int32_t, SchedProcessFreeFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Pid kPid() { return {}; } + static constexpr FieldMetadata_Pid kPid{}; void set_pid(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Pid::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -106743,14 +101462,7 @@ class SchedProcessFreeFtraceEvent : public ::protozero::Message { int32_t, SchedProcessFreeFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Prio kPrio() { return {}; } + static constexpr FieldMetadata_Prio kPrio{}; void set_prio(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Prio::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -106796,17 +101508,13 @@ class SchedProcessForkFtraceEvent : public ::protozero::Message { std::string, SchedProcessForkFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ParentComm kParentComm() { return {}; } + static constexpr FieldMetadata_ParentComm kParentComm{}; void set_parent_comm(const char* data, size_t size) { AppendBytes(FieldMetadata_ParentComm::kFieldId, data, size); } + void set_parent_comm(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_ParentComm::kFieldId, chars.data, chars.size); + } void set_parent_comm(std::string value) { static constexpr uint32_t field_id = FieldMetadata_ParentComm::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -106824,14 +101532,7 @@ class SchedProcessForkFtraceEvent : public ::protozero::Message { int32_t, SchedProcessForkFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ParentPid kParentPid() { return {}; } + static constexpr FieldMetadata_ParentPid kParentPid{}; void set_parent_pid(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_ParentPid::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -106849,17 +101550,13 @@ class SchedProcessForkFtraceEvent : public ::protozero::Message { std::string, SchedProcessForkFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ChildComm kChildComm() { return {}; } + static constexpr FieldMetadata_ChildComm kChildComm{}; void set_child_comm(const char* data, size_t size) { AppendBytes(FieldMetadata_ChildComm::kFieldId, data, size); } + void set_child_comm(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_ChildComm::kFieldId, chars.data, chars.size); + } void set_child_comm(std::string value) { static constexpr uint32_t field_id = FieldMetadata_ChildComm::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -106877,14 +101574,7 @@ class SchedProcessForkFtraceEvent : public ::protozero::Message { int32_t, SchedProcessForkFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ChildPid kChildPid() { return {}; } + static constexpr FieldMetadata_ChildPid kChildPid{}; void set_child_pid(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_ChildPid::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -106930,17 +101620,13 @@ class SchedProcessExitFtraceEvent : public ::protozero::Message { std::string, SchedProcessExitFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Comm kComm() { return {}; } + static constexpr FieldMetadata_Comm kComm{}; void set_comm(const char* data, size_t size) { AppendBytes(FieldMetadata_Comm::kFieldId, data, size); } + void set_comm(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Comm::kFieldId, chars.data, chars.size); + } void set_comm(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Comm::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -106958,14 +101644,7 @@ class SchedProcessExitFtraceEvent : public ::protozero::Message { int32_t, SchedProcessExitFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Pid kPid() { return {}; } + static constexpr FieldMetadata_Pid kPid{}; void set_pid(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Pid::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -106983,14 +101662,7 @@ class SchedProcessExitFtraceEvent : public ::protozero::Message { int32_t, SchedProcessExitFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Tgid kTgid() { return {}; } + static constexpr FieldMetadata_Tgid kTgid{}; void set_tgid(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Tgid::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -107008,14 +101680,7 @@ class SchedProcessExitFtraceEvent : public ::protozero::Message { int32_t, SchedProcessExitFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Prio kPrio() { return {}; } + static constexpr FieldMetadata_Prio kPrio{}; void set_prio(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Prio::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -107058,17 +101723,13 @@ class SchedProcessExecFtraceEvent : public ::protozero::Message { std::string, SchedProcessExecFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Filename kFilename() { return {}; } + static constexpr FieldMetadata_Filename kFilename{}; void set_filename(const char* data, size_t size) { AppendBytes(FieldMetadata_Filename::kFieldId, data, size); } + void set_filename(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Filename::kFieldId, chars.data, chars.size); + } void set_filename(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Filename::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -107086,14 +101747,7 @@ class SchedProcessExecFtraceEvent : public ::protozero::Message { int32_t, SchedProcessExecFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Pid kPid() { return {}; } + static constexpr FieldMetadata_Pid kPid{}; void set_pid(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Pid::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -107111,14 +101765,7 @@ class SchedProcessExecFtraceEvent : public ::protozero::Message { int32_t, SchedProcessExecFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_OldPid kOldPid() { return {}; } + static constexpr FieldMetadata_OldPid kOldPid{}; void set_old_pid(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_OldPid::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -107167,17 +101814,13 @@ class SchedWakeupNewFtraceEvent : public ::protozero::Message { std::string, SchedWakeupNewFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Comm kComm() { return {}; } + static constexpr FieldMetadata_Comm kComm{}; void set_comm(const char* data, size_t size) { AppendBytes(FieldMetadata_Comm::kFieldId, data, size); } + void set_comm(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Comm::kFieldId, chars.data, chars.size); + } void set_comm(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Comm::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -107195,14 +101838,7 @@ class SchedWakeupNewFtraceEvent : public ::protozero::Message { int32_t, SchedWakeupNewFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Pid kPid() { return {}; } + static constexpr FieldMetadata_Pid kPid{}; void set_pid(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Pid::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -107220,14 +101856,7 @@ class SchedWakeupNewFtraceEvent : public ::protozero::Message { int32_t, SchedWakeupNewFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Prio kPrio() { return {}; } + static constexpr FieldMetadata_Prio kPrio{}; void set_prio(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Prio::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -107245,14 +101874,7 @@ class SchedWakeupNewFtraceEvent : public ::protozero::Message { int32_t, SchedWakeupNewFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Success kSuccess() { return {}; } + static constexpr FieldMetadata_Success kSuccess{}; void set_success(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Success::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -107270,14 +101892,7 @@ class SchedWakeupNewFtraceEvent : public ::protozero::Message { int32_t, SchedWakeupNewFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_TargetCpu kTargetCpu() { return {}; } + static constexpr FieldMetadata_TargetCpu kTargetCpu{}; void set_target_cpu(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_TargetCpu::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -107326,17 +101941,13 @@ class SchedWakingFtraceEvent : public ::protozero::Message { std::string, SchedWakingFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Comm kComm() { return {}; } + static constexpr FieldMetadata_Comm kComm{}; void set_comm(const char* data, size_t size) { AppendBytes(FieldMetadata_Comm::kFieldId, data, size); } + void set_comm(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Comm::kFieldId, chars.data, chars.size); + } void set_comm(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Comm::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -107354,14 +101965,7 @@ class SchedWakingFtraceEvent : public ::protozero::Message { int32_t, SchedWakingFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Pid kPid() { return {}; } + static constexpr FieldMetadata_Pid kPid{}; void set_pid(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Pid::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -107379,14 +101983,7 @@ class SchedWakingFtraceEvent : public ::protozero::Message { int32_t, SchedWakingFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Prio kPrio() { return {}; } + static constexpr FieldMetadata_Prio kPrio{}; void set_prio(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Prio::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -107404,14 +102001,7 @@ class SchedWakingFtraceEvent : public ::protozero::Message { int32_t, SchedWakingFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Success kSuccess() { return {}; } + static constexpr FieldMetadata_Success kSuccess{}; void set_success(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Success::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -107429,14 +102019,7 @@ class SchedWakingFtraceEvent : public ::protozero::Message { int32_t, SchedWakingFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_TargetCpu kTargetCpu() { return {}; } + static constexpr FieldMetadata_TargetCpu kTargetCpu{}; void set_target_cpu(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_TargetCpu::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -107479,14 +102062,7 @@ class SchedCpuHotplugFtraceEvent : public ::protozero::Message { int32_t, SchedCpuHotplugFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_AffectedCpu kAffectedCpu() { return {}; } + static constexpr FieldMetadata_AffectedCpu kAffectedCpu{}; void set_affected_cpu(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_AffectedCpu::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -107504,14 +102080,7 @@ class SchedCpuHotplugFtraceEvent : public ::protozero::Message { int32_t, SchedCpuHotplugFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Error kError() { return {}; } + static constexpr FieldMetadata_Error kError{}; void set_error(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Error::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -107529,14 +102098,7 @@ class SchedCpuHotplugFtraceEvent : public ::protozero::Message { int32_t, SchedCpuHotplugFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Status kStatus() { return {}; } + static constexpr FieldMetadata_Status kStatus{}; void set_status(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Status::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -107579,14 +102141,7 @@ class SchedBlockedReasonFtraceEvent : public ::protozero::Message { int32_t, SchedBlockedReasonFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Pid kPid() { return {}; } + static constexpr FieldMetadata_Pid kPid{}; void set_pid(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Pid::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -107604,14 +102159,7 @@ class SchedBlockedReasonFtraceEvent : public ::protozero::Message { uint64_t, SchedBlockedReasonFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Caller kCaller() { return {}; } + static constexpr FieldMetadata_Caller kCaller{}; void set_caller(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Caller::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -107629,14 +102177,7 @@ class SchedBlockedReasonFtraceEvent : public ::protozero::Message { uint32_t, SchedBlockedReasonFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_IoWait kIoWait() { return {}; } + static constexpr FieldMetadata_IoWait kIoWait{}; void set_io_wait(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_IoWait::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -107685,17 +102226,13 @@ class SchedWakeupFtraceEvent : public ::protozero::Message { std::string, SchedWakeupFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Comm kComm() { return {}; } + static constexpr FieldMetadata_Comm kComm{}; void set_comm(const char* data, size_t size) { AppendBytes(FieldMetadata_Comm::kFieldId, data, size); } + void set_comm(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Comm::kFieldId, chars.data, chars.size); + } void set_comm(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Comm::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -107713,14 +102250,7 @@ class SchedWakeupFtraceEvent : public ::protozero::Message { int32_t, SchedWakeupFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Pid kPid() { return {}; } + static constexpr FieldMetadata_Pid kPid{}; void set_pid(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Pid::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -107738,14 +102268,7 @@ class SchedWakeupFtraceEvent : public ::protozero::Message { int32_t, SchedWakeupFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Prio kPrio() { return {}; } + static constexpr FieldMetadata_Prio kPrio{}; void set_prio(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Prio::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -107763,14 +102286,7 @@ class SchedWakeupFtraceEvent : public ::protozero::Message { int32_t, SchedWakeupFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Success kSuccess() { return {}; } + static constexpr FieldMetadata_Success kSuccess{}; void set_success(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Success::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -107788,14 +102304,7 @@ class SchedWakeupFtraceEvent : public ::protozero::Message { int32_t, SchedWakeupFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_TargetCpu kTargetCpu() { return {}; } + static constexpr FieldMetadata_TargetCpu kTargetCpu{}; void set_target_cpu(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_TargetCpu::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -107850,17 +102359,13 @@ class SchedSwitchFtraceEvent : public ::protozero::Message { std::string, SchedSwitchFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_PrevComm kPrevComm() { return {}; } + static constexpr FieldMetadata_PrevComm kPrevComm{}; void set_prev_comm(const char* data, size_t size) { AppendBytes(FieldMetadata_PrevComm::kFieldId, data, size); } + void set_prev_comm(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_PrevComm::kFieldId, chars.data, chars.size); + } void set_prev_comm(std::string value) { static constexpr uint32_t field_id = FieldMetadata_PrevComm::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -107878,14 +102383,7 @@ class SchedSwitchFtraceEvent : public ::protozero::Message { int32_t, SchedSwitchFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_PrevPid kPrevPid() { return {}; } + static constexpr FieldMetadata_PrevPid kPrevPid{}; void set_prev_pid(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_PrevPid::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -107903,14 +102401,7 @@ class SchedSwitchFtraceEvent : public ::protozero::Message { int32_t, SchedSwitchFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_PrevPrio kPrevPrio() { return {}; } + static constexpr FieldMetadata_PrevPrio kPrevPrio{}; void set_prev_prio(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_PrevPrio::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -107928,14 +102419,7 @@ class SchedSwitchFtraceEvent : public ::protozero::Message { int64_t, SchedSwitchFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_PrevState kPrevState() { return {}; } + static constexpr FieldMetadata_PrevState kPrevState{}; void set_prev_state(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_PrevState::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -107953,17 +102437,13 @@ class SchedSwitchFtraceEvent : public ::protozero::Message { std::string, SchedSwitchFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_NextComm kNextComm() { return {}; } + static constexpr FieldMetadata_NextComm kNextComm{}; void set_next_comm(const char* data, size_t size) { AppendBytes(FieldMetadata_NextComm::kFieldId, data, size); } + void set_next_comm(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_NextComm::kFieldId, chars.data, chars.size); + } void set_next_comm(std::string value) { static constexpr uint32_t field_id = FieldMetadata_NextComm::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -107981,14 +102461,7 @@ class SchedSwitchFtraceEvent : public ::protozero::Message { int32_t, SchedSwitchFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_NextPid kNextPid() { return {}; } + static constexpr FieldMetadata_NextPid kNextPid{}; void set_next_pid(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_NextPid::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -108006,14 +102479,7 @@ class SchedSwitchFtraceEvent : public ::protozero::Message { int32_t, SchedSwitchFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_NextPrio kNextPrio() { return {}; } + static constexpr FieldMetadata_NextPrio kNextPrio{}; void set_next_prio(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_NextPrio::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -108094,14 +102560,7 @@ class ScmCallStartFtraceEvent : public ::protozero::Message { uint32_t, ScmCallStartFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Arginfo kArginfo() { return {}; } + static constexpr FieldMetadata_Arginfo kArginfo{}; void set_arginfo(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Arginfo::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -108119,14 +102578,7 @@ class ScmCallStartFtraceEvent : public ::protozero::Message { uint64_t, ScmCallStartFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_X0 kX0() { return {}; } + static constexpr FieldMetadata_X0 kX0{}; void set_x0(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_X0::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -108144,14 +102596,7 @@ class ScmCallStartFtraceEvent : public ::protozero::Message { uint64_t, ScmCallStartFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_X5 kX5() { return {}; } + static constexpr FieldMetadata_X5 kX5{}; void set_x5(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_X5::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -108221,14 +102666,7 @@ class SdeSdePerfUpdateBusFtraceEvent : public ::protozero::Message { uint64_t, SdeSdePerfUpdateBusFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_AbQuota kAbQuota() { return {}; } + static constexpr FieldMetadata_AbQuota kAbQuota{}; void set_ab_quota(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_AbQuota::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -108246,14 +102684,7 @@ class SdeSdePerfUpdateBusFtraceEvent : public ::protozero::Message { uint32_t, SdeSdePerfUpdateBusFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_BusId kBusId() { return {}; } + static constexpr FieldMetadata_BusId kBusId{}; void set_bus_id(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_BusId::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -108271,14 +102702,7 @@ class SdeSdePerfUpdateBusFtraceEvent : public ::protozero::Message { int32_t, SdeSdePerfUpdateBusFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Client kClient() { return {}; } + static constexpr FieldMetadata_Client kClient{}; void set_client(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Client::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -108296,14 +102720,7 @@ class SdeSdePerfUpdateBusFtraceEvent : public ::protozero::Message { uint64_t, SdeSdePerfUpdateBusFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_IbQuota kIbQuota() { return {}; } + static constexpr FieldMetadata_IbQuota kIbQuota{}; void set_ib_quota(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_IbQuota::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -108355,14 +102772,7 @@ class SdeSdePerfSetQosLutsFtraceEvent : public ::protozero::Message { uint32_t, SdeSdePerfSetQosLutsFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Fl kFl() { return {}; } + static constexpr FieldMetadata_Fl kFl{}; void set_fl(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Fl::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -108380,14 +102790,7 @@ class SdeSdePerfSetQosLutsFtraceEvent : public ::protozero::Message { uint32_t, SdeSdePerfSetQosLutsFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Fmt kFmt() { return {}; } + static constexpr FieldMetadata_Fmt kFmt{}; void set_fmt(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Fmt::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -108405,14 +102808,7 @@ class SdeSdePerfSetQosLutsFtraceEvent : public ::protozero::Message { uint64_t, SdeSdePerfSetQosLutsFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Lut kLut() { return {}; } + static constexpr FieldMetadata_Lut kLut{}; void set_lut(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Lut::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -108430,14 +102826,7 @@ class SdeSdePerfSetQosLutsFtraceEvent : public ::protozero::Message { uint32_t, SdeSdePerfSetQosLutsFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_LutUsage kLutUsage() { return {}; } + static constexpr FieldMetadata_LutUsage kLutUsage{}; void set_lut_usage(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_LutUsage::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -108455,14 +102844,7 @@ class SdeSdePerfSetQosLutsFtraceEvent : public ::protozero::Message { uint32_t, SdeSdePerfSetQosLutsFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Pnum kPnum() { return {}; } + static constexpr FieldMetadata_Pnum kPnum{}; void set_pnum(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Pnum::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -108480,14 +102862,7 @@ class SdeSdePerfSetQosLutsFtraceEvent : public ::protozero::Message { uint32_t, SdeSdePerfSetQosLutsFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Rt kRt() { return {}; } + static constexpr FieldMetadata_Rt kRt{}; void set_rt(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Rt::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -108557,14 +102932,7 @@ class SdeSdePerfCrtcUpdateFtraceEvent : public ::protozero::Message { uint64_t, SdeSdePerfCrtcUpdateFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_BwCtlEbi kBwCtlEbi() { return {}; } + static constexpr FieldMetadata_BwCtlEbi kBwCtlEbi{}; void set_bw_ctl_ebi(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_BwCtlEbi::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -108582,14 +102950,7 @@ class SdeSdePerfCrtcUpdateFtraceEvent : public ::protozero::Message { uint64_t, SdeSdePerfCrtcUpdateFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_BwCtlLlcc kBwCtlLlcc() { return {}; } + static constexpr FieldMetadata_BwCtlLlcc kBwCtlLlcc{}; void set_bw_ctl_llcc(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_BwCtlLlcc::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -108607,14 +102968,7 @@ class SdeSdePerfCrtcUpdateFtraceEvent : public ::protozero::Message { uint64_t, SdeSdePerfCrtcUpdateFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_BwCtlMnoc kBwCtlMnoc() { return {}; } + static constexpr FieldMetadata_BwCtlMnoc kBwCtlMnoc{}; void set_bw_ctl_mnoc(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_BwCtlMnoc::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -108632,14 +102986,7 @@ class SdeSdePerfCrtcUpdateFtraceEvent : public ::protozero::Message { uint32_t, SdeSdePerfCrtcUpdateFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_CoreClkRate kCoreClkRate() { return {}; } + static constexpr FieldMetadata_CoreClkRate kCoreClkRate{}; void set_core_clk_rate(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_CoreClkRate::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -108657,14 +103004,7 @@ class SdeSdePerfCrtcUpdateFtraceEvent : public ::protozero::Message { uint32_t, SdeSdePerfCrtcUpdateFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Crtc kCrtc() { return {}; } + static constexpr FieldMetadata_Crtc kCrtc{}; void set_crtc(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Crtc::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -108682,14 +103022,7 @@ class SdeSdePerfCrtcUpdateFtraceEvent : public ::protozero::Message { int32_t, SdeSdePerfCrtcUpdateFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Params kParams() { return {}; } + static constexpr FieldMetadata_Params kParams{}; void set_params(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Params::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -108707,14 +103040,7 @@ class SdeSdePerfCrtcUpdateFtraceEvent : public ::protozero::Message { uint64_t, SdeSdePerfCrtcUpdateFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_PerPipeIbEbi kPerPipeIbEbi() { return {}; } + static constexpr FieldMetadata_PerPipeIbEbi kPerPipeIbEbi{}; void set_per_pipe_ib_ebi(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_PerPipeIbEbi::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -108732,14 +103058,7 @@ class SdeSdePerfCrtcUpdateFtraceEvent : public ::protozero::Message { uint64_t, SdeSdePerfCrtcUpdateFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_PerPipeIbLlcc kPerPipeIbLlcc() { return {}; } + static constexpr FieldMetadata_PerPipeIbLlcc kPerPipeIbLlcc{}; void set_per_pipe_ib_llcc(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_PerPipeIbLlcc::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -108757,14 +103076,7 @@ class SdeSdePerfCrtcUpdateFtraceEvent : public ::protozero::Message { uint64_t, SdeSdePerfCrtcUpdateFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_PerPipeIbMnoc kPerPipeIbMnoc() { return {}; } + static constexpr FieldMetadata_PerPipeIbMnoc kPerPipeIbMnoc{}; void set_per_pipe_ib_mnoc(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_PerPipeIbMnoc::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -108782,14 +103094,7 @@ class SdeSdePerfCrtcUpdateFtraceEvent : public ::protozero::Message { uint32_t, SdeSdePerfCrtcUpdateFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_StopReq kStopReq() { return {}; } + static constexpr FieldMetadata_StopReq kStopReq{}; void set_stop_req(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_StopReq::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -108807,14 +103112,7 @@ class SdeSdePerfCrtcUpdateFtraceEvent : public ::protozero::Message { uint32_t, SdeSdePerfCrtcUpdateFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_UpdateBus kUpdateBus() { return {}; } + static constexpr FieldMetadata_UpdateBus kUpdateBus{}; void set_update_bus(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_UpdateBus::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -108832,14 +103130,7 @@ class SdeSdePerfCrtcUpdateFtraceEvent : public ::protozero::Message { uint32_t, SdeSdePerfCrtcUpdateFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_UpdateClk kUpdateClk() { return {}; } + static constexpr FieldMetadata_UpdateClk kUpdateClk{}; void set_update_clk(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_UpdateClk::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -108897,14 +103188,7 @@ class SdeSdePerfCalcCrtcFtraceEvent : public ::protozero::Message { uint64_t, SdeSdePerfCalcCrtcFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_BwCtlEbi kBwCtlEbi() { return {}; } + static constexpr FieldMetadata_BwCtlEbi kBwCtlEbi{}; void set_bw_ctl_ebi(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_BwCtlEbi::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -108922,14 +103206,7 @@ class SdeSdePerfCalcCrtcFtraceEvent : public ::protozero::Message { uint64_t, SdeSdePerfCalcCrtcFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_BwCtlLlcc kBwCtlLlcc() { return {}; } + static constexpr FieldMetadata_BwCtlLlcc kBwCtlLlcc{}; void set_bw_ctl_llcc(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_BwCtlLlcc::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -108947,14 +103224,7 @@ class SdeSdePerfCalcCrtcFtraceEvent : public ::protozero::Message { uint64_t, SdeSdePerfCalcCrtcFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_BwCtlMnoc kBwCtlMnoc() { return {}; } + static constexpr FieldMetadata_BwCtlMnoc kBwCtlMnoc{}; void set_bw_ctl_mnoc(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_BwCtlMnoc::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -108972,14 +103242,7 @@ class SdeSdePerfCalcCrtcFtraceEvent : public ::protozero::Message { uint32_t, SdeSdePerfCalcCrtcFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_CoreClkRate kCoreClkRate() { return {}; } + static constexpr FieldMetadata_CoreClkRate kCoreClkRate{}; void set_core_clk_rate(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_CoreClkRate::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -108997,14 +103260,7 @@ class SdeSdePerfCalcCrtcFtraceEvent : public ::protozero::Message { uint32_t, SdeSdePerfCalcCrtcFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Crtc kCrtc() { return {}; } + static constexpr FieldMetadata_Crtc kCrtc{}; void set_crtc(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Crtc::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -109022,14 +103278,7 @@ class SdeSdePerfCalcCrtcFtraceEvent : public ::protozero::Message { uint64_t, SdeSdePerfCalcCrtcFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_IbEbi kIbEbi() { return {}; } + static constexpr FieldMetadata_IbEbi kIbEbi{}; void set_ib_ebi(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_IbEbi::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -109047,14 +103296,7 @@ class SdeSdePerfCalcCrtcFtraceEvent : public ::protozero::Message { uint64_t, SdeSdePerfCalcCrtcFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_IbLlcc kIbLlcc() { return {}; } + static constexpr FieldMetadata_IbLlcc kIbLlcc{}; void set_ib_llcc(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_IbLlcc::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -109072,14 +103314,7 @@ class SdeSdePerfCalcCrtcFtraceEvent : public ::protozero::Message { uint64_t, SdeSdePerfCalcCrtcFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_IbMnoc kIbMnoc() { return {}; } + static constexpr FieldMetadata_IbMnoc kIbMnoc{}; void set_ib_mnoc(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_IbMnoc::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -109122,17 +103357,13 @@ class SdeSdeEvtlogFtraceEvent : public ::protozero::Message { std::string, SdeSdeEvtlogFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_EvtlogTag kEvtlogTag() { return {}; } + static constexpr FieldMetadata_EvtlogTag kEvtlogTag{}; void set_evtlog_tag(const char* data, size_t size) { AppendBytes(FieldMetadata_EvtlogTag::kFieldId, data, size); } + void set_evtlog_tag(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_EvtlogTag::kFieldId, chars.data, chars.size); + } void set_evtlog_tag(std::string value) { static constexpr uint32_t field_id = FieldMetadata_EvtlogTag::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -109150,14 +103381,7 @@ class SdeSdeEvtlogFtraceEvent : public ::protozero::Message { int32_t, SdeSdeEvtlogFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Pid kPid() { return {}; } + static constexpr FieldMetadata_Pid kPid{}; void set_pid(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Pid::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -109175,14 +103399,7 @@ class SdeSdeEvtlogFtraceEvent : public ::protozero::Message { uint32_t, SdeSdeEvtlogFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_TagId kTagId() { return {}; } + static constexpr FieldMetadata_TagId kTagId{}; void set_tag_id(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_TagId::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -109231,14 +103448,7 @@ class SdeTracingMarkWriteFtraceEvent : public ::protozero::Message { int32_t, SdeTracingMarkWriteFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Pid kPid() { return {}; } + static constexpr FieldMetadata_Pid kPid{}; void set_pid(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Pid::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -109256,17 +103466,13 @@ class SdeTracingMarkWriteFtraceEvent : public ::protozero::Message { std::string, SdeTracingMarkWriteFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_TraceName kTraceName() { return {}; } + static constexpr FieldMetadata_TraceName kTraceName{}; void set_trace_name(const char* data, size_t size) { AppendBytes(FieldMetadata_TraceName::kFieldId, data, size); } + void set_trace_name(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_TraceName::kFieldId, chars.data, chars.size); + } void set_trace_name(std::string value) { static constexpr uint32_t field_id = FieldMetadata_TraceName::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -109284,14 +103490,7 @@ class SdeTracingMarkWriteFtraceEvent : public ::protozero::Message { uint32_t, SdeTracingMarkWriteFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_TraceType kTraceType() { return {}; } + static constexpr FieldMetadata_TraceType kTraceType{}; void set_trace_type(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_TraceType::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -109309,14 +103508,7 @@ class SdeTracingMarkWriteFtraceEvent : public ::protozero::Message { int32_t, SdeTracingMarkWriteFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Value kValue() { return {}; } + static constexpr FieldMetadata_Value kValue{}; void set_value(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Value::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -109334,14 +103526,7 @@ class SdeTracingMarkWriteFtraceEvent : public ::protozero::Message { uint32_t, SdeTracingMarkWriteFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_TraceBegin kTraceBegin() { return {}; } + static constexpr FieldMetadata_TraceBegin kTraceBegin{}; void set_trace_begin(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_TraceBegin::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -109417,14 +103602,7 @@ class SignalGenerateFtraceEvent : public ::protozero::Message { int32_t, SignalGenerateFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Code kCode() { return {}; } + static constexpr FieldMetadata_Code kCode{}; void set_code(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Code::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -109442,17 +103620,13 @@ class SignalGenerateFtraceEvent : public ::protozero::Message { std::string, SignalGenerateFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Comm kComm() { return {}; } + static constexpr FieldMetadata_Comm kComm{}; void set_comm(const char* data, size_t size) { AppendBytes(FieldMetadata_Comm::kFieldId, data, size); } + void set_comm(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Comm::kFieldId, chars.data, chars.size); + } void set_comm(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Comm::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -109470,14 +103644,7 @@ class SignalGenerateFtraceEvent : public ::protozero::Message { int32_t, SignalGenerateFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Group kGroup() { return {}; } + static constexpr FieldMetadata_Group kGroup{}; void set_group(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Group::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -109495,14 +103662,7 @@ class SignalGenerateFtraceEvent : public ::protozero::Message { int32_t, SignalGenerateFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Pid kPid() { return {}; } + static constexpr FieldMetadata_Pid kPid{}; void set_pid(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Pid::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -109520,14 +103680,7 @@ class SignalGenerateFtraceEvent : public ::protozero::Message { int32_t, SignalGenerateFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Result kResult() { return {}; } + static constexpr FieldMetadata_Result kResult{}; void set_result(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Result::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -109545,14 +103698,7 @@ class SignalGenerateFtraceEvent : public ::protozero::Message { int32_t, SignalGenerateFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Sig kSig() { return {}; } + static constexpr FieldMetadata_Sig kSig{}; void set_sig(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Sig::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -109595,14 +103741,7 @@ class SignalDeliverFtraceEvent : public ::protozero::Message { int32_t, SignalDeliverFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Code kCode() { return {}; } + static constexpr FieldMetadata_Code kCode{}; void set_code(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Code::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -109620,14 +103759,7 @@ class SignalDeliverFtraceEvent : public ::protozero::Message { uint64_t, SignalDeliverFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_SaFlags kSaFlags() { return {}; } + static constexpr FieldMetadata_SaFlags kSaFlags{}; void set_sa_flags(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_SaFlags::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -109645,14 +103777,7 @@ class SignalDeliverFtraceEvent : public ::protozero::Message { int32_t, SignalDeliverFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Sig kSig() { return {}; } + static constexpr FieldMetadata_Sig kSig{}; void set_sig(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Sig::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -109719,14 +103844,7 @@ class KfreeSkbFtraceEvent : public ::protozero::Message { uint64_t, KfreeSkbFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Location kLocation() { return {}; } + static constexpr FieldMetadata_Location kLocation{}; void set_location(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Location::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -109744,14 +103862,7 @@ class KfreeSkbFtraceEvent : public ::protozero::Message { uint32_t, KfreeSkbFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Protocol kProtocol() { return {}; } + static constexpr FieldMetadata_Protocol kProtocol{}; void set_protocol(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Protocol::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -109769,14 +103880,7 @@ class KfreeSkbFtraceEvent : public ::protozero::Message { uint64_t, KfreeSkbFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Skbaddr kSkbaddr() { return {}; } + static constexpr FieldMetadata_Skbaddr kSkbaddr{}; void set_skbaddr(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Skbaddr::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -109861,14 +103965,7 @@ class InetSockSetStateFtraceEvent : public ::protozero::Message { uint32_t, InetSockSetStateFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Daddr kDaddr() { return {}; } + static constexpr FieldMetadata_Daddr kDaddr{}; void set_daddr(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Daddr::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -109886,14 +103983,7 @@ class InetSockSetStateFtraceEvent : public ::protozero::Message { uint32_t, InetSockSetStateFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Dport kDport() { return {}; } + static constexpr FieldMetadata_Dport kDport{}; void set_dport(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Dport::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -109911,14 +104001,7 @@ class InetSockSetStateFtraceEvent : public ::protozero::Message { uint32_t, InetSockSetStateFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Family kFamily() { return {}; } + static constexpr FieldMetadata_Family kFamily{}; void set_family(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Family::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -109936,14 +104019,7 @@ class InetSockSetStateFtraceEvent : public ::protozero::Message { int32_t, InetSockSetStateFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Newstate kNewstate() { return {}; } + static constexpr FieldMetadata_Newstate kNewstate{}; void set_newstate(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Newstate::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -109961,14 +104037,7 @@ class InetSockSetStateFtraceEvent : public ::protozero::Message { int32_t, InetSockSetStateFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Oldstate kOldstate() { return {}; } + static constexpr FieldMetadata_Oldstate kOldstate{}; void set_oldstate(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Oldstate::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -109986,14 +104055,7 @@ class InetSockSetStateFtraceEvent : public ::protozero::Message { uint32_t, InetSockSetStateFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Protocol kProtocol() { return {}; } + static constexpr FieldMetadata_Protocol kProtocol{}; void set_protocol(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Protocol::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -110011,14 +104073,7 @@ class InetSockSetStateFtraceEvent : public ::protozero::Message { uint32_t, InetSockSetStateFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Saddr kSaddr() { return {}; } + static constexpr FieldMetadata_Saddr kSaddr{}; void set_saddr(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Saddr::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -110036,14 +104091,7 @@ class InetSockSetStateFtraceEvent : public ::protozero::Message { uint64_t, InetSockSetStateFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Skaddr kSkaddr() { return {}; } + static constexpr FieldMetadata_Skaddr kSkaddr{}; void set_skaddr(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Skaddr::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -110061,14 +104109,7 @@ class InetSockSetStateFtraceEvent : public ::protozero::Message { uint32_t, InetSockSetStateFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Sport kSport() { return {}; } + static constexpr FieldMetadata_Sport kSport{}; void set_sport(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Sport::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -110135,17 +104176,13 @@ class SyncWaitFtraceEvent : public ::protozero::Message { std::string, SyncWaitFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Name kName() { return {}; } + static constexpr FieldMetadata_Name kName{}; void set_name(const char* data, size_t size) { AppendBytes(FieldMetadata_Name::kFieldId, data, size); } + void set_name(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Name::kFieldId, chars.data, chars.size); + } void set_name(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Name::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -110163,14 +104200,7 @@ class SyncWaitFtraceEvent : public ::protozero::Message { int32_t, SyncWaitFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Status kStatus() { return {}; } + static constexpr FieldMetadata_Status kStatus{}; void set_status(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Status::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -110188,14 +104218,7 @@ class SyncWaitFtraceEvent : public ::protozero::Message { uint32_t, SyncWaitFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Begin kBegin() { return {}; } + static constexpr FieldMetadata_Begin kBegin{}; void set_begin(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Begin::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -110235,17 +104258,13 @@ class SyncTimelineFtraceEvent : public ::protozero::Message { std::string, SyncTimelineFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Name kName() { return {}; } + static constexpr FieldMetadata_Name kName{}; void set_name(const char* data, size_t size) { AppendBytes(FieldMetadata_Name::kFieldId, data, size); } + void set_name(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Name::kFieldId, chars.data, chars.size); + } void set_name(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Name::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -110263,17 +104282,13 @@ class SyncTimelineFtraceEvent : public ::protozero::Message { std::string, SyncTimelineFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Value kValue() { return {}; } + static constexpr FieldMetadata_Value kValue{}; void set_value(const char* data, size_t size) { AppendBytes(FieldMetadata_Value::kFieldId, data, size); } + void set_value(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Value::kFieldId, chars.data, chars.size); + } void set_value(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Value::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -110313,17 +104328,13 @@ class SyncPtFtraceEvent : public ::protozero::Message { std::string, SyncPtFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Timeline kTimeline() { return {}; } + static constexpr FieldMetadata_Timeline kTimeline{}; void set_timeline(const char* data, size_t size) { AppendBytes(FieldMetadata_Timeline::kFieldId, data, size); } + void set_timeline(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Timeline::kFieldId, chars.data, chars.size); + } void set_timeline(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Timeline::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -110341,17 +104352,13 @@ class SyncPtFtraceEvent : public ::protozero::Message { std::string, SyncPtFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Value kValue() { return {}; } + static constexpr FieldMetadata_Value kValue{}; void set_value(const char* data, size_t size) { AppendBytes(FieldMetadata_Value::kFieldId, data, size); } + void set_value(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Value::kFieldId, chars.data, chars.size); + } void set_value(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Value::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -110386,6 +104393,43 @@ namespace protos { namespace pbzero { +class SuspendResumeMinimalFtraceEvent_Decoder : public ::protozero::TypedProtoDecoder { + public: + SuspendResumeMinimalFtraceEvent_Decoder(const uint8_t* data, size_t len) : TypedProtoDecoder(data, len) {} + explicit SuspendResumeMinimalFtraceEvent_Decoder(const std::string& raw) : TypedProtoDecoder(reinterpret_cast(raw.data()), raw.size()) {} + explicit SuspendResumeMinimalFtraceEvent_Decoder(const ::protozero::ConstBytes& raw) : TypedProtoDecoder(raw.data, raw.size) {} + bool has_start() const { return at<1>().valid(); } + uint32_t start() const { return at<1>().as_uint32(); } +}; + +class SuspendResumeMinimalFtraceEvent : public ::protozero::Message { + public: + using Decoder = SuspendResumeMinimalFtraceEvent_Decoder; + enum : int32_t { + kStartFieldNumber = 1, + }; + static constexpr const char* GetName() { return ".perfetto.protos.SuspendResumeMinimalFtraceEvent"; } + + + using FieldMetadata_Start = + ::protozero::proto_utils::FieldMetadata< + 1, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint32, + uint32_t, + SuspendResumeMinimalFtraceEvent>; + + static constexpr FieldMetadata_Start kStart{}; + void set_start(uint32_t value) { + static constexpr uint32_t field_id = FieldMetadata_Start::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint32> + ::Append(*this, field_id, value); + } +}; + class RssStatThrottledFtraceEvent_Decoder : public ::protozero::TypedProtoDecoder { public: RssStatThrottledFtraceEvent_Decoder(const uint8_t* data, size_t len) : TypedProtoDecoder(data, len) {} @@ -110421,14 +104465,7 @@ class RssStatThrottledFtraceEvent : public ::protozero::Message { uint32_t, RssStatThrottledFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Curr kCurr() { return {}; } + static constexpr FieldMetadata_Curr kCurr{}; void set_curr(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Curr::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -110446,14 +104483,7 @@ class RssStatThrottledFtraceEvent : public ::protozero::Message { int32_t, RssStatThrottledFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Member kMember() { return {}; } + static constexpr FieldMetadata_Member kMember{}; void set_member(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Member::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -110471,14 +104501,7 @@ class RssStatThrottledFtraceEvent : public ::protozero::Message { uint32_t, RssStatThrottledFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_MmId kMmId() { return {}; } + static constexpr FieldMetadata_MmId kMmId{}; void set_mm_id(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_MmId::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -110496,14 +104519,7 @@ class RssStatThrottledFtraceEvent : public ::protozero::Message { int64_t, RssStatThrottledFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Size kSize() { return {}; } + static constexpr FieldMetadata_Size kSize{}; void set_size(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_Size::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -110573,14 +104589,7 @@ class ZeroFtraceEvent : public ::protozero::Message { int32_t, ZeroFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Flag kFlag() { return {}; } + static constexpr FieldMetadata_Flag kFlag{}; void set_flag(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Flag::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -110598,17 +104607,13 @@ class ZeroFtraceEvent : public ::protozero::Message { std::string, ZeroFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Name kName() { return {}; } + static constexpr FieldMetadata_Name kName{}; void set_name(const char* data, size_t size) { AppendBytes(FieldMetadata_Name::kFieldId, data, size); } + void set_name(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Name::kFieldId, chars.data, chars.size); + } void set_name(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Name::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -110626,14 +104631,7 @@ class ZeroFtraceEvent : public ::protozero::Message { int32_t, ZeroFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Pid kPid() { return {}; } + static constexpr FieldMetadata_Pid kPid{}; void set_pid(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Pid::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -110651,14 +104649,7 @@ class ZeroFtraceEvent : public ::protozero::Message { int64_t, ZeroFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Value kValue() { return {}; } + static constexpr FieldMetadata_Value kValue{}; void set_value(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_Value::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -110728,14 +104719,7 @@ class TaskRenameFtraceEvent : public ::protozero::Message { int32_t, TaskRenameFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Pid kPid() { return {}; } + static constexpr FieldMetadata_Pid kPid{}; void set_pid(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Pid::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -110753,17 +104737,13 @@ class TaskRenameFtraceEvent : public ::protozero::Message { std::string, TaskRenameFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Oldcomm kOldcomm() { return {}; } + static constexpr FieldMetadata_Oldcomm kOldcomm{}; void set_oldcomm(const char* data, size_t size) { AppendBytes(FieldMetadata_Oldcomm::kFieldId, data, size); } + void set_oldcomm(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Oldcomm::kFieldId, chars.data, chars.size); + } void set_oldcomm(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Oldcomm::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -110781,17 +104761,13 @@ class TaskRenameFtraceEvent : public ::protozero::Message { std::string, TaskRenameFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Newcomm kNewcomm() { return {}; } + static constexpr FieldMetadata_Newcomm kNewcomm{}; void set_newcomm(const char* data, size_t size) { AppendBytes(FieldMetadata_Newcomm::kFieldId, data, size); } + void set_newcomm(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Newcomm::kFieldId, chars.data, chars.size); + } void set_newcomm(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Newcomm::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -110809,14 +104785,7 @@ class TaskRenameFtraceEvent : public ::protozero::Message { int32_t, TaskRenameFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_OomScoreAdj kOomScoreAdj() { return {}; } + static constexpr FieldMetadata_OomScoreAdj kOomScoreAdj{}; void set_oom_score_adj(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_OomScoreAdj::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -110862,14 +104831,7 @@ class TaskNewtaskFtraceEvent : public ::protozero::Message { int32_t, TaskNewtaskFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Pid kPid() { return {}; } + static constexpr FieldMetadata_Pid kPid{}; void set_pid(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Pid::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -110887,17 +104849,13 @@ class TaskNewtaskFtraceEvent : public ::protozero::Message { std::string, TaskNewtaskFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Comm kComm() { return {}; } + static constexpr FieldMetadata_Comm kComm{}; void set_comm(const char* data, size_t size) { AppendBytes(FieldMetadata_Comm::kFieldId, data, size); } + void set_comm(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Comm::kFieldId, chars.data, chars.size); + } void set_comm(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Comm::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -110915,14 +104873,7 @@ class TaskNewtaskFtraceEvent : public ::protozero::Message { uint64_t, TaskNewtaskFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_CloneFlags kCloneFlags() { return {}; } + static constexpr FieldMetadata_CloneFlags kCloneFlags{}; void set_clone_flags(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_CloneFlags::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -110940,14 +104891,7 @@ class TaskNewtaskFtraceEvent : public ::protozero::Message { int32_t, TaskNewtaskFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_OomScoreAdj kOomScoreAdj() { return {}; } + static constexpr FieldMetadata_OomScoreAdj kOomScoreAdj{}; void set_oom_score_adj(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_OomScoreAdj::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -111026,14 +104970,7 @@ class TcpRetransmitSkbFtraceEvent : public ::protozero::Message { uint32_t, TcpRetransmitSkbFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Daddr kDaddr() { return {}; } + static constexpr FieldMetadata_Daddr kDaddr{}; void set_daddr(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Daddr::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -111051,14 +104988,7 @@ class TcpRetransmitSkbFtraceEvent : public ::protozero::Message { uint32_t, TcpRetransmitSkbFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Dport kDport() { return {}; } + static constexpr FieldMetadata_Dport kDport{}; void set_dport(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Dport::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -111076,14 +105006,7 @@ class TcpRetransmitSkbFtraceEvent : public ::protozero::Message { uint32_t, TcpRetransmitSkbFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Saddr kSaddr() { return {}; } + static constexpr FieldMetadata_Saddr kSaddr{}; void set_saddr(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Saddr::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -111101,14 +105024,7 @@ class TcpRetransmitSkbFtraceEvent : public ::protozero::Message { uint64_t, TcpRetransmitSkbFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Skaddr kSkaddr() { return {}; } + static constexpr FieldMetadata_Skaddr kSkaddr{}; void set_skaddr(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Skaddr::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -111126,14 +105042,7 @@ class TcpRetransmitSkbFtraceEvent : public ::protozero::Message { uint64_t, TcpRetransmitSkbFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Skbaddr kSkbaddr() { return {}; } + static constexpr FieldMetadata_Skbaddr kSkbaddr{}; void set_skbaddr(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Skbaddr::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -111151,14 +105060,7 @@ class TcpRetransmitSkbFtraceEvent : public ::protozero::Message { uint32_t, TcpRetransmitSkbFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Sport kSport() { return {}; } + static constexpr FieldMetadata_Sport kSport{}; void set_sport(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Sport::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -111176,14 +105078,7 @@ class TcpRetransmitSkbFtraceEvent : public ::protozero::Message { int32_t, TcpRetransmitSkbFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_State kState() { return {}; } + static constexpr FieldMetadata_State kState{}; void set_state(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_State::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -111247,14 +105142,7 @@ class CdevUpdateFtraceEvent : public ::protozero::Message { uint64_t, CdevUpdateFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Target kTarget() { return {}; } + static constexpr FieldMetadata_Target kTarget{}; void set_target(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Target::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -111272,17 +105160,13 @@ class CdevUpdateFtraceEvent : public ::protozero::Message { std::string, CdevUpdateFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Type kType() { return {}; } + static constexpr FieldMetadata_Type kType{}; void set_type(const char* data, size_t size) { AppendBytes(FieldMetadata_Type::kFieldId, data, size); } + void set_type(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Type::kFieldId, chars.data, chars.size); + } void set_type(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Type::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -111328,14 +105212,7 @@ class ThermalTemperatureFtraceEvent : public ::protozero::Message { int32_t, ThermalTemperatureFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Id kId() { return {}; } + static constexpr FieldMetadata_Id kId{}; void set_id(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Id::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -111353,14 +105230,7 @@ class ThermalTemperatureFtraceEvent : public ::protozero::Message { int32_t, ThermalTemperatureFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Temp kTemp() { return {}; } + static constexpr FieldMetadata_Temp kTemp{}; void set_temp(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Temp::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -111378,14 +105248,7 @@ class ThermalTemperatureFtraceEvent : public ::protozero::Message { int32_t, ThermalTemperatureFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_TempPrev kTempPrev() { return {}; } + static constexpr FieldMetadata_TempPrev kTempPrev{}; void set_temp_prev(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_TempPrev::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -111403,17 +105266,13 @@ class ThermalTemperatureFtraceEvent : public ::protozero::Message { std::string, ThermalTemperatureFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ThermalZone kThermalZone() { return {}; } + static constexpr FieldMetadata_ThermalZone kThermalZone{}; void set_thermal_zone(const char* data, size_t size) { AppendBytes(FieldMetadata_ThermalZone::kFieldId, data, size); } + void set_thermal_zone(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_ThermalZone::kFieldId, chars.data, chars.size); + } void set_thermal_zone(std::string value) { static constexpr uint32_t field_id = FieldMetadata_ThermalZone::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -111424,6 +105283,1473 @@ class ThermalTemperatureFtraceEvent : public ::protozero::Message { } }; +} // Namespace. +} // Namespace. +} // Namespace. +#endif // Include guard. +// gen_amalgamated begin header: gen/protos/perfetto/trace/ftrace/trusty.pbzero.h +// Autogenerated by the ProtoZero compiler plugin. DO NOT EDIT. + +#ifndef PERFETTO_PROTOS_PROTOS_PERFETTO_TRACE_FTRACE_TRUSTY_PROTO_H_ +#define PERFETTO_PROTOS_PROTOS_PERFETTO_TRACE_FTRACE_TRUSTY_PROTO_H_ + +#include +#include + +// gen_amalgamated expanded: #include "perfetto/protozero/field_writer.h" +// gen_amalgamated expanded: #include "perfetto/protozero/message.h" +// gen_amalgamated expanded: #include "perfetto/protozero/packed_repeated_fields.h" +// gen_amalgamated expanded: #include "perfetto/protozero/proto_decoder.h" +// gen_amalgamated expanded: #include "perfetto/protozero/proto_utils.h" + +namespace perfetto { +namespace protos { +namespace pbzero { + + +class TrustyEnqueueNopFtraceEvent_Decoder : public ::protozero::TypedProtoDecoder { + public: + TrustyEnqueueNopFtraceEvent_Decoder(const uint8_t* data, size_t len) : TypedProtoDecoder(data, len) {} + explicit TrustyEnqueueNopFtraceEvent_Decoder(const std::string& raw) : TypedProtoDecoder(reinterpret_cast(raw.data()), raw.size()) {} + explicit TrustyEnqueueNopFtraceEvent_Decoder(const ::protozero::ConstBytes& raw) : TypedProtoDecoder(raw.data, raw.size) {} + bool has_arg1() const { return at<1>().valid(); } + uint32_t arg1() const { return at<1>().as_uint32(); } + bool has_arg2() const { return at<2>().valid(); } + uint32_t arg2() const { return at<2>().as_uint32(); } + bool has_arg3() const { return at<3>().valid(); } + uint32_t arg3() const { return at<3>().as_uint32(); } +}; + +class TrustyEnqueueNopFtraceEvent : public ::protozero::Message { + public: + using Decoder = TrustyEnqueueNopFtraceEvent_Decoder; + enum : int32_t { + kArg1FieldNumber = 1, + kArg2FieldNumber = 2, + kArg3FieldNumber = 3, + }; + static constexpr const char* GetName() { return ".perfetto.protos.TrustyEnqueueNopFtraceEvent"; } + + + using FieldMetadata_Arg1 = + ::protozero::proto_utils::FieldMetadata< + 1, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint32, + uint32_t, + TrustyEnqueueNopFtraceEvent>; + + static constexpr FieldMetadata_Arg1 kArg1{}; + void set_arg1(uint32_t value) { + static constexpr uint32_t field_id = FieldMetadata_Arg1::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint32> + ::Append(*this, field_id, value); + } + + using FieldMetadata_Arg2 = + ::protozero::proto_utils::FieldMetadata< + 2, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint32, + uint32_t, + TrustyEnqueueNopFtraceEvent>; + + static constexpr FieldMetadata_Arg2 kArg2{}; + void set_arg2(uint32_t value) { + static constexpr uint32_t field_id = FieldMetadata_Arg2::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint32> + ::Append(*this, field_id, value); + } + + using FieldMetadata_Arg3 = + ::protozero::proto_utils::FieldMetadata< + 3, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint32, + uint32_t, + TrustyEnqueueNopFtraceEvent>; + + static constexpr FieldMetadata_Arg3 kArg3{}; + void set_arg3(uint32_t value) { + static constexpr uint32_t field_id = FieldMetadata_Arg3::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint32> + ::Append(*this, field_id, value); + } +}; + +class TrustyIpcRxFtraceEvent_Decoder : public ::protozero::TypedProtoDecoder { + public: + TrustyIpcRxFtraceEvent_Decoder(const uint8_t* data, size_t len) : TypedProtoDecoder(data, len) {} + explicit TrustyIpcRxFtraceEvent_Decoder(const std::string& raw) : TypedProtoDecoder(reinterpret_cast(raw.data()), raw.size()) {} + explicit TrustyIpcRxFtraceEvent_Decoder(const ::protozero::ConstBytes& raw) : TypedProtoDecoder(raw.data, raw.size) {} + bool has_buf_id() const { return at<1>().valid(); } + uint64_t buf_id() const { return at<1>().as_uint64(); } + bool has_chan() const { return at<2>().valid(); } + uint32_t chan() const { return at<2>().as_uint32(); } + bool has_srv_name() const { return at<3>().valid(); } + ::protozero::ConstChars srv_name() const { return at<3>().as_string(); } +}; + +class TrustyIpcRxFtraceEvent : public ::protozero::Message { + public: + using Decoder = TrustyIpcRxFtraceEvent_Decoder; + enum : int32_t { + kBufIdFieldNumber = 1, + kChanFieldNumber = 2, + kSrvNameFieldNumber = 3, + }; + static constexpr const char* GetName() { return ".perfetto.protos.TrustyIpcRxFtraceEvent"; } + + + using FieldMetadata_BufId = + ::protozero::proto_utils::FieldMetadata< + 1, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint64, + uint64_t, + TrustyIpcRxFtraceEvent>; + + static constexpr FieldMetadata_BufId kBufId{}; + void set_buf_id(uint64_t value) { + static constexpr uint32_t field_id = FieldMetadata_BufId::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint64> + ::Append(*this, field_id, value); + } + + using FieldMetadata_Chan = + ::protozero::proto_utils::FieldMetadata< + 2, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint32, + uint32_t, + TrustyIpcRxFtraceEvent>; + + static constexpr FieldMetadata_Chan kChan{}; + void set_chan(uint32_t value) { + static constexpr uint32_t field_id = FieldMetadata_Chan::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint32> + ::Append(*this, field_id, value); + } + + using FieldMetadata_SrvName = + ::protozero::proto_utils::FieldMetadata< + 3, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kString, + std::string, + TrustyIpcRxFtraceEvent>; + + static constexpr FieldMetadata_SrvName kSrvName{}; + void set_srv_name(const char* data, size_t size) { + AppendBytes(FieldMetadata_SrvName::kFieldId, data, size); + } + void set_srv_name(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_SrvName::kFieldId, chars.data, chars.size); + } + void set_srv_name(std::string value) { + static constexpr uint32_t field_id = FieldMetadata_SrvName::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kString> + ::Append(*this, field_id, value); + } +}; + +class TrustyIpcReadEndFtraceEvent_Decoder : public ::protozero::TypedProtoDecoder { + public: + TrustyIpcReadEndFtraceEvent_Decoder(const uint8_t* data, size_t len) : TypedProtoDecoder(data, len) {} + explicit TrustyIpcReadEndFtraceEvent_Decoder(const std::string& raw) : TypedProtoDecoder(reinterpret_cast(raw.data()), raw.size()) {} + explicit TrustyIpcReadEndFtraceEvent_Decoder(const ::protozero::ConstBytes& raw) : TypedProtoDecoder(raw.data, raw.size) {} + bool has_buf_id() const { return at<1>().valid(); } + uint64_t buf_id() const { return at<1>().as_uint64(); } + bool has_chan() const { return at<2>().valid(); } + uint32_t chan() const { return at<2>().as_uint32(); } + bool has_len_or_err() const { return at<3>().valid(); } + int32_t len_or_err() const { return at<3>().as_int32(); } + bool has_shm_cnt() const { return at<4>().valid(); } + uint64_t shm_cnt() const { return at<4>().as_uint64(); } + bool has_srv_name() const { return at<5>().valid(); } + ::protozero::ConstChars srv_name() const { return at<5>().as_string(); } +}; + +class TrustyIpcReadEndFtraceEvent : public ::protozero::Message { + public: + using Decoder = TrustyIpcReadEndFtraceEvent_Decoder; + enum : int32_t { + kBufIdFieldNumber = 1, + kChanFieldNumber = 2, + kLenOrErrFieldNumber = 3, + kShmCntFieldNumber = 4, + kSrvNameFieldNumber = 5, + }; + static constexpr const char* GetName() { return ".perfetto.protos.TrustyIpcReadEndFtraceEvent"; } + + + using FieldMetadata_BufId = + ::protozero::proto_utils::FieldMetadata< + 1, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint64, + uint64_t, + TrustyIpcReadEndFtraceEvent>; + + static constexpr FieldMetadata_BufId kBufId{}; + void set_buf_id(uint64_t value) { + static constexpr uint32_t field_id = FieldMetadata_BufId::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint64> + ::Append(*this, field_id, value); + } + + using FieldMetadata_Chan = + ::protozero::proto_utils::FieldMetadata< + 2, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint32, + uint32_t, + TrustyIpcReadEndFtraceEvent>; + + static constexpr FieldMetadata_Chan kChan{}; + void set_chan(uint32_t value) { + static constexpr uint32_t field_id = FieldMetadata_Chan::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint32> + ::Append(*this, field_id, value); + } + + using FieldMetadata_LenOrErr = + ::protozero::proto_utils::FieldMetadata< + 3, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kInt32, + int32_t, + TrustyIpcReadEndFtraceEvent>; + + static constexpr FieldMetadata_LenOrErr kLenOrErr{}; + void set_len_or_err(int32_t value) { + static constexpr uint32_t field_id = FieldMetadata_LenOrErr::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kInt32> + ::Append(*this, field_id, value); + } + + using FieldMetadata_ShmCnt = + ::protozero::proto_utils::FieldMetadata< + 4, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint64, + uint64_t, + TrustyIpcReadEndFtraceEvent>; + + static constexpr FieldMetadata_ShmCnt kShmCnt{}; + void set_shm_cnt(uint64_t value) { + static constexpr uint32_t field_id = FieldMetadata_ShmCnt::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint64> + ::Append(*this, field_id, value); + } + + using FieldMetadata_SrvName = + ::protozero::proto_utils::FieldMetadata< + 5, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kString, + std::string, + TrustyIpcReadEndFtraceEvent>; + + static constexpr FieldMetadata_SrvName kSrvName{}; + void set_srv_name(const char* data, size_t size) { + AppendBytes(FieldMetadata_SrvName::kFieldId, data, size); + } + void set_srv_name(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_SrvName::kFieldId, chars.data, chars.size); + } + void set_srv_name(std::string value) { + static constexpr uint32_t field_id = FieldMetadata_SrvName::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kString> + ::Append(*this, field_id, value); + } +}; + +class TrustyIpcReadFtraceEvent_Decoder : public ::protozero::TypedProtoDecoder { + public: + TrustyIpcReadFtraceEvent_Decoder(const uint8_t* data, size_t len) : TypedProtoDecoder(data, len) {} + explicit TrustyIpcReadFtraceEvent_Decoder(const std::string& raw) : TypedProtoDecoder(reinterpret_cast(raw.data()), raw.size()) {} + explicit TrustyIpcReadFtraceEvent_Decoder(const ::protozero::ConstBytes& raw) : TypedProtoDecoder(raw.data, raw.size) {} + bool has_chan() const { return at<1>().valid(); } + uint32_t chan() const { return at<1>().as_uint32(); } + bool has_srv_name() const { return at<2>().valid(); } + ::protozero::ConstChars srv_name() const { return at<2>().as_string(); } +}; + +class TrustyIpcReadFtraceEvent : public ::protozero::Message { + public: + using Decoder = TrustyIpcReadFtraceEvent_Decoder; + enum : int32_t { + kChanFieldNumber = 1, + kSrvNameFieldNumber = 2, + }; + static constexpr const char* GetName() { return ".perfetto.protos.TrustyIpcReadFtraceEvent"; } + + + using FieldMetadata_Chan = + ::protozero::proto_utils::FieldMetadata< + 1, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint32, + uint32_t, + TrustyIpcReadFtraceEvent>; + + static constexpr FieldMetadata_Chan kChan{}; + void set_chan(uint32_t value) { + static constexpr uint32_t field_id = FieldMetadata_Chan::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint32> + ::Append(*this, field_id, value); + } + + using FieldMetadata_SrvName = + ::protozero::proto_utils::FieldMetadata< + 2, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kString, + std::string, + TrustyIpcReadFtraceEvent>; + + static constexpr FieldMetadata_SrvName kSrvName{}; + void set_srv_name(const char* data, size_t size) { + AppendBytes(FieldMetadata_SrvName::kFieldId, data, size); + } + void set_srv_name(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_SrvName::kFieldId, chars.data, chars.size); + } + void set_srv_name(std::string value) { + static constexpr uint32_t field_id = FieldMetadata_SrvName::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kString> + ::Append(*this, field_id, value); + } +}; + +class TrustyIpcPollFtraceEvent_Decoder : public ::protozero::TypedProtoDecoder { + public: + TrustyIpcPollFtraceEvent_Decoder(const uint8_t* data, size_t len) : TypedProtoDecoder(data, len) {} + explicit TrustyIpcPollFtraceEvent_Decoder(const std::string& raw) : TypedProtoDecoder(reinterpret_cast(raw.data()), raw.size()) {} + explicit TrustyIpcPollFtraceEvent_Decoder(const ::protozero::ConstBytes& raw) : TypedProtoDecoder(raw.data, raw.size) {} + bool has_chan() const { return at<1>().valid(); } + uint32_t chan() const { return at<1>().as_uint32(); } + bool has_poll_mask() const { return at<2>().valid(); } + uint32_t poll_mask() const { return at<2>().as_uint32(); } + bool has_srv_name() const { return at<3>().valid(); } + ::protozero::ConstChars srv_name() const { return at<3>().as_string(); } +}; + +class TrustyIpcPollFtraceEvent : public ::protozero::Message { + public: + using Decoder = TrustyIpcPollFtraceEvent_Decoder; + enum : int32_t { + kChanFieldNumber = 1, + kPollMaskFieldNumber = 2, + kSrvNameFieldNumber = 3, + }; + static constexpr const char* GetName() { return ".perfetto.protos.TrustyIpcPollFtraceEvent"; } + + + using FieldMetadata_Chan = + ::protozero::proto_utils::FieldMetadata< + 1, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint32, + uint32_t, + TrustyIpcPollFtraceEvent>; + + static constexpr FieldMetadata_Chan kChan{}; + void set_chan(uint32_t value) { + static constexpr uint32_t field_id = FieldMetadata_Chan::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint32> + ::Append(*this, field_id, value); + } + + using FieldMetadata_PollMask = + ::protozero::proto_utils::FieldMetadata< + 2, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint32, + uint32_t, + TrustyIpcPollFtraceEvent>; + + static constexpr FieldMetadata_PollMask kPollMask{}; + void set_poll_mask(uint32_t value) { + static constexpr uint32_t field_id = FieldMetadata_PollMask::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint32> + ::Append(*this, field_id, value); + } + + using FieldMetadata_SrvName = + ::protozero::proto_utils::FieldMetadata< + 3, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kString, + std::string, + TrustyIpcPollFtraceEvent>; + + static constexpr FieldMetadata_SrvName kSrvName{}; + void set_srv_name(const char* data, size_t size) { + AppendBytes(FieldMetadata_SrvName::kFieldId, data, size); + } + void set_srv_name(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_SrvName::kFieldId, chars.data, chars.size); + } + void set_srv_name(std::string value) { + static constexpr uint32_t field_id = FieldMetadata_SrvName::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kString> + ::Append(*this, field_id, value); + } +}; + +class TrustyIpcWriteFtraceEvent_Decoder : public ::protozero::TypedProtoDecoder { + public: + TrustyIpcWriteFtraceEvent_Decoder(const uint8_t* data, size_t len) : TypedProtoDecoder(data, len) {} + explicit TrustyIpcWriteFtraceEvent_Decoder(const std::string& raw) : TypedProtoDecoder(reinterpret_cast(raw.data()), raw.size()) {} + explicit TrustyIpcWriteFtraceEvent_Decoder(const ::protozero::ConstBytes& raw) : TypedProtoDecoder(raw.data, raw.size) {} + bool has_buf_id() const { return at<1>().valid(); } + uint64_t buf_id() const { return at<1>().as_uint64(); } + bool has_chan() const { return at<2>().valid(); } + uint32_t chan() const { return at<2>().as_uint32(); } + bool has_kind_shm() const { return at<3>().valid(); } + int32_t kind_shm() const { return at<3>().as_int32(); } + bool has_len_or_err() const { return at<4>().valid(); } + int32_t len_or_err() const { return at<4>().as_int32(); } + bool has_shm_cnt() const { return at<5>().valid(); } + uint64_t shm_cnt() const { return at<5>().as_uint64(); } + bool has_srv_name() const { return at<6>().valid(); } + ::protozero::ConstChars srv_name() const { return at<6>().as_string(); } +}; + +class TrustyIpcWriteFtraceEvent : public ::protozero::Message { + public: + using Decoder = TrustyIpcWriteFtraceEvent_Decoder; + enum : int32_t { + kBufIdFieldNumber = 1, + kChanFieldNumber = 2, + kKindShmFieldNumber = 3, + kLenOrErrFieldNumber = 4, + kShmCntFieldNumber = 5, + kSrvNameFieldNumber = 6, + }; + static constexpr const char* GetName() { return ".perfetto.protos.TrustyIpcWriteFtraceEvent"; } + + + using FieldMetadata_BufId = + ::protozero::proto_utils::FieldMetadata< + 1, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint64, + uint64_t, + TrustyIpcWriteFtraceEvent>; + + static constexpr FieldMetadata_BufId kBufId{}; + void set_buf_id(uint64_t value) { + static constexpr uint32_t field_id = FieldMetadata_BufId::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint64> + ::Append(*this, field_id, value); + } + + using FieldMetadata_Chan = + ::protozero::proto_utils::FieldMetadata< + 2, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint32, + uint32_t, + TrustyIpcWriteFtraceEvent>; + + static constexpr FieldMetadata_Chan kChan{}; + void set_chan(uint32_t value) { + static constexpr uint32_t field_id = FieldMetadata_Chan::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint32> + ::Append(*this, field_id, value); + } + + using FieldMetadata_KindShm = + ::protozero::proto_utils::FieldMetadata< + 3, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kInt32, + int32_t, + TrustyIpcWriteFtraceEvent>; + + static constexpr FieldMetadata_KindShm kKindShm{}; + void set_kind_shm(int32_t value) { + static constexpr uint32_t field_id = FieldMetadata_KindShm::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kInt32> + ::Append(*this, field_id, value); + } + + using FieldMetadata_LenOrErr = + ::protozero::proto_utils::FieldMetadata< + 4, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kInt32, + int32_t, + TrustyIpcWriteFtraceEvent>; + + static constexpr FieldMetadata_LenOrErr kLenOrErr{}; + void set_len_or_err(int32_t value) { + static constexpr uint32_t field_id = FieldMetadata_LenOrErr::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kInt32> + ::Append(*this, field_id, value); + } + + using FieldMetadata_ShmCnt = + ::protozero::proto_utils::FieldMetadata< + 5, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint64, + uint64_t, + TrustyIpcWriteFtraceEvent>; + + static constexpr FieldMetadata_ShmCnt kShmCnt{}; + void set_shm_cnt(uint64_t value) { + static constexpr uint32_t field_id = FieldMetadata_ShmCnt::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint64> + ::Append(*this, field_id, value); + } + + using FieldMetadata_SrvName = + ::protozero::proto_utils::FieldMetadata< + 6, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kString, + std::string, + TrustyIpcWriteFtraceEvent>; + + static constexpr FieldMetadata_SrvName kSrvName{}; + void set_srv_name(const char* data, size_t size) { + AppendBytes(FieldMetadata_SrvName::kFieldId, data, size); + } + void set_srv_name(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_SrvName::kFieldId, chars.data, chars.size); + } + void set_srv_name(std::string value) { + static constexpr uint32_t field_id = FieldMetadata_SrvName::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kString> + ::Append(*this, field_id, value); + } +}; + +class TrustyIpcConnectEndFtraceEvent_Decoder : public ::protozero::TypedProtoDecoder { + public: + TrustyIpcConnectEndFtraceEvent_Decoder(const uint8_t* data, size_t len) : TypedProtoDecoder(data, len) {} + explicit TrustyIpcConnectEndFtraceEvent_Decoder(const std::string& raw) : TypedProtoDecoder(reinterpret_cast(raw.data()), raw.size()) {} + explicit TrustyIpcConnectEndFtraceEvent_Decoder(const ::protozero::ConstBytes& raw) : TypedProtoDecoder(raw.data, raw.size) {} + bool has_chan() const { return at<1>().valid(); } + uint32_t chan() const { return at<1>().as_uint32(); } + bool has_err() const { return at<2>().valid(); } + int32_t err() const { return at<2>().as_int32(); } + bool has_state() const { return at<3>().valid(); } + int32_t state() const { return at<3>().as_int32(); } +}; + +class TrustyIpcConnectEndFtraceEvent : public ::protozero::Message { + public: + using Decoder = TrustyIpcConnectEndFtraceEvent_Decoder; + enum : int32_t { + kChanFieldNumber = 1, + kErrFieldNumber = 2, + kStateFieldNumber = 3, + }; + static constexpr const char* GetName() { return ".perfetto.protos.TrustyIpcConnectEndFtraceEvent"; } + + + using FieldMetadata_Chan = + ::protozero::proto_utils::FieldMetadata< + 1, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint32, + uint32_t, + TrustyIpcConnectEndFtraceEvent>; + + static constexpr FieldMetadata_Chan kChan{}; + void set_chan(uint32_t value) { + static constexpr uint32_t field_id = FieldMetadata_Chan::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint32> + ::Append(*this, field_id, value); + } + + using FieldMetadata_Err = + ::protozero::proto_utils::FieldMetadata< + 2, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kInt32, + int32_t, + TrustyIpcConnectEndFtraceEvent>; + + static constexpr FieldMetadata_Err kErr{}; + void set_err(int32_t value) { + static constexpr uint32_t field_id = FieldMetadata_Err::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kInt32> + ::Append(*this, field_id, value); + } + + using FieldMetadata_State = + ::protozero::proto_utils::FieldMetadata< + 3, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kInt32, + int32_t, + TrustyIpcConnectEndFtraceEvent>; + + static constexpr FieldMetadata_State kState{}; + void set_state(int32_t value) { + static constexpr uint32_t field_id = FieldMetadata_State::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kInt32> + ::Append(*this, field_id, value); + } +}; + +class TrustyIpcConnectFtraceEvent_Decoder : public ::protozero::TypedProtoDecoder { + public: + TrustyIpcConnectFtraceEvent_Decoder(const uint8_t* data, size_t len) : TypedProtoDecoder(data, len) {} + explicit TrustyIpcConnectFtraceEvent_Decoder(const std::string& raw) : TypedProtoDecoder(reinterpret_cast(raw.data()), raw.size()) {} + explicit TrustyIpcConnectFtraceEvent_Decoder(const ::protozero::ConstBytes& raw) : TypedProtoDecoder(raw.data, raw.size) {} + bool has_chan() const { return at<1>().valid(); } + uint32_t chan() const { return at<1>().as_uint32(); } + bool has_port() const { return at<2>().valid(); } + ::protozero::ConstChars port() const { return at<2>().as_string(); } + bool has_state() const { return at<3>().valid(); } + int32_t state() const { return at<3>().as_int32(); } +}; + +class TrustyIpcConnectFtraceEvent : public ::protozero::Message { + public: + using Decoder = TrustyIpcConnectFtraceEvent_Decoder; + enum : int32_t { + kChanFieldNumber = 1, + kPortFieldNumber = 2, + kStateFieldNumber = 3, + }; + static constexpr const char* GetName() { return ".perfetto.protos.TrustyIpcConnectFtraceEvent"; } + + + using FieldMetadata_Chan = + ::protozero::proto_utils::FieldMetadata< + 1, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint32, + uint32_t, + TrustyIpcConnectFtraceEvent>; + + static constexpr FieldMetadata_Chan kChan{}; + void set_chan(uint32_t value) { + static constexpr uint32_t field_id = FieldMetadata_Chan::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint32> + ::Append(*this, field_id, value); + } + + using FieldMetadata_Port = + ::protozero::proto_utils::FieldMetadata< + 2, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kString, + std::string, + TrustyIpcConnectFtraceEvent>; + + static constexpr FieldMetadata_Port kPort{}; + void set_port(const char* data, size_t size) { + AppendBytes(FieldMetadata_Port::kFieldId, data, size); + } + void set_port(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Port::kFieldId, chars.data, chars.size); + } + void set_port(std::string value) { + static constexpr uint32_t field_id = FieldMetadata_Port::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kString> + ::Append(*this, field_id, value); + } + + using FieldMetadata_State = + ::protozero::proto_utils::FieldMetadata< + 3, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kInt32, + int32_t, + TrustyIpcConnectFtraceEvent>; + + static constexpr FieldMetadata_State kState{}; + void set_state(int32_t value) { + static constexpr uint32_t field_id = FieldMetadata_State::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kInt32> + ::Append(*this, field_id, value); + } +}; + +class TrustyIpcHandleEventFtraceEvent_Decoder : public ::protozero::TypedProtoDecoder { + public: + TrustyIpcHandleEventFtraceEvent_Decoder(const uint8_t* data, size_t len) : TypedProtoDecoder(data, len) {} + explicit TrustyIpcHandleEventFtraceEvent_Decoder(const std::string& raw) : TypedProtoDecoder(reinterpret_cast(raw.data()), raw.size()) {} + explicit TrustyIpcHandleEventFtraceEvent_Decoder(const ::protozero::ConstBytes& raw) : TypedProtoDecoder(raw.data, raw.size) {} + bool has_chan() const { return at<1>().valid(); } + uint32_t chan() const { return at<1>().as_uint32(); } + bool has_event_id() const { return at<2>().valid(); } + uint32_t event_id() const { return at<2>().as_uint32(); } + bool has_srv_name() const { return at<3>().valid(); } + ::protozero::ConstChars srv_name() const { return at<3>().as_string(); } +}; + +class TrustyIpcHandleEventFtraceEvent : public ::protozero::Message { + public: + using Decoder = TrustyIpcHandleEventFtraceEvent_Decoder; + enum : int32_t { + kChanFieldNumber = 1, + kEventIdFieldNumber = 2, + kSrvNameFieldNumber = 3, + }; + static constexpr const char* GetName() { return ".perfetto.protos.TrustyIpcHandleEventFtraceEvent"; } + + + using FieldMetadata_Chan = + ::protozero::proto_utils::FieldMetadata< + 1, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint32, + uint32_t, + TrustyIpcHandleEventFtraceEvent>; + + static constexpr FieldMetadata_Chan kChan{}; + void set_chan(uint32_t value) { + static constexpr uint32_t field_id = FieldMetadata_Chan::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint32> + ::Append(*this, field_id, value); + } + + using FieldMetadata_EventId = + ::protozero::proto_utils::FieldMetadata< + 2, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint32, + uint32_t, + TrustyIpcHandleEventFtraceEvent>; + + static constexpr FieldMetadata_EventId kEventId{}; + void set_event_id(uint32_t value) { + static constexpr uint32_t field_id = FieldMetadata_EventId::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint32> + ::Append(*this, field_id, value); + } + + using FieldMetadata_SrvName = + ::protozero::proto_utils::FieldMetadata< + 3, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kString, + std::string, + TrustyIpcHandleEventFtraceEvent>; + + static constexpr FieldMetadata_SrvName kSrvName{}; + void set_srv_name(const char* data, size_t size) { + AppendBytes(FieldMetadata_SrvName::kFieldId, data, size); + } + void set_srv_name(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_SrvName::kFieldId, chars.data, chars.size); + } + void set_srv_name(std::string value) { + static constexpr uint32_t field_id = FieldMetadata_SrvName::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kString> + ::Append(*this, field_id, value); + } +}; + +class TrustyIrqFtraceEvent_Decoder : public ::protozero::TypedProtoDecoder { + public: + TrustyIrqFtraceEvent_Decoder(const uint8_t* data, size_t len) : TypedProtoDecoder(data, len) {} + explicit TrustyIrqFtraceEvent_Decoder(const std::string& raw) : TypedProtoDecoder(reinterpret_cast(raw.data()), raw.size()) {} + explicit TrustyIrqFtraceEvent_Decoder(const ::protozero::ConstBytes& raw) : TypedProtoDecoder(raw.data, raw.size) {} + bool has_irq() const { return at<1>().valid(); } + int32_t irq() const { return at<1>().as_int32(); } +}; + +class TrustyIrqFtraceEvent : public ::protozero::Message { + public: + using Decoder = TrustyIrqFtraceEvent_Decoder; + enum : int32_t { + kIrqFieldNumber = 1, + }; + static constexpr const char* GetName() { return ".perfetto.protos.TrustyIrqFtraceEvent"; } + + + using FieldMetadata_Irq = + ::protozero::proto_utils::FieldMetadata< + 1, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kInt32, + int32_t, + TrustyIrqFtraceEvent>; + + static constexpr FieldMetadata_Irq kIrq{}; + void set_irq(int32_t value) { + static constexpr uint32_t field_id = FieldMetadata_Irq::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kInt32> + ::Append(*this, field_id, value); + } +}; + +class TrustyReclaimMemoryDoneFtraceEvent_Decoder : public ::protozero::TypedProtoDecoder { + public: + TrustyReclaimMemoryDoneFtraceEvent_Decoder(const uint8_t* data, size_t len) : TypedProtoDecoder(data, len) {} + explicit TrustyReclaimMemoryDoneFtraceEvent_Decoder(const std::string& raw) : TypedProtoDecoder(reinterpret_cast(raw.data()), raw.size()) {} + explicit TrustyReclaimMemoryDoneFtraceEvent_Decoder(const ::protozero::ConstBytes& raw) : TypedProtoDecoder(raw.data, raw.size) {} + bool has_id() const { return at<1>().valid(); } + uint64_t id() const { return at<1>().as_uint64(); } + bool has_ret() const { return at<2>().valid(); } + int32_t ret() const { return at<2>().as_int32(); } +}; + +class TrustyReclaimMemoryDoneFtraceEvent : public ::protozero::Message { + public: + using Decoder = TrustyReclaimMemoryDoneFtraceEvent_Decoder; + enum : int32_t { + kIdFieldNumber = 1, + kRetFieldNumber = 2, + }; + static constexpr const char* GetName() { return ".perfetto.protos.TrustyReclaimMemoryDoneFtraceEvent"; } + + + using FieldMetadata_Id = + ::protozero::proto_utils::FieldMetadata< + 1, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint64, + uint64_t, + TrustyReclaimMemoryDoneFtraceEvent>; + + static constexpr FieldMetadata_Id kId{}; + void set_id(uint64_t value) { + static constexpr uint32_t field_id = FieldMetadata_Id::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint64> + ::Append(*this, field_id, value); + } + + using FieldMetadata_Ret = + ::protozero::proto_utils::FieldMetadata< + 2, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kInt32, + int32_t, + TrustyReclaimMemoryDoneFtraceEvent>; + + static constexpr FieldMetadata_Ret kRet{}; + void set_ret(int32_t value) { + static constexpr uint32_t field_id = FieldMetadata_Ret::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kInt32> + ::Append(*this, field_id, value); + } +}; + +class TrustyReclaimMemoryFtraceEvent_Decoder : public ::protozero::TypedProtoDecoder { + public: + TrustyReclaimMemoryFtraceEvent_Decoder(const uint8_t* data, size_t len) : TypedProtoDecoder(data, len) {} + explicit TrustyReclaimMemoryFtraceEvent_Decoder(const std::string& raw) : TypedProtoDecoder(reinterpret_cast(raw.data()), raw.size()) {} + explicit TrustyReclaimMemoryFtraceEvent_Decoder(const ::protozero::ConstBytes& raw) : TypedProtoDecoder(raw.data, raw.size) {} + bool has_id() const { return at<1>().valid(); } + uint64_t id() const { return at<1>().as_uint64(); } +}; + +class TrustyReclaimMemoryFtraceEvent : public ::protozero::Message { + public: + using Decoder = TrustyReclaimMemoryFtraceEvent_Decoder; + enum : int32_t { + kIdFieldNumber = 1, + }; + static constexpr const char* GetName() { return ".perfetto.protos.TrustyReclaimMemoryFtraceEvent"; } + + + using FieldMetadata_Id = + ::protozero::proto_utils::FieldMetadata< + 1, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint64, + uint64_t, + TrustyReclaimMemoryFtraceEvent>; + + static constexpr FieldMetadata_Id kId{}; + void set_id(uint64_t value) { + static constexpr uint32_t field_id = FieldMetadata_Id::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint64> + ::Append(*this, field_id, value); + } +}; + +class TrustyShareMemoryDoneFtraceEvent_Decoder : public ::protozero::TypedProtoDecoder { + public: + TrustyShareMemoryDoneFtraceEvent_Decoder(const uint8_t* data, size_t len) : TypedProtoDecoder(data, len) {} + explicit TrustyShareMemoryDoneFtraceEvent_Decoder(const std::string& raw) : TypedProtoDecoder(reinterpret_cast(raw.data()), raw.size()) {} + explicit TrustyShareMemoryDoneFtraceEvent_Decoder(const ::protozero::ConstBytes& raw) : TypedProtoDecoder(raw.data, raw.size) {} + bool has_handle() const { return at<1>().valid(); } + uint64_t handle() const { return at<1>().as_uint64(); } + bool has_len() const { return at<2>().valid(); } + uint64_t len() const { return at<2>().as_uint64(); } + bool has_lend() const { return at<3>().valid(); } + uint32_t lend() const { return at<3>().as_uint32(); } + bool has_nents() const { return at<4>().valid(); } + uint32_t nents() const { return at<4>().as_uint32(); } + bool has_ret() const { return at<5>().valid(); } + int32_t ret() const { return at<5>().as_int32(); } +}; + +class TrustyShareMemoryDoneFtraceEvent : public ::protozero::Message { + public: + using Decoder = TrustyShareMemoryDoneFtraceEvent_Decoder; + enum : int32_t { + kHandleFieldNumber = 1, + kLenFieldNumber = 2, + kLendFieldNumber = 3, + kNentsFieldNumber = 4, + kRetFieldNumber = 5, + }; + static constexpr const char* GetName() { return ".perfetto.protos.TrustyShareMemoryDoneFtraceEvent"; } + + + using FieldMetadata_Handle = + ::protozero::proto_utils::FieldMetadata< + 1, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint64, + uint64_t, + TrustyShareMemoryDoneFtraceEvent>; + + static constexpr FieldMetadata_Handle kHandle{}; + void set_handle(uint64_t value) { + static constexpr uint32_t field_id = FieldMetadata_Handle::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint64> + ::Append(*this, field_id, value); + } + + using FieldMetadata_Len = + ::protozero::proto_utils::FieldMetadata< + 2, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint64, + uint64_t, + TrustyShareMemoryDoneFtraceEvent>; + + static constexpr FieldMetadata_Len kLen{}; + void set_len(uint64_t value) { + static constexpr uint32_t field_id = FieldMetadata_Len::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint64> + ::Append(*this, field_id, value); + } + + using FieldMetadata_Lend = + ::protozero::proto_utils::FieldMetadata< + 3, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint32, + uint32_t, + TrustyShareMemoryDoneFtraceEvent>; + + static constexpr FieldMetadata_Lend kLend{}; + void set_lend(uint32_t value) { + static constexpr uint32_t field_id = FieldMetadata_Lend::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint32> + ::Append(*this, field_id, value); + } + + using FieldMetadata_Nents = + ::protozero::proto_utils::FieldMetadata< + 4, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint32, + uint32_t, + TrustyShareMemoryDoneFtraceEvent>; + + static constexpr FieldMetadata_Nents kNents{}; + void set_nents(uint32_t value) { + static constexpr uint32_t field_id = FieldMetadata_Nents::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint32> + ::Append(*this, field_id, value); + } + + using FieldMetadata_Ret = + ::protozero::proto_utils::FieldMetadata< + 5, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kInt32, + int32_t, + TrustyShareMemoryDoneFtraceEvent>; + + static constexpr FieldMetadata_Ret kRet{}; + void set_ret(int32_t value) { + static constexpr uint32_t field_id = FieldMetadata_Ret::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kInt32> + ::Append(*this, field_id, value); + } +}; + +class TrustyShareMemoryFtraceEvent_Decoder : public ::protozero::TypedProtoDecoder { + public: + TrustyShareMemoryFtraceEvent_Decoder(const uint8_t* data, size_t len) : TypedProtoDecoder(data, len) {} + explicit TrustyShareMemoryFtraceEvent_Decoder(const std::string& raw) : TypedProtoDecoder(reinterpret_cast(raw.data()), raw.size()) {} + explicit TrustyShareMemoryFtraceEvent_Decoder(const ::protozero::ConstBytes& raw) : TypedProtoDecoder(raw.data, raw.size) {} + bool has_len() const { return at<1>().valid(); } + uint64_t len() const { return at<1>().as_uint64(); } + bool has_lend() const { return at<2>().valid(); } + uint32_t lend() const { return at<2>().as_uint32(); } + bool has_nents() const { return at<3>().valid(); } + uint32_t nents() const { return at<3>().as_uint32(); } +}; + +class TrustyShareMemoryFtraceEvent : public ::protozero::Message { + public: + using Decoder = TrustyShareMemoryFtraceEvent_Decoder; + enum : int32_t { + kLenFieldNumber = 1, + kLendFieldNumber = 2, + kNentsFieldNumber = 3, + }; + static constexpr const char* GetName() { return ".perfetto.protos.TrustyShareMemoryFtraceEvent"; } + + + using FieldMetadata_Len = + ::protozero::proto_utils::FieldMetadata< + 1, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint64, + uint64_t, + TrustyShareMemoryFtraceEvent>; + + static constexpr FieldMetadata_Len kLen{}; + void set_len(uint64_t value) { + static constexpr uint32_t field_id = FieldMetadata_Len::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint64> + ::Append(*this, field_id, value); + } + + using FieldMetadata_Lend = + ::protozero::proto_utils::FieldMetadata< + 2, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint32, + uint32_t, + TrustyShareMemoryFtraceEvent>; + + static constexpr FieldMetadata_Lend kLend{}; + void set_lend(uint32_t value) { + static constexpr uint32_t field_id = FieldMetadata_Lend::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint32> + ::Append(*this, field_id, value); + } + + using FieldMetadata_Nents = + ::protozero::proto_utils::FieldMetadata< + 3, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint32, + uint32_t, + TrustyShareMemoryFtraceEvent>; + + static constexpr FieldMetadata_Nents kNents{}; + void set_nents(uint32_t value) { + static constexpr uint32_t field_id = FieldMetadata_Nents::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint32> + ::Append(*this, field_id, value); + } +}; + +class TrustyStdCall32DoneFtraceEvent_Decoder : public ::protozero::TypedProtoDecoder { + public: + TrustyStdCall32DoneFtraceEvent_Decoder(const uint8_t* data, size_t len) : TypedProtoDecoder(data, len) {} + explicit TrustyStdCall32DoneFtraceEvent_Decoder(const std::string& raw) : TypedProtoDecoder(reinterpret_cast(raw.data()), raw.size()) {} + explicit TrustyStdCall32DoneFtraceEvent_Decoder(const ::protozero::ConstBytes& raw) : TypedProtoDecoder(raw.data, raw.size) {} + bool has_ret() const { return at<1>().valid(); } + int64_t ret() const { return at<1>().as_int64(); } +}; + +class TrustyStdCall32DoneFtraceEvent : public ::protozero::Message { + public: + using Decoder = TrustyStdCall32DoneFtraceEvent_Decoder; + enum : int32_t { + kRetFieldNumber = 1, + }; + static constexpr const char* GetName() { return ".perfetto.protos.TrustyStdCall32DoneFtraceEvent"; } + + + using FieldMetadata_Ret = + ::protozero::proto_utils::FieldMetadata< + 1, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kInt64, + int64_t, + TrustyStdCall32DoneFtraceEvent>; + + static constexpr FieldMetadata_Ret kRet{}; + void set_ret(int64_t value) { + static constexpr uint32_t field_id = FieldMetadata_Ret::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kInt64> + ::Append(*this, field_id, value); + } +}; + +class TrustyStdCall32FtraceEvent_Decoder : public ::protozero::TypedProtoDecoder { + public: + TrustyStdCall32FtraceEvent_Decoder(const uint8_t* data, size_t len) : TypedProtoDecoder(data, len) {} + explicit TrustyStdCall32FtraceEvent_Decoder(const std::string& raw) : TypedProtoDecoder(reinterpret_cast(raw.data()), raw.size()) {} + explicit TrustyStdCall32FtraceEvent_Decoder(const ::protozero::ConstBytes& raw) : TypedProtoDecoder(raw.data, raw.size) {} + bool has_r0() const { return at<1>().valid(); } + uint64_t r0() const { return at<1>().as_uint64(); } + bool has_r1() const { return at<2>().valid(); } + uint64_t r1() const { return at<2>().as_uint64(); } + bool has_r2() const { return at<3>().valid(); } + uint64_t r2() const { return at<3>().as_uint64(); } + bool has_r3() const { return at<4>().valid(); } + uint64_t r3() const { return at<4>().as_uint64(); } +}; + +class TrustyStdCall32FtraceEvent : public ::protozero::Message { + public: + using Decoder = TrustyStdCall32FtraceEvent_Decoder; + enum : int32_t { + kR0FieldNumber = 1, + kR1FieldNumber = 2, + kR2FieldNumber = 3, + kR3FieldNumber = 4, + }; + static constexpr const char* GetName() { return ".perfetto.protos.TrustyStdCall32FtraceEvent"; } + + + using FieldMetadata_R0 = + ::protozero::proto_utils::FieldMetadata< + 1, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint64, + uint64_t, + TrustyStdCall32FtraceEvent>; + + static constexpr FieldMetadata_R0 kR0{}; + void set_r0(uint64_t value) { + static constexpr uint32_t field_id = FieldMetadata_R0::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint64> + ::Append(*this, field_id, value); + } + + using FieldMetadata_R1 = + ::protozero::proto_utils::FieldMetadata< + 2, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint64, + uint64_t, + TrustyStdCall32FtraceEvent>; + + static constexpr FieldMetadata_R1 kR1{}; + void set_r1(uint64_t value) { + static constexpr uint32_t field_id = FieldMetadata_R1::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint64> + ::Append(*this, field_id, value); + } + + using FieldMetadata_R2 = + ::protozero::proto_utils::FieldMetadata< + 3, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint64, + uint64_t, + TrustyStdCall32FtraceEvent>; + + static constexpr FieldMetadata_R2 kR2{}; + void set_r2(uint64_t value) { + static constexpr uint32_t field_id = FieldMetadata_R2::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint64> + ::Append(*this, field_id, value); + } + + using FieldMetadata_R3 = + ::protozero::proto_utils::FieldMetadata< + 4, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint64, + uint64_t, + TrustyStdCall32FtraceEvent>; + + static constexpr FieldMetadata_R3 kR3{}; + void set_r3(uint64_t value) { + static constexpr uint32_t field_id = FieldMetadata_R3::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint64> + ::Append(*this, field_id, value); + } +}; + +class TrustySmcDoneFtraceEvent_Decoder : public ::protozero::TypedProtoDecoder { + public: + TrustySmcDoneFtraceEvent_Decoder(const uint8_t* data, size_t len) : TypedProtoDecoder(data, len) {} + explicit TrustySmcDoneFtraceEvent_Decoder(const std::string& raw) : TypedProtoDecoder(reinterpret_cast(raw.data()), raw.size()) {} + explicit TrustySmcDoneFtraceEvent_Decoder(const ::protozero::ConstBytes& raw) : TypedProtoDecoder(raw.data, raw.size) {} + bool has_ret() const { return at<1>().valid(); } + uint64_t ret() const { return at<1>().as_uint64(); } +}; + +class TrustySmcDoneFtraceEvent : public ::protozero::Message { + public: + using Decoder = TrustySmcDoneFtraceEvent_Decoder; + enum : int32_t { + kRetFieldNumber = 1, + }; + static constexpr const char* GetName() { return ".perfetto.protos.TrustySmcDoneFtraceEvent"; } + + + using FieldMetadata_Ret = + ::protozero::proto_utils::FieldMetadata< + 1, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint64, + uint64_t, + TrustySmcDoneFtraceEvent>; + + static constexpr FieldMetadata_Ret kRet{}; + void set_ret(uint64_t value) { + static constexpr uint32_t field_id = FieldMetadata_Ret::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint64> + ::Append(*this, field_id, value); + } +}; + +class TrustySmcFtraceEvent_Decoder : public ::protozero::TypedProtoDecoder { + public: + TrustySmcFtraceEvent_Decoder(const uint8_t* data, size_t len) : TypedProtoDecoder(data, len) {} + explicit TrustySmcFtraceEvent_Decoder(const std::string& raw) : TypedProtoDecoder(reinterpret_cast(raw.data()), raw.size()) {} + explicit TrustySmcFtraceEvent_Decoder(const ::protozero::ConstBytes& raw) : TypedProtoDecoder(raw.data, raw.size) {} + bool has_r0() const { return at<1>().valid(); } + uint64_t r0() const { return at<1>().as_uint64(); } + bool has_r1() const { return at<2>().valid(); } + uint64_t r1() const { return at<2>().as_uint64(); } + bool has_r2() const { return at<3>().valid(); } + uint64_t r2() const { return at<3>().as_uint64(); } + bool has_r3() const { return at<4>().valid(); } + uint64_t r3() const { return at<4>().as_uint64(); } +}; + +class TrustySmcFtraceEvent : public ::protozero::Message { + public: + using Decoder = TrustySmcFtraceEvent_Decoder; + enum : int32_t { + kR0FieldNumber = 1, + kR1FieldNumber = 2, + kR2FieldNumber = 3, + kR3FieldNumber = 4, + }; + static constexpr const char* GetName() { return ".perfetto.protos.TrustySmcFtraceEvent"; } + + + using FieldMetadata_R0 = + ::protozero::proto_utils::FieldMetadata< + 1, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint64, + uint64_t, + TrustySmcFtraceEvent>; + + static constexpr FieldMetadata_R0 kR0{}; + void set_r0(uint64_t value) { + static constexpr uint32_t field_id = FieldMetadata_R0::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint64> + ::Append(*this, field_id, value); + } + + using FieldMetadata_R1 = + ::protozero::proto_utils::FieldMetadata< + 2, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint64, + uint64_t, + TrustySmcFtraceEvent>; + + static constexpr FieldMetadata_R1 kR1{}; + void set_r1(uint64_t value) { + static constexpr uint32_t field_id = FieldMetadata_R1::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint64> + ::Append(*this, field_id, value); + } + + using FieldMetadata_R2 = + ::protozero::proto_utils::FieldMetadata< + 3, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint64, + uint64_t, + TrustySmcFtraceEvent>; + + static constexpr FieldMetadata_R2 kR2{}; + void set_r2(uint64_t value) { + static constexpr uint32_t field_id = FieldMetadata_R2::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint64> + ::Append(*this, field_id, value); + } + + using FieldMetadata_R3 = + ::protozero::proto_utils::FieldMetadata< + 4, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint64, + uint64_t, + TrustySmcFtraceEvent>; + + static constexpr FieldMetadata_R3 kR3{}; + void set_r3(uint64_t value) { + static constexpr uint32_t field_id = FieldMetadata_R3::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint64> + ::Append(*this, field_id, value); + } +}; + } // Namespace. } // Namespace. } // Namespace. @@ -111477,17 +106803,13 @@ class UfshcdClkGatingFtraceEvent : public ::protozero::Message { std::string, UfshcdClkGatingFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_DevName kDevName() { return {}; } + static constexpr FieldMetadata_DevName kDevName{}; void set_dev_name(const char* data, size_t size) { AppendBytes(FieldMetadata_DevName::kFieldId, data, size); } + void set_dev_name(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_DevName::kFieldId, chars.data, chars.size); + } void set_dev_name(std::string value) { static constexpr uint32_t field_id = FieldMetadata_DevName::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -111505,14 +106827,7 @@ class UfshcdClkGatingFtraceEvent : public ::protozero::Message { int32_t, UfshcdClkGatingFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_State kState() { return {}; } + static constexpr FieldMetadata_State kState{}; void set_state(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_State::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -111576,17 +106891,13 @@ class UfshcdCommandFtraceEvent : public ::protozero::Message { std::string, UfshcdCommandFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_DevName kDevName() { return {}; } + static constexpr FieldMetadata_DevName kDevName{}; void set_dev_name(const char* data, size_t size) { AppendBytes(FieldMetadata_DevName::kFieldId, data, size); } + void set_dev_name(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_DevName::kFieldId, chars.data, chars.size); + } void set_dev_name(std::string value) { static constexpr uint32_t field_id = FieldMetadata_DevName::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -111604,14 +106915,7 @@ class UfshcdCommandFtraceEvent : public ::protozero::Message { uint32_t, UfshcdCommandFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Doorbell kDoorbell() { return {}; } + static constexpr FieldMetadata_Doorbell kDoorbell{}; void set_doorbell(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Doorbell::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -111629,14 +106933,7 @@ class UfshcdCommandFtraceEvent : public ::protozero::Message { uint32_t, UfshcdCommandFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Intr kIntr() { return {}; } + static constexpr FieldMetadata_Intr kIntr{}; void set_intr(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Intr::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -111654,14 +106951,7 @@ class UfshcdCommandFtraceEvent : public ::protozero::Message { uint64_t, UfshcdCommandFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Lba kLba() { return {}; } + static constexpr FieldMetadata_Lba kLba{}; void set_lba(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Lba::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -111679,14 +106969,7 @@ class UfshcdCommandFtraceEvent : public ::protozero::Message { uint32_t, UfshcdCommandFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Opcode kOpcode() { return {}; } + static constexpr FieldMetadata_Opcode kOpcode{}; void set_opcode(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Opcode::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -111704,17 +106987,13 @@ class UfshcdCommandFtraceEvent : public ::protozero::Message { std::string, UfshcdCommandFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Str kStr() { return {}; } + static constexpr FieldMetadata_Str kStr{}; void set_str(const char* data, size_t size) { AppendBytes(FieldMetadata_Str::kFieldId, data, size); } + void set_str(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Str::kFieldId, chars.data, chars.size); + } void set_str(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Str::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -111732,14 +107011,7 @@ class UfshcdCommandFtraceEvent : public ::protozero::Message { uint32_t, UfshcdCommandFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Tag kTag() { return {}; } + static constexpr FieldMetadata_Tag kTag{}; void set_tag(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Tag::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -111757,14 +107029,7 @@ class UfshcdCommandFtraceEvent : public ::protozero::Message { int32_t, UfshcdCommandFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_TransferLen kTransferLen() { return {}; } + static constexpr FieldMetadata_TransferLen kTransferLen{}; void set_transfer_len(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_TransferLen::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -111782,14 +107047,7 @@ class UfshcdCommandFtraceEvent : public ::protozero::Message { uint32_t, UfshcdCommandFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_GroupId kGroupId() { return {}; } + static constexpr FieldMetadata_GroupId kGroupId{}; void set_group_id(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_GroupId::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -111807,14 +107065,7 @@ class UfshcdCommandFtraceEvent : public ::protozero::Message { uint32_t, UfshcdCommandFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_StrT kStrT() { return {}; } + static constexpr FieldMetadata_StrT kStrT{}; void set_str_t(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_StrT::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -111825,6 +107076,3096 @@ class UfshcdCommandFtraceEvent : public ::protozero::Message { } }; +} // Namespace. +} // Namespace. +} // Namespace. +#endif // Include guard. +// gen_amalgamated begin header: gen/protos/perfetto/trace/ftrace/v4l2.pbzero.h +// Autogenerated by the ProtoZero compiler plugin. DO NOT EDIT. + +#ifndef PERFETTO_PROTOS_PROTOS_PERFETTO_TRACE_FTRACE_V4L2_PROTO_H_ +#define PERFETTO_PROTOS_PROTOS_PERFETTO_TRACE_FTRACE_V4L2_PROTO_H_ + +#include +#include + +// gen_amalgamated expanded: #include "perfetto/protozero/field_writer.h" +// gen_amalgamated expanded: #include "perfetto/protozero/message.h" +// gen_amalgamated expanded: #include "perfetto/protozero/packed_repeated_fields.h" +// gen_amalgamated expanded: #include "perfetto/protozero/proto_decoder.h" +// gen_amalgamated expanded: #include "perfetto/protozero/proto_utils.h" + +namespace perfetto { +namespace protos { +namespace pbzero { + + +class Vb2V4l2DqbufFtraceEvent_Decoder : public ::protozero::TypedProtoDecoder { + public: + Vb2V4l2DqbufFtraceEvent_Decoder(const uint8_t* data, size_t len) : TypedProtoDecoder(data, len) {} + explicit Vb2V4l2DqbufFtraceEvent_Decoder(const std::string& raw) : TypedProtoDecoder(reinterpret_cast(raw.data()), raw.size()) {} + explicit Vb2V4l2DqbufFtraceEvent_Decoder(const ::protozero::ConstBytes& raw) : TypedProtoDecoder(raw.data, raw.size) {} + bool has_field() const { return at<1>().valid(); } + uint32_t field() const { return at<1>().as_uint32(); } + bool has_flags() const { return at<2>().valid(); } + uint32_t flags() const { return at<2>().as_uint32(); } + bool has_minor() const { return at<3>().valid(); } + int32_t minor() const { return at<3>().as_int32(); } + bool has_sequence() const { return at<4>().valid(); } + uint32_t sequence() const { return at<4>().as_uint32(); } + bool has_timecode_flags() const { return at<5>().valid(); } + uint32_t timecode_flags() const { return at<5>().as_uint32(); } + bool has_timecode_frames() const { return at<6>().valid(); } + uint32_t timecode_frames() const { return at<6>().as_uint32(); } + bool has_timecode_hours() const { return at<7>().valid(); } + uint32_t timecode_hours() const { return at<7>().as_uint32(); } + bool has_timecode_minutes() const { return at<8>().valid(); } + uint32_t timecode_minutes() const { return at<8>().as_uint32(); } + bool has_timecode_seconds() const { return at<9>().valid(); } + uint32_t timecode_seconds() const { return at<9>().as_uint32(); } + bool has_timecode_type() const { return at<10>().valid(); } + uint32_t timecode_type() const { return at<10>().as_uint32(); } + bool has_timecode_userbits0() const { return at<11>().valid(); } + uint32_t timecode_userbits0() const { return at<11>().as_uint32(); } + bool has_timecode_userbits1() const { return at<12>().valid(); } + uint32_t timecode_userbits1() const { return at<12>().as_uint32(); } + bool has_timecode_userbits2() const { return at<13>().valid(); } + uint32_t timecode_userbits2() const { return at<13>().as_uint32(); } + bool has_timecode_userbits3() const { return at<14>().valid(); } + uint32_t timecode_userbits3() const { return at<14>().as_uint32(); } + bool has_timestamp() const { return at<15>().valid(); } + int64_t timestamp() const { return at<15>().as_int64(); } +}; + +class Vb2V4l2DqbufFtraceEvent : public ::protozero::Message { + public: + using Decoder = Vb2V4l2DqbufFtraceEvent_Decoder; + enum : int32_t { + kFieldFieldNumber = 1, + kFlagsFieldNumber = 2, + kMinorFieldNumber = 3, + kSequenceFieldNumber = 4, + kTimecodeFlagsFieldNumber = 5, + kTimecodeFramesFieldNumber = 6, + kTimecodeHoursFieldNumber = 7, + kTimecodeMinutesFieldNumber = 8, + kTimecodeSecondsFieldNumber = 9, + kTimecodeTypeFieldNumber = 10, + kTimecodeUserbits0FieldNumber = 11, + kTimecodeUserbits1FieldNumber = 12, + kTimecodeUserbits2FieldNumber = 13, + kTimecodeUserbits3FieldNumber = 14, + kTimestampFieldNumber = 15, + }; + static constexpr const char* GetName() { return ".perfetto.protos.Vb2V4l2DqbufFtraceEvent"; } + + + using FieldMetadata_Field = + ::protozero::proto_utils::FieldMetadata< + 1, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint32, + uint32_t, + Vb2V4l2DqbufFtraceEvent>; + + static constexpr FieldMetadata_Field kField{}; + void set_field(uint32_t value) { + static constexpr uint32_t field_id = FieldMetadata_Field::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint32> + ::Append(*this, field_id, value); + } + + using FieldMetadata_Flags = + ::protozero::proto_utils::FieldMetadata< + 2, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint32, + uint32_t, + Vb2V4l2DqbufFtraceEvent>; + + static constexpr FieldMetadata_Flags kFlags{}; + void set_flags(uint32_t value) { + static constexpr uint32_t field_id = FieldMetadata_Flags::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint32> + ::Append(*this, field_id, value); + } + + using FieldMetadata_Minor = + ::protozero::proto_utils::FieldMetadata< + 3, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kInt32, + int32_t, + Vb2V4l2DqbufFtraceEvent>; + + static constexpr FieldMetadata_Minor kMinor{}; + void set_minor(int32_t value) { + static constexpr uint32_t field_id = FieldMetadata_Minor::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kInt32> + ::Append(*this, field_id, value); + } + + using FieldMetadata_Sequence = + ::protozero::proto_utils::FieldMetadata< + 4, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint32, + uint32_t, + Vb2V4l2DqbufFtraceEvent>; + + static constexpr FieldMetadata_Sequence kSequence{}; + void set_sequence(uint32_t value) { + static constexpr uint32_t field_id = FieldMetadata_Sequence::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint32> + ::Append(*this, field_id, value); + } + + using FieldMetadata_TimecodeFlags = + ::protozero::proto_utils::FieldMetadata< + 5, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint32, + uint32_t, + Vb2V4l2DqbufFtraceEvent>; + + static constexpr FieldMetadata_TimecodeFlags kTimecodeFlags{}; + void set_timecode_flags(uint32_t value) { + static constexpr uint32_t field_id = FieldMetadata_TimecodeFlags::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint32> + ::Append(*this, field_id, value); + } + + using FieldMetadata_TimecodeFrames = + ::protozero::proto_utils::FieldMetadata< + 6, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint32, + uint32_t, + Vb2V4l2DqbufFtraceEvent>; + + static constexpr FieldMetadata_TimecodeFrames kTimecodeFrames{}; + void set_timecode_frames(uint32_t value) { + static constexpr uint32_t field_id = FieldMetadata_TimecodeFrames::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint32> + ::Append(*this, field_id, value); + } + + using FieldMetadata_TimecodeHours = + ::protozero::proto_utils::FieldMetadata< + 7, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint32, + uint32_t, + Vb2V4l2DqbufFtraceEvent>; + + static constexpr FieldMetadata_TimecodeHours kTimecodeHours{}; + void set_timecode_hours(uint32_t value) { + static constexpr uint32_t field_id = FieldMetadata_TimecodeHours::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint32> + ::Append(*this, field_id, value); + } + + using FieldMetadata_TimecodeMinutes = + ::protozero::proto_utils::FieldMetadata< + 8, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint32, + uint32_t, + Vb2V4l2DqbufFtraceEvent>; + + static constexpr FieldMetadata_TimecodeMinutes kTimecodeMinutes{}; + void set_timecode_minutes(uint32_t value) { + static constexpr uint32_t field_id = FieldMetadata_TimecodeMinutes::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint32> + ::Append(*this, field_id, value); + } + + using FieldMetadata_TimecodeSeconds = + ::protozero::proto_utils::FieldMetadata< + 9, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint32, + uint32_t, + Vb2V4l2DqbufFtraceEvent>; + + static constexpr FieldMetadata_TimecodeSeconds kTimecodeSeconds{}; + void set_timecode_seconds(uint32_t value) { + static constexpr uint32_t field_id = FieldMetadata_TimecodeSeconds::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint32> + ::Append(*this, field_id, value); + } + + using FieldMetadata_TimecodeType = + ::protozero::proto_utils::FieldMetadata< + 10, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint32, + uint32_t, + Vb2V4l2DqbufFtraceEvent>; + + static constexpr FieldMetadata_TimecodeType kTimecodeType{}; + void set_timecode_type(uint32_t value) { + static constexpr uint32_t field_id = FieldMetadata_TimecodeType::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint32> + ::Append(*this, field_id, value); + } + + using FieldMetadata_TimecodeUserbits0 = + ::protozero::proto_utils::FieldMetadata< + 11, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint32, + uint32_t, + Vb2V4l2DqbufFtraceEvent>; + + static constexpr FieldMetadata_TimecodeUserbits0 kTimecodeUserbits0{}; + void set_timecode_userbits0(uint32_t value) { + static constexpr uint32_t field_id = FieldMetadata_TimecodeUserbits0::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint32> + ::Append(*this, field_id, value); + } + + using FieldMetadata_TimecodeUserbits1 = + ::protozero::proto_utils::FieldMetadata< + 12, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint32, + uint32_t, + Vb2V4l2DqbufFtraceEvent>; + + static constexpr FieldMetadata_TimecodeUserbits1 kTimecodeUserbits1{}; + void set_timecode_userbits1(uint32_t value) { + static constexpr uint32_t field_id = FieldMetadata_TimecodeUserbits1::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint32> + ::Append(*this, field_id, value); + } + + using FieldMetadata_TimecodeUserbits2 = + ::protozero::proto_utils::FieldMetadata< + 13, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint32, + uint32_t, + Vb2V4l2DqbufFtraceEvent>; + + static constexpr FieldMetadata_TimecodeUserbits2 kTimecodeUserbits2{}; + void set_timecode_userbits2(uint32_t value) { + static constexpr uint32_t field_id = FieldMetadata_TimecodeUserbits2::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint32> + ::Append(*this, field_id, value); + } + + using FieldMetadata_TimecodeUserbits3 = + ::protozero::proto_utils::FieldMetadata< + 14, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint32, + uint32_t, + Vb2V4l2DqbufFtraceEvent>; + + static constexpr FieldMetadata_TimecodeUserbits3 kTimecodeUserbits3{}; + void set_timecode_userbits3(uint32_t value) { + static constexpr uint32_t field_id = FieldMetadata_TimecodeUserbits3::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint32> + ::Append(*this, field_id, value); + } + + using FieldMetadata_Timestamp = + ::protozero::proto_utils::FieldMetadata< + 15, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kInt64, + int64_t, + Vb2V4l2DqbufFtraceEvent>; + + static constexpr FieldMetadata_Timestamp kTimestamp{}; + void set_timestamp(int64_t value) { + static constexpr uint32_t field_id = FieldMetadata_Timestamp::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kInt64> + ::Append(*this, field_id, value); + } +}; + +class Vb2V4l2QbufFtraceEvent_Decoder : public ::protozero::TypedProtoDecoder { + public: + Vb2V4l2QbufFtraceEvent_Decoder(const uint8_t* data, size_t len) : TypedProtoDecoder(data, len) {} + explicit Vb2V4l2QbufFtraceEvent_Decoder(const std::string& raw) : TypedProtoDecoder(reinterpret_cast(raw.data()), raw.size()) {} + explicit Vb2V4l2QbufFtraceEvent_Decoder(const ::protozero::ConstBytes& raw) : TypedProtoDecoder(raw.data, raw.size) {} + bool has_field() const { return at<1>().valid(); } + uint32_t field() const { return at<1>().as_uint32(); } + bool has_flags() const { return at<2>().valid(); } + uint32_t flags() const { return at<2>().as_uint32(); } + bool has_minor() const { return at<3>().valid(); } + int32_t minor() const { return at<3>().as_int32(); } + bool has_sequence() const { return at<4>().valid(); } + uint32_t sequence() const { return at<4>().as_uint32(); } + bool has_timecode_flags() const { return at<5>().valid(); } + uint32_t timecode_flags() const { return at<5>().as_uint32(); } + bool has_timecode_frames() const { return at<6>().valid(); } + uint32_t timecode_frames() const { return at<6>().as_uint32(); } + bool has_timecode_hours() const { return at<7>().valid(); } + uint32_t timecode_hours() const { return at<7>().as_uint32(); } + bool has_timecode_minutes() const { return at<8>().valid(); } + uint32_t timecode_minutes() const { return at<8>().as_uint32(); } + bool has_timecode_seconds() const { return at<9>().valid(); } + uint32_t timecode_seconds() const { return at<9>().as_uint32(); } + bool has_timecode_type() const { return at<10>().valid(); } + uint32_t timecode_type() const { return at<10>().as_uint32(); } + bool has_timecode_userbits0() const { return at<11>().valid(); } + uint32_t timecode_userbits0() const { return at<11>().as_uint32(); } + bool has_timecode_userbits1() const { return at<12>().valid(); } + uint32_t timecode_userbits1() const { return at<12>().as_uint32(); } + bool has_timecode_userbits2() const { return at<13>().valid(); } + uint32_t timecode_userbits2() const { return at<13>().as_uint32(); } + bool has_timecode_userbits3() const { return at<14>().valid(); } + uint32_t timecode_userbits3() const { return at<14>().as_uint32(); } + bool has_timestamp() const { return at<15>().valid(); } + int64_t timestamp() const { return at<15>().as_int64(); } +}; + +class Vb2V4l2QbufFtraceEvent : public ::protozero::Message { + public: + using Decoder = Vb2V4l2QbufFtraceEvent_Decoder; + enum : int32_t { + kFieldFieldNumber = 1, + kFlagsFieldNumber = 2, + kMinorFieldNumber = 3, + kSequenceFieldNumber = 4, + kTimecodeFlagsFieldNumber = 5, + kTimecodeFramesFieldNumber = 6, + kTimecodeHoursFieldNumber = 7, + kTimecodeMinutesFieldNumber = 8, + kTimecodeSecondsFieldNumber = 9, + kTimecodeTypeFieldNumber = 10, + kTimecodeUserbits0FieldNumber = 11, + kTimecodeUserbits1FieldNumber = 12, + kTimecodeUserbits2FieldNumber = 13, + kTimecodeUserbits3FieldNumber = 14, + kTimestampFieldNumber = 15, + }; + static constexpr const char* GetName() { return ".perfetto.protos.Vb2V4l2QbufFtraceEvent"; } + + + using FieldMetadata_Field = + ::protozero::proto_utils::FieldMetadata< + 1, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint32, + uint32_t, + Vb2V4l2QbufFtraceEvent>; + + static constexpr FieldMetadata_Field kField{}; + void set_field(uint32_t value) { + static constexpr uint32_t field_id = FieldMetadata_Field::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint32> + ::Append(*this, field_id, value); + } + + using FieldMetadata_Flags = + ::protozero::proto_utils::FieldMetadata< + 2, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint32, + uint32_t, + Vb2V4l2QbufFtraceEvent>; + + static constexpr FieldMetadata_Flags kFlags{}; + void set_flags(uint32_t value) { + static constexpr uint32_t field_id = FieldMetadata_Flags::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint32> + ::Append(*this, field_id, value); + } + + using FieldMetadata_Minor = + ::protozero::proto_utils::FieldMetadata< + 3, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kInt32, + int32_t, + Vb2V4l2QbufFtraceEvent>; + + static constexpr FieldMetadata_Minor kMinor{}; + void set_minor(int32_t value) { + static constexpr uint32_t field_id = FieldMetadata_Minor::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kInt32> + ::Append(*this, field_id, value); + } + + using FieldMetadata_Sequence = + ::protozero::proto_utils::FieldMetadata< + 4, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint32, + uint32_t, + Vb2V4l2QbufFtraceEvent>; + + static constexpr FieldMetadata_Sequence kSequence{}; + void set_sequence(uint32_t value) { + static constexpr uint32_t field_id = FieldMetadata_Sequence::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint32> + ::Append(*this, field_id, value); + } + + using FieldMetadata_TimecodeFlags = + ::protozero::proto_utils::FieldMetadata< + 5, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint32, + uint32_t, + Vb2V4l2QbufFtraceEvent>; + + static constexpr FieldMetadata_TimecodeFlags kTimecodeFlags{}; + void set_timecode_flags(uint32_t value) { + static constexpr uint32_t field_id = FieldMetadata_TimecodeFlags::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint32> + ::Append(*this, field_id, value); + } + + using FieldMetadata_TimecodeFrames = + ::protozero::proto_utils::FieldMetadata< + 6, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint32, + uint32_t, + Vb2V4l2QbufFtraceEvent>; + + static constexpr FieldMetadata_TimecodeFrames kTimecodeFrames{}; + void set_timecode_frames(uint32_t value) { + static constexpr uint32_t field_id = FieldMetadata_TimecodeFrames::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint32> + ::Append(*this, field_id, value); + } + + using FieldMetadata_TimecodeHours = + ::protozero::proto_utils::FieldMetadata< + 7, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint32, + uint32_t, + Vb2V4l2QbufFtraceEvent>; + + static constexpr FieldMetadata_TimecodeHours kTimecodeHours{}; + void set_timecode_hours(uint32_t value) { + static constexpr uint32_t field_id = FieldMetadata_TimecodeHours::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint32> + ::Append(*this, field_id, value); + } + + using FieldMetadata_TimecodeMinutes = + ::protozero::proto_utils::FieldMetadata< + 8, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint32, + uint32_t, + Vb2V4l2QbufFtraceEvent>; + + static constexpr FieldMetadata_TimecodeMinutes kTimecodeMinutes{}; + void set_timecode_minutes(uint32_t value) { + static constexpr uint32_t field_id = FieldMetadata_TimecodeMinutes::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint32> + ::Append(*this, field_id, value); + } + + using FieldMetadata_TimecodeSeconds = + ::protozero::proto_utils::FieldMetadata< + 9, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint32, + uint32_t, + Vb2V4l2QbufFtraceEvent>; + + static constexpr FieldMetadata_TimecodeSeconds kTimecodeSeconds{}; + void set_timecode_seconds(uint32_t value) { + static constexpr uint32_t field_id = FieldMetadata_TimecodeSeconds::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint32> + ::Append(*this, field_id, value); + } + + using FieldMetadata_TimecodeType = + ::protozero::proto_utils::FieldMetadata< + 10, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint32, + uint32_t, + Vb2V4l2QbufFtraceEvent>; + + static constexpr FieldMetadata_TimecodeType kTimecodeType{}; + void set_timecode_type(uint32_t value) { + static constexpr uint32_t field_id = FieldMetadata_TimecodeType::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint32> + ::Append(*this, field_id, value); + } + + using FieldMetadata_TimecodeUserbits0 = + ::protozero::proto_utils::FieldMetadata< + 11, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint32, + uint32_t, + Vb2V4l2QbufFtraceEvent>; + + static constexpr FieldMetadata_TimecodeUserbits0 kTimecodeUserbits0{}; + void set_timecode_userbits0(uint32_t value) { + static constexpr uint32_t field_id = FieldMetadata_TimecodeUserbits0::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint32> + ::Append(*this, field_id, value); + } + + using FieldMetadata_TimecodeUserbits1 = + ::protozero::proto_utils::FieldMetadata< + 12, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint32, + uint32_t, + Vb2V4l2QbufFtraceEvent>; + + static constexpr FieldMetadata_TimecodeUserbits1 kTimecodeUserbits1{}; + void set_timecode_userbits1(uint32_t value) { + static constexpr uint32_t field_id = FieldMetadata_TimecodeUserbits1::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint32> + ::Append(*this, field_id, value); + } + + using FieldMetadata_TimecodeUserbits2 = + ::protozero::proto_utils::FieldMetadata< + 13, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint32, + uint32_t, + Vb2V4l2QbufFtraceEvent>; + + static constexpr FieldMetadata_TimecodeUserbits2 kTimecodeUserbits2{}; + void set_timecode_userbits2(uint32_t value) { + static constexpr uint32_t field_id = FieldMetadata_TimecodeUserbits2::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint32> + ::Append(*this, field_id, value); + } + + using FieldMetadata_TimecodeUserbits3 = + ::protozero::proto_utils::FieldMetadata< + 14, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint32, + uint32_t, + Vb2V4l2QbufFtraceEvent>; + + static constexpr FieldMetadata_TimecodeUserbits3 kTimecodeUserbits3{}; + void set_timecode_userbits3(uint32_t value) { + static constexpr uint32_t field_id = FieldMetadata_TimecodeUserbits3::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint32> + ::Append(*this, field_id, value); + } + + using FieldMetadata_Timestamp = + ::protozero::proto_utils::FieldMetadata< + 15, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kInt64, + int64_t, + Vb2V4l2QbufFtraceEvent>; + + static constexpr FieldMetadata_Timestamp kTimestamp{}; + void set_timestamp(int64_t value) { + static constexpr uint32_t field_id = FieldMetadata_Timestamp::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kInt64> + ::Append(*this, field_id, value); + } +}; + +class Vb2V4l2BufDoneFtraceEvent_Decoder : public ::protozero::TypedProtoDecoder { + public: + Vb2V4l2BufDoneFtraceEvent_Decoder(const uint8_t* data, size_t len) : TypedProtoDecoder(data, len) {} + explicit Vb2V4l2BufDoneFtraceEvent_Decoder(const std::string& raw) : TypedProtoDecoder(reinterpret_cast(raw.data()), raw.size()) {} + explicit Vb2V4l2BufDoneFtraceEvent_Decoder(const ::protozero::ConstBytes& raw) : TypedProtoDecoder(raw.data, raw.size) {} + bool has_field() const { return at<1>().valid(); } + uint32_t field() const { return at<1>().as_uint32(); } + bool has_flags() const { return at<2>().valid(); } + uint32_t flags() const { return at<2>().as_uint32(); } + bool has_minor() const { return at<3>().valid(); } + int32_t minor() const { return at<3>().as_int32(); } + bool has_sequence() const { return at<4>().valid(); } + uint32_t sequence() const { return at<4>().as_uint32(); } + bool has_timecode_flags() const { return at<5>().valid(); } + uint32_t timecode_flags() const { return at<5>().as_uint32(); } + bool has_timecode_frames() const { return at<6>().valid(); } + uint32_t timecode_frames() const { return at<6>().as_uint32(); } + bool has_timecode_hours() const { return at<7>().valid(); } + uint32_t timecode_hours() const { return at<7>().as_uint32(); } + bool has_timecode_minutes() const { return at<8>().valid(); } + uint32_t timecode_minutes() const { return at<8>().as_uint32(); } + bool has_timecode_seconds() const { return at<9>().valid(); } + uint32_t timecode_seconds() const { return at<9>().as_uint32(); } + bool has_timecode_type() const { return at<10>().valid(); } + uint32_t timecode_type() const { return at<10>().as_uint32(); } + bool has_timecode_userbits0() const { return at<11>().valid(); } + uint32_t timecode_userbits0() const { return at<11>().as_uint32(); } + bool has_timecode_userbits1() const { return at<12>().valid(); } + uint32_t timecode_userbits1() const { return at<12>().as_uint32(); } + bool has_timecode_userbits2() const { return at<13>().valid(); } + uint32_t timecode_userbits2() const { return at<13>().as_uint32(); } + bool has_timecode_userbits3() const { return at<14>().valid(); } + uint32_t timecode_userbits3() const { return at<14>().as_uint32(); } + bool has_timestamp() const { return at<15>().valid(); } + int64_t timestamp() const { return at<15>().as_int64(); } +}; + +class Vb2V4l2BufDoneFtraceEvent : public ::protozero::Message { + public: + using Decoder = Vb2V4l2BufDoneFtraceEvent_Decoder; + enum : int32_t { + kFieldFieldNumber = 1, + kFlagsFieldNumber = 2, + kMinorFieldNumber = 3, + kSequenceFieldNumber = 4, + kTimecodeFlagsFieldNumber = 5, + kTimecodeFramesFieldNumber = 6, + kTimecodeHoursFieldNumber = 7, + kTimecodeMinutesFieldNumber = 8, + kTimecodeSecondsFieldNumber = 9, + kTimecodeTypeFieldNumber = 10, + kTimecodeUserbits0FieldNumber = 11, + kTimecodeUserbits1FieldNumber = 12, + kTimecodeUserbits2FieldNumber = 13, + kTimecodeUserbits3FieldNumber = 14, + kTimestampFieldNumber = 15, + }; + static constexpr const char* GetName() { return ".perfetto.protos.Vb2V4l2BufDoneFtraceEvent"; } + + + using FieldMetadata_Field = + ::protozero::proto_utils::FieldMetadata< + 1, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint32, + uint32_t, + Vb2V4l2BufDoneFtraceEvent>; + + static constexpr FieldMetadata_Field kField{}; + void set_field(uint32_t value) { + static constexpr uint32_t field_id = FieldMetadata_Field::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint32> + ::Append(*this, field_id, value); + } + + using FieldMetadata_Flags = + ::protozero::proto_utils::FieldMetadata< + 2, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint32, + uint32_t, + Vb2V4l2BufDoneFtraceEvent>; + + static constexpr FieldMetadata_Flags kFlags{}; + void set_flags(uint32_t value) { + static constexpr uint32_t field_id = FieldMetadata_Flags::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint32> + ::Append(*this, field_id, value); + } + + using FieldMetadata_Minor = + ::protozero::proto_utils::FieldMetadata< + 3, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kInt32, + int32_t, + Vb2V4l2BufDoneFtraceEvent>; + + static constexpr FieldMetadata_Minor kMinor{}; + void set_minor(int32_t value) { + static constexpr uint32_t field_id = FieldMetadata_Minor::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kInt32> + ::Append(*this, field_id, value); + } + + using FieldMetadata_Sequence = + ::protozero::proto_utils::FieldMetadata< + 4, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint32, + uint32_t, + Vb2V4l2BufDoneFtraceEvent>; + + static constexpr FieldMetadata_Sequence kSequence{}; + void set_sequence(uint32_t value) { + static constexpr uint32_t field_id = FieldMetadata_Sequence::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint32> + ::Append(*this, field_id, value); + } + + using FieldMetadata_TimecodeFlags = + ::protozero::proto_utils::FieldMetadata< + 5, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint32, + uint32_t, + Vb2V4l2BufDoneFtraceEvent>; + + static constexpr FieldMetadata_TimecodeFlags kTimecodeFlags{}; + void set_timecode_flags(uint32_t value) { + static constexpr uint32_t field_id = FieldMetadata_TimecodeFlags::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint32> + ::Append(*this, field_id, value); + } + + using FieldMetadata_TimecodeFrames = + ::protozero::proto_utils::FieldMetadata< + 6, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint32, + uint32_t, + Vb2V4l2BufDoneFtraceEvent>; + + static constexpr FieldMetadata_TimecodeFrames kTimecodeFrames{}; + void set_timecode_frames(uint32_t value) { + static constexpr uint32_t field_id = FieldMetadata_TimecodeFrames::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint32> + ::Append(*this, field_id, value); + } + + using FieldMetadata_TimecodeHours = + ::protozero::proto_utils::FieldMetadata< + 7, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint32, + uint32_t, + Vb2V4l2BufDoneFtraceEvent>; + + static constexpr FieldMetadata_TimecodeHours kTimecodeHours{}; + void set_timecode_hours(uint32_t value) { + static constexpr uint32_t field_id = FieldMetadata_TimecodeHours::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint32> + ::Append(*this, field_id, value); + } + + using FieldMetadata_TimecodeMinutes = + ::protozero::proto_utils::FieldMetadata< + 8, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint32, + uint32_t, + Vb2V4l2BufDoneFtraceEvent>; + + static constexpr FieldMetadata_TimecodeMinutes kTimecodeMinutes{}; + void set_timecode_minutes(uint32_t value) { + static constexpr uint32_t field_id = FieldMetadata_TimecodeMinutes::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint32> + ::Append(*this, field_id, value); + } + + using FieldMetadata_TimecodeSeconds = + ::protozero::proto_utils::FieldMetadata< + 9, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint32, + uint32_t, + Vb2V4l2BufDoneFtraceEvent>; + + static constexpr FieldMetadata_TimecodeSeconds kTimecodeSeconds{}; + void set_timecode_seconds(uint32_t value) { + static constexpr uint32_t field_id = FieldMetadata_TimecodeSeconds::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint32> + ::Append(*this, field_id, value); + } + + using FieldMetadata_TimecodeType = + ::protozero::proto_utils::FieldMetadata< + 10, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint32, + uint32_t, + Vb2V4l2BufDoneFtraceEvent>; + + static constexpr FieldMetadata_TimecodeType kTimecodeType{}; + void set_timecode_type(uint32_t value) { + static constexpr uint32_t field_id = FieldMetadata_TimecodeType::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint32> + ::Append(*this, field_id, value); + } + + using FieldMetadata_TimecodeUserbits0 = + ::protozero::proto_utils::FieldMetadata< + 11, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint32, + uint32_t, + Vb2V4l2BufDoneFtraceEvent>; + + static constexpr FieldMetadata_TimecodeUserbits0 kTimecodeUserbits0{}; + void set_timecode_userbits0(uint32_t value) { + static constexpr uint32_t field_id = FieldMetadata_TimecodeUserbits0::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint32> + ::Append(*this, field_id, value); + } + + using FieldMetadata_TimecodeUserbits1 = + ::protozero::proto_utils::FieldMetadata< + 12, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint32, + uint32_t, + Vb2V4l2BufDoneFtraceEvent>; + + static constexpr FieldMetadata_TimecodeUserbits1 kTimecodeUserbits1{}; + void set_timecode_userbits1(uint32_t value) { + static constexpr uint32_t field_id = FieldMetadata_TimecodeUserbits1::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint32> + ::Append(*this, field_id, value); + } + + using FieldMetadata_TimecodeUserbits2 = + ::protozero::proto_utils::FieldMetadata< + 13, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint32, + uint32_t, + Vb2V4l2BufDoneFtraceEvent>; + + static constexpr FieldMetadata_TimecodeUserbits2 kTimecodeUserbits2{}; + void set_timecode_userbits2(uint32_t value) { + static constexpr uint32_t field_id = FieldMetadata_TimecodeUserbits2::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint32> + ::Append(*this, field_id, value); + } + + using FieldMetadata_TimecodeUserbits3 = + ::protozero::proto_utils::FieldMetadata< + 14, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint32, + uint32_t, + Vb2V4l2BufDoneFtraceEvent>; + + static constexpr FieldMetadata_TimecodeUserbits3 kTimecodeUserbits3{}; + void set_timecode_userbits3(uint32_t value) { + static constexpr uint32_t field_id = FieldMetadata_TimecodeUserbits3::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint32> + ::Append(*this, field_id, value); + } + + using FieldMetadata_Timestamp = + ::protozero::proto_utils::FieldMetadata< + 15, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kInt64, + int64_t, + Vb2V4l2BufDoneFtraceEvent>; + + static constexpr FieldMetadata_Timestamp kTimestamp{}; + void set_timestamp(int64_t value) { + static constexpr uint32_t field_id = FieldMetadata_Timestamp::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kInt64> + ::Append(*this, field_id, value); + } +}; + +class Vb2V4l2BufQueueFtraceEvent_Decoder : public ::protozero::TypedProtoDecoder { + public: + Vb2V4l2BufQueueFtraceEvent_Decoder(const uint8_t* data, size_t len) : TypedProtoDecoder(data, len) {} + explicit Vb2V4l2BufQueueFtraceEvent_Decoder(const std::string& raw) : TypedProtoDecoder(reinterpret_cast(raw.data()), raw.size()) {} + explicit Vb2V4l2BufQueueFtraceEvent_Decoder(const ::protozero::ConstBytes& raw) : TypedProtoDecoder(raw.data, raw.size) {} + bool has_field() const { return at<1>().valid(); } + uint32_t field() const { return at<1>().as_uint32(); } + bool has_flags() const { return at<2>().valid(); } + uint32_t flags() const { return at<2>().as_uint32(); } + bool has_minor() const { return at<3>().valid(); } + int32_t minor() const { return at<3>().as_int32(); } + bool has_sequence() const { return at<4>().valid(); } + uint32_t sequence() const { return at<4>().as_uint32(); } + bool has_timecode_flags() const { return at<5>().valid(); } + uint32_t timecode_flags() const { return at<5>().as_uint32(); } + bool has_timecode_frames() const { return at<6>().valid(); } + uint32_t timecode_frames() const { return at<6>().as_uint32(); } + bool has_timecode_hours() const { return at<7>().valid(); } + uint32_t timecode_hours() const { return at<7>().as_uint32(); } + bool has_timecode_minutes() const { return at<8>().valid(); } + uint32_t timecode_minutes() const { return at<8>().as_uint32(); } + bool has_timecode_seconds() const { return at<9>().valid(); } + uint32_t timecode_seconds() const { return at<9>().as_uint32(); } + bool has_timecode_type() const { return at<10>().valid(); } + uint32_t timecode_type() const { return at<10>().as_uint32(); } + bool has_timecode_userbits0() const { return at<11>().valid(); } + uint32_t timecode_userbits0() const { return at<11>().as_uint32(); } + bool has_timecode_userbits1() const { return at<12>().valid(); } + uint32_t timecode_userbits1() const { return at<12>().as_uint32(); } + bool has_timecode_userbits2() const { return at<13>().valid(); } + uint32_t timecode_userbits2() const { return at<13>().as_uint32(); } + bool has_timecode_userbits3() const { return at<14>().valid(); } + uint32_t timecode_userbits3() const { return at<14>().as_uint32(); } + bool has_timestamp() const { return at<15>().valid(); } + int64_t timestamp() const { return at<15>().as_int64(); } +}; + +class Vb2V4l2BufQueueFtraceEvent : public ::protozero::Message { + public: + using Decoder = Vb2V4l2BufQueueFtraceEvent_Decoder; + enum : int32_t { + kFieldFieldNumber = 1, + kFlagsFieldNumber = 2, + kMinorFieldNumber = 3, + kSequenceFieldNumber = 4, + kTimecodeFlagsFieldNumber = 5, + kTimecodeFramesFieldNumber = 6, + kTimecodeHoursFieldNumber = 7, + kTimecodeMinutesFieldNumber = 8, + kTimecodeSecondsFieldNumber = 9, + kTimecodeTypeFieldNumber = 10, + kTimecodeUserbits0FieldNumber = 11, + kTimecodeUserbits1FieldNumber = 12, + kTimecodeUserbits2FieldNumber = 13, + kTimecodeUserbits3FieldNumber = 14, + kTimestampFieldNumber = 15, + }; + static constexpr const char* GetName() { return ".perfetto.protos.Vb2V4l2BufQueueFtraceEvent"; } + + + using FieldMetadata_Field = + ::protozero::proto_utils::FieldMetadata< + 1, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint32, + uint32_t, + Vb2V4l2BufQueueFtraceEvent>; + + static constexpr FieldMetadata_Field kField{}; + void set_field(uint32_t value) { + static constexpr uint32_t field_id = FieldMetadata_Field::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint32> + ::Append(*this, field_id, value); + } + + using FieldMetadata_Flags = + ::protozero::proto_utils::FieldMetadata< + 2, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint32, + uint32_t, + Vb2V4l2BufQueueFtraceEvent>; + + static constexpr FieldMetadata_Flags kFlags{}; + void set_flags(uint32_t value) { + static constexpr uint32_t field_id = FieldMetadata_Flags::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint32> + ::Append(*this, field_id, value); + } + + using FieldMetadata_Minor = + ::protozero::proto_utils::FieldMetadata< + 3, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kInt32, + int32_t, + Vb2V4l2BufQueueFtraceEvent>; + + static constexpr FieldMetadata_Minor kMinor{}; + void set_minor(int32_t value) { + static constexpr uint32_t field_id = FieldMetadata_Minor::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kInt32> + ::Append(*this, field_id, value); + } + + using FieldMetadata_Sequence = + ::protozero::proto_utils::FieldMetadata< + 4, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint32, + uint32_t, + Vb2V4l2BufQueueFtraceEvent>; + + static constexpr FieldMetadata_Sequence kSequence{}; + void set_sequence(uint32_t value) { + static constexpr uint32_t field_id = FieldMetadata_Sequence::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint32> + ::Append(*this, field_id, value); + } + + using FieldMetadata_TimecodeFlags = + ::protozero::proto_utils::FieldMetadata< + 5, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint32, + uint32_t, + Vb2V4l2BufQueueFtraceEvent>; + + static constexpr FieldMetadata_TimecodeFlags kTimecodeFlags{}; + void set_timecode_flags(uint32_t value) { + static constexpr uint32_t field_id = FieldMetadata_TimecodeFlags::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint32> + ::Append(*this, field_id, value); + } + + using FieldMetadata_TimecodeFrames = + ::protozero::proto_utils::FieldMetadata< + 6, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint32, + uint32_t, + Vb2V4l2BufQueueFtraceEvent>; + + static constexpr FieldMetadata_TimecodeFrames kTimecodeFrames{}; + void set_timecode_frames(uint32_t value) { + static constexpr uint32_t field_id = FieldMetadata_TimecodeFrames::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint32> + ::Append(*this, field_id, value); + } + + using FieldMetadata_TimecodeHours = + ::protozero::proto_utils::FieldMetadata< + 7, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint32, + uint32_t, + Vb2V4l2BufQueueFtraceEvent>; + + static constexpr FieldMetadata_TimecodeHours kTimecodeHours{}; + void set_timecode_hours(uint32_t value) { + static constexpr uint32_t field_id = FieldMetadata_TimecodeHours::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint32> + ::Append(*this, field_id, value); + } + + using FieldMetadata_TimecodeMinutes = + ::protozero::proto_utils::FieldMetadata< + 8, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint32, + uint32_t, + Vb2V4l2BufQueueFtraceEvent>; + + static constexpr FieldMetadata_TimecodeMinutes kTimecodeMinutes{}; + void set_timecode_minutes(uint32_t value) { + static constexpr uint32_t field_id = FieldMetadata_TimecodeMinutes::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint32> + ::Append(*this, field_id, value); + } + + using FieldMetadata_TimecodeSeconds = + ::protozero::proto_utils::FieldMetadata< + 9, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint32, + uint32_t, + Vb2V4l2BufQueueFtraceEvent>; + + static constexpr FieldMetadata_TimecodeSeconds kTimecodeSeconds{}; + void set_timecode_seconds(uint32_t value) { + static constexpr uint32_t field_id = FieldMetadata_TimecodeSeconds::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint32> + ::Append(*this, field_id, value); + } + + using FieldMetadata_TimecodeType = + ::protozero::proto_utils::FieldMetadata< + 10, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint32, + uint32_t, + Vb2V4l2BufQueueFtraceEvent>; + + static constexpr FieldMetadata_TimecodeType kTimecodeType{}; + void set_timecode_type(uint32_t value) { + static constexpr uint32_t field_id = FieldMetadata_TimecodeType::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint32> + ::Append(*this, field_id, value); + } + + using FieldMetadata_TimecodeUserbits0 = + ::protozero::proto_utils::FieldMetadata< + 11, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint32, + uint32_t, + Vb2V4l2BufQueueFtraceEvent>; + + static constexpr FieldMetadata_TimecodeUserbits0 kTimecodeUserbits0{}; + void set_timecode_userbits0(uint32_t value) { + static constexpr uint32_t field_id = FieldMetadata_TimecodeUserbits0::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint32> + ::Append(*this, field_id, value); + } + + using FieldMetadata_TimecodeUserbits1 = + ::protozero::proto_utils::FieldMetadata< + 12, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint32, + uint32_t, + Vb2V4l2BufQueueFtraceEvent>; + + static constexpr FieldMetadata_TimecodeUserbits1 kTimecodeUserbits1{}; + void set_timecode_userbits1(uint32_t value) { + static constexpr uint32_t field_id = FieldMetadata_TimecodeUserbits1::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint32> + ::Append(*this, field_id, value); + } + + using FieldMetadata_TimecodeUserbits2 = + ::protozero::proto_utils::FieldMetadata< + 13, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint32, + uint32_t, + Vb2V4l2BufQueueFtraceEvent>; + + static constexpr FieldMetadata_TimecodeUserbits2 kTimecodeUserbits2{}; + void set_timecode_userbits2(uint32_t value) { + static constexpr uint32_t field_id = FieldMetadata_TimecodeUserbits2::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint32> + ::Append(*this, field_id, value); + } + + using FieldMetadata_TimecodeUserbits3 = + ::protozero::proto_utils::FieldMetadata< + 14, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint32, + uint32_t, + Vb2V4l2BufQueueFtraceEvent>; + + static constexpr FieldMetadata_TimecodeUserbits3 kTimecodeUserbits3{}; + void set_timecode_userbits3(uint32_t value) { + static constexpr uint32_t field_id = FieldMetadata_TimecodeUserbits3::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint32> + ::Append(*this, field_id, value); + } + + using FieldMetadata_Timestamp = + ::protozero::proto_utils::FieldMetadata< + 15, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kInt64, + int64_t, + Vb2V4l2BufQueueFtraceEvent>; + + static constexpr FieldMetadata_Timestamp kTimestamp{}; + void set_timestamp(int64_t value) { + static constexpr uint32_t field_id = FieldMetadata_Timestamp::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kInt64> + ::Append(*this, field_id, value); + } +}; + +class V4l2DqbufFtraceEvent_Decoder : public ::protozero::TypedProtoDecoder { + public: + V4l2DqbufFtraceEvent_Decoder(const uint8_t* data, size_t len) : TypedProtoDecoder(data, len) {} + explicit V4l2DqbufFtraceEvent_Decoder(const std::string& raw) : TypedProtoDecoder(reinterpret_cast(raw.data()), raw.size()) {} + explicit V4l2DqbufFtraceEvent_Decoder(const ::protozero::ConstBytes& raw) : TypedProtoDecoder(raw.data, raw.size) {} + bool has_bytesused() const { return at<1>().valid(); } + uint32_t bytesused() const { return at<1>().as_uint32(); } + bool has_field() const { return at<2>().valid(); } + uint32_t field() const { return at<2>().as_uint32(); } + bool has_flags() const { return at<3>().valid(); } + uint32_t flags() const { return at<3>().as_uint32(); } + bool has_index() const { return at<4>().valid(); } + uint32_t index() const { return at<4>().as_uint32(); } + bool has_minor() const { return at<5>().valid(); } + int32_t minor() const { return at<5>().as_int32(); } + bool has_sequence() const { return at<6>().valid(); } + uint32_t sequence() const { return at<6>().as_uint32(); } + bool has_timecode_flags() const { return at<7>().valid(); } + uint32_t timecode_flags() const { return at<7>().as_uint32(); } + bool has_timecode_frames() const { return at<8>().valid(); } + uint32_t timecode_frames() const { return at<8>().as_uint32(); } + bool has_timecode_hours() const { return at<9>().valid(); } + uint32_t timecode_hours() const { return at<9>().as_uint32(); } + bool has_timecode_minutes() const { return at<10>().valid(); } + uint32_t timecode_minutes() const { return at<10>().as_uint32(); } + bool has_timecode_seconds() const { return at<11>().valid(); } + uint32_t timecode_seconds() const { return at<11>().as_uint32(); } + bool has_timecode_type() const { return at<12>().valid(); } + uint32_t timecode_type() const { return at<12>().as_uint32(); } + bool has_timecode_userbits0() const { return at<13>().valid(); } + uint32_t timecode_userbits0() const { return at<13>().as_uint32(); } + bool has_timecode_userbits1() const { return at<14>().valid(); } + uint32_t timecode_userbits1() const { return at<14>().as_uint32(); } + bool has_timecode_userbits2() const { return at<15>().valid(); } + uint32_t timecode_userbits2() const { return at<15>().as_uint32(); } + bool has_timecode_userbits3() const { return at<16>().valid(); } + uint32_t timecode_userbits3() const { return at<16>().as_uint32(); } + bool has_timestamp() const { return at<17>().valid(); } + int64_t timestamp() const { return at<17>().as_int64(); } + bool has_type() const { return at<18>().valid(); } + uint32_t type() const { return at<18>().as_uint32(); } +}; + +class V4l2DqbufFtraceEvent : public ::protozero::Message { + public: + using Decoder = V4l2DqbufFtraceEvent_Decoder; + enum : int32_t { + kBytesusedFieldNumber = 1, + kFieldFieldNumber = 2, + kFlagsFieldNumber = 3, + kIndexFieldNumber = 4, + kMinorFieldNumber = 5, + kSequenceFieldNumber = 6, + kTimecodeFlagsFieldNumber = 7, + kTimecodeFramesFieldNumber = 8, + kTimecodeHoursFieldNumber = 9, + kTimecodeMinutesFieldNumber = 10, + kTimecodeSecondsFieldNumber = 11, + kTimecodeTypeFieldNumber = 12, + kTimecodeUserbits0FieldNumber = 13, + kTimecodeUserbits1FieldNumber = 14, + kTimecodeUserbits2FieldNumber = 15, + kTimecodeUserbits3FieldNumber = 16, + kTimestampFieldNumber = 17, + kTypeFieldNumber = 18, + }; + static constexpr const char* GetName() { return ".perfetto.protos.V4l2DqbufFtraceEvent"; } + + + using FieldMetadata_Bytesused = + ::protozero::proto_utils::FieldMetadata< + 1, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint32, + uint32_t, + V4l2DqbufFtraceEvent>; + + static constexpr FieldMetadata_Bytesused kBytesused{}; + void set_bytesused(uint32_t value) { + static constexpr uint32_t field_id = FieldMetadata_Bytesused::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint32> + ::Append(*this, field_id, value); + } + + using FieldMetadata_Field = + ::protozero::proto_utils::FieldMetadata< + 2, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint32, + uint32_t, + V4l2DqbufFtraceEvent>; + + static constexpr FieldMetadata_Field kField{}; + void set_field(uint32_t value) { + static constexpr uint32_t field_id = FieldMetadata_Field::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint32> + ::Append(*this, field_id, value); + } + + using FieldMetadata_Flags = + ::protozero::proto_utils::FieldMetadata< + 3, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint32, + uint32_t, + V4l2DqbufFtraceEvent>; + + static constexpr FieldMetadata_Flags kFlags{}; + void set_flags(uint32_t value) { + static constexpr uint32_t field_id = FieldMetadata_Flags::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint32> + ::Append(*this, field_id, value); + } + + using FieldMetadata_Index = + ::protozero::proto_utils::FieldMetadata< + 4, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint32, + uint32_t, + V4l2DqbufFtraceEvent>; + + static constexpr FieldMetadata_Index kIndex{}; + void set_index(uint32_t value) { + static constexpr uint32_t field_id = FieldMetadata_Index::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint32> + ::Append(*this, field_id, value); + } + + using FieldMetadata_Minor = + ::protozero::proto_utils::FieldMetadata< + 5, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kInt32, + int32_t, + V4l2DqbufFtraceEvent>; + + static constexpr FieldMetadata_Minor kMinor{}; + void set_minor(int32_t value) { + static constexpr uint32_t field_id = FieldMetadata_Minor::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kInt32> + ::Append(*this, field_id, value); + } + + using FieldMetadata_Sequence = + ::protozero::proto_utils::FieldMetadata< + 6, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint32, + uint32_t, + V4l2DqbufFtraceEvent>; + + static constexpr FieldMetadata_Sequence kSequence{}; + void set_sequence(uint32_t value) { + static constexpr uint32_t field_id = FieldMetadata_Sequence::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint32> + ::Append(*this, field_id, value); + } + + using FieldMetadata_TimecodeFlags = + ::protozero::proto_utils::FieldMetadata< + 7, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint32, + uint32_t, + V4l2DqbufFtraceEvent>; + + static constexpr FieldMetadata_TimecodeFlags kTimecodeFlags{}; + void set_timecode_flags(uint32_t value) { + static constexpr uint32_t field_id = FieldMetadata_TimecodeFlags::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint32> + ::Append(*this, field_id, value); + } + + using FieldMetadata_TimecodeFrames = + ::protozero::proto_utils::FieldMetadata< + 8, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint32, + uint32_t, + V4l2DqbufFtraceEvent>; + + static constexpr FieldMetadata_TimecodeFrames kTimecodeFrames{}; + void set_timecode_frames(uint32_t value) { + static constexpr uint32_t field_id = FieldMetadata_TimecodeFrames::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint32> + ::Append(*this, field_id, value); + } + + using FieldMetadata_TimecodeHours = + ::protozero::proto_utils::FieldMetadata< + 9, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint32, + uint32_t, + V4l2DqbufFtraceEvent>; + + static constexpr FieldMetadata_TimecodeHours kTimecodeHours{}; + void set_timecode_hours(uint32_t value) { + static constexpr uint32_t field_id = FieldMetadata_TimecodeHours::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint32> + ::Append(*this, field_id, value); + } + + using FieldMetadata_TimecodeMinutes = + ::protozero::proto_utils::FieldMetadata< + 10, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint32, + uint32_t, + V4l2DqbufFtraceEvent>; + + static constexpr FieldMetadata_TimecodeMinutes kTimecodeMinutes{}; + void set_timecode_minutes(uint32_t value) { + static constexpr uint32_t field_id = FieldMetadata_TimecodeMinutes::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint32> + ::Append(*this, field_id, value); + } + + using FieldMetadata_TimecodeSeconds = + ::protozero::proto_utils::FieldMetadata< + 11, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint32, + uint32_t, + V4l2DqbufFtraceEvent>; + + static constexpr FieldMetadata_TimecodeSeconds kTimecodeSeconds{}; + void set_timecode_seconds(uint32_t value) { + static constexpr uint32_t field_id = FieldMetadata_TimecodeSeconds::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint32> + ::Append(*this, field_id, value); + } + + using FieldMetadata_TimecodeType = + ::protozero::proto_utils::FieldMetadata< + 12, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint32, + uint32_t, + V4l2DqbufFtraceEvent>; + + static constexpr FieldMetadata_TimecodeType kTimecodeType{}; + void set_timecode_type(uint32_t value) { + static constexpr uint32_t field_id = FieldMetadata_TimecodeType::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint32> + ::Append(*this, field_id, value); + } + + using FieldMetadata_TimecodeUserbits0 = + ::protozero::proto_utils::FieldMetadata< + 13, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint32, + uint32_t, + V4l2DqbufFtraceEvent>; + + static constexpr FieldMetadata_TimecodeUserbits0 kTimecodeUserbits0{}; + void set_timecode_userbits0(uint32_t value) { + static constexpr uint32_t field_id = FieldMetadata_TimecodeUserbits0::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint32> + ::Append(*this, field_id, value); + } + + using FieldMetadata_TimecodeUserbits1 = + ::protozero::proto_utils::FieldMetadata< + 14, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint32, + uint32_t, + V4l2DqbufFtraceEvent>; + + static constexpr FieldMetadata_TimecodeUserbits1 kTimecodeUserbits1{}; + void set_timecode_userbits1(uint32_t value) { + static constexpr uint32_t field_id = FieldMetadata_TimecodeUserbits1::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint32> + ::Append(*this, field_id, value); + } + + using FieldMetadata_TimecodeUserbits2 = + ::protozero::proto_utils::FieldMetadata< + 15, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint32, + uint32_t, + V4l2DqbufFtraceEvent>; + + static constexpr FieldMetadata_TimecodeUserbits2 kTimecodeUserbits2{}; + void set_timecode_userbits2(uint32_t value) { + static constexpr uint32_t field_id = FieldMetadata_TimecodeUserbits2::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint32> + ::Append(*this, field_id, value); + } + + using FieldMetadata_TimecodeUserbits3 = + ::protozero::proto_utils::FieldMetadata< + 16, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint32, + uint32_t, + V4l2DqbufFtraceEvent>; + + static constexpr FieldMetadata_TimecodeUserbits3 kTimecodeUserbits3{}; + void set_timecode_userbits3(uint32_t value) { + static constexpr uint32_t field_id = FieldMetadata_TimecodeUserbits3::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint32> + ::Append(*this, field_id, value); + } + + using FieldMetadata_Timestamp = + ::protozero::proto_utils::FieldMetadata< + 17, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kInt64, + int64_t, + V4l2DqbufFtraceEvent>; + + static constexpr FieldMetadata_Timestamp kTimestamp{}; + void set_timestamp(int64_t value) { + static constexpr uint32_t field_id = FieldMetadata_Timestamp::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kInt64> + ::Append(*this, field_id, value); + } + + using FieldMetadata_Type = + ::protozero::proto_utils::FieldMetadata< + 18, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint32, + uint32_t, + V4l2DqbufFtraceEvent>; + + static constexpr FieldMetadata_Type kType{}; + void set_type(uint32_t value) { + static constexpr uint32_t field_id = FieldMetadata_Type::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint32> + ::Append(*this, field_id, value); + } +}; + +class V4l2QbufFtraceEvent_Decoder : public ::protozero::TypedProtoDecoder { + public: + V4l2QbufFtraceEvent_Decoder(const uint8_t* data, size_t len) : TypedProtoDecoder(data, len) {} + explicit V4l2QbufFtraceEvent_Decoder(const std::string& raw) : TypedProtoDecoder(reinterpret_cast(raw.data()), raw.size()) {} + explicit V4l2QbufFtraceEvent_Decoder(const ::protozero::ConstBytes& raw) : TypedProtoDecoder(raw.data, raw.size) {} + bool has_bytesused() const { return at<1>().valid(); } + uint32_t bytesused() const { return at<1>().as_uint32(); } + bool has_field() const { return at<2>().valid(); } + uint32_t field() const { return at<2>().as_uint32(); } + bool has_flags() const { return at<3>().valid(); } + uint32_t flags() const { return at<3>().as_uint32(); } + bool has_index() const { return at<4>().valid(); } + uint32_t index() const { return at<4>().as_uint32(); } + bool has_minor() const { return at<5>().valid(); } + int32_t minor() const { return at<5>().as_int32(); } + bool has_sequence() const { return at<6>().valid(); } + uint32_t sequence() const { return at<6>().as_uint32(); } + bool has_timecode_flags() const { return at<7>().valid(); } + uint32_t timecode_flags() const { return at<7>().as_uint32(); } + bool has_timecode_frames() const { return at<8>().valid(); } + uint32_t timecode_frames() const { return at<8>().as_uint32(); } + bool has_timecode_hours() const { return at<9>().valid(); } + uint32_t timecode_hours() const { return at<9>().as_uint32(); } + bool has_timecode_minutes() const { return at<10>().valid(); } + uint32_t timecode_minutes() const { return at<10>().as_uint32(); } + bool has_timecode_seconds() const { return at<11>().valid(); } + uint32_t timecode_seconds() const { return at<11>().as_uint32(); } + bool has_timecode_type() const { return at<12>().valid(); } + uint32_t timecode_type() const { return at<12>().as_uint32(); } + bool has_timecode_userbits0() const { return at<13>().valid(); } + uint32_t timecode_userbits0() const { return at<13>().as_uint32(); } + bool has_timecode_userbits1() const { return at<14>().valid(); } + uint32_t timecode_userbits1() const { return at<14>().as_uint32(); } + bool has_timecode_userbits2() const { return at<15>().valid(); } + uint32_t timecode_userbits2() const { return at<15>().as_uint32(); } + bool has_timecode_userbits3() const { return at<16>().valid(); } + uint32_t timecode_userbits3() const { return at<16>().as_uint32(); } + bool has_timestamp() const { return at<17>().valid(); } + int64_t timestamp() const { return at<17>().as_int64(); } + bool has_type() const { return at<18>().valid(); } + uint32_t type() const { return at<18>().as_uint32(); } +}; + +class V4l2QbufFtraceEvent : public ::protozero::Message { + public: + using Decoder = V4l2QbufFtraceEvent_Decoder; + enum : int32_t { + kBytesusedFieldNumber = 1, + kFieldFieldNumber = 2, + kFlagsFieldNumber = 3, + kIndexFieldNumber = 4, + kMinorFieldNumber = 5, + kSequenceFieldNumber = 6, + kTimecodeFlagsFieldNumber = 7, + kTimecodeFramesFieldNumber = 8, + kTimecodeHoursFieldNumber = 9, + kTimecodeMinutesFieldNumber = 10, + kTimecodeSecondsFieldNumber = 11, + kTimecodeTypeFieldNumber = 12, + kTimecodeUserbits0FieldNumber = 13, + kTimecodeUserbits1FieldNumber = 14, + kTimecodeUserbits2FieldNumber = 15, + kTimecodeUserbits3FieldNumber = 16, + kTimestampFieldNumber = 17, + kTypeFieldNumber = 18, + }; + static constexpr const char* GetName() { return ".perfetto.protos.V4l2QbufFtraceEvent"; } + + + using FieldMetadata_Bytesused = + ::protozero::proto_utils::FieldMetadata< + 1, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint32, + uint32_t, + V4l2QbufFtraceEvent>; + + static constexpr FieldMetadata_Bytesused kBytesused{}; + void set_bytesused(uint32_t value) { + static constexpr uint32_t field_id = FieldMetadata_Bytesused::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint32> + ::Append(*this, field_id, value); + } + + using FieldMetadata_Field = + ::protozero::proto_utils::FieldMetadata< + 2, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint32, + uint32_t, + V4l2QbufFtraceEvent>; + + static constexpr FieldMetadata_Field kField{}; + void set_field(uint32_t value) { + static constexpr uint32_t field_id = FieldMetadata_Field::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint32> + ::Append(*this, field_id, value); + } + + using FieldMetadata_Flags = + ::protozero::proto_utils::FieldMetadata< + 3, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint32, + uint32_t, + V4l2QbufFtraceEvent>; + + static constexpr FieldMetadata_Flags kFlags{}; + void set_flags(uint32_t value) { + static constexpr uint32_t field_id = FieldMetadata_Flags::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint32> + ::Append(*this, field_id, value); + } + + using FieldMetadata_Index = + ::protozero::proto_utils::FieldMetadata< + 4, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint32, + uint32_t, + V4l2QbufFtraceEvent>; + + static constexpr FieldMetadata_Index kIndex{}; + void set_index(uint32_t value) { + static constexpr uint32_t field_id = FieldMetadata_Index::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint32> + ::Append(*this, field_id, value); + } + + using FieldMetadata_Minor = + ::protozero::proto_utils::FieldMetadata< + 5, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kInt32, + int32_t, + V4l2QbufFtraceEvent>; + + static constexpr FieldMetadata_Minor kMinor{}; + void set_minor(int32_t value) { + static constexpr uint32_t field_id = FieldMetadata_Minor::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kInt32> + ::Append(*this, field_id, value); + } + + using FieldMetadata_Sequence = + ::protozero::proto_utils::FieldMetadata< + 6, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint32, + uint32_t, + V4l2QbufFtraceEvent>; + + static constexpr FieldMetadata_Sequence kSequence{}; + void set_sequence(uint32_t value) { + static constexpr uint32_t field_id = FieldMetadata_Sequence::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint32> + ::Append(*this, field_id, value); + } + + using FieldMetadata_TimecodeFlags = + ::protozero::proto_utils::FieldMetadata< + 7, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint32, + uint32_t, + V4l2QbufFtraceEvent>; + + static constexpr FieldMetadata_TimecodeFlags kTimecodeFlags{}; + void set_timecode_flags(uint32_t value) { + static constexpr uint32_t field_id = FieldMetadata_TimecodeFlags::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint32> + ::Append(*this, field_id, value); + } + + using FieldMetadata_TimecodeFrames = + ::protozero::proto_utils::FieldMetadata< + 8, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint32, + uint32_t, + V4l2QbufFtraceEvent>; + + static constexpr FieldMetadata_TimecodeFrames kTimecodeFrames{}; + void set_timecode_frames(uint32_t value) { + static constexpr uint32_t field_id = FieldMetadata_TimecodeFrames::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint32> + ::Append(*this, field_id, value); + } + + using FieldMetadata_TimecodeHours = + ::protozero::proto_utils::FieldMetadata< + 9, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint32, + uint32_t, + V4l2QbufFtraceEvent>; + + static constexpr FieldMetadata_TimecodeHours kTimecodeHours{}; + void set_timecode_hours(uint32_t value) { + static constexpr uint32_t field_id = FieldMetadata_TimecodeHours::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint32> + ::Append(*this, field_id, value); + } + + using FieldMetadata_TimecodeMinutes = + ::protozero::proto_utils::FieldMetadata< + 10, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint32, + uint32_t, + V4l2QbufFtraceEvent>; + + static constexpr FieldMetadata_TimecodeMinutes kTimecodeMinutes{}; + void set_timecode_minutes(uint32_t value) { + static constexpr uint32_t field_id = FieldMetadata_TimecodeMinutes::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint32> + ::Append(*this, field_id, value); + } + + using FieldMetadata_TimecodeSeconds = + ::protozero::proto_utils::FieldMetadata< + 11, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint32, + uint32_t, + V4l2QbufFtraceEvent>; + + static constexpr FieldMetadata_TimecodeSeconds kTimecodeSeconds{}; + void set_timecode_seconds(uint32_t value) { + static constexpr uint32_t field_id = FieldMetadata_TimecodeSeconds::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint32> + ::Append(*this, field_id, value); + } + + using FieldMetadata_TimecodeType = + ::protozero::proto_utils::FieldMetadata< + 12, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint32, + uint32_t, + V4l2QbufFtraceEvent>; + + static constexpr FieldMetadata_TimecodeType kTimecodeType{}; + void set_timecode_type(uint32_t value) { + static constexpr uint32_t field_id = FieldMetadata_TimecodeType::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint32> + ::Append(*this, field_id, value); + } + + using FieldMetadata_TimecodeUserbits0 = + ::protozero::proto_utils::FieldMetadata< + 13, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint32, + uint32_t, + V4l2QbufFtraceEvent>; + + static constexpr FieldMetadata_TimecodeUserbits0 kTimecodeUserbits0{}; + void set_timecode_userbits0(uint32_t value) { + static constexpr uint32_t field_id = FieldMetadata_TimecodeUserbits0::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint32> + ::Append(*this, field_id, value); + } + + using FieldMetadata_TimecodeUserbits1 = + ::protozero::proto_utils::FieldMetadata< + 14, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint32, + uint32_t, + V4l2QbufFtraceEvent>; + + static constexpr FieldMetadata_TimecodeUserbits1 kTimecodeUserbits1{}; + void set_timecode_userbits1(uint32_t value) { + static constexpr uint32_t field_id = FieldMetadata_TimecodeUserbits1::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint32> + ::Append(*this, field_id, value); + } + + using FieldMetadata_TimecodeUserbits2 = + ::protozero::proto_utils::FieldMetadata< + 15, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint32, + uint32_t, + V4l2QbufFtraceEvent>; + + static constexpr FieldMetadata_TimecodeUserbits2 kTimecodeUserbits2{}; + void set_timecode_userbits2(uint32_t value) { + static constexpr uint32_t field_id = FieldMetadata_TimecodeUserbits2::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint32> + ::Append(*this, field_id, value); + } + + using FieldMetadata_TimecodeUserbits3 = + ::protozero::proto_utils::FieldMetadata< + 16, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint32, + uint32_t, + V4l2QbufFtraceEvent>; + + static constexpr FieldMetadata_TimecodeUserbits3 kTimecodeUserbits3{}; + void set_timecode_userbits3(uint32_t value) { + static constexpr uint32_t field_id = FieldMetadata_TimecodeUserbits3::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint32> + ::Append(*this, field_id, value); + } + + using FieldMetadata_Timestamp = + ::protozero::proto_utils::FieldMetadata< + 17, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kInt64, + int64_t, + V4l2QbufFtraceEvent>; + + static constexpr FieldMetadata_Timestamp kTimestamp{}; + void set_timestamp(int64_t value) { + static constexpr uint32_t field_id = FieldMetadata_Timestamp::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kInt64> + ::Append(*this, field_id, value); + } + + using FieldMetadata_Type = + ::protozero::proto_utils::FieldMetadata< + 18, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint32, + uint32_t, + V4l2QbufFtraceEvent>; + + static constexpr FieldMetadata_Type kType{}; + void set_type(uint32_t value) { + static constexpr uint32_t field_id = FieldMetadata_Type::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint32> + ::Append(*this, field_id, value); + } +}; + +} // Namespace. +} // Namespace. +} // Namespace. +#endif // Include guard. +// gen_amalgamated begin header: gen/protos/perfetto/trace/ftrace/virtio_gpu.pbzero.h +// Autogenerated by the ProtoZero compiler plugin. DO NOT EDIT. + +#ifndef PERFETTO_PROTOS_PROTOS_PERFETTO_TRACE_FTRACE_VIRTIO_GPU_PROTO_H_ +#define PERFETTO_PROTOS_PROTOS_PERFETTO_TRACE_FTRACE_VIRTIO_GPU_PROTO_H_ + +#include +#include + +// gen_amalgamated expanded: #include "perfetto/protozero/field_writer.h" +// gen_amalgamated expanded: #include "perfetto/protozero/message.h" +// gen_amalgamated expanded: #include "perfetto/protozero/packed_repeated_fields.h" +// gen_amalgamated expanded: #include "perfetto/protozero/proto_decoder.h" +// gen_amalgamated expanded: #include "perfetto/protozero/proto_utils.h" + +namespace perfetto { +namespace protos { +namespace pbzero { + + +class VirtioGpuCmdResponseFtraceEvent_Decoder : public ::protozero::TypedProtoDecoder { + public: + VirtioGpuCmdResponseFtraceEvent_Decoder(const uint8_t* data, size_t len) : TypedProtoDecoder(data, len) {} + explicit VirtioGpuCmdResponseFtraceEvent_Decoder(const std::string& raw) : TypedProtoDecoder(reinterpret_cast(raw.data()), raw.size()) {} + explicit VirtioGpuCmdResponseFtraceEvent_Decoder(const ::protozero::ConstBytes& raw) : TypedProtoDecoder(raw.data, raw.size) {} + bool has_ctx_id() const { return at<1>().valid(); } + uint32_t ctx_id() const { return at<1>().as_uint32(); } + bool has_dev() const { return at<2>().valid(); } + int32_t dev() const { return at<2>().as_int32(); } + bool has_fence_id() const { return at<3>().valid(); } + uint64_t fence_id() const { return at<3>().as_uint64(); } + bool has_flags() const { return at<4>().valid(); } + uint32_t flags() const { return at<4>().as_uint32(); } + bool has_name() const { return at<5>().valid(); } + ::protozero::ConstChars name() const { return at<5>().as_string(); } + bool has_num_free() const { return at<6>().valid(); } + uint32_t num_free() const { return at<6>().as_uint32(); } + bool has_seqno() const { return at<7>().valid(); } + uint32_t seqno() const { return at<7>().as_uint32(); } + bool has_type() const { return at<8>().valid(); } + uint32_t type() const { return at<8>().as_uint32(); } + bool has_vq() const { return at<9>().valid(); } + uint32_t vq() const { return at<9>().as_uint32(); } +}; + +class VirtioGpuCmdResponseFtraceEvent : public ::protozero::Message { + public: + using Decoder = VirtioGpuCmdResponseFtraceEvent_Decoder; + enum : int32_t { + kCtxIdFieldNumber = 1, + kDevFieldNumber = 2, + kFenceIdFieldNumber = 3, + kFlagsFieldNumber = 4, + kNameFieldNumber = 5, + kNumFreeFieldNumber = 6, + kSeqnoFieldNumber = 7, + kTypeFieldNumber = 8, + kVqFieldNumber = 9, + }; + static constexpr const char* GetName() { return ".perfetto.protos.VirtioGpuCmdResponseFtraceEvent"; } + + + using FieldMetadata_CtxId = + ::protozero::proto_utils::FieldMetadata< + 1, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint32, + uint32_t, + VirtioGpuCmdResponseFtraceEvent>; + + static constexpr FieldMetadata_CtxId kCtxId{}; + void set_ctx_id(uint32_t value) { + static constexpr uint32_t field_id = FieldMetadata_CtxId::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint32> + ::Append(*this, field_id, value); + } + + using FieldMetadata_Dev = + ::protozero::proto_utils::FieldMetadata< + 2, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kInt32, + int32_t, + VirtioGpuCmdResponseFtraceEvent>; + + static constexpr FieldMetadata_Dev kDev{}; + void set_dev(int32_t value) { + static constexpr uint32_t field_id = FieldMetadata_Dev::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kInt32> + ::Append(*this, field_id, value); + } + + using FieldMetadata_FenceId = + ::protozero::proto_utils::FieldMetadata< + 3, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint64, + uint64_t, + VirtioGpuCmdResponseFtraceEvent>; + + static constexpr FieldMetadata_FenceId kFenceId{}; + void set_fence_id(uint64_t value) { + static constexpr uint32_t field_id = FieldMetadata_FenceId::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint64> + ::Append(*this, field_id, value); + } + + using FieldMetadata_Flags = + ::protozero::proto_utils::FieldMetadata< + 4, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint32, + uint32_t, + VirtioGpuCmdResponseFtraceEvent>; + + static constexpr FieldMetadata_Flags kFlags{}; + void set_flags(uint32_t value) { + static constexpr uint32_t field_id = FieldMetadata_Flags::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint32> + ::Append(*this, field_id, value); + } + + using FieldMetadata_Name = + ::protozero::proto_utils::FieldMetadata< + 5, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kString, + std::string, + VirtioGpuCmdResponseFtraceEvent>; + + static constexpr FieldMetadata_Name kName{}; + void set_name(const char* data, size_t size) { + AppendBytes(FieldMetadata_Name::kFieldId, data, size); + } + void set_name(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Name::kFieldId, chars.data, chars.size); + } + void set_name(std::string value) { + static constexpr uint32_t field_id = FieldMetadata_Name::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kString> + ::Append(*this, field_id, value); + } + + using FieldMetadata_NumFree = + ::protozero::proto_utils::FieldMetadata< + 6, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint32, + uint32_t, + VirtioGpuCmdResponseFtraceEvent>; + + static constexpr FieldMetadata_NumFree kNumFree{}; + void set_num_free(uint32_t value) { + static constexpr uint32_t field_id = FieldMetadata_NumFree::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint32> + ::Append(*this, field_id, value); + } + + using FieldMetadata_Seqno = + ::protozero::proto_utils::FieldMetadata< + 7, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint32, + uint32_t, + VirtioGpuCmdResponseFtraceEvent>; + + static constexpr FieldMetadata_Seqno kSeqno{}; + void set_seqno(uint32_t value) { + static constexpr uint32_t field_id = FieldMetadata_Seqno::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint32> + ::Append(*this, field_id, value); + } + + using FieldMetadata_Type = + ::protozero::proto_utils::FieldMetadata< + 8, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint32, + uint32_t, + VirtioGpuCmdResponseFtraceEvent>; + + static constexpr FieldMetadata_Type kType{}; + void set_type(uint32_t value) { + static constexpr uint32_t field_id = FieldMetadata_Type::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint32> + ::Append(*this, field_id, value); + } + + using FieldMetadata_Vq = + ::protozero::proto_utils::FieldMetadata< + 9, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint32, + uint32_t, + VirtioGpuCmdResponseFtraceEvent>; + + static constexpr FieldMetadata_Vq kVq{}; + void set_vq(uint32_t value) { + static constexpr uint32_t field_id = FieldMetadata_Vq::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint32> + ::Append(*this, field_id, value); + } +}; + +class VirtioGpuCmdQueueFtraceEvent_Decoder : public ::protozero::TypedProtoDecoder { + public: + VirtioGpuCmdQueueFtraceEvent_Decoder(const uint8_t* data, size_t len) : TypedProtoDecoder(data, len) {} + explicit VirtioGpuCmdQueueFtraceEvent_Decoder(const std::string& raw) : TypedProtoDecoder(reinterpret_cast(raw.data()), raw.size()) {} + explicit VirtioGpuCmdQueueFtraceEvent_Decoder(const ::protozero::ConstBytes& raw) : TypedProtoDecoder(raw.data, raw.size) {} + bool has_ctx_id() const { return at<1>().valid(); } + uint32_t ctx_id() const { return at<1>().as_uint32(); } + bool has_dev() const { return at<2>().valid(); } + int32_t dev() const { return at<2>().as_int32(); } + bool has_fence_id() const { return at<3>().valid(); } + uint64_t fence_id() const { return at<3>().as_uint64(); } + bool has_flags() const { return at<4>().valid(); } + uint32_t flags() const { return at<4>().as_uint32(); } + bool has_name() const { return at<5>().valid(); } + ::protozero::ConstChars name() const { return at<5>().as_string(); } + bool has_num_free() const { return at<6>().valid(); } + uint32_t num_free() const { return at<6>().as_uint32(); } + bool has_seqno() const { return at<7>().valid(); } + uint32_t seqno() const { return at<7>().as_uint32(); } + bool has_type() const { return at<8>().valid(); } + uint32_t type() const { return at<8>().as_uint32(); } + bool has_vq() const { return at<9>().valid(); } + uint32_t vq() const { return at<9>().as_uint32(); } +}; + +class VirtioGpuCmdQueueFtraceEvent : public ::protozero::Message { + public: + using Decoder = VirtioGpuCmdQueueFtraceEvent_Decoder; + enum : int32_t { + kCtxIdFieldNumber = 1, + kDevFieldNumber = 2, + kFenceIdFieldNumber = 3, + kFlagsFieldNumber = 4, + kNameFieldNumber = 5, + kNumFreeFieldNumber = 6, + kSeqnoFieldNumber = 7, + kTypeFieldNumber = 8, + kVqFieldNumber = 9, + }; + static constexpr const char* GetName() { return ".perfetto.protos.VirtioGpuCmdQueueFtraceEvent"; } + + + using FieldMetadata_CtxId = + ::protozero::proto_utils::FieldMetadata< + 1, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint32, + uint32_t, + VirtioGpuCmdQueueFtraceEvent>; + + static constexpr FieldMetadata_CtxId kCtxId{}; + void set_ctx_id(uint32_t value) { + static constexpr uint32_t field_id = FieldMetadata_CtxId::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint32> + ::Append(*this, field_id, value); + } + + using FieldMetadata_Dev = + ::protozero::proto_utils::FieldMetadata< + 2, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kInt32, + int32_t, + VirtioGpuCmdQueueFtraceEvent>; + + static constexpr FieldMetadata_Dev kDev{}; + void set_dev(int32_t value) { + static constexpr uint32_t field_id = FieldMetadata_Dev::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kInt32> + ::Append(*this, field_id, value); + } + + using FieldMetadata_FenceId = + ::protozero::proto_utils::FieldMetadata< + 3, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint64, + uint64_t, + VirtioGpuCmdQueueFtraceEvent>; + + static constexpr FieldMetadata_FenceId kFenceId{}; + void set_fence_id(uint64_t value) { + static constexpr uint32_t field_id = FieldMetadata_FenceId::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint64> + ::Append(*this, field_id, value); + } + + using FieldMetadata_Flags = + ::protozero::proto_utils::FieldMetadata< + 4, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint32, + uint32_t, + VirtioGpuCmdQueueFtraceEvent>; + + static constexpr FieldMetadata_Flags kFlags{}; + void set_flags(uint32_t value) { + static constexpr uint32_t field_id = FieldMetadata_Flags::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint32> + ::Append(*this, field_id, value); + } + + using FieldMetadata_Name = + ::protozero::proto_utils::FieldMetadata< + 5, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kString, + std::string, + VirtioGpuCmdQueueFtraceEvent>; + + static constexpr FieldMetadata_Name kName{}; + void set_name(const char* data, size_t size) { + AppendBytes(FieldMetadata_Name::kFieldId, data, size); + } + void set_name(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Name::kFieldId, chars.data, chars.size); + } + void set_name(std::string value) { + static constexpr uint32_t field_id = FieldMetadata_Name::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kString> + ::Append(*this, field_id, value); + } + + using FieldMetadata_NumFree = + ::protozero::proto_utils::FieldMetadata< + 6, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint32, + uint32_t, + VirtioGpuCmdQueueFtraceEvent>; + + static constexpr FieldMetadata_NumFree kNumFree{}; + void set_num_free(uint32_t value) { + static constexpr uint32_t field_id = FieldMetadata_NumFree::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint32> + ::Append(*this, field_id, value); + } + + using FieldMetadata_Seqno = + ::protozero::proto_utils::FieldMetadata< + 7, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint32, + uint32_t, + VirtioGpuCmdQueueFtraceEvent>; + + static constexpr FieldMetadata_Seqno kSeqno{}; + void set_seqno(uint32_t value) { + static constexpr uint32_t field_id = FieldMetadata_Seqno::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint32> + ::Append(*this, field_id, value); + } + + using FieldMetadata_Type = + ::protozero::proto_utils::FieldMetadata< + 8, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint32, + uint32_t, + VirtioGpuCmdQueueFtraceEvent>; + + static constexpr FieldMetadata_Type kType{}; + void set_type(uint32_t value) { + static constexpr uint32_t field_id = FieldMetadata_Type::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint32> + ::Append(*this, field_id, value); + } + + using FieldMetadata_Vq = + ::protozero::proto_utils::FieldMetadata< + 9, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint32, + uint32_t, + VirtioGpuCmdQueueFtraceEvent>; + + static constexpr FieldMetadata_Vq kVq{}; + void set_vq(uint32_t value) { + static constexpr uint32_t field_id = FieldMetadata_Vq::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint32> + ::Append(*this, field_id, value); + } +}; + +} // Namespace. +} // Namespace. +} // Namespace. +#endif // Include guard. +// gen_amalgamated begin header: gen/protos/perfetto/trace/ftrace/virtio_video.pbzero.h +// Autogenerated by the ProtoZero compiler plugin. DO NOT EDIT. + +#ifndef PERFETTO_PROTOS_PROTOS_PERFETTO_TRACE_FTRACE_VIRTIO_VIDEO_PROTO_H_ +#define PERFETTO_PROTOS_PROTOS_PERFETTO_TRACE_FTRACE_VIRTIO_VIDEO_PROTO_H_ + +#include +#include + +// gen_amalgamated expanded: #include "perfetto/protozero/field_writer.h" +// gen_amalgamated expanded: #include "perfetto/protozero/message.h" +// gen_amalgamated expanded: #include "perfetto/protozero/packed_repeated_fields.h" +// gen_amalgamated expanded: #include "perfetto/protozero/proto_decoder.h" +// gen_amalgamated expanded: #include "perfetto/protozero/proto_utils.h" + +namespace perfetto { +namespace protos { +namespace pbzero { + + +class VirtioVideoResourceQueueDoneFtraceEvent_Decoder : public ::protozero::TypedProtoDecoder { + public: + VirtioVideoResourceQueueDoneFtraceEvent_Decoder(const uint8_t* data, size_t len) : TypedProtoDecoder(data, len) {} + explicit VirtioVideoResourceQueueDoneFtraceEvent_Decoder(const std::string& raw) : TypedProtoDecoder(reinterpret_cast(raw.data()), raw.size()) {} + explicit VirtioVideoResourceQueueDoneFtraceEvent_Decoder(const ::protozero::ConstBytes& raw) : TypedProtoDecoder(raw.data, raw.size) {} + bool has_data_size0() const { return at<1>().valid(); } + uint32_t data_size0() const { return at<1>().as_uint32(); } + bool has_data_size1() const { return at<2>().valid(); } + uint32_t data_size1() const { return at<2>().as_uint32(); } + bool has_data_size2() const { return at<3>().valid(); } + uint32_t data_size2() const { return at<3>().as_uint32(); } + bool has_data_size3() const { return at<4>().valid(); } + uint32_t data_size3() const { return at<4>().as_uint32(); } + bool has_queue_type() const { return at<5>().valid(); } + uint32_t queue_type() const { return at<5>().as_uint32(); } + bool has_resource_id() const { return at<6>().valid(); } + int32_t resource_id() const { return at<6>().as_int32(); } + bool has_stream_id() const { return at<7>().valid(); } + int32_t stream_id() const { return at<7>().as_int32(); } + bool has_timestamp() const { return at<8>().valid(); } + uint64_t timestamp() const { return at<8>().as_uint64(); } +}; + +class VirtioVideoResourceQueueDoneFtraceEvent : public ::protozero::Message { + public: + using Decoder = VirtioVideoResourceQueueDoneFtraceEvent_Decoder; + enum : int32_t { + kDataSize0FieldNumber = 1, + kDataSize1FieldNumber = 2, + kDataSize2FieldNumber = 3, + kDataSize3FieldNumber = 4, + kQueueTypeFieldNumber = 5, + kResourceIdFieldNumber = 6, + kStreamIdFieldNumber = 7, + kTimestampFieldNumber = 8, + }; + static constexpr const char* GetName() { return ".perfetto.protos.VirtioVideoResourceQueueDoneFtraceEvent"; } + + + using FieldMetadata_DataSize0 = + ::protozero::proto_utils::FieldMetadata< + 1, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint32, + uint32_t, + VirtioVideoResourceQueueDoneFtraceEvent>; + + static constexpr FieldMetadata_DataSize0 kDataSize0{}; + void set_data_size0(uint32_t value) { + static constexpr uint32_t field_id = FieldMetadata_DataSize0::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint32> + ::Append(*this, field_id, value); + } + + using FieldMetadata_DataSize1 = + ::protozero::proto_utils::FieldMetadata< + 2, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint32, + uint32_t, + VirtioVideoResourceQueueDoneFtraceEvent>; + + static constexpr FieldMetadata_DataSize1 kDataSize1{}; + void set_data_size1(uint32_t value) { + static constexpr uint32_t field_id = FieldMetadata_DataSize1::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint32> + ::Append(*this, field_id, value); + } + + using FieldMetadata_DataSize2 = + ::protozero::proto_utils::FieldMetadata< + 3, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint32, + uint32_t, + VirtioVideoResourceQueueDoneFtraceEvent>; + + static constexpr FieldMetadata_DataSize2 kDataSize2{}; + void set_data_size2(uint32_t value) { + static constexpr uint32_t field_id = FieldMetadata_DataSize2::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint32> + ::Append(*this, field_id, value); + } + + using FieldMetadata_DataSize3 = + ::protozero::proto_utils::FieldMetadata< + 4, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint32, + uint32_t, + VirtioVideoResourceQueueDoneFtraceEvent>; + + static constexpr FieldMetadata_DataSize3 kDataSize3{}; + void set_data_size3(uint32_t value) { + static constexpr uint32_t field_id = FieldMetadata_DataSize3::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint32> + ::Append(*this, field_id, value); + } + + using FieldMetadata_QueueType = + ::protozero::proto_utils::FieldMetadata< + 5, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint32, + uint32_t, + VirtioVideoResourceQueueDoneFtraceEvent>; + + static constexpr FieldMetadata_QueueType kQueueType{}; + void set_queue_type(uint32_t value) { + static constexpr uint32_t field_id = FieldMetadata_QueueType::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint32> + ::Append(*this, field_id, value); + } + + using FieldMetadata_ResourceId = + ::protozero::proto_utils::FieldMetadata< + 6, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kInt32, + int32_t, + VirtioVideoResourceQueueDoneFtraceEvent>; + + static constexpr FieldMetadata_ResourceId kResourceId{}; + void set_resource_id(int32_t value) { + static constexpr uint32_t field_id = FieldMetadata_ResourceId::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kInt32> + ::Append(*this, field_id, value); + } + + using FieldMetadata_StreamId = + ::protozero::proto_utils::FieldMetadata< + 7, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kInt32, + int32_t, + VirtioVideoResourceQueueDoneFtraceEvent>; + + static constexpr FieldMetadata_StreamId kStreamId{}; + void set_stream_id(int32_t value) { + static constexpr uint32_t field_id = FieldMetadata_StreamId::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kInt32> + ::Append(*this, field_id, value); + } + + using FieldMetadata_Timestamp = + ::protozero::proto_utils::FieldMetadata< + 8, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint64, + uint64_t, + VirtioVideoResourceQueueDoneFtraceEvent>; + + static constexpr FieldMetadata_Timestamp kTimestamp{}; + void set_timestamp(uint64_t value) { + static constexpr uint32_t field_id = FieldMetadata_Timestamp::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint64> + ::Append(*this, field_id, value); + } +}; + +class VirtioVideoResourceQueueFtraceEvent_Decoder : public ::protozero::TypedProtoDecoder { + public: + VirtioVideoResourceQueueFtraceEvent_Decoder(const uint8_t* data, size_t len) : TypedProtoDecoder(data, len) {} + explicit VirtioVideoResourceQueueFtraceEvent_Decoder(const std::string& raw) : TypedProtoDecoder(reinterpret_cast(raw.data()), raw.size()) {} + explicit VirtioVideoResourceQueueFtraceEvent_Decoder(const ::protozero::ConstBytes& raw) : TypedProtoDecoder(raw.data, raw.size) {} + bool has_data_size0() const { return at<1>().valid(); } + uint32_t data_size0() const { return at<1>().as_uint32(); } + bool has_data_size1() const { return at<2>().valid(); } + uint32_t data_size1() const { return at<2>().as_uint32(); } + bool has_data_size2() const { return at<3>().valid(); } + uint32_t data_size2() const { return at<3>().as_uint32(); } + bool has_data_size3() const { return at<4>().valid(); } + uint32_t data_size3() const { return at<4>().as_uint32(); } + bool has_queue_type() const { return at<5>().valid(); } + uint32_t queue_type() const { return at<5>().as_uint32(); } + bool has_resource_id() const { return at<6>().valid(); } + int32_t resource_id() const { return at<6>().as_int32(); } + bool has_stream_id() const { return at<7>().valid(); } + int32_t stream_id() const { return at<7>().as_int32(); } + bool has_timestamp() const { return at<8>().valid(); } + uint64_t timestamp() const { return at<8>().as_uint64(); } +}; + +class VirtioVideoResourceQueueFtraceEvent : public ::protozero::Message { + public: + using Decoder = VirtioVideoResourceQueueFtraceEvent_Decoder; + enum : int32_t { + kDataSize0FieldNumber = 1, + kDataSize1FieldNumber = 2, + kDataSize2FieldNumber = 3, + kDataSize3FieldNumber = 4, + kQueueTypeFieldNumber = 5, + kResourceIdFieldNumber = 6, + kStreamIdFieldNumber = 7, + kTimestampFieldNumber = 8, + }; + static constexpr const char* GetName() { return ".perfetto.protos.VirtioVideoResourceQueueFtraceEvent"; } + + + using FieldMetadata_DataSize0 = + ::protozero::proto_utils::FieldMetadata< + 1, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint32, + uint32_t, + VirtioVideoResourceQueueFtraceEvent>; + + static constexpr FieldMetadata_DataSize0 kDataSize0{}; + void set_data_size0(uint32_t value) { + static constexpr uint32_t field_id = FieldMetadata_DataSize0::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint32> + ::Append(*this, field_id, value); + } + + using FieldMetadata_DataSize1 = + ::protozero::proto_utils::FieldMetadata< + 2, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint32, + uint32_t, + VirtioVideoResourceQueueFtraceEvent>; + + static constexpr FieldMetadata_DataSize1 kDataSize1{}; + void set_data_size1(uint32_t value) { + static constexpr uint32_t field_id = FieldMetadata_DataSize1::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint32> + ::Append(*this, field_id, value); + } + + using FieldMetadata_DataSize2 = + ::protozero::proto_utils::FieldMetadata< + 3, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint32, + uint32_t, + VirtioVideoResourceQueueFtraceEvent>; + + static constexpr FieldMetadata_DataSize2 kDataSize2{}; + void set_data_size2(uint32_t value) { + static constexpr uint32_t field_id = FieldMetadata_DataSize2::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint32> + ::Append(*this, field_id, value); + } + + using FieldMetadata_DataSize3 = + ::protozero::proto_utils::FieldMetadata< + 4, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint32, + uint32_t, + VirtioVideoResourceQueueFtraceEvent>; + + static constexpr FieldMetadata_DataSize3 kDataSize3{}; + void set_data_size3(uint32_t value) { + static constexpr uint32_t field_id = FieldMetadata_DataSize3::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint32> + ::Append(*this, field_id, value); + } + + using FieldMetadata_QueueType = + ::protozero::proto_utils::FieldMetadata< + 5, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint32, + uint32_t, + VirtioVideoResourceQueueFtraceEvent>; + + static constexpr FieldMetadata_QueueType kQueueType{}; + void set_queue_type(uint32_t value) { + static constexpr uint32_t field_id = FieldMetadata_QueueType::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint32> + ::Append(*this, field_id, value); + } + + using FieldMetadata_ResourceId = + ::protozero::proto_utils::FieldMetadata< + 6, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kInt32, + int32_t, + VirtioVideoResourceQueueFtraceEvent>; + + static constexpr FieldMetadata_ResourceId kResourceId{}; + void set_resource_id(int32_t value) { + static constexpr uint32_t field_id = FieldMetadata_ResourceId::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kInt32> + ::Append(*this, field_id, value); + } + + using FieldMetadata_StreamId = + ::protozero::proto_utils::FieldMetadata< + 7, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kInt32, + int32_t, + VirtioVideoResourceQueueFtraceEvent>; + + static constexpr FieldMetadata_StreamId kStreamId{}; + void set_stream_id(int32_t value) { + static constexpr uint32_t field_id = FieldMetadata_StreamId::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kInt32> + ::Append(*this, field_id, value); + } + + using FieldMetadata_Timestamp = + ::protozero::proto_utils::FieldMetadata< + 8, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint64, + uint64_t, + VirtioVideoResourceQueueFtraceEvent>; + + static constexpr FieldMetadata_Timestamp kTimestamp{}; + void set_timestamp(uint64_t value) { + static constexpr uint32_t field_id = FieldMetadata_Timestamp::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint64> + ::Append(*this, field_id, value); + } +}; + +class VirtioVideoCmdDoneFtraceEvent_Decoder : public ::protozero::TypedProtoDecoder { + public: + VirtioVideoCmdDoneFtraceEvent_Decoder(const uint8_t* data, size_t len) : TypedProtoDecoder(data, len) {} + explicit VirtioVideoCmdDoneFtraceEvent_Decoder(const std::string& raw) : TypedProtoDecoder(reinterpret_cast(raw.data()), raw.size()) {} + explicit VirtioVideoCmdDoneFtraceEvent_Decoder(const ::protozero::ConstBytes& raw) : TypedProtoDecoder(raw.data, raw.size) {} + bool has_stream_id() const { return at<1>().valid(); } + uint32_t stream_id() const { return at<1>().as_uint32(); } + bool has_type() const { return at<2>().valid(); } + uint32_t type() const { return at<2>().as_uint32(); } +}; + +class VirtioVideoCmdDoneFtraceEvent : public ::protozero::Message { + public: + using Decoder = VirtioVideoCmdDoneFtraceEvent_Decoder; + enum : int32_t { + kStreamIdFieldNumber = 1, + kTypeFieldNumber = 2, + }; + static constexpr const char* GetName() { return ".perfetto.protos.VirtioVideoCmdDoneFtraceEvent"; } + + + using FieldMetadata_StreamId = + ::protozero::proto_utils::FieldMetadata< + 1, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint32, + uint32_t, + VirtioVideoCmdDoneFtraceEvent>; + + static constexpr FieldMetadata_StreamId kStreamId{}; + void set_stream_id(uint32_t value) { + static constexpr uint32_t field_id = FieldMetadata_StreamId::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint32> + ::Append(*this, field_id, value); + } + + using FieldMetadata_Type = + ::protozero::proto_utils::FieldMetadata< + 2, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint32, + uint32_t, + VirtioVideoCmdDoneFtraceEvent>; + + static constexpr FieldMetadata_Type kType{}; + void set_type(uint32_t value) { + static constexpr uint32_t field_id = FieldMetadata_Type::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint32> + ::Append(*this, field_id, value); + } +}; + +class VirtioVideoCmdFtraceEvent_Decoder : public ::protozero::TypedProtoDecoder { + public: + VirtioVideoCmdFtraceEvent_Decoder(const uint8_t* data, size_t len) : TypedProtoDecoder(data, len) {} + explicit VirtioVideoCmdFtraceEvent_Decoder(const std::string& raw) : TypedProtoDecoder(reinterpret_cast(raw.data()), raw.size()) {} + explicit VirtioVideoCmdFtraceEvent_Decoder(const ::protozero::ConstBytes& raw) : TypedProtoDecoder(raw.data, raw.size) {} + bool has_stream_id() const { return at<1>().valid(); } + uint32_t stream_id() const { return at<1>().as_uint32(); } + bool has_type() const { return at<2>().valid(); } + uint32_t type() const { return at<2>().as_uint32(); } +}; + +class VirtioVideoCmdFtraceEvent : public ::protozero::Message { + public: + using Decoder = VirtioVideoCmdFtraceEvent_Decoder; + enum : int32_t { + kStreamIdFieldNumber = 1, + kTypeFieldNumber = 2, + }; + static constexpr const char* GetName() { return ".perfetto.protos.VirtioVideoCmdFtraceEvent"; } + + + using FieldMetadata_StreamId = + ::protozero::proto_utils::FieldMetadata< + 1, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint32, + uint32_t, + VirtioVideoCmdFtraceEvent>; + + static constexpr FieldMetadata_StreamId kStreamId{}; + void set_stream_id(uint32_t value) { + static constexpr uint32_t field_id = FieldMetadata_StreamId::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint32> + ::Append(*this, field_id, value); + } + + using FieldMetadata_Type = + ::protozero::proto_utils::FieldMetadata< + 2, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint32, + uint32_t, + VirtioVideoCmdFtraceEvent>; + + static constexpr FieldMetadata_Type kType{}; + void set_type(uint32_t value) { + static constexpr uint32_t field_id = FieldMetadata_Type::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint32> + ::Append(*this, field_id, value); + } +}; + } // Namespace. } // Namespace. } // Namespace. @@ -111849,6 +110190,416 @@ namespace protos { namespace pbzero { +class MmShrinkSlabEndFtraceEvent_Decoder : public ::protozero::TypedProtoDecoder { + public: + MmShrinkSlabEndFtraceEvent_Decoder(const uint8_t* data, size_t len) : TypedProtoDecoder(data, len) {} + explicit MmShrinkSlabEndFtraceEvent_Decoder(const std::string& raw) : TypedProtoDecoder(reinterpret_cast(raw.data()), raw.size()) {} + explicit MmShrinkSlabEndFtraceEvent_Decoder(const ::protozero::ConstBytes& raw) : TypedProtoDecoder(raw.data, raw.size) {} + bool has_new_scan() const { return at<1>().valid(); } + int64_t new_scan() const { return at<1>().as_int64(); } + bool has_retval() const { return at<2>().valid(); } + int32_t retval() const { return at<2>().as_int32(); } + bool has_shr() const { return at<3>().valid(); } + uint64_t shr() const { return at<3>().as_uint64(); } + bool has_shrink() const { return at<4>().valid(); } + uint64_t shrink() const { return at<4>().as_uint64(); } + bool has_total_scan() const { return at<5>().valid(); } + int64_t total_scan() const { return at<5>().as_int64(); } + bool has_unused_scan() const { return at<6>().valid(); } + int64_t unused_scan() const { return at<6>().as_int64(); } + bool has_nid() const { return at<7>().valid(); } + int32_t nid() const { return at<7>().as_int32(); } +}; + +class MmShrinkSlabEndFtraceEvent : public ::protozero::Message { + public: + using Decoder = MmShrinkSlabEndFtraceEvent_Decoder; + enum : int32_t { + kNewScanFieldNumber = 1, + kRetvalFieldNumber = 2, + kShrFieldNumber = 3, + kShrinkFieldNumber = 4, + kTotalScanFieldNumber = 5, + kUnusedScanFieldNumber = 6, + kNidFieldNumber = 7, + }; + static constexpr const char* GetName() { return ".perfetto.protos.MmShrinkSlabEndFtraceEvent"; } + + + using FieldMetadata_NewScan = + ::protozero::proto_utils::FieldMetadata< + 1, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kInt64, + int64_t, + MmShrinkSlabEndFtraceEvent>; + + static constexpr FieldMetadata_NewScan kNewScan{}; + void set_new_scan(int64_t value) { + static constexpr uint32_t field_id = FieldMetadata_NewScan::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kInt64> + ::Append(*this, field_id, value); + } + + using FieldMetadata_Retval = + ::protozero::proto_utils::FieldMetadata< + 2, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kInt32, + int32_t, + MmShrinkSlabEndFtraceEvent>; + + static constexpr FieldMetadata_Retval kRetval{}; + void set_retval(int32_t value) { + static constexpr uint32_t field_id = FieldMetadata_Retval::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kInt32> + ::Append(*this, field_id, value); + } + + using FieldMetadata_Shr = + ::protozero::proto_utils::FieldMetadata< + 3, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint64, + uint64_t, + MmShrinkSlabEndFtraceEvent>; + + static constexpr FieldMetadata_Shr kShr{}; + void set_shr(uint64_t value) { + static constexpr uint32_t field_id = FieldMetadata_Shr::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint64> + ::Append(*this, field_id, value); + } + + using FieldMetadata_Shrink = + ::protozero::proto_utils::FieldMetadata< + 4, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint64, + uint64_t, + MmShrinkSlabEndFtraceEvent>; + + static constexpr FieldMetadata_Shrink kShrink{}; + void set_shrink(uint64_t value) { + static constexpr uint32_t field_id = FieldMetadata_Shrink::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint64> + ::Append(*this, field_id, value); + } + + using FieldMetadata_TotalScan = + ::protozero::proto_utils::FieldMetadata< + 5, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kInt64, + int64_t, + MmShrinkSlabEndFtraceEvent>; + + static constexpr FieldMetadata_TotalScan kTotalScan{}; + void set_total_scan(int64_t value) { + static constexpr uint32_t field_id = FieldMetadata_TotalScan::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kInt64> + ::Append(*this, field_id, value); + } + + using FieldMetadata_UnusedScan = + ::protozero::proto_utils::FieldMetadata< + 6, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kInt64, + int64_t, + MmShrinkSlabEndFtraceEvent>; + + static constexpr FieldMetadata_UnusedScan kUnusedScan{}; + void set_unused_scan(int64_t value) { + static constexpr uint32_t field_id = FieldMetadata_UnusedScan::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kInt64> + ::Append(*this, field_id, value); + } + + using FieldMetadata_Nid = + ::protozero::proto_utils::FieldMetadata< + 7, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kInt32, + int32_t, + MmShrinkSlabEndFtraceEvent>; + + static constexpr FieldMetadata_Nid kNid{}; + void set_nid(int32_t value) { + static constexpr uint32_t field_id = FieldMetadata_Nid::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kInt32> + ::Append(*this, field_id, value); + } +}; + +class MmShrinkSlabStartFtraceEvent_Decoder : public ::protozero::TypedProtoDecoder { + public: + MmShrinkSlabStartFtraceEvent_Decoder(const uint8_t* data, size_t len) : TypedProtoDecoder(data, len) {} + explicit MmShrinkSlabStartFtraceEvent_Decoder(const std::string& raw) : TypedProtoDecoder(reinterpret_cast(raw.data()), raw.size()) {} + explicit MmShrinkSlabStartFtraceEvent_Decoder(const ::protozero::ConstBytes& raw) : TypedProtoDecoder(raw.data, raw.size) {} + bool has_cache_items() const { return at<1>().valid(); } + uint64_t cache_items() const { return at<1>().as_uint64(); } + bool has_delta() const { return at<2>().valid(); } + uint64_t delta() const { return at<2>().as_uint64(); } + bool has_gfp_flags() const { return at<3>().valid(); } + uint32_t gfp_flags() const { return at<3>().as_uint32(); } + bool has_lru_pgs() const { return at<4>().valid(); } + uint64_t lru_pgs() const { return at<4>().as_uint64(); } + bool has_nr_objects_to_shrink() const { return at<5>().valid(); } + int64_t nr_objects_to_shrink() const { return at<5>().as_int64(); } + bool has_pgs_scanned() const { return at<6>().valid(); } + uint64_t pgs_scanned() const { return at<6>().as_uint64(); } + bool has_shr() const { return at<7>().valid(); } + uint64_t shr() const { return at<7>().as_uint64(); } + bool has_shrink() const { return at<8>().valid(); } + uint64_t shrink() const { return at<8>().as_uint64(); } + bool has_total_scan() const { return at<9>().valid(); } + uint64_t total_scan() const { return at<9>().as_uint64(); } + bool has_nid() const { return at<10>().valid(); } + int32_t nid() const { return at<10>().as_int32(); } + bool has_priority() const { return at<11>().valid(); } + int32_t priority() const { return at<11>().as_int32(); } +}; + +class MmShrinkSlabStartFtraceEvent : public ::protozero::Message { + public: + using Decoder = MmShrinkSlabStartFtraceEvent_Decoder; + enum : int32_t { + kCacheItemsFieldNumber = 1, + kDeltaFieldNumber = 2, + kGfpFlagsFieldNumber = 3, + kLruPgsFieldNumber = 4, + kNrObjectsToShrinkFieldNumber = 5, + kPgsScannedFieldNumber = 6, + kShrFieldNumber = 7, + kShrinkFieldNumber = 8, + kTotalScanFieldNumber = 9, + kNidFieldNumber = 10, + kPriorityFieldNumber = 11, + }; + static constexpr const char* GetName() { return ".perfetto.protos.MmShrinkSlabStartFtraceEvent"; } + + + using FieldMetadata_CacheItems = + ::protozero::proto_utils::FieldMetadata< + 1, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint64, + uint64_t, + MmShrinkSlabStartFtraceEvent>; + + static constexpr FieldMetadata_CacheItems kCacheItems{}; + void set_cache_items(uint64_t value) { + static constexpr uint32_t field_id = FieldMetadata_CacheItems::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint64> + ::Append(*this, field_id, value); + } + + using FieldMetadata_Delta = + ::protozero::proto_utils::FieldMetadata< + 2, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint64, + uint64_t, + MmShrinkSlabStartFtraceEvent>; + + static constexpr FieldMetadata_Delta kDelta{}; + void set_delta(uint64_t value) { + static constexpr uint32_t field_id = FieldMetadata_Delta::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint64> + ::Append(*this, field_id, value); + } + + using FieldMetadata_GfpFlags = + ::protozero::proto_utils::FieldMetadata< + 3, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint32, + uint32_t, + MmShrinkSlabStartFtraceEvent>; + + static constexpr FieldMetadata_GfpFlags kGfpFlags{}; + void set_gfp_flags(uint32_t value) { + static constexpr uint32_t field_id = FieldMetadata_GfpFlags::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint32> + ::Append(*this, field_id, value); + } + + using FieldMetadata_LruPgs = + ::protozero::proto_utils::FieldMetadata< + 4, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint64, + uint64_t, + MmShrinkSlabStartFtraceEvent>; + + static constexpr FieldMetadata_LruPgs kLruPgs{}; + void set_lru_pgs(uint64_t value) { + static constexpr uint32_t field_id = FieldMetadata_LruPgs::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint64> + ::Append(*this, field_id, value); + } + + using FieldMetadata_NrObjectsToShrink = + ::protozero::proto_utils::FieldMetadata< + 5, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kInt64, + int64_t, + MmShrinkSlabStartFtraceEvent>; + + static constexpr FieldMetadata_NrObjectsToShrink kNrObjectsToShrink{}; + void set_nr_objects_to_shrink(int64_t value) { + static constexpr uint32_t field_id = FieldMetadata_NrObjectsToShrink::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kInt64> + ::Append(*this, field_id, value); + } + + using FieldMetadata_PgsScanned = + ::protozero::proto_utils::FieldMetadata< + 6, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint64, + uint64_t, + MmShrinkSlabStartFtraceEvent>; + + static constexpr FieldMetadata_PgsScanned kPgsScanned{}; + void set_pgs_scanned(uint64_t value) { + static constexpr uint32_t field_id = FieldMetadata_PgsScanned::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint64> + ::Append(*this, field_id, value); + } + + using FieldMetadata_Shr = + ::protozero::proto_utils::FieldMetadata< + 7, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint64, + uint64_t, + MmShrinkSlabStartFtraceEvent>; + + static constexpr FieldMetadata_Shr kShr{}; + void set_shr(uint64_t value) { + static constexpr uint32_t field_id = FieldMetadata_Shr::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint64> + ::Append(*this, field_id, value); + } + + using FieldMetadata_Shrink = + ::protozero::proto_utils::FieldMetadata< + 8, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint64, + uint64_t, + MmShrinkSlabStartFtraceEvent>; + + static constexpr FieldMetadata_Shrink kShrink{}; + void set_shrink(uint64_t value) { + static constexpr uint32_t field_id = FieldMetadata_Shrink::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint64> + ::Append(*this, field_id, value); + } + + using FieldMetadata_TotalScan = + ::protozero::proto_utils::FieldMetadata< + 9, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint64, + uint64_t, + MmShrinkSlabStartFtraceEvent>; + + static constexpr FieldMetadata_TotalScan kTotalScan{}; + void set_total_scan(uint64_t value) { + static constexpr uint32_t field_id = FieldMetadata_TotalScan::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint64> + ::Append(*this, field_id, value); + } + + using FieldMetadata_Nid = + ::protozero::proto_utils::FieldMetadata< + 10, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kInt32, + int32_t, + MmShrinkSlabStartFtraceEvent>; + + static constexpr FieldMetadata_Nid kNid{}; + void set_nid(int32_t value) { + static constexpr uint32_t field_id = FieldMetadata_Nid::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kInt32> + ::Append(*this, field_id, value); + } + + using FieldMetadata_Priority = + ::protozero::proto_utils::FieldMetadata< + 11, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kInt32, + int32_t, + MmShrinkSlabStartFtraceEvent>; + + static constexpr FieldMetadata_Priority kPriority{}; + void set_priority(int32_t value) { + static constexpr uint32_t field_id = FieldMetadata_Priority::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kInt32> + ::Append(*this, field_id, value); + } +}; + class MmVmscanKswapdSleepFtraceEvent_Decoder : public ::protozero::TypedProtoDecoder { public: MmVmscanKswapdSleepFtraceEvent_Decoder(const uint8_t* data, size_t len) : TypedProtoDecoder(data, len) {} @@ -111875,14 +110626,7 @@ class MmVmscanKswapdSleepFtraceEvent : public ::protozero::Message { int32_t, MmVmscanKswapdSleepFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Nid kNid() { return {}; } + static constexpr FieldMetadata_Nid kNid{}; void set_nid(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Nid::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -111925,14 +110669,7 @@ class MmVmscanKswapdWakeFtraceEvent : public ::protozero::Message { int32_t, MmVmscanKswapdWakeFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Nid kNid() { return {}; } + static constexpr FieldMetadata_Nid kNid{}; void set_nid(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Nid::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -111950,14 +110687,7 @@ class MmVmscanKswapdWakeFtraceEvent : public ::protozero::Message { int32_t, MmVmscanKswapdWakeFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Order kOrder() { return {}; } + static constexpr FieldMetadata_Order kOrder{}; void set_order(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Order::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -111975,14 +110705,7 @@ class MmVmscanKswapdWakeFtraceEvent : public ::protozero::Message { int32_t, MmVmscanKswapdWakeFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Zid kZid() { return {}; } + static constexpr FieldMetadata_Zid kZid{}; void set_zid(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Zid::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -112019,14 +110742,7 @@ class MmVmscanDirectReclaimEndFtraceEvent : public ::protozero::Message { uint64_t, MmVmscanDirectReclaimEndFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_NrReclaimed kNrReclaimed() { return {}; } + static constexpr FieldMetadata_NrReclaimed kNrReclaimed{}; void set_nr_reclaimed(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_NrReclaimed::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -112069,14 +110785,7 @@ class MmVmscanDirectReclaimBeginFtraceEvent : public ::protozero::Message { int32_t, MmVmscanDirectReclaimBeginFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Order kOrder() { return {}; } + static constexpr FieldMetadata_Order kOrder{}; void set_order(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Order::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -112094,14 +110803,7 @@ class MmVmscanDirectReclaimBeginFtraceEvent : public ::protozero::Message { int32_t, MmVmscanDirectReclaimBeginFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_MayWritepage kMayWritepage() { return {}; } + static constexpr FieldMetadata_MayWritepage kMayWritepage{}; void set_may_writepage(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_MayWritepage::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -112119,14 +110821,7 @@ class MmVmscanDirectReclaimBeginFtraceEvent : public ::protozero::Message { uint32_t, MmVmscanDirectReclaimBeginFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_GfpFlags kGfpFlags() { return {}; } + static constexpr FieldMetadata_GfpFlags kGfpFlags{}; void set_gfp_flags(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_GfpFlags::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -112199,14 +110894,7 @@ class WorkqueueQueueWorkFtraceEvent : public ::protozero::Message { uint64_t, WorkqueueQueueWorkFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Work kWork() { return {}; } + static constexpr FieldMetadata_Work kWork{}; void set_work(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Work::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -112224,14 +110912,7 @@ class WorkqueueQueueWorkFtraceEvent : public ::protozero::Message { uint64_t, WorkqueueQueueWorkFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Function kFunction() { return {}; } + static constexpr FieldMetadata_Function kFunction{}; void set_function(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Function::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -112249,14 +110930,7 @@ class WorkqueueQueueWorkFtraceEvent : public ::protozero::Message { uint64_t, WorkqueueQueueWorkFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Workqueue kWorkqueue() { return {}; } + static constexpr FieldMetadata_Workqueue kWorkqueue{}; void set_workqueue(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Workqueue::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -112274,14 +110948,7 @@ class WorkqueueQueueWorkFtraceEvent : public ::protozero::Message { uint32_t, WorkqueueQueueWorkFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ReqCpu kReqCpu() { return {}; } + static constexpr FieldMetadata_ReqCpu kReqCpu{}; void set_req_cpu(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_ReqCpu::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -112299,14 +110966,7 @@ class WorkqueueQueueWorkFtraceEvent : public ::protozero::Message { uint32_t, WorkqueueQueueWorkFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Cpu kCpu() { return {}; } + static constexpr FieldMetadata_Cpu kCpu{}; void set_cpu(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Cpu::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -112346,14 +111006,7 @@ class WorkqueueExecuteStartFtraceEvent : public ::protozero::Message { uint64_t, WorkqueueExecuteStartFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Work kWork() { return {}; } + static constexpr FieldMetadata_Work kWork{}; void set_work(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Work::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -112371,14 +111024,7 @@ class WorkqueueExecuteStartFtraceEvent : public ::protozero::Message { uint64_t, WorkqueueExecuteStartFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Function kFunction() { return {}; } + static constexpr FieldMetadata_Function kFunction{}; void set_function(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Function::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -112418,14 +111064,7 @@ class WorkqueueExecuteEndFtraceEvent : public ::protozero::Message { uint64_t, WorkqueueExecuteEndFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Work kWork() { return {}; } + static constexpr FieldMetadata_Work kWork{}; void set_work(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Work::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -112443,14 +111082,7 @@ class WorkqueueExecuteEndFtraceEvent : public ::protozero::Message { uint64_t, WorkqueueExecuteEndFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Function kFunction() { return {}; } + static constexpr FieldMetadata_Function kFunction{}; void set_function(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Function::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -112487,14 +111119,7 @@ class WorkqueueActivateWorkFtraceEvent : public ::protozero::Message { uint64_t, WorkqueueActivateWorkFtraceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Work kWork() { return {}; } + static constexpr FieldMetadata_Work kWork{}; void set_work(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Work::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -112564,14 +111189,7 @@ class GpuCounterEvent : public ::protozero::Message { GpuCounterDescriptor, GpuCounterEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_CounterDescriptor kCounterDescriptor() { return {}; } + static constexpr FieldMetadata_CounterDescriptor kCounterDescriptor{}; template T* set_counter_descriptor() { return BeginNestedMessage(1); } @@ -112585,14 +111203,7 @@ class GpuCounterEvent : public ::protozero::Message { GpuCounterEvent_GpuCounter, GpuCounterEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Counters kCounters() { return {}; } + static constexpr FieldMetadata_Counters kCounters{}; template T* add_counters() { return BeginNestedMessage(2); } @@ -112606,14 +111217,7 @@ class GpuCounterEvent : public ::protozero::Message { int32_t, GpuCounterEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_GpuId kGpuId() { return {}; } + static constexpr FieldMetadata_GpuId kGpuId{}; void set_gpu_id(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_GpuId::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -112656,14 +111260,7 @@ class GpuCounterEvent_GpuCounter : public ::protozero::Message { uint32_t, GpuCounterEvent_GpuCounter>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_CounterId kCounterId() { return {}; } + static constexpr FieldMetadata_CounterId kCounterId{}; void set_counter_id(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_CounterId::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -112681,14 +111278,7 @@ class GpuCounterEvent_GpuCounter : public ::protozero::Message { int64_t, GpuCounterEvent_GpuCounter>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_IntValue kIntValue() { return {}; } + static constexpr FieldMetadata_IntValue kIntValue{}; void set_int_value(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_IntValue::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -112706,14 +111296,7 @@ class GpuCounterEvent_GpuCounter : public ::protozero::Message { double, GpuCounterEvent_GpuCounter>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_DoubleValue kDoubleValue() { return {}; } + static constexpr FieldMetadata_DoubleValue kDoubleValue{}; void set_double_value(double value) { static constexpr uint32_t field_id = FieldMetadata_DoubleValue::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -112747,19 +111330,51 @@ namespace perfetto { namespace protos { namespace pbzero { -enum GpuLog_Severity : int32_t; +namespace perfetto_pbzero_enum_GpuLog { +enum Severity : int32_t; +} // namespace perfetto_pbzero_enum_GpuLog +using GpuLog_Severity = perfetto_pbzero_enum_GpuLog::Severity; -enum GpuLog_Severity : int32_t { - GpuLog_Severity_LOG_SEVERITY_UNSPECIFIED = 0, - GpuLog_Severity_LOG_SEVERITY_VERBOSE = 1, - GpuLog_Severity_LOG_SEVERITY_DEBUG = 2, - GpuLog_Severity_LOG_SEVERITY_INFO = 3, - GpuLog_Severity_LOG_SEVERITY_WARNING = 4, - GpuLog_Severity_LOG_SEVERITY_ERROR = 5, +namespace perfetto_pbzero_enum_GpuLog { +enum Severity : int32_t { + LOG_SEVERITY_UNSPECIFIED = 0, + LOG_SEVERITY_VERBOSE = 1, + LOG_SEVERITY_DEBUG = 2, + LOG_SEVERITY_INFO = 3, + LOG_SEVERITY_WARNING = 4, + LOG_SEVERITY_ERROR = 5, }; +} // namespace perfetto_pbzero_enum_GpuLog +using GpuLog_Severity = perfetto_pbzero_enum_GpuLog::Severity; -const GpuLog_Severity GpuLog_Severity_MIN = GpuLog_Severity_LOG_SEVERITY_UNSPECIFIED; -const GpuLog_Severity GpuLog_Severity_MAX = GpuLog_Severity_LOG_SEVERITY_ERROR; + +constexpr GpuLog_Severity GpuLog_Severity_MIN = GpuLog_Severity::LOG_SEVERITY_UNSPECIFIED; +constexpr GpuLog_Severity GpuLog_Severity_MAX = GpuLog_Severity::LOG_SEVERITY_ERROR; + + +PERFETTO_PROTOZERO_CONSTEXPR14_OR_INLINE +const char* GpuLog_Severity_Name(::perfetto::protos::pbzero::GpuLog_Severity value) { + switch (value) { + case ::perfetto::protos::pbzero::GpuLog_Severity::LOG_SEVERITY_UNSPECIFIED: + return "LOG_SEVERITY_UNSPECIFIED"; + + case ::perfetto::protos::pbzero::GpuLog_Severity::LOG_SEVERITY_VERBOSE: + return "LOG_SEVERITY_VERBOSE"; + + case ::perfetto::protos::pbzero::GpuLog_Severity::LOG_SEVERITY_DEBUG: + return "LOG_SEVERITY_DEBUG"; + + case ::perfetto::protos::pbzero::GpuLog_Severity::LOG_SEVERITY_INFO: + return "LOG_SEVERITY_INFO"; + + case ::perfetto::protos::pbzero::GpuLog_Severity::LOG_SEVERITY_WARNING: + return "LOG_SEVERITY_WARNING"; + + case ::perfetto::protos::pbzero::GpuLog_Severity::LOG_SEVERITY_ERROR: + return "LOG_SEVERITY_ERROR"; + } + return "PBZERO_UNKNOWN_ENUM_VALUE"; +} class GpuLog_Decoder : public ::protozero::TypedProtoDecoder { public: @@ -112784,13 +111399,17 @@ class GpuLog : public ::protozero::Message { }; static constexpr const char* GetName() { return ".perfetto.protos.GpuLog"; } + using Severity = ::perfetto::protos::pbzero::GpuLog_Severity; - static const Severity LOG_SEVERITY_UNSPECIFIED = GpuLog_Severity_LOG_SEVERITY_UNSPECIFIED; - static const Severity LOG_SEVERITY_VERBOSE = GpuLog_Severity_LOG_SEVERITY_VERBOSE; - static const Severity LOG_SEVERITY_DEBUG = GpuLog_Severity_LOG_SEVERITY_DEBUG; - static const Severity LOG_SEVERITY_INFO = GpuLog_Severity_LOG_SEVERITY_INFO; - static const Severity LOG_SEVERITY_WARNING = GpuLog_Severity_LOG_SEVERITY_WARNING; - static const Severity LOG_SEVERITY_ERROR = GpuLog_Severity_LOG_SEVERITY_ERROR; + static inline const char* Severity_Name(Severity value) { + return ::perfetto::protos::pbzero::GpuLog_Severity_Name(value); + } + static const Severity LOG_SEVERITY_UNSPECIFIED = Severity::LOG_SEVERITY_UNSPECIFIED; + static const Severity LOG_SEVERITY_VERBOSE = Severity::LOG_SEVERITY_VERBOSE; + static const Severity LOG_SEVERITY_DEBUG = Severity::LOG_SEVERITY_DEBUG; + static const Severity LOG_SEVERITY_INFO = Severity::LOG_SEVERITY_INFO; + static const Severity LOG_SEVERITY_WARNING = Severity::LOG_SEVERITY_WARNING; + static const Severity LOG_SEVERITY_ERROR = Severity::LOG_SEVERITY_ERROR; using FieldMetadata_Severity = ::protozero::proto_utils::FieldMetadata< @@ -112800,14 +111419,7 @@ class GpuLog : public ::protozero::Message { ::perfetto::protos::pbzero::GpuLog_Severity, GpuLog>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Severity kSeverity() { return {}; } + static constexpr FieldMetadata_Severity kSeverity{}; void set_severity(::perfetto::protos::pbzero::GpuLog_Severity value) { static constexpr uint32_t field_id = FieldMetadata_Severity::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -112825,17 +111437,13 @@ class GpuLog : public ::protozero::Message { std::string, GpuLog>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Tag kTag() { return {}; } + static constexpr FieldMetadata_Tag kTag{}; void set_tag(const char* data, size_t size) { AppendBytes(FieldMetadata_Tag::kFieldId, data, size); } + void set_tag(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Tag::kFieldId, chars.data, chars.size); + } void set_tag(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Tag::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -112853,17 +111461,13 @@ class GpuLog : public ::protozero::Message { std::string, GpuLog>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_LogMessage kLogMessage() { return {}; } + static constexpr FieldMetadata_LogMessage kLogMessage{}; void set_log_message(const char* data, size_t size) { AppendBytes(FieldMetadata_LogMessage::kFieldId, data, size); } + void set_log_message(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_LogMessage::kFieldId, chars.data, chars.size); + } void set_log_message(std::string value) { static constexpr uint32_t field_id = FieldMetadata_LogMessage::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -112901,27 +111505,76 @@ class GpuRenderStageEvent_ExtraData; class GpuRenderStageEvent_Specifications; class GpuRenderStageEvent_Specifications_ContextSpec; class GpuRenderStageEvent_Specifications_Description; -enum InternedGpuRenderStageSpecification_RenderStageCategory : int32_t; -enum InternedGraphicsContext_Api : int32_t; +namespace perfetto_pbzero_enum_InternedGpuRenderStageSpecification { +enum RenderStageCategory : int32_t; +} // namespace perfetto_pbzero_enum_InternedGpuRenderStageSpecification +using InternedGpuRenderStageSpecification_RenderStageCategory = perfetto_pbzero_enum_InternedGpuRenderStageSpecification::RenderStageCategory; +namespace perfetto_pbzero_enum_InternedGraphicsContext { +enum Api : int32_t; +} // namespace perfetto_pbzero_enum_InternedGraphicsContext +using InternedGraphicsContext_Api = perfetto_pbzero_enum_InternedGraphicsContext::Api; -enum InternedGpuRenderStageSpecification_RenderStageCategory : int32_t { - InternedGpuRenderStageSpecification_RenderStageCategory_OTHER = 0, - InternedGpuRenderStageSpecification_RenderStageCategory_GRAPHICS = 1, - InternedGpuRenderStageSpecification_RenderStageCategory_COMPUTE = 2, +namespace perfetto_pbzero_enum_InternedGpuRenderStageSpecification { +enum RenderStageCategory : int32_t { + OTHER = 0, + GRAPHICS = 1, + COMPUTE = 2, }; +} // namespace perfetto_pbzero_enum_InternedGpuRenderStageSpecification +using InternedGpuRenderStageSpecification_RenderStageCategory = perfetto_pbzero_enum_InternedGpuRenderStageSpecification::RenderStageCategory; -const InternedGpuRenderStageSpecification_RenderStageCategory InternedGpuRenderStageSpecification_RenderStageCategory_MIN = InternedGpuRenderStageSpecification_RenderStageCategory_OTHER; -const InternedGpuRenderStageSpecification_RenderStageCategory InternedGpuRenderStageSpecification_RenderStageCategory_MAX = InternedGpuRenderStageSpecification_RenderStageCategory_COMPUTE; -enum InternedGraphicsContext_Api : int32_t { - InternedGraphicsContext_Api_UNDEFINED = 0, - InternedGraphicsContext_Api_OPEN_GL = 1, - InternedGraphicsContext_Api_VULKAN = 2, - InternedGraphicsContext_Api_OPEN_CL = 3, +constexpr InternedGpuRenderStageSpecification_RenderStageCategory InternedGpuRenderStageSpecification_RenderStageCategory_MIN = InternedGpuRenderStageSpecification_RenderStageCategory::OTHER; +constexpr InternedGpuRenderStageSpecification_RenderStageCategory InternedGpuRenderStageSpecification_RenderStageCategory_MAX = InternedGpuRenderStageSpecification_RenderStageCategory::COMPUTE; + + +PERFETTO_PROTOZERO_CONSTEXPR14_OR_INLINE +const char* InternedGpuRenderStageSpecification_RenderStageCategory_Name(::perfetto::protos::pbzero::InternedGpuRenderStageSpecification_RenderStageCategory value) { + switch (value) { + case ::perfetto::protos::pbzero::InternedGpuRenderStageSpecification_RenderStageCategory::OTHER: + return "OTHER"; + + case ::perfetto::protos::pbzero::InternedGpuRenderStageSpecification_RenderStageCategory::GRAPHICS: + return "GRAPHICS"; + + case ::perfetto::protos::pbzero::InternedGpuRenderStageSpecification_RenderStageCategory::COMPUTE: + return "COMPUTE"; + } + return "PBZERO_UNKNOWN_ENUM_VALUE"; +} + +namespace perfetto_pbzero_enum_InternedGraphicsContext { +enum Api : int32_t { + UNDEFINED = 0, + OPEN_GL = 1, + VULKAN = 2, + OPEN_CL = 3, }; +} // namespace perfetto_pbzero_enum_InternedGraphicsContext +using InternedGraphicsContext_Api = perfetto_pbzero_enum_InternedGraphicsContext::Api; -const InternedGraphicsContext_Api InternedGraphicsContext_Api_MIN = InternedGraphicsContext_Api_UNDEFINED; -const InternedGraphicsContext_Api InternedGraphicsContext_Api_MAX = InternedGraphicsContext_Api_OPEN_CL; + +constexpr InternedGraphicsContext_Api InternedGraphicsContext_Api_MIN = InternedGraphicsContext_Api::UNDEFINED; +constexpr InternedGraphicsContext_Api InternedGraphicsContext_Api_MAX = InternedGraphicsContext_Api::OPEN_CL; + + +PERFETTO_PROTOZERO_CONSTEXPR14_OR_INLINE +const char* InternedGraphicsContext_Api_Name(::perfetto::protos::pbzero::InternedGraphicsContext_Api value) { + switch (value) { + case ::perfetto::protos::pbzero::InternedGraphicsContext_Api::UNDEFINED: + return "UNDEFINED"; + + case ::perfetto::protos::pbzero::InternedGraphicsContext_Api::OPEN_GL: + return "OPEN_GL"; + + case ::perfetto::protos::pbzero::InternedGraphicsContext_Api::VULKAN: + return "VULKAN"; + + case ::perfetto::protos::pbzero::InternedGraphicsContext_Api::OPEN_CL: + return "OPEN_CL"; + } + return "PBZERO_UNKNOWN_ENUM_VALUE"; +} class InternedGpuRenderStageSpecification_Decoder : public ::protozero::TypedProtoDecoder { public: @@ -112949,10 +111602,14 @@ class InternedGpuRenderStageSpecification : public ::protozero::Message { }; static constexpr const char* GetName() { return ".perfetto.protos.InternedGpuRenderStageSpecification"; } + using RenderStageCategory = ::perfetto::protos::pbzero::InternedGpuRenderStageSpecification_RenderStageCategory; - static const RenderStageCategory OTHER = InternedGpuRenderStageSpecification_RenderStageCategory_OTHER; - static const RenderStageCategory GRAPHICS = InternedGpuRenderStageSpecification_RenderStageCategory_GRAPHICS; - static const RenderStageCategory COMPUTE = InternedGpuRenderStageSpecification_RenderStageCategory_COMPUTE; + static inline const char* RenderStageCategory_Name(RenderStageCategory value) { + return ::perfetto::protos::pbzero::InternedGpuRenderStageSpecification_RenderStageCategory_Name(value); + } + static const RenderStageCategory OTHER = RenderStageCategory::OTHER; + static const RenderStageCategory GRAPHICS = RenderStageCategory::GRAPHICS; + static const RenderStageCategory COMPUTE = RenderStageCategory::COMPUTE; using FieldMetadata_Iid = ::protozero::proto_utils::FieldMetadata< @@ -112962,14 +111619,7 @@ class InternedGpuRenderStageSpecification : public ::protozero::Message { uint64_t, InternedGpuRenderStageSpecification>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Iid kIid() { return {}; } + static constexpr FieldMetadata_Iid kIid{}; void set_iid(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Iid::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -112987,17 +111637,13 @@ class InternedGpuRenderStageSpecification : public ::protozero::Message { std::string, InternedGpuRenderStageSpecification>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Name kName() { return {}; } + static constexpr FieldMetadata_Name kName{}; void set_name(const char* data, size_t size) { AppendBytes(FieldMetadata_Name::kFieldId, data, size); } + void set_name(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Name::kFieldId, chars.data, chars.size); + } void set_name(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Name::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -113015,17 +111661,13 @@ class InternedGpuRenderStageSpecification : public ::protozero::Message { std::string, InternedGpuRenderStageSpecification>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Description kDescription() { return {}; } + static constexpr FieldMetadata_Description kDescription{}; void set_description(const char* data, size_t size) { AppendBytes(FieldMetadata_Description::kFieldId, data, size); } + void set_description(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Description::kFieldId, chars.data, chars.size); + } void set_description(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Description::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -113043,14 +111685,7 @@ class InternedGpuRenderStageSpecification : public ::protozero::Message { ::perfetto::protos::pbzero::InternedGpuRenderStageSpecification_RenderStageCategory, InternedGpuRenderStageSpecification>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Category kCategory() { return {}; } + static constexpr FieldMetadata_Category kCategory{}; void set_category(::perfetto::protos::pbzero::InternedGpuRenderStageSpecification_RenderStageCategory value) { static constexpr uint32_t field_id = FieldMetadata_Category::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -113084,11 +111719,15 @@ class InternedGraphicsContext : public ::protozero::Message { }; static constexpr const char* GetName() { return ".perfetto.protos.InternedGraphicsContext"; } + using Api = ::perfetto::protos::pbzero::InternedGraphicsContext_Api; - static const Api UNDEFINED = InternedGraphicsContext_Api_UNDEFINED; - static const Api OPEN_GL = InternedGraphicsContext_Api_OPEN_GL; - static const Api VULKAN = InternedGraphicsContext_Api_VULKAN; - static const Api OPEN_CL = InternedGraphicsContext_Api_OPEN_CL; + static inline const char* Api_Name(Api value) { + return ::perfetto::protos::pbzero::InternedGraphicsContext_Api_Name(value); + } + static const Api UNDEFINED = Api::UNDEFINED; + static const Api OPEN_GL = Api::OPEN_GL; + static const Api VULKAN = Api::VULKAN; + static const Api OPEN_CL = Api::OPEN_CL; using FieldMetadata_Iid = ::protozero::proto_utils::FieldMetadata< @@ -113098,14 +111737,7 @@ class InternedGraphicsContext : public ::protozero::Message { uint64_t, InternedGraphicsContext>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Iid kIid() { return {}; } + static constexpr FieldMetadata_Iid kIid{}; void set_iid(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Iid::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -113123,14 +111755,7 @@ class InternedGraphicsContext : public ::protozero::Message { int32_t, InternedGraphicsContext>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Pid kPid() { return {}; } + static constexpr FieldMetadata_Pid kPid{}; void set_pid(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Pid::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -113148,14 +111773,7 @@ class InternedGraphicsContext : public ::protozero::Message { ::perfetto::protos::pbzero::InternedGraphicsContext_Api, InternedGraphicsContext>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Api kApi() { return {}; } + static constexpr FieldMetadata_Api kApi{}; void set_api(::perfetto::protos::pbzero::InternedGraphicsContext_Api value) { static constexpr uint32_t field_id = FieldMetadata_Api::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -113236,14 +111854,7 @@ class GpuRenderStageEvent : public ::protozero::Message { uint64_t, GpuRenderStageEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_EventId kEventId() { return {}; } + static constexpr FieldMetadata_EventId kEventId{}; void set_event_id(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_EventId::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -113261,14 +111872,7 @@ class GpuRenderStageEvent : public ::protozero::Message { uint64_t, GpuRenderStageEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Duration kDuration() { return {}; } + static constexpr FieldMetadata_Duration kDuration{}; void set_duration(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Duration::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -113286,14 +111890,7 @@ class GpuRenderStageEvent : public ::protozero::Message { uint64_t, GpuRenderStageEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_HwQueueIid kHwQueueIid() { return {}; } + static constexpr FieldMetadata_HwQueueIid kHwQueueIid{}; void set_hw_queue_iid(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_HwQueueIid::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -113311,14 +111908,7 @@ class GpuRenderStageEvent : public ::protozero::Message { uint64_t, GpuRenderStageEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_StageIid kStageIid() { return {}; } + static constexpr FieldMetadata_StageIid kStageIid{}; void set_stage_iid(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_StageIid::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -113336,14 +111926,7 @@ class GpuRenderStageEvent : public ::protozero::Message { int32_t, GpuRenderStageEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_GpuId kGpuId() { return {}; } + static constexpr FieldMetadata_GpuId kGpuId{}; void set_gpu_id(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_GpuId::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -113361,14 +111944,7 @@ class GpuRenderStageEvent : public ::protozero::Message { uint64_t, GpuRenderStageEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Context kContext() { return {}; } + static constexpr FieldMetadata_Context kContext{}; void set_context(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Context::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -113386,14 +111962,7 @@ class GpuRenderStageEvent : public ::protozero::Message { uint64_t, GpuRenderStageEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_RenderTargetHandle kRenderTargetHandle() { return {}; } + static constexpr FieldMetadata_RenderTargetHandle kRenderTargetHandle{}; void set_render_target_handle(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_RenderTargetHandle::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -113411,14 +111980,7 @@ class GpuRenderStageEvent : public ::protozero::Message { uint32_t, GpuRenderStageEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_SubmissionId kSubmissionId() { return {}; } + static constexpr FieldMetadata_SubmissionId kSubmissionId{}; void set_submission_id(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_SubmissionId::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -113436,14 +111998,7 @@ class GpuRenderStageEvent : public ::protozero::Message { GpuRenderStageEvent_ExtraData, GpuRenderStageEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ExtraData kExtraData() { return {}; } + static constexpr FieldMetadata_ExtraData kExtraData{}; template T* add_extra_data() { return BeginNestedMessage(6); } @@ -113457,14 +112012,7 @@ class GpuRenderStageEvent : public ::protozero::Message { uint64_t, GpuRenderStageEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_RenderPassHandle kRenderPassHandle() { return {}; } + static constexpr FieldMetadata_RenderPassHandle kRenderPassHandle{}; void set_render_pass_handle(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_RenderPassHandle::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -113482,14 +112030,7 @@ class GpuRenderStageEvent : public ::protozero::Message { uint64_t, GpuRenderStageEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_RenderSubpassIndexMask kRenderSubpassIndexMask() { return {}; } + static constexpr FieldMetadata_RenderSubpassIndexMask kRenderSubpassIndexMask{}; void add_render_subpass_index_mask(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_RenderSubpassIndexMask::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -113507,14 +112048,7 @@ class GpuRenderStageEvent : public ::protozero::Message { uint64_t, GpuRenderStageEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_CommandBufferHandle kCommandBufferHandle() { return {}; } + static constexpr FieldMetadata_CommandBufferHandle kCommandBufferHandle{}; void set_command_buffer_handle(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_CommandBufferHandle::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -113532,14 +112066,7 @@ class GpuRenderStageEvent : public ::protozero::Message { GpuRenderStageEvent_Specifications, GpuRenderStageEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Specifications kSpecifications() { return {}; } + static constexpr FieldMetadata_Specifications kSpecifications{}; template T* set_specifications() { return BeginNestedMessage(7); } @@ -113553,14 +112080,7 @@ class GpuRenderStageEvent : public ::protozero::Message { int32_t, GpuRenderStageEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_HwQueueId kHwQueueId() { return {}; } + static constexpr FieldMetadata_HwQueueId kHwQueueId{}; void set_hw_queue_id(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_HwQueueId::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -113578,14 +112098,7 @@ class GpuRenderStageEvent : public ::protozero::Message { int32_t, GpuRenderStageEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_StageId kStageId() { return {}; } + static constexpr FieldMetadata_StageId kStageId{}; void set_stage_id(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_StageId::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -113630,14 +112143,7 @@ class GpuRenderStageEvent_Specifications : public ::protozero::Message { GpuRenderStageEvent_Specifications_ContextSpec, GpuRenderStageEvent_Specifications>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ContextSpec kContextSpec() { return {}; } + static constexpr FieldMetadata_ContextSpec kContextSpec{}; template T* set_context_spec() { return BeginNestedMessage(1); } @@ -113651,14 +112157,7 @@ class GpuRenderStageEvent_Specifications : public ::protozero::Message { GpuRenderStageEvent_Specifications_Description, GpuRenderStageEvent_Specifications>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_HwQueue kHwQueue() { return {}; } + static constexpr FieldMetadata_HwQueue kHwQueue{}; template T* add_hw_queue() { return BeginNestedMessage(2); } @@ -113672,14 +112171,7 @@ class GpuRenderStageEvent_Specifications : public ::protozero::Message { GpuRenderStageEvent_Specifications_Description, GpuRenderStageEvent_Specifications>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Stage kStage() { return {}; } + static constexpr FieldMetadata_Stage kStage{}; template T* add_stage() { return BeginNestedMessage(3); } @@ -113715,17 +112207,13 @@ class GpuRenderStageEvent_Specifications_Description : public ::protozero::Messa std::string, GpuRenderStageEvent_Specifications_Description>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Name kName() { return {}; } + static constexpr FieldMetadata_Name kName{}; void set_name(const char* data, size_t size) { AppendBytes(FieldMetadata_Name::kFieldId, data, size); } + void set_name(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Name::kFieldId, chars.data, chars.size); + } void set_name(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Name::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -113743,17 +112231,13 @@ class GpuRenderStageEvent_Specifications_Description : public ::protozero::Messa std::string, GpuRenderStageEvent_Specifications_Description>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Description kDescription() { return {}; } + static constexpr FieldMetadata_Description kDescription{}; void set_description(const char* data, size_t size) { AppendBytes(FieldMetadata_Description::kFieldId, data, size); } + void set_description(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Description::kFieldId, chars.data, chars.size); + } void set_description(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Description::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -113793,14 +112277,7 @@ class GpuRenderStageEvent_Specifications_ContextSpec : public ::protozero::Messa uint64_t, GpuRenderStageEvent_Specifications_ContextSpec>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Context kContext() { return {}; } + static constexpr FieldMetadata_Context kContext{}; void set_context(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Context::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -113818,14 +112295,7 @@ class GpuRenderStageEvent_Specifications_ContextSpec : public ::protozero::Messa int32_t, GpuRenderStageEvent_Specifications_ContextSpec>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Pid kPid() { return {}; } + static constexpr FieldMetadata_Pid kPid{}; void set_pid(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Pid::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -113865,17 +112335,13 @@ class GpuRenderStageEvent_ExtraData : public ::protozero::Message { std::string, GpuRenderStageEvent_ExtraData>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Name kName() { return {}; } + static constexpr FieldMetadata_Name kName{}; void set_name(const char* data, size_t size) { AppendBytes(FieldMetadata_Name::kFieldId, data, size); } + void set_name(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Name::kFieldId, chars.data, chars.size); + } void set_name(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Name::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -113893,17 +112359,13 @@ class GpuRenderStageEvent_ExtraData : public ::protozero::Message { std::string, GpuRenderStageEvent_ExtraData>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Value kValue() { return {}; } + static constexpr FieldMetadata_Value kValue{}; void set_value(const char* data, size_t size) { AppendBytes(FieldMetadata_Value::kFieldId, data, size); } + void set_value(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Value::kFieldId, chars.data, chars.size); + } void set_value(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Value::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -113971,14 +112433,7 @@ class VulkanApiEvent : public ::protozero::Message { VulkanApiEvent_VkDebugUtilsObjectName, VulkanApiEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_VkDebugUtilsObjectName kVkDebugUtilsObjectName() { return {}; } + static constexpr FieldMetadata_VkDebugUtilsObjectName kVkDebugUtilsObjectName{}; template T* set_vk_debug_utils_object_name() { return BeginNestedMessage(1); } @@ -113992,14 +112447,7 @@ class VulkanApiEvent : public ::protozero::Message { VulkanApiEvent_VkQueueSubmit, VulkanApiEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_VkQueueSubmit kVkQueueSubmit() { return {}; } + static constexpr FieldMetadata_VkQueueSubmit kVkQueueSubmit{}; template T* set_vk_queue_submit() { return BeginNestedMessage(2); } @@ -114047,14 +112495,7 @@ class VulkanApiEvent_VkQueueSubmit : public ::protozero::Message { uint64_t, VulkanApiEvent_VkQueueSubmit>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_DurationNs kDurationNs() { return {}; } + static constexpr FieldMetadata_DurationNs kDurationNs{}; void set_duration_ns(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_DurationNs::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -114072,14 +112513,7 @@ class VulkanApiEvent_VkQueueSubmit : public ::protozero::Message { uint32_t, VulkanApiEvent_VkQueueSubmit>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Pid kPid() { return {}; } + static constexpr FieldMetadata_Pid kPid{}; void set_pid(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Pid::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -114097,14 +112531,7 @@ class VulkanApiEvent_VkQueueSubmit : public ::protozero::Message { uint32_t, VulkanApiEvent_VkQueueSubmit>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Tid kTid() { return {}; } + static constexpr FieldMetadata_Tid kTid{}; void set_tid(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Tid::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -114122,14 +112549,7 @@ class VulkanApiEvent_VkQueueSubmit : public ::protozero::Message { uint64_t, VulkanApiEvent_VkQueueSubmit>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_VkQueue kVkQueue() { return {}; } + static constexpr FieldMetadata_VkQueue kVkQueue{}; void set_vk_queue(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_VkQueue::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -114147,14 +112567,7 @@ class VulkanApiEvent_VkQueueSubmit : public ::protozero::Message { uint64_t, VulkanApiEvent_VkQueueSubmit>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_VkCommandBuffers kVkCommandBuffers() { return {}; } + static constexpr FieldMetadata_VkCommandBuffers kVkCommandBuffers{}; void add_vk_command_buffers(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_VkCommandBuffers::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -114172,14 +112585,7 @@ class VulkanApiEvent_VkQueueSubmit : public ::protozero::Message { uint32_t, VulkanApiEvent_VkQueueSubmit>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_SubmissionId kSubmissionId() { return {}; } + static constexpr FieldMetadata_SubmissionId kSubmissionId{}; void set_submission_id(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_SubmissionId::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -114228,14 +112634,7 @@ class VulkanApiEvent_VkDebugUtilsObjectName : public ::protozero::Message { uint32_t, VulkanApiEvent_VkDebugUtilsObjectName>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Pid kPid() { return {}; } + static constexpr FieldMetadata_Pid kPid{}; void set_pid(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Pid::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -114253,14 +112652,7 @@ class VulkanApiEvent_VkDebugUtilsObjectName : public ::protozero::Message { uint64_t, VulkanApiEvent_VkDebugUtilsObjectName>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_VkDevice kVkDevice() { return {}; } + static constexpr FieldMetadata_VkDevice kVkDevice{}; void set_vk_device(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_VkDevice::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -114278,14 +112670,7 @@ class VulkanApiEvent_VkDebugUtilsObjectName : public ::protozero::Message { int32_t, VulkanApiEvent_VkDebugUtilsObjectName>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ObjectType kObjectType() { return {}; } + static constexpr FieldMetadata_ObjectType kObjectType{}; void set_object_type(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_ObjectType::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -114303,14 +112688,7 @@ class VulkanApiEvent_VkDebugUtilsObjectName : public ::protozero::Message { uint64_t, VulkanApiEvent_VkDebugUtilsObjectName>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Object kObject() { return {}; } + static constexpr FieldMetadata_Object kObject{}; void set_object(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Object::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -114328,17 +112706,13 @@ class VulkanApiEvent_VkDebugUtilsObjectName : public ::protozero::Message { std::string, VulkanApiEvent_VkDebugUtilsObjectName>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ObjectName kObjectName() { return {}; } + static constexpr FieldMetadata_ObjectName kObjectName{}; void set_object_name(const char* data, size_t size) { AppendBytes(FieldMetadata_ObjectName::kFieldId, data, size); } + void set_object_name(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_ObjectName::kFieldId, chars.data, chars.size); + } void set_object_name(std::string value) { static constexpr uint32_t field_id = FieldMetadata_ObjectName::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -114373,45 +112747,141 @@ namespace protos { namespace pbzero { class VulkanMemoryEventAnnotation; -enum VulkanMemoryEvent_AllocationScope : int32_t; -enum VulkanMemoryEvent_Operation : int32_t; -enum VulkanMemoryEvent_Source : int32_t; +namespace perfetto_pbzero_enum_VulkanMemoryEvent { +enum AllocationScope : int32_t; +} // namespace perfetto_pbzero_enum_VulkanMemoryEvent +using VulkanMemoryEvent_AllocationScope = perfetto_pbzero_enum_VulkanMemoryEvent::AllocationScope; +namespace perfetto_pbzero_enum_VulkanMemoryEvent { +enum Operation : int32_t; +} // namespace perfetto_pbzero_enum_VulkanMemoryEvent +using VulkanMemoryEvent_Operation = perfetto_pbzero_enum_VulkanMemoryEvent::Operation; +namespace perfetto_pbzero_enum_VulkanMemoryEvent { +enum Source : int32_t; +} // namespace perfetto_pbzero_enum_VulkanMemoryEvent +using VulkanMemoryEvent_Source = perfetto_pbzero_enum_VulkanMemoryEvent::Source; -enum VulkanMemoryEvent_Source : int32_t { - VulkanMemoryEvent_Source_SOURCE_UNSPECIFIED = 0, - VulkanMemoryEvent_Source_SOURCE_DRIVER = 1, - VulkanMemoryEvent_Source_SOURCE_DEVICE = 2, - VulkanMemoryEvent_Source_SOURCE_DEVICE_MEMORY = 3, - VulkanMemoryEvent_Source_SOURCE_BUFFER = 4, - VulkanMemoryEvent_Source_SOURCE_IMAGE = 5, +namespace perfetto_pbzero_enum_VulkanMemoryEvent { +enum Source : int32_t { + SOURCE_UNSPECIFIED = 0, + SOURCE_DRIVER = 1, + SOURCE_DEVICE = 2, + SOURCE_DEVICE_MEMORY = 3, + SOURCE_BUFFER = 4, + SOURCE_IMAGE = 5, }; +} // namespace perfetto_pbzero_enum_VulkanMemoryEvent +using VulkanMemoryEvent_Source = perfetto_pbzero_enum_VulkanMemoryEvent::Source; -const VulkanMemoryEvent_Source VulkanMemoryEvent_Source_MIN = VulkanMemoryEvent_Source_SOURCE_UNSPECIFIED; -const VulkanMemoryEvent_Source VulkanMemoryEvent_Source_MAX = VulkanMemoryEvent_Source_SOURCE_IMAGE; -enum VulkanMemoryEvent_Operation : int32_t { - VulkanMemoryEvent_Operation_OP_UNSPECIFIED = 0, - VulkanMemoryEvent_Operation_OP_CREATE = 1, - VulkanMemoryEvent_Operation_OP_DESTROY = 2, - VulkanMemoryEvent_Operation_OP_BIND = 3, - VulkanMemoryEvent_Operation_OP_DESTROY_BOUND = 4, - VulkanMemoryEvent_Operation_OP_ANNOTATIONS = 5, +constexpr VulkanMemoryEvent_Source VulkanMemoryEvent_Source_MIN = VulkanMemoryEvent_Source::SOURCE_UNSPECIFIED; +constexpr VulkanMemoryEvent_Source VulkanMemoryEvent_Source_MAX = VulkanMemoryEvent_Source::SOURCE_IMAGE; + + +PERFETTO_PROTOZERO_CONSTEXPR14_OR_INLINE +const char* VulkanMemoryEvent_Source_Name(::perfetto::protos::pbzero::VulkanMemoryEvent_Source value) { + switch (value) { + case ::perfetto::protos::pbzero::VulkanMemoryEvent_Source::SOURCE_UNSPECIFIED: + return "SOURCE_UNSPECIFIED"; + + case ::perfetto::protos::pbzero::VulkanMemoryEvent_Source::SOURCE_DRIVER: + return "SOURCE_DRIVER"; + + case ::perfetto::protos::pbzero::VulkanMemoryEvent_Source::SOURCE_DEVICE: + return "SOURCE_DEVICE"; + + case ::perfetto::protos::pbzero::VulkanMemoryEvent_Source::SOURCE_DEVICE_MEMORY: + return "SOURCE_DEVICE_MEMORY"; + + case ::perfetto::protos::pbzero::VulkanMemoryEvent_Source::SOURCE_BUFFER: + return "SOURCE_BUFFER"; + + case ::perfetto::protos::pbzero::VulkanMemoryEvent_Source::SOURCE_IMAGE: + return "SOURCE_IMAGE"; + } + return "PBZERO_UNKNOWN_ENUM_VALUE"; +} + +namespace perfetto_pbzero_enum_VulkanMemoryEvent { +enum Operation : int32_t { + OP_UNSPECIFIED = 0, + OP_CREATE = 1, + OP_DESTROY = 2, + OP_BIND = 3, + OP_DESTROY_BOUND = 4, + OP_ANNOTATIONS = 5, }; +} // namespace perfetto_pbzero_enum_VulkanMemoryEvent +using VulkanMemoryEvent_Operation = perfetto_pbzero_enum_VulkanMemoryEvent::Operation; -const VulkanMemoryEvent_Operation VulkanMemoryEvent_Operation_MIN = VulkanMemoryEvent_Operation_OP_UNSPECIFIED; -const VulkanMemoryEvent_Operation VulkanMemoryEvent_Operation_MAX = VulkanMemoryEvent_Operation_OP_ANNOTATIONS; -enum VulkanMemoryEvent_AllocationScope : int32_t { - VulkanMemoryEvent_AllocationScope_SCOPE_UNSPECIFIED = 0, - VulkanMemoryEvent_AllocationScope_SCOPE_COMMAND = 1, - VulkanMemoryEvent_AllocationScope_SCOPE_OBJECT = 2, - VulkanMemoryEvent_AllocationScope_SCOPE_CACHE = 3, - VulkanMemoryEvent_AllocationScope_SCOPE_DEVICE = 4, - VulkanMemoryEvent_AllocationScope_SCOPE_INSTANCE = 5, +constexpr VulkanMemoryEvent_Operation VulkanMemoryEvent_Operation_MIN = VulkanMemoryEvent_Operation::OP_UNSPECIFIED; +constexpr VulkanMemoryEvent_Operation VulkanMemoryEvent_Operation_MAX = VulkanMemoryEvent_Operation::OP_ANNOTATIONS; + + +PERFETTO_PROTOZERO_CONSTEXPR14_OR_INLINE +const char* VulkanMemoryEvent_Operation_Name(::perfetto::protos::pbzero::VulkanMemoryEvent_Operation value) { + switch (value) { + case ::perfetto::protos::pbzero::VulkanMemoryEvent_Operation::OP_UNSPECIFIED: + return "OP_UNSPECIFIED"; + + case ::perfetto::protos::pbzero::VulkanMemoryEvent_Operation::OP_CREATE: + return "OP_CREATE"; + + case ::perfetto::protos::pbzero::VulkanMemoryEvent_Operation::OP_DESTROY: + return "OP_DESTROY"; + + case ::perfetto::protos::pbzero::VulkanMemoryEvent_Operation::OP_BIND: + return "OP_BIND"; + + case ::perfetto::protos::pbzero::VulkanMemoryEvent_Operation::OP_DESTROY_BOUND: + return "OP_DESTROY_BOUND"; + + case ::perfetto::protos::pbzero::VulkanMemoryEvent_Operation::OP_ANNOTATIONS: + return "OP_ANNOTATIONS"; + } + return "PBZERO_UNKNOWN_ENUM_VALUE"; +} + +namespace perfetto_pbzero_enum_VulkanMemoryEvent { +enum AllocationScope : int32_t { + SCOPE_UNSPECIFIED = 0, + SCOPE_COMMAND = 1, + SCOPE_OBJECT = 2, + SCOPE_CACHE = 3, + SCOPE_DEVICE = 4, + SCOPE_INSTANCE = 5, }; +} // namespace perfetto_pbzero_enum_VulkanMemoryEvent +using VulkanMemoryEvent_AllocationScope = perfetto_pbzero_enum_VulkanMemoryEvent::AllocationScope; -const VulkanMemoryEvent_AllocationScope VulkanMemoryEvent_AllocationScope_MIN = VulkanMemoryEvent_AllocationScope_SCOPE_UNSPECIFIED; -const VulkanMemoryEvent_AllocationScope VulkanMemoryEvent_AllocationScope_MAX = VulkanMemoryEvent_AllocationScope_SCOPE_INSTANCE; + +constexpr VulkanMemoryEvent_AllocationScope VulkanMemoryEvent_AllocationScope_MIN = VulkanMemoryEvent_AllocationScope::SCOPE_UNSPECIFIED; +constexpr VulkanMemoryEvent_AllocationScope VulkanMemoryEvent_AllocationScope_MAX = VulkanMemoryEvent_AllocationScope::SCOPE_INSTANCE; + + +PERFETTO_PROTOZERO_CONSTEXPR14_OR_INLINE +const char* VulkanMemoryEvent_AllocationScope_Name(::perfetto::protos::pbzero::VulkanMemoryEvent_AllocationScope value) { + switch (value) { + case ::perfetto::protos::pbzero::VulkanMemoryEvent_AllocationScope::SCOPE_UNSPECIFIED: + return "SCOPE_UNSPECIFIED"; + + case ::perfetto::protos::pbzero::VulkanMemoryEvent_AllocationScope::SCOPE_COMMAND: + return "SCOPE_COMMAND"; + + case ::perfetto::protos::pbzero::VulkanMemoryEvent_AllocationScope::SCOPE_OBJECT: + return "SCOPE_OBJECT"; + + case ::perfetto::protos::pbzero::VulkanMemoryEvent_AllocationScope::SCOPE_CACHE: + return "SCOPE_CACHE"; + + case ::perfetto::protos::pbzero::VulkanMemoryEvent_AllocationScope::SCOPE_DEVICE: + return "SCOPE_DEVICE"; + + case ::perfetto::protos::pbzero::VulkanMemoryEvent_AllocationScope::SCOPE_INSTANCE: + return "SCOPE_INSTANCE"; + } + return "PBZERO_UNKNOWN_ENUM_VALUE"; +} class VulkanMemoryEvent_Decoder : public ::protozero::TypedProtoDecoder { public: @@ -114469,27 +112939,39 @@ class VulkanMemoryEvent : public ::protozero::Message { }; static constexpr const char* GetName() { return ".perfetto.protos.VulkanMemoryEvent"; } + using Source = ::perfetto::protos::pbzero::VulkanMemoryEvent_Source; + static inline const char* Source_Name(Source value) { + return ::perfetto::protos::pbzero::VulkanMemoryEvent_Source_Name(value); + } + using Operation = ::perfetto::protos::pbzero::VulkanMemoryEvent_Operation; + static inline const char* Operation_Name(Operation value) { + return ::perfetto::protos::pbzero::VulkanMemoryEvent_Operation_Name(value); + } + using AllocationScope = ::perfetto::protos::pbzero::VulkanMemoryEvent_AllocationScope; - static const Source SOURCE_UNSPECIFIED = VulkanMemoryEvent_Source_SOURCE_UNSPECIFIED; - static const Source SOURCE_DRIVER = VulkanMemoryEvent_Source_SOURCE_DRIVER; - static const Source SOURCE_DEVICE = VulkanMemoryEvent_Source_SOURCE_DEVICE; - static const Source SOURCE_DEVICE_MEMORY = VulkanMemoryEvent_Source_SOURCE_DEVICE_MEMORY; - static const Source SOURCE_BUFFER = VulkanMemoryEvent_Source_SOURCE_BUFFER; - static const Source SOURCE_IMAGE = VulkanMemoryEvent_Source_SOURCE_IMAGE; - static const Operation OP_UNSPECIFIED = VulkanMemoryEvent_Operation_OP_UNSPECIFIED; - static const Operation OP_CREATE = VulkanMemoryEvent_Operation_OP_CREATE; - static const Operation OP_DESTROY = VulkanMemoryEvent_Operation_OP_DESTROY; - static const Operation OP_BIND = VulkanMemoryEvent_Operation_OP_BIND; - static const Operation OP_DESTROY_BOUND = VulkanMemoryEvent_Operation_OP_DESTROY_BOUND; - static const Operation OP_ANNOTATIONS = VulkanMemoryEvent_Operation_OP_ANNOTATIONS; - static const AllocationScope SCOPE_UNSPECIFIED = VulkanMemoryEvent_AllocationScope_SCOPE_UNSPECIFIED; - static const AllocationScope SCOPE_COMMAND = VulkanMemoryEvent_AllocationScope_SCOPE_COMMAND; - static const AllocationScope SCOPE_OBJECT = VulkanMemoryEvent_AllocationScope_SCOPE_OBJECT; - static const AllocationScope SCOPE_CACHE = VulkanMemoryEvent_AllocationScope_SCOPE_CACHE; - static const AllocationScope SCOPE_DEVICE = VulkanMemoryEvent_AllocationScope_SCOPE_DEVICE; - static const AllocationScope SCOPE_INSTANCE = VulkanMemoryEvent_AllocationScope_SCOPE_INSTANCE; + static inline const char* AllocationScope_Name(AllocationScope value) { + return ::perfetto::protos::pbzero::VulkanMemoryEvent_AllocationScope_Name(value); + } + static const Source SOURCE_UNSPECIFIED = Source::SOURCE_UNSPECIFIED; + static const Source SOURCE_DRIVER = Source::SOURCE_DRIVER; + static const Source SOURCE_DEVICE = Source::SOURCE_DEVICE; + static const Source SOURCE_DEVICE_MEMORY = Source::SOURCE_DEVICE_MEMORY; + static const Source SOURCE_BUFFER = Source::SOURCE_BUFFER; + static const Source SOURCE_IMAGE = Source::SOURCE_IMAGE; + static const Operation OP_UNSPECIFIED = Operation::OP_UNSPECIFIED; + static const Operation OP_CREATE = Operation::OP_CREATE; + static const Operation OP_DESTROY = Operation::OP_DESTROY; + static const Operation OP_BIND = Operation::OP_BIND; + static const Operation OP_DESTROY_BOUND = Operation::OP_DESTROY_BOUND; + static const Operation OP_ANNOTATIONS = Operation::OP_ANNOTATIONS; + static const AllocationScope SCOPE_UNSPECIFIED = AllocationScope::SCOPE_UNSPECIFIED; + static const AllocationScope SCOPE_COMMAND = AllocationScope::SCOPE_COMMAND; + static const AllocationScope SCOPE_OBJECT = AllocationScope::SCOPE_OBJECT; + static const AllocationScope SCOPE_CACHE = AllocationScope::SCOPE_CACHE; + static const AllocationScope SCOPE_DEVICE = AllocationScope::SCOPE_DEVICE; + static const AllocationScope SCOPE_INSTANCE = AllocationScope::SCOPE_INSTANCE; using FieldMetadata_Source = ::protozero::proto_utils::FieldMetadata< @@ -114499,14 +112981,7 @@ class VulkanMemoryEvent : public ::protozero::Message { ::perfetto::protos::pbzero::VulkanMemoryEvent_Source, VulkanMemoryEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Source kSource() { return {}; } + static constexpr FieldMetadata_Source kSource{}; void set_source(::perfetto::protos::pbzero::VulkanMemoryEvent_Source value) { static constexpr uint32_t field_id = FieldMetadata_Source::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -114524,14 +112999,7 @@ class VulkanMemoryEvent : public ::protozero::Message { ::perfetto::protos::pbzero::VulkanMemoryEvent_Operation, VulkanMemoryEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Operation kOperation() { return {}; } + static constexpr FieldMetadata_Operation kOperation{}; void set_operation(::perfetto::protos::pbzero::VulkanMemoryEvent_Operation value) { static constexpr uint32_t field_id = FieldMetadata_Operation::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -114549,14 +113017,7 @@ class VulkanMemoryEvent : public ::protozero::Message { int64_t, VulkanMemoryEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Timestamp kTimestamp() { return {}; } + static constexpr FieldMetadata_Timestamp kTimestamp{}; void set_timestamp(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_Timestamp::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -114574,14 +113035,7 @@ class VulkanMemoryEvent : public ::protozero::Message { uint32_t, VulkanMemoryEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Pid kPid() { return {}; } + static constexpr FieldMetadata_Pid kPid{}; void set_pid(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Pid::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -114599,14 +113053,7 @@ class VulkanMemoryEvent : public ::protozero::Message { uint64_t, VulkanMemoryEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_MemoryAddress kMemoryAddress() { return {}; } + static constexpr FieldMetadata_MemoryAddress kMemoryAddress{}; void set_memory_address(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_MemoryAddress::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -114624,14 +113071,7 @@ class VulkanMemoryEvent : public ::protozero::Message { uint64_t, VulkanMemoryEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_MemorySize kMemorySize() { return {}; } + static constexpr FieldMetadata_MemorySize kMemorySize{}; void set_memory_size(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_MemorySize::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -114649,14 +113089,7 @@ class VulkanMemoryEvent : public ::protozero::Message { uint64_t, VulkanMemoryEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_CallerIid kCallerIid() { return {}; } + static constexpr FieldMetadata_CallerIid kCallerIid{}; void set_caller_iid(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_CallerIid::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -114674,14 +113107,7 @@ class VulkanMemoryEvent : public ::protozero::Message { ::perfetto::protos::pbzero::VulkanMemoryEvent_AllocationScope, VulkanMemoryEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_AllocationScope kAllocationScope() { return {}; } + static constexpr FieldMetadata_AllocationScope kAllocationScope{}; void set_allocation_scope(::perfetto::protos::pbzero::VulkanMemoryEvent_AllocationScope value) { static constexpr uint32_t field_id = FieldMetadata_AllocationScope::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -114699,14 +113125,7 @@ class VulkanMemoryEvent : public ::protozero::Message { VulkanMemoryEventAnnotation, VulkanMemoryEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Annotations kAnnotations() { return {}; } + static constexpr FieldMetadata_Annotations kAnnotations{}; template T* add_annotations() { return BeginNestedMessage(9); } @@ -114720,14 +113139,7 @@ class VulkanMemoryEvent : public ::protozero::Message { uint64_t, VulkanMemoryEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Device kDevice() { return {}; } + static constexpr FieldMetadata_Device kDevice{}; void set_device(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Device::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -114745,14 +113157,7 @@ class VulkanMemoryEvent : public ::protozero::Message { uint64_t, VulkanMemoryEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_DeviceMemory kDeviceMemory() { return {}; } + static constexpr FieldMetadata_DeviceMemory kDeviceMemory{}; void set_device_memory(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_DeviceMemory::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -114770,14 +113175,7 @@ class VulkanMemoryEvent : public ::protozero::Message { uint32_t, VulkanMemoryEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_MemoryType kMemoryType() { return {}; } + static constexpr FieldMetadata_MemoryType kMemoryType{}; void set_memory_type(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_MemoryType::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -114795,14 +113193,7 @@ class VulkanMemoryEvent : public ::protozero::Message { uint32_t, VulkanMemoryEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Heap kHeap() { return {}; } + static constexpr FieldMetadata_Heap kHeap{}; void set_heap(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Heap::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -114820,14 +113211,7 @@ class VulkanMemoryEvent : public ::protozero::Message { uint64_t, VulkanMemoryEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ObjectHandle kObjectHandle() { return {}; } + static constexpr FieldMetadata_ObjectHandle kObjectHandle{}; void set_object_handle(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_ObjectHandle::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -114873,14 +113257,7 @@ class VulkanMemoryEventAnnotation : public ::protozero::Message { uint64_t, VulkanMemoryEventAnnotation>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_KeyIid kKeyIid() { return {}; } + static constexpr FieldMetadata_KeyIid kKeyIid{}; void set_key_iid(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_KeyIid::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -114898,14 +113275,7 @@ class VulkanMemoryEventAnnotation : public ::protozero::Message { int64_t, VulkanMemoryEventAnnotation>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_IntValue kIntValue() { return {}; } + static constexpr FieldMetadata_IntValue kIntValue{}; void set_int_value(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_IntValue::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -114923,14 +113293,7 @@ class VulkanMemoryEventAnnotation : public ::protozero::Message { double, VulkanMemoryEventAnnotation>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_DoubleValue kDoubleValue() { return {}; } + static constexpr FieldMetadata_DoubleValue kDoubleValue{}; void set_double_value(double value) { static constexpr uint32_t field_id = FieldMetadata_DoubleValue::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -114948,14 +113311,7 @@ class VulkanMemoryEventAnnotation : public ::protozero::Message { uint64_t, VulkanMemoryEventAnnotation>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_StringIid kStringIid() { return {}; } + static constexpr FieldMetadata_StringIid kStringIid{}; void set_string_iid(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_StringIid::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -115024,17 +113380,13 @@ class DeobfuscationMapping : public ::protozero::Message { std::string, DeobfuscationMapping>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_PackageName kPackageName() { return {}; } + static constexpr FieldMetadata_PackageName kPackageName{}; void set_package_name(const char* data, size_t size) { AppendBytes(FieldMetadata_PackageName::kFieldId, data, size); } + void set_package_name(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_PackageName::kFieldId, chars.data, chars.size); + } void set_package_name(std::string value) { static constexpr uint32_t field_id = FieldMetadata_PackageName::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -115052,14 +113404,7 @@ class DeobfuscationMapping : public ::protozero::Message { int64_t, DeobfuscationMapping>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_VersionCode kVersionCode() { return {}; } + static constexpr FieldMetadata_VersionCode kVersionCode{}; void set_version_code(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_VersionCode::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -115077,14 +113422,7 @@ class DeobfuscationMapping : public ::protozero::Message { ObfuscatedClass, DeobfuscationMapping>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ObfuscatedClasses kObfuscatedClasses() { return {}; } + static constexpr FieldMetadata_ObfuscatedClasses kObfuscatedClasses{}; template T* add_obfuscated_classes() { return BeginNestedMessage(3); } @@ -115126,17 +113464,13 @@ class ObfuscatedClass : public ::protozero::Message { std::string, ObfuscatedClass>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ObfuscatedName kObfuscatedName() { return {}; } + static constexpr FieldMetadata_ObfuscatedName kObfuscatedName{}; void set_obfuscated_name(const char* data, size_t size) { AppendBytes(FieldMetadata_ObfuscatedName::kFieldId, data, size); } + void set_obfuscated_name(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_ObfuscatedName::kFieldId, chars.data, chars.size); + } void set_obfuscated_name(std::string value) { static constexpr uint32_t field_id = FieldMetadata_ObfuscatedName::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -115154,17 +113488,13 @@ class ObfuscatedClass : public ::protozero::Message { std::string, ObfuscatedClass>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_DeobfuscatedName kDeobfuscatedName() { return {}; } + static constexpr FieldMetadata_DeobfuscatedName kDeobfuscatedName{}; void set_deobfuscated_name(const char* data, size_t size) { AppendBytes(FieldMetadata_DeobfuscatedName::kFieldId, data, size); } + void set_deobfuscated_name(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_DeobfuscatedName::kFieldId, chars.data, chars.size); + } void set_deobfuscated_name(std::string value) { static constexpr uint32_t field_id = FieldMetadata_DeobfuscatedName::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -115182,14 +113512,7 @@ class ObfuscatedClass : public ::protozero::Message { ObfuscatedMember, ObfuscatedClass>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ObfuscatedMembers kObfuscatedMembers() { return {}; } + static constexpr FieldMetadata_ObfuscatedMembers kObfuscatedMembers{}; template T* add_obfuscated_members() { return BeginNestedMessage(3); } @@ -115203,14 +113526,7 @@ class ObfuscatedClass : public ::protozero::Message { ObfuscatedMember, ObfuscatedClass>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ObfuscatedMethods kObfuscatedMethods() { return {}; } + static constexpr FieldMetadata_ObfuscatedMethods kObfuscatedMethods{}; template T* add_obfuscated_methods() { return BeginNestedMessage(4); } @@ -115246,17 +113562,13 @@ class ObfuscatedMember : public ::protozero::Message { std::string, ObfuscatedMember>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ObfuscatedName kObfuscatedName() { return {}; } + static constexpr FieldMetadata_ObfuscatedName kObfuscatedName{}; void set_obfuscated_name(const char* data, size_t size) { AppendBytes(FieldMetadata_ObfuscatedName::kFieldId, data, size); } + void set_obfuscated_name(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_ObfuscatedName::kFieldId, chars.data, chars.size); + } void set_obfuscated_name(std::string value) { static constexpr uint32_t field_id = FieldMetadata_ObfuscatedName::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -115274,17 +113586,13 @@ class ObfuscatedMember : public ::protozero::Message { std::string, ObfuscatedMember>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_DeobfuscatedName kDeobfuscatedName() { return {}; } + static constexpr FieldMetadata_DeobfuscatedName kDeobfuscatedName{}; void set_deobfuscated_name(const char* data, size_t size) { AppendBytes(FieldMetadata_DeobfuscatedName::kFieldId, data, size); } + void set_deobfuscated_name(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_DeobfuscatedName::kFieldId, chars.data, chars.size); + } void set_deobfuscated_name(std::string value) { static constexpr uint32_t field_id = FieldMetadata_DeobfuscatedName::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -115354,17 +113662,13 @@ class DeobfuscationMapping : public ::protozero::Message { std::string, DeobfuscationMapping>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_PackageName kPackageName() { return {}; } + static constexpr FieldMetadata_PackageName kPackageName{}; void set_package_name(const char* data, size_t size) { AppendBytes(FieldMetadata_PackageName::kFieldId, data, size); } + void set_package_name(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_PackageName::kFieldId, chars.data, chars.size); + } void set_package_name(std::string value) { static constexpr uint32_t field_id = FieldMetadata_PackageName::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -115382,14 +113686,7 @@ class DeobfuscationMapping : public ::protozero::Message { int64_t, DeobfuscationMapping>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_VersionCode kVersionCode() { return {}; } + static constexpr FieldMetadata_VersionCode kVersionCode{}; void set_version_code(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_VersionCode::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -115407,14 +113704,7 @@ class DeobfuscationMapping : public ::protozero::Message { ObfuscatedClass, DeobfuscationMapping>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ObfuscatedClasses kObfuscatedClasses() { return {}; } + static constexpr FieldMetadata_ObfuscatedClasses kObfuscatedClasses{}; template T* add_obfuscated_classes() { return BeginNestedMessage(3); } @@ -115456,17 +113746,13 @@ class ObfuscatedClass : public ::protozero::Message { std::string, ObfuscatedClass>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ObfuscatedName kObfuscatedName() { return {}; } + static constexpr FieldMetadata_ObfuscatedName kObfuscatedName{}; void set_obfuscated_name(const char* data, size_t size) { AppendBytes(FieldMetadata_ObfuscatedName::kFieldId, data, size); } + void set_obfuscated_name(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_ObfuscatedName::kFieldId, chars.data, chars.size); + } void set_obfuscated_name(std::string value) { static constexpr uint32_t field_id = FieldMetadata_ObfuscatedName::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -115484,17 +113770,13 @@ class ObfuscatedClass : public ::protozero::Message { std::string, ObfuscatedClass>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_DeobfuscatedName kDeobfuscatedName() { return {}; } + static constexpr FieldMetadata_DeobfuscatedName kDeobfuscatedName{}; void set_deobfuscated_name(const char* data, size_t size) { AppendBytes(FieldMetadata_DeobfuscatedName::kFieldId, data, size); } + void set_deobfuscated_name(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_DeobfuscatedName::kFieldId, chars.data, chars.size); + } void set_deobfuscated_name(std::string value) { static constexpr uint32_t field_id = FieldMetadata_DeobfuscatedName::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -115512,14 +113794,7 @@ class ObfuscatedClass : public ::protozero::Message { ObfuscatedMember, ObfuscatedClass>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ObfuscatedMembers kObfuscatedMembers() { return {}; } + static constexpr FieldMetadata_ObfuscatedMembers kObfuscatedMembers{}; template T* add_obfuscated_members() { return BeginNestedMessage(3); } @@ -115533,14 +113808,7 @@ class ObfuscatedClass : public ::protozero::Message { ObfuscatedMember, ObfuscatedClass>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ObfuscatedMethods kObfuscatedMethods() { return {}; } + static constexpr FieldMetadata_ObfuscatedMethods kObfuscatedMethods{}; template T* add_obfuscated_methods() { return BeginNestedMessage(4); } @@ -115576,17 +113844,13 @@ class ObfuscatedMember : public ::protozero::Message { std::string, ObfuscatedMember>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ObfuscatedName kObfuscatedName() { return {}; } + static constexpr FieldMetadata_ObfuscatedName kObfuscatedName{}; void set_obfuscated_name(const char* data, size_t size) { AppendBytes(FieldMetadata_ObfuscatedName::kFieldId, data, size); } + void set_obfuscated_name(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_ObfuscatedName::kFieldId, chars.data, chars.size); + } void set_obfuscated_name(std::string value) { static constexpr uint32_t field_id = FieldMetadata_ObfuscatedName::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -115604,17 +113868,13 @@ class ObfuscatedMember : public ::protozero::Message { std::string, ObfuscatedMember>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_DeobfuscatedName kDeobfuscatedName() { return {}; } + static constexpr FieldMetadata_DeobfuscatedName kDeobfuscatedName{}; void set_deobfuscated_name(const char* data, size_t size) { AppendBytes(FieldMetadata_DeobfuscatedName::kFieldId, data, size); } + void set_deobfuscated_name(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_DeobfuscatedName::kFieldId, chars.data, chars.size); + } void set_deobfuscated_name(std::string value) { static constexpr uint32_t field_id = FieldMetadata_DeobfuscatedName::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -115652,47 +113912,156 @@ class HeapGraphObject; class HeapGraphRoot; class HeapGraphType; class InternedString; -enum HeapGraphRoot_Type : int32_t; -enum HeapGraphType_Kind : int32_t; +namespace perfetto_pbzero_enum_HeapGraphRoot { +enum Type : int32_t; +} // namespace perfetto_pbzero_enum_HeapGraphRoot +using HeapGraphRoot_Type = perfetto_pbzero_enum_HeapGraphRoot::Type; +namespace perfetto_pbzero_enum_HeapGraphType { +enum Kind : int32_t; +} // namespace perfetto_pbzero_enum_HeapGraphType +using HeapGraphType_Kind = perfetto_pbzero_enum_HeapGraphType::Kind; -enum HeapGraphType_Kind : int32_t { - HeapGraphType_Kind_KIND_UNKNOWN = 0, - HeapGraphType_Kind_KIND_NORMAL = 1, - HeapGraphType_Kind_KIND_NOREFERENCES = 2, - HeapGraphType_Kind_KIND_STRING = 3, - HeapGraphType_Kind_KIND_ARRAY = 4, - HeapGraphType_Kind_KIND_CLASS = 5, - HeapGraphType_Kind_KIND_CLASSLOADER = 6, - HeapGraphType_Kind_KIND_DEXCACHE = 7, - HeapGraphType_Kind_KIND_SOFT_REFERENCE = 8, - HeapGraphType_Kind_KIND_WEAK_REFERENCE = 9, - HeapGraphType_Kind_KIND_FINALIZER_REFERENCE = 10, - HeapGraphType_Kind_KIND_PHANTOM_REFERENCE = 11, +namespace perfetto_pbzero_enum_HeapGraphType { +enum Kind : int32_t { + KIND_UNKNOWN = 0, + KIND_NORMAL = 1, + KIND_NOREFERENCES = 2, + KIND_STRING = 3, + KIND_ARRAY = 4, + KIND_CLASS = 5, + KIND_CLASSLOADER = 6, + KIND_DEXCACHE = 7, + KIND_SOFT_REFERENCE = 8, + KIND_WEAK_REFERENCE = 9, + KIND_FINALIZER_REFERENCE = 10, + KIND_PHANTOM_REFERENCE = 11, }; +} // namespace perfetto_pbzero_enum_HeapGraphType +using HeapGraphType_Kind = perfetto_pbzero_enum_HeapGraphType::Kind; -const HeapGraphType_Kind HeapGraphType_Kind_MIN = HeapGraphType_Kind_KIND_UNKNOWN; -const HeapGraphType_Kind HeapGraphType_Kind_MAX = HeapGraphType_Kind_KIND_PHANTOM_REFERENCE; -enum HeapGraphRoot_Type : int32_t { - HeapGraphRoot_Type_ROOT_UNKNOWN = 0, - HeapGraphRoot_Type_ROOT_JNI_GLOBAL = 1, - HeapGraphRoot_Type_ROOT_JNI_LOCAL = 2, - HeapGraphRoot_Type_ROOT_JAVA_FRAME = 3, - HeapGraphRoot_Type_ROOT_NATIVE_STACK = 4, - HeapGraphRoot_Type_ROOT_STICKY_CLASS = 5, - HeapGraphRoot_Type_ROOT_THREAD_BLOCK = 6, - HeapGraphRoot_Type_ROOT_MONITOR_USED = 7, - HeapGraphRoot_Type_ROOT_THREAD_OBJECT = 8, - HeapGraphRoot_Type_ROOT_INTERNED_STRING = 9, - HeapGraphRoot_Type_ROOT_FINALIZING = 10, - HeapGraphRoot_Type_ROOT_DEBUGGER = 11, - HeapGraphRoot_Type_ROOT_REFERENCE_CLEANUP = 12, - HeapGraphRoot_Type_ROOT_VM_INTERNAL = 13, - HeapGraphRoot_Type_ROOT_JNI_MONITOR = 14, +constexpr HeapGraphType_Kind HeapGraphType_Kind_MIN = HeapGraphType_Kind::KIND_UNKNOWN; +constexpr HeapGraphType_Kind HeapGraphType_Kind_MAX = HeapGraphType_Kind::KIND_PHANTOM_REFERENCE; + + +PERFETTO_PROTOZERO_CONSTEXPR14_OR_INLINE +const char* HeapGraphType_Kind_Name(::perfetto::protos::pbzero::HeapGraphType_Kind value) { + switch (value) { + case ::perfetto::protos::pbzero::HeapGraphType_Kind::KIND_UNKNOWN: + return "KIND_UNKNOWN"; + + case ::perfetto::protos::pbzero::HeapGraphType_Kind::KIND_NORMAL: + return "KIND_NORMAL"; + + case ::perfetto::protos::pbzero::HeapGraphType_Kind::KIND_NOREFERENCES: + return "KIND_NOREFERENCES"; + + case ::perfetto::protos::pbzero::HeapGraphType_Kind::KIND_STRING: + return "KIND_STRING"; + + case ::perfetto::protos::pbzero::HeapGraphType_Kind::KIND_ARRAY: + return "KIND_ARRAY"; + + case ::perfetto::protos::pbzero::HeapGraphType_Kind::KIND_CLASS: + return "KIND_CLASS"; + + case ::perfetto::protos::pbzero::HeapGraphType_Kind::KIND_CLASSLOADER: + return "KIND_CLASSLOADER"; + + case ::perfetto::protos::pbzero::HeapGraphType_Kind::KIND_DEXCACHE: + return "KIND_DEXCACHE"; + + case ::perfetto::protos::pbzero::HeapGraphType_Kind::KIND_SOFT_REFERENCE: + return "KIND_SOFT_REFERENCE"; + + case ::perfetto::protos::pbzero::HeapGraphType_Kind::KIND_WEAK_REFERENCE: + return "KIND_WEAK_REFERENCE"; + + case ::perfetto::protos::pbzero::HeapGraphType_Kind::KIND_FINALIZER_REFERENCE: + return "KIND_FINALIZER_REFERENCE"; + + case ::perfetto::protos::pbzero::HeapGraphType_Kind::KIND_PHANTOM_REFERENCE: + return "KIND_PHANTOM_REFERENCE"; + } + return "PBZERO_UNKNOWN_ENUM_VALUE"; +} + +namespace perfetto_pbzero_enum_HeapGraphRoot { +enum Type : int32_t { + ROOT_UNKNOWN = 0, + ROOT_JNI_GLOBAL = 1, + ROOT_JNI_LOCAL = 2, + ROOT_JAVA_FRAME = 3, + ROOT_NATIVE_STACK = 4, + ROOT_STICKY_CLASS = 5, + ROOT_THREAD_BLOCK = 6, + ROOT_MONITOR_USED = 7, + ROOT_THREAD_OBJECT = 8, + ROOT_INTERNED_STRING = 9, + ROOT_FINALIZING = 10, + ROOT_DEBUGGER = 11, + ROOT_REFERENCE_CLEANUP = 12, + ROOT_VM_INTERNAL = 13, + ROOT_JNI_MONITOR = 14, }; +} // namespace perfetto_pbzero_enum_HeapGraphRoot +using HeapGraphRoot_Type = perfetto_pbzero_enum_HeapGraphRoot::Type; -const HeapGraphRoot_Type HeapGraphRoot_Type_MIN = HeapGraphRoot_Type_ROOT_UNKNOWN; -const HeapGraphRoot_Type HeapGraphRoot_Type_MAX = HeapGraphRoot_Type_ROOT_JNI_MONITOR; + +constexpr HeapGraphRoot_Type HeapGraphRoot_Type_MIN = HeapGraphRoot_Type::ROOT_UNKNOWN; +constexpr HeapGraphRoot_Type HeapGraphRoot_Type_MAX = HeapGraphRoot_Type::ROOT_JNI_MONITOR; + + +PERFETTO_PROTOZERO_CONSTEXPR14_OR_INLINE +const char* HeapGraphRoot_Type_Name(::perfetto::protos::pbzero::HeapGraphRoot_Type value) { + switch (value) { + case ::perfetto::protos::pbzero::HeapGraphRoot_Type::ROOT_UNKNOWN: + return "ROOT_UNKNOWN"; + + case ::perfetto::protos::pbzero::HeapGraphRoot_Type::ROOT_JNI_GLOBAL: + return "ROOT_JNI_GLOBAL"; + + case ::perfetto::protos::pbzero::HeapGraphRoot_Type::ROOT_JNI_LOCAL: + return "ROOT_JNI_LOCAL"; + + case ::perfetto::protos::pbzero::HeapGraphRoot_Type::ROOT_JAVA_FRAME: + return "ROOT_JAVA_FRAME"; + + case ::perfetto::protos::pbzero::HeapGraphRoot_Type::ROOT_NATIVE_STACK: + return "ROOT_NATIVE_STACK"; + + case ::perfetto::protos::pbzero::HeapGraphRoot_Type::ROOT_STICKY_CLASS: + return "ROOT_STICKY_CLASS"; + + case ::perfetto::protos::pbzero::HeapGraphRoot_Type::ROOT_THREAD_BLOCK: + return "ROOT_THREAD_BLOCK"; + + case ::perfetto::protos::pbzero::HeapGraphRoot_Type::ROOT_MONITOR_USED: + return "ROOT_MONITOR_USED"; + + case ::perfetto::protos::pbzero::HeapGraphRoot_Type::ROOT_THREAD_OBJECT: + return "ROOT_THREAD_OBJECT"; + + case ::perfetto::protos::pbzero::HeapGraphRoot_Type::ROOT_INTERNED_STRING: + return "ROOT_INTERNED_STRING"; + + case ::perfetto::protos::pbzero::HeapGraphRoot_Type::ROOT_FINALIZING: + return "ROOT_FINALIZING"; + + case ::perfetto::protos::pbzero::HeapGraphRoot_Type::ROOT_DEBUGGER: + return "ROOT_DEBUGGER"; + + case ::perfetto::protos::pbzero::HeapGraphRoot_Type::ROOT_REFERENCE_CLEANUP: + return "ROOT_REFERENCE_CLEANUP"; + + case ::perfetto::protos::pbzero::HeapGraphRoot_Type::ROOT_VM_INTERNAL: + return "ROOT_VM_INTERNAL"; + + case ::perfetto::protos::pbzero::HeapGraphRoot_Type::ROOT_JNI_MONITOR: + return "ROOT_JNI_MONITOR"; + } + return "PBZERO_UNKNOWN_ENUM_VALUE"; +} class HeapGraph_Decoder : public ::protozero::TypedProtoDecoder { public: @@ -115741,14 +114110,7 @@ class HeapGraph : public ::protozero::Message { int32_t, HeapGraph>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Pid kPid() { return {}; } + static constexpr FieldMetadata_Pid kPid{}; void set_pid(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Pid::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -115766,14 +114128,7 @@ class HeapGraph : public ::protozero::Message { HeapGraphObject, HeapGraph>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Objects kObjects() { return {}; } + static constexpr FieldMetadata_Objects kObjects{}; template T* add_objects() { return BeginNestedMessage(2); } @@ -115787,14 +114142,7 @@ class HeapGraph : public ::protozero::Message { HeapGraphRoot, HeapGraph>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Roots kRoots() { return {}; } + static constexpr FieldMetadata_Roots kRoots{}; template T* add_roots() { return BeginNestedMessage(7); } @@ -115808,14 +114156,7 @@ class HeapGraph : public ::protozero::Message { HeapGraphType, HeapGraph>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Types kTypes() { return {}; } + static constexpr FieldMetadata_Types kTypes{}; template T* add_types() { return BeginNestedMessage(9); } @@ -115829,14 +114170,7 @@ class HeapGraph : public ::protozero::Message { InternedString, HeapGraph>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_FieldNames kFieldNames() { return {}; } + static constexpr FieldMetadata_FieldNames kFieldNames{}; template T* add_field_names() { return BeginNestedMessage(4); } @@ -115850,14 +114184,7 @@ class HeapGraph : public ::protozero::Message { InternedString, HeapGraph>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_LocationNames kLocationNames() { return {}; } + static constexpr FieldMetadata_LocationNames kLocationNames{}; template T* add_location_names() { return BeginNestedMessage(8); } @@ -115871,14 +114198,7 @@ class HeapGraph : public ::protozero::Message { bool, HeapGraph>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Continued kContinued() { return {}; } + static constexpr FieldMetadata_Continued kContinued{}; void set_continued(bool value) { static constexpr uint32_t field_id = FieldMetadata_Continued::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -115896,14 +114216,7 @@ class HeapGraph : public ::protozero::Message { uint64_t, HeapGraph>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Index kIndex() { return {}; } + static constexpr FieldMetadata_Index kIndex{}; void set_index(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Index::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -115961,14 +114274,7 @@ class HeapGraphObject : public ::protozero::Message { uint64_t, HeapGraphObject>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Id kId() { return {}; } + static constexpr FieldMetadata_Id kId{}; void set_id(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Id::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -115986,14 +114292,7 @@ class HeapGraphObject : public ::protozero::Message { uint64_t, HeapGraphObject>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_IdDelta kIdDelta() { return {}; } + static constexpr FieldMetadata_IdDelta kIdDelta{}; void set_id_delta(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_IdDelta::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -116011,14 +114310,7 @@ class HeapGraphObject : public ::protozero::Message { uint64_t, HeapGraphObject>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_TypeId kTypeId() { return {}; } + static constexpr FieldMetadata_TypeId kTypeId{}; void set_type_id(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_TypeId::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -116036,14 +114328,7 @@ class HeapGraphObject : public ::protozero::Message { uint64_t, HeapGraphObject>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_SelfSize kSelfSize() { return {}; } + static constexpr FieldMetadata_SelfSize kSelfSize{}; void set_self_size(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_SelfSize::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -116061,14 +114346,7 @@ class HeapGraphObject : public ::protozero::Message { uint64_t, HeapGraphObject>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ReferenceFieldIdBase kReferenceFieldIdBase() { return {}; } + static constexpr FieldMetadata_ReferenceFieldIdBase kReferenceFieldIdBase{}; void set_reference_field_id_base(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_ReferenceFieldIdBase::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -116086,14 +114364,7 @@ class HeapGraphObject : public ::protozero::Message { uint64_t, HeapGraphObject>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ReferenceFieldId kReferenceFieldId() { return {}; } + static constexpr FieldMetadata_ReferenceFieldId kReferenceFieldId{}; void set_reference_field_id(const ::protozero::PackedVarInt& packed_buffer) { AppendBytes(FieldMetadata_ReferenceFieldId::kFieldId, packed_buffer.data(), packed_buffer.size()); @@ -116107,14 +114378,7 @@ class HeapGraphObject : public ::protozero::Message { uint64_t, HeapGraphObject>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ReferenceObjectId kReferenceObjectId() { return {}; } + static constexpr FieldMetadata_ReferenceObjectId kReferenceObjectId{}; void set_reference_object_id(const ::protozero::PackedVarInt& packed_buffer) { AppendBytes(FieldMetadata_ReferenceObjectId::kFieldId, packed_buffer.data(), packed_buffer.size()); @@ -116128,14 +114392,7 @@ class HeapGraphObject : public ::protozero::Message { int64_t, HeapGraphObject>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_NativeAllocationRegistrySizeField kNativeAllocationRegistrySizeField() { return {}; } + static constexpr FieldMetadata_NativeAllocationRegistrySizeField kNativeAllocationRegistrySizeField{}; void set_native_allocation_registry_size_field(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_NativeAllocationRegistrySizeField::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -116184,19 +114441,23 @@ class HeapGraphType : public ::protozero::Message { }; static constexpr const char* GetName() { return ".perfetto.protos.HeapGraphType"; } + using Kind = ::perfetto::protos::pbzero::HeapGraphType_Kind; - static const Kind KIND_UNKNOWN = HeapGraphType_Kind_KIND_UNKNOWN; - static const Kind KIND_NORMAL = HeapGraphType_Kind_KIND_NORMAL; - static const Kind KIND_NOREFERENCES = HeapGraphType_Kind_KIND_NOREFERENCES; - static const Kind KIND_STRING = HeapGraphType_Kind_KIND_STRING; - static const Kind KIND_ARRAY = HeapGraphType_Kind_KIND_ARRAY; - static const Kind KIND_CLASS = HeapGraphType_Kind_KIND_CLASS; - static const Kind KIND_CLASSLOADER = HeapGraphType_Kind_KIND_CLASSLOADER; - static const Kind KIND_DEXCACHE = HeapGraphType_Kind_KIND_DEXCACHE; - static const Kind KIND_SOFT_REFERENCE = HeapGraphType_Kind_KIND_SOFT_REFERENCE; - static const Kind KIND_WEAK_REFERENCE = HeapGraphType_Kind_KIND_WEAK_REFERENCE; - static const Kind KIND_FINALIZER_REFERENCE = HeapGraphType_Kind_KIND_FINALIZER_REFERENCE; - static const Kind KIND_PHANTOM_REFERENCE = HeapGraphType_Kind_KIND_PHANTOM_REFERENCE; + static inline const char* Kind_Name(Kind value) { + return ::perfetto::protos::pbzero::HeapGraphType_Kind_Name(value); + } + static const Kind KIND_UNKNOWN = Kind::KIND_UNKNOWN; + static const Kind KIND_NORMAL = Kind::KIND_NORMAL; + static const Kind KIND_NOREFERENCES = Kind::KIND_NOREFERENCES; + static const Kind KIND_STRING = Kind::KIND_STRING; + static const Kind KIND_ARRAY = Kind::KIND_ARRAY; + static const Kind KIND_CLASS = Kind::KIND_CLASS; + static const Kind KIND_CLASSLOADER = Kind::KIND_CLASSLOADER; + static const Kind KIND_DEXCACHE = Kind::KIND_DEXCACHE; + static const Kind KIND_SOFT_REFERENCE = Kind::KIND_SOFT_REFERENCE; + static const Kind KIND_WEAK_REFERENCE = Kind::KIND_WEAK_REFERENCE; + static const Kind KIND_FINALIZER_REFERENCE = Kind::KIND_FINALIZER_REFERENCE; + static const Kind KIND_PHANTOM_REFERENCE = Kind::KIND_PHANTOM_REFERENCE; using FieldMetadata_Id = ::protozero::proto_utils::FieldMetadata< @@ -116206,14 +114467,7 @@ class HeapGraphType : public ::protozero::Message { uint64_t, HeapGraphType>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Id kId() { return {}; } + static constexpr FieldMetadata_Id kId{}; void set_id(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Id::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -116231,14 +114485,7 @@ class HeapGraphType : public ::protozero::Message { uint64_t, HeapGraphType>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_LocationId kLocationId() { return {}; } + static constexpr FieldMetadata_LocationId kLocationId{}; void set_location_id(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_LocationId::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -116256,17 +114503,13 @@ class HeapGraphType : public ::protozero::Message { std::string, HeapGraphType>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ClassName kClassName() { return {}; } + static constexpr FieldMetadata_ClassName kClassName{}; void set_class_name(const char* data, size_t size) { AppendBytes(FieldMetadata_ClassName::kFieldId, data, size); } + void set_class_name(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_ClassName::kFieldId, chars.data, chars.size); + } void set_class_name(std::string value) { static constexpr uint32_t field_id = FieldMetadata_ClassName::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -116284,14 +114527,7 @@ class HeapGraphType : public ::protozero::Message { uint64_t, HeapGraphType>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ObjectSize kObjectSize() { return {}; } + static constexpr FieldMetadata_ObjectSize kObjectSize{}; void set_object_size(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_ObjectSize::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -116309,14 +114545,7 @@ class HeapGraphType : public ::protozero::Message { uint64_t, HeapGraphType>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_SuperclassId kSuperclassId() { return {}; } + static constexpr FieldMetadata_SuperclassId kSuperclassId{}; void set_superclass_id(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_SuperclassId::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -116334,14 +114563,7 @@ class HeapGraphType : public ::protozero::Message { uint64_t, HeapGraphType>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ReferenceFieldId kReferenceFieldId() { return {}; } + static constexpr FieldMetadata_ReferenceFieldId kReferenceFieldId{}; void set_reference_field_id(const ::protozero::PackedVarInt& packed_buffer) { AppendBytes(FieldMetadata_ReferenceFieldId::kFieldId, packed_buffer.data(), packed_buffer.size()); @@ -116355,14 +114577,7 @@ class HeapGraphType : public ::protozero::Message { ::perfetto::protos::pbzero::HeapGraphType_Kind, HeapGraphType>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Kind kKind() { return {}; } + static constexpr FieldMetadata_Kind kKind{}; void set_kind(::perfetto::protos::pbzero::HeapGraphType_Kind value) { static constexpr uint32_t field_id = FieldMetadata_Kind::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -116380,14 +114595,7 @@ class HeapGraphType : public ::protozero::Message { uint64_t, HeapGraphType>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ClassloaderId kClassloaderId() { return {}; } + static constexpr FieldMetadata_ClassloaderId kClassloaderId{}; void set_classloader_id(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_ClassloaderId::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -116418,22 +114626,26 @@ class HeapGraphRoot : public ::protozero::Message { }; static constexpr const char* GetName() { return ".perfetto.protos.HeapGraphRoot"; } + using Type = ::perfetto::protos::pbzero::HeapGraphRoot_Type; - static const Type ROOT_UNKNOWN = HeapGraphRoot_Type_ROOT_UNKNOWN; - static const Type ROOT_JNI_GLOBAL = HeapGraphRoot_Type_ROOT_JNI_GLOBAL; - static const Type ROOT_JNI_LOCAL = HeapGraphRoot_Type_ROOT_JNI_LOCAL; - static const Type ROOT_JAVA_FRAME = HeapGraphRoot_Type_ROOT_JAVA_FRAME; - static const Type ROOT_NATIVE_STACK = HeapGraphRoot_Type_ROOT_NATIVE_STACK; - static const Type ROOT_STICKY_CLASS = HeapGraphRoot_Type_ROOT_STICKY_CLASS; - static const Type ROOT_THREAD_BLOCK = HeapGraphRoot_Type_ROOT_THREAD_BLOCK; - static const Type ROOT_MONITOR_USED = HeapGraphRoot_Type_ROOT_MONITOR_USED; - static const Type ROOT_THREAD_OBJECT = HeapGraphRoot_Type_ROOT_THREAD_OBJECT; - static const Type ROOT_INTERNED_STRING = HeapGraphRoot_Type_ROOT_INTERNED_STRING; - static const Type ROOT_FINALIZING = HeapGraphRoot_Type_ROOT_FINALIZING; - static const Type ROOT_DEBUGGER = HeapGraphRoot_Type_ROOT_DEBUGGER; - static const Type ROOT_REFERENCE_CLEANUP = HeapGraphRoot_Type_ROOT_REFERENCE_CLEANUP; - static const Type ROOT_VM_INTERNAL = HeapGraphRoot_Type_ROOT_VM_INTERNAL; - static const Type ROOT_JNI_MONITOR = HeapGraphRoot_Type_ROOT_JNI_MONITOR; + static inline const char* Type_Name(Type value) { + return ::perfetto::protos::pbzero::HeapGraphRoot_Type_Name(value); + } + static const Type ROOT_UNKNOWN = Type::ROOT_UNKNOWN; + static const Type ROOT_JNI_GLOBAL = Type::ROOT_JNI_GLOBAL; + static const Type ROOT_JNI_LOCAL = Type::ROOT_JNI_LOCAL; + static const Type ROOT_JAVA_FRAME = Type::ROOT_JAVA_FRAME; + static const Type ROOT_NATIVE_STACK = Type::ROOT_NATIVE_STACK; + static const Type ROOT_STICKY_CLASS = Type::ROOT_STICKY_CLASS; + static const Type ROOT_THREAD_BLOCK = Type::ROOT_THREAD_BLOCK; + static const Type ROOT_MONITOR_USED = Type::ROOT_MONITOR_USED; + static const Type ROOT_THREAD_OBJECT = Type::ROOT_THREAD_OBJECT; + static const Type ROOT_INTERNED_STRING = Type::ROOT_INTERNED_STRING; + static const Type ROOT_FINALIZING = Type::ROOT_FINALIZING; + static const Type ROOT_DEBUGGER = Type::ROOT_DEBUGGER; + static const Type ROOT_REFERENCE_CLEANUP = Type::ROOT_REFERENCE_CLEANUP; + static const Type ROOT_VM_INTERNAL = Type::ROOT_VM_INTERNAL; + static const Type ROOT_JNI_MONITOR = Type::ROOT_JNI_MONITOR; using FieldMetadata_ObjectIds = ::protozero::proto_utils::FieldMetadata< @@ -116443,14 +114655,7 @@ class HeapGraphRoot : public ::protozero::Message { uint64_t, HeapGraphRoot>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ObjectIds kObjectIds() { return {}; } + static constexpr FieldMetadata_ObjectIds kObjectIds{}; void set_object_ids(const ::protozero::PackedVarInt& packed_buffer) { AppendBytes(FieldMetadata_ObjectIds::kFieldId, packed_buffer.data(), packed_buffer.size()); @@ -116464,14 +114669,7 @@ class HeapGraphRoot : public ::protozero::Message { ::perfetto::protos::pbzero::HeapGraphRoot_Type, HeapGraphRoot>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_RootType kRootType() { return {}; } + static constexpr FieldMetadata_RootType kRootType{}; void set_root_type(::perfetto::protos::pbzero::HeapGraphRoot_Type value) { static constexpr uint32_t field_id = FieldMetadata_RootType::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -116537,14 +114735,7 @@ class Callstack : public ::protozero::Message { uint64_t, Callstack>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Iid kIid() { return {}; } + static constexpr FieldMetadata_Iid kIid{}; void set_iid(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Iid::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -116562,14 +114753,7 @@ class Callstack : public ::protozero::Message { uint64_t, Callstack>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_FrameIds kFrameIds() { return {}; } + static constexpr FieldMetadata_FrameIds kFrameIds{}; void add_frame_ids(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_FrameIds::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -116615,14 +114799,7 @@ class Frame : public ::protozero::Message { uint64_t, Frame>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Iid kIid() { return {}; } + static constexpr FieldMetadata_Iid kIid{}; void set_iid(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Iid::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -116640,14 +114817,7 @@ class Frame : public ::protozero::Message { uint64_t, Frame>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_FunctionNameId kFunctionNameId() { return {}; } + static constexpr FieldMetadata_FunctionNameId kFunctionNameId{}; void set_function_name_id(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_FunctionNameId::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -116665,14 +114835,7 @@ class Frame : public ::protozero::Message { uint64_t, Frame>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_MappingId kMappingId() { return {}; } + static constexpr FieldMetadata_MappingId kMappingId{}; void set_mapping_id(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_MappingId::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -116690,14 +114853,7 @@ class Frame : public ::protozero::Message { uint64_t, Frame>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_RelPc kRelPc() { return {}; } + static constexpr FieldMetadata_RelPc kRelPc{}; void set_rel_pc(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_RelPc::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -116755,14 +114911,7 @@ class Mapping : public ::protozero::Message { uint64_t, Mapping>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Iid kIid() { return {}; } + static constexpr FieldMetadata_Iid kIid{}; void set_iid(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Iid::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -116780,14 +114929,7 @@ class Mapping : public ::protozero::Message { uint64_t, Mapping>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_BuildId kBuildId() { return {}; } + static constexpr FieldMetadata_BuildId kBuildId{}; void set_build_id(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_BuildId::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -116805,14 +114947,7 @@ class Mapping : public ::protozero::Message { uint64_t, Mapping>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ExactOffset kExactOffset() { return {}; } + static constexpr FieldMetadata_ExactOffset kExactOffset{}; void set_exact_offset(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_ExactOffset::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -116830,14 +114965,7 @@ class Mapping : public ::protozero::Message { uint64_t, Mapping>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_StartOffset kStartOffset() { return {}; } + static constexpr FieldMetadata_StartOffset kStartOffset{}; void set_start_offset(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_StartOffset::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -116855,14 +114983,7 @@ class Mapping : public ::protozero::Message { uint64_t, Mapping>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Start kStart() { return {}; } + static constexpr FieldMetadata_Start kStart{}; void set_start(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Start::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -116880,14 +115001,7 @@ class Mapping : public ::protozero::Message { uint64_t, Mapping>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_End kEnd() { return {}; } + static constexpr FieldMetadata_End kEnd{}; void set_end(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_End::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -116905,14 +115019,7 @@ class Mapping : public ::protozero::Message { uint64_t, Mapping>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_LoadBias kLoadBias() { return {}; } + static constexpr FieldMetadata_LoadBias kLoadBias{}; void set_load_bias(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_LoadBias::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -116930,14 +115037,7 @@ class Mapping : public ::protozero::Message { uint64_t, Mapping>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_PathStringIds kPathStringIds() { return {}; } + static constexpr FieldMetadata_PathStringIds kPathStringIds{}; void add_path_string_ids(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_PathStringIds::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -116980,17 +115080,13 @@ class ModuleSymbols : public ::protozero::Message { std::string, ModuleSymbols>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Path kPath() { return {}; } + static constexpr FieldMetadata_Path kPath{}; void set_path(const char* data, size_t size) { AppendBytes(FieldMetadata_Path::kFieldId, data, size); } + void set_path(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Path::kFieldId, chars.data, chars.size); + } void set_path(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Path::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -117008,17 +115104,13 @@ class ModuleSymbols : public ::protozero::Message { std::string, ModuleSymbols>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_BuildId kBuildId() { return {}; } + static constexpr FieldMetadata_BuildId kBuildId{}; void set_build_id(const char* data, size_t size) { AppendBytes(FieldMetadata_BuildId::kFieldId, data, size); } + void set_build_id(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_BuildId::kFieldId, chars.data, chars.size); + } void set_build_id(std::string value) { static constexpr uint32_t field_id = FieldMetadata_BuildId::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -117036,14 +115128,7 @@ class ModuleSymbols : public ::protozero::Message { AddressSymbols, ModuleSymbols>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_AddressSymbols kAddressSymbols() { return {}; } + static constexpr FieldMetadata_AddressSymbols kAddressSymbols{}; template T* add_address_symbols() { return BeginNestedMessage(3); } @@ -117079,14 +115164,7 @@ class AddressSymbols : public ::protozero::Message { uint64_t, AddressSymbols>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Address kAddress() { return {}; } + static constexpr FieldMetadata_Address kAddress{}; void set_address(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Address::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -117104,14 +115182,7 @@ class AddressSymbols : public ::protozero::Message { Line, AddressSymbols>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Lines kLines() { return {}; } + static constexpr FieldMetadata_Lines kLines{}; template T* add_lines() { return BeginNestedMessage(2); } @@ -117150,17 +115221,13 @@ class Line : public ::protozero::Message { std::string, Line>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_FunctionName kFunctionName() { return {}; } + static constexpr FieldMetadata_FunctionName kFunctionName{}; void set_function_name(const char* data, size_t size) { AppendBytes(FieldMetadata_FunctionName::kFieldId, data, size); } + void set_function_name(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_FunctionName::kFieldId, chars.data, chars.size); + } void set_function_name(std::string value) { static constexpr uint32_t field_id = FieldMetadata_FunctionName::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -117178,17 +115245,13 @@ class Line : public ::protozero::Message { std::string, Line>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_SourceFileName kSourceFileName() { return {}; } + static constexpr FieldMetadata_SourceFileName kSourceFileName{}; void set_source_file_name(const char* data, size_t size) { AppendBytes(FieldMetadata_SourceFileName::kFieldId, data, size); } + void set_source_file_name(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_SourceFileName::kFieldId, chars.data, chars.size); + } void set_source_file_name(std::string value) { static constexpr uint32_t field_id = FieldMetadata_SourceFileName::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -117206,14 +115269,7 @@ class Line : public ::protozero::Message { uint32_t, Line>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_LineNumber kLineNumber() { return {}; } + static constexpr FieldMetadata_LineNumber kLineNumber{}; void set_line_number(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_LineNumber::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -117259,14 +115315,7 @@ class ProfiledFrameSymbols : public ::protozero::Message { uint64_t, ProfiledFrameSymbols>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_FrameIid kFrameIid() { return {}; } + static constexpr FieldMetadata_FrameIid kFrameIid{}; void set_frame_iid(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_FrameIid::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -117284,14 +115333,7 @@ class ProfiledFrameSymbols : public ::protozero::Message { uint64_t, ProfiledFrameSymbols>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_FunctionNameId kFunctionNameId() { return {}; } + static constexpr FieldMetadata_FunctionNameId kFunctionNameId{}; void add_function_name_id(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_FunctionNameId::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -117309,14 +115351,7 @@ class ProfiledFrameSymbols : public ::protozero::Message { uint64_t, ProfiledFrameSymbols>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_FileNameId kFileNameId() { return {}; } + static constexpr FieldMetadata_FileNameId kFileNameId{}; void add_file_name_id(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_FileNameId::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -117334,14 +115369,7 @@ class ProfiledFrameSymbols : public ::protozero::Message { uint32_t, ProfiledFrameSymbols>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_LineNumber kLineNumber() { return {}; } + static constexpr FieldMetadata_LineNumber kLineNumber{}; void add_line_number(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_LineNumber::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -117381,14 +115409,7 @@ class InternedString : public ::protozero::Message { uint64_t, InternedString>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Iid kIid() { return {}; } + static constexpr FieldMetadata_Iid kIid{}; void set_iid(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Iid::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -117406,17 +115427,13 @@ class InternedString : public ::protozero::Message { std::string, InternedString>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Str kStr() { return {}; } + static constexpr FieldMetadata_Str kStr{}; void set_str(const uint8_t* data, size_t size) { AppendBytes(FieldMetadata_Str::kFieldId, data, size); } + void set_str(::protozero::ConstBytes bytes) { + AppendBytes(FieldMetadata_Str::kFieldId, bytes.data, bytes.size); + } void set_str(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Str::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -117461,79 +115478,247 @@ class ProfilePacket_Histogram; class ProfilePacket_Histogram_Bucket; class ProfilePacket_ProcessHeapSamples; class ProfilePacket_ProcessStats; -enum PerfSample_ProducerEvent_DataSourceStopReason : int32_t; -enum PerfSample_SampleSkipReason : int32_t; -enum ProfilePacket_ProcessHeapSamples_ClientError : int32_t; -enum Profiling_CpuMode : int32_t; -enum Profiling_StackUnwindError : int32_t; +namespace perfetto_pbzero_enum_PerfSample_ProducerEvent { +enum DataSourceStopReason : int32_t; +} // namespace perfetto_pbzero_enum_PerfSample_ProducerEvent +using PerfSample_ProducerEvent_DataSourceStopReason = perfetto_pbzero_enum_PerfSample_ProducerEvent::DataSourceStopReason; +namespace perfetto_pbzero_enum_PerfSample { +enum SampleSkipReason : int32_t; +} // namespace perfetto_pbzero_enum_PerfSample +using PerfSample_SampleSkipReason = perfetto_pbzero_enum_PerfSample::SampleSkipReason; +namespace perfetto_pbzero_enum_ProfilePacket_ProcessHeapSamples { +enum ClientError : int32_t; +} // namespace perfetto_pbzero_enum_ProfilePacket_ProcessHeapSamples +using ProfilePacket_ProcessHeapSamples_ClientError = perfetto_pbzero_enum_ProfilePacket_ProcessHeapSamples::ClientError; +namespace perfetto_pbzero_enum_Profiling { +enum CpuMode : int32_t; +} // namespace perfetto_pbzero_enum_Profiling +using Profiling_CpuMode = perfetto_pbzero_enum_Profiling::CpuMode; +namespace perfetto_pbzero_enum_Profiling { +enum StackUnwindError : int32_t; +} // namespace perfetto_pbzero_enum_Profiling +using Profiling_StackUnwindError = perfetto_pbzero_enum_Profiling::StackUnwindError; -enum PerfSample_SampleSkipReason : int32_t { - PerfSample_SampleSkipReason_PROFILER_SKIP_UNKNOWN = 0, - PerfSample_SampleSkipReason_PROFILER_SKIP_READ_STAGE = 1, - PerfSample_SampleSkipReason_PROFILER_SKIP_UNWIND_STAGE = 2, - PerfSample_SampleSkipReason_PROFILER_SKIP_UNWIND_ENQUEUE = 3, +namespace perfetto_pbzero_enum_PerfSample { +enum SampleSkipReason : int32_t { + PROFILER_SKIP_UNKNOWN = 0, + PROFILER_SKIP_READ_STAGE = 1, + PROFILER_SKIP_UNWIND_STAGE = 2, + PROFILER_SKIP_UNWIND_ENQUEUE = 3, }; +} // namespace perfetto_pbzero_enum_PerfSample +using PerfSample_SampleSkipReason = perfetto_pbzero_enum_PerfSample::SampleSkipReason; -const PerfSample_SampleSkipReason PerfSample_SampleSkipReason_MIN = PerfSample_SampleSkipReason_PROFILER_SKIP_UNKNOWN; -const PerfSample_SampleSkipReason PerfSample_SampleSkipReason_MAX = PerfSample_SampleSkipReason_PROFILER_SKIP_UNWIND_ENQUEUE; -enum PerfSample_ProducerEvent_DataSourceStopReason : int32_t { - PerfSample_ProducerEvent_DataSourceStopReason_PROFILER_STOP_UNKNOWN = 0, - PerfSample_ProducerEvent_DataSourceStopReason_PROFILER_STOP_GUARDRAIL = 1, +constexpr PerfSample_SampleSkipReason PerfSample_SampleSkipReason_MIN = PerfSample_SampleSkipReason::PROFILER_SKIP_UNKNOWN; +constexpr PerfSample_SampleSkipReason PerfSample_SampleSkipReason_MAX = PerfSample_SampleSkipReason::PROFILER_SKIP_UNWIND_ENQUEUE; + + +PERFETTO_PROTOZERO_CONSTEXPR14_OR_INLINE +const char* PerfSample_SampleSkipReason_Name(::perfetto::protos::pbzero::PerfSample_SampleSkipReason value) { + switch (value) { + case ::perfetto::protos::pbzero::PerfSample_SampleSkipReason::PROFILER_SKIP_UNKNOWN: + return "PROFILER_SKIP_UNKNOWN"; + + case ::perfetto::protos::pbzero::PerfSample_SampleSkipReason::PROFILER_SKIP_READ_STAGE: + return "PROFILER_SKIP_READ_STAGE"; + + case ::perfetto::protos::pbzero::PerfSample_SampleSkipReason::PROFILER_SKIP_UNWIND_STAGE: + return "PROFILER_SKIP_UNWIND_STAGE"; + + case ::perfetto::protos::pbzero::PerfSample_SampleSkipReason::PROFILER_SKIP_UNWIND_ENQUEUE: + return "PROFILER_SKIP_UNWIND_ENQUEUE"; + } + return "PBZERO_UNKNOWN_ENUM_VALUE"; +} + +namespace perfetto_pbzero_enum_PerfSample_ProducerEvent { +enum DataSourceStopReason : int32_t { + PROFILER_STOP_UNKNOWN = 0, + PROFILER_STOP_GUARDRAIL = 1, }; +} // namespace perfetto_pbzero_enum_PerfSample_ProducerEvent +using PerfSample_ProducerEvent_DataSourceStopReason = perfetto_pbzero_enum_PerfSample_ProducerEvent::DataSourceStopReason; -const PerfSample_ProducerEvent_DataSourceStopReason PerfSample_ProducerEvent_DataSourceStopReason_MIN = PerfSample_ProducerEvent_DataSourceStopReason_PROFILER_STOP_UNKNOWN; -const PerfSample_ProducerEvent_DataSourceStopReason PerfSample_ProducerEvent_DataSourceStopReason_MAX = PerfSample_ProducerEvent_DataSourceStopReason_PROFILER_STOP_GUARDRAIL; -enum Profiling_CpuMode : int32_t { - Profiling_CpuMode_MODE_UNKNOWN = 0, - Profiling_CpuMode_MODE_KERNEL = 1, - Profiling_CpuMode_MODE_USER = 2, - Profiling_CpuMode_MODE_HYPERVISOR = 3, - Profiling_CpuMode_MODE_GUEST_KERNEL = 4, - Profiling_CpuMode_MODE_GUEST_USER = 5, +constexpr PerfSample_ProducerEvent_DataSourceStopReason PerfSample_ProducerEvent_DataSourceStopReason_MIN = PerfSample_ProducerEvent_DataSourceStopReason::PROFILER_STOP_UNKNOWN; +constexpr PerfSample_ProducerEvent_DataSourceStopReason PerfSample_ProducerEvent_DataSourceStopReason_MAX = PerfSample_ProducerEvent_DataSourceStopReason::PROFILER_STOP_GUARDRAIL; + + +PERFETTO_PROTOZERO_CONSTEXPR14_OR_INLINE +const char* PerfSample_ProducerEvent_DataSourceStopReason_Name(::perfetto::protos::pbzero::PerfSample_ProducerEvent_DataSourceStopReason value) { + switch (value) { + case ::perfetto::protos::pbzero::PerfSample_ProducerEvent_DataSourceStopReason::PROFILER_STOP_UNKNOWN: + return "PROFILER_STOP_UNKNOWN"; + + case ::perfetto::protos::pbzero::PerfSample_ProducerEvent_DataSourceStopReason::PROFILER_STOP_GUARDRAIL: + return "PROFILER_STOP_GUARDRAIL"; + } + return "PBZERO_UNKNOWN_ENUM_VALUE"; +} + +namespace perfetto_pbzero_enum_Profiling { +enum CpuMode : int32_t { + MODE_UNKNOWN = 0, + MODE_KERNEL = 1, + MODE_USER = 2, + MODE_HYPERVISOR = 3, + MODE_GUEST_KERNEL = 4, + MODE_GUEST_USER = 5, }; +} // namespace perfetto_pbzero_enum_Profiling +using Profiling_CpuMode = perfetto_pbzero_enum_Profiling::CpuMode; -const Profiling_CpuMode Profiling_CpuMode_MIN = Profiling_CpuMode_MODE_UNKNOWN; -const Profiling_CpuMode Profiling_CpuMode_MAX = Profiling_CpuMode_MODE_GUEST_USER; -enum Profiling_StackUnwindError : int32_t { - Profiling_StackUnwindError_UNWIND_ERROR_UNKNOWN = 0, - Profiling_StackUnwindError_UNWIND_ERROR_NONE = 1, - Profiling_StackUnwindError_UNWIND_ERROR_MEMORY_INVALID = 2, - Profiling_StackUnwindError_UNWIND_ERROR_UNWIND_INFO = 3, - Profiling_StackUnwindError_UNWIND_ERROR_UNSUPPORTED = 4, - Profiling_StackUnwindError_UNWIND_ERROR_INVALID_MAP = 5, - Profiling_StackUnwindError_UNWIND_ERROR_MAX_FRAMES_EXCEEDED = 6, - Profiling_StackUnwindError_UNWIND_ERROR_REPEATED_FRAME = 7, - Profiling_StackUnwindError_UNWIND_ERROR_INVALID_ELF = 8, - Profiling_StackUnwindError_UNWIND_ERROR_SYSTEM_CALL = 9, - Profiling_StackUnwindError_UNWIND_ERROR_THREAD_TIMEOUT = 10, - Profiling_StackUnwindError_UNWIND_ERROR_THREAD_DOES_NOT_EXIST = 11, - Profiling_StackUnwindError_UNWIND_ERROR_BAD_ARCH = 12, - Profiling_StackUnwindError_UNWIND_ERROR_MAPS_PARSE = 13, - Profiling_StackUnwindError_UNWIND_ERROR_INVALID_PARAMETER = 14, +constexpr Profiling_CpuMode Profiling_CpuMode_MIN = Profiling_CpuMode::MODE_UNKNOWN; +constexpr Profiling_CpuMode Profiling_CpuMode_MAX = Profiling_CpuMode::MODE_GUEST_USER; + + +PERFETTO_PROTOZERO_CONSTEXPR14_OR_INLINE +const char* Profiling_CpuMode_Name(::perfetto::protos::pbzero::Profiling_CpuMode value) { + switch (value) { + case ::perfetto::protos::pbzero::Profiling_CpuMode::MODE_UNKNOWN: + return "MODE_UNKNOWN"; + + case ::perfetto::protos::pbzero::Profiling_CpuMode::MODE_KERNEL: + return "MODE_KERNEL"; + + case ::perfetto::protos::pbzero::Profiling_CpuMode::MODE_USER: + return "MODE_USER"; + + case ::perfetto::protos::pbzero::Profiling_CpuMode::MODE_HYPERVISOR: + return "MODE_HYPERVISOR"; + + case ::perfetto::protos::pbzero::Profiling_CpuMode::MODE_GUEST_KERNEL: + return "MODE_GUEST_KERNEL"; + + case ::perfetto::protos::pbzero::Profiling_CpuMode::MODE_GUEST_USER: + return "MODE_GUEST_USER"; + } + return "PBZERO_UNKNOWN_ENUM_VALUE"; +} + +namespace perfetto_pbzero_enum_Profiling { +enum StackUnwindError : int32_t { + UNWIND_ERROR_UNKNOWN = 0, + UNWIND_ERROR_NONE = 1, + UNWIND_ERROR_MEMORY_INVALID = 2, + UNWIND_ERROR_UNWIND_INFO = 3, + UNWIND_ERROR_UNSUPPORTED = 4, + UNWIND_ERROR_INVALID_MAP = 5, + UNWIND_ERROR_MAX_FRAMES_EXCEEDED = 6, + UNWIND_ERROR_REPEATED_FRAME = 7, + UNWIND_ERROR_INVALID_ELF = 8, + UNWIND_ERROR_SYSTEM_CALL = 9, + UNWIND_ERROR_THREAD_TIMEOUT = 10, + UNWIND_ERROR_THREAD_DOES_NOT_EXIST = 11, + UNWIND_ERROR_BAD_ARCH = 12, + UNWIND_ERROR_MAPS_PARSE = 13, + UNWIND_ERROR_INVALID_PARAMETER = 14, + UNWIND_ERROR_PTRACE_CALL = 15, }; +} // namespace perfetto_pbzero_enum_Profiling +using Profiling_StackUnwindError = perfetto_pbzero_enum_Profiling::StackUnwindError; -const Profiling_StackUnwindError Profiling_StackUnwindError_MIN = Profiling_StackUnwindError_UNWIND_ERROR_UNKNOWN; -const Profiling_StackUnwindError Profiling_StackUnwindError_MAX = Profiling_StackUnwindError_UNWIND_ERROR_INVALID_PARAMETER; -enum ProfilePacket_ProcessHeapSamples_ClientError : int32_t { - ProfilePacket_ProcessHeapSamples_ClientError_CLIENT_ERROR_NONE = 0, - ProfilePacket_ProcessHeapSamples_ClientError_CLIENT_ERROR_HIT_TIMEOUT = 1, - ProfilePacket_ProcessHeapSamples_ClientError_CLIENT_ERROR_INVALID_STACK_BOUNDS = 2, +constexpr Profiling_StackUnwindError Profiling_StackUnwindError_MIN = Profiling_StackUnwindError::UNWIND_ERROR_UNKNOWN; +constexpr Profiling_StackUnwindError Profiling_StackUnwindError_MAX = Profiling_StackUnwindError::UNWIND_ERROR_PTRACE_CALL; + + +PERFETTO_PROTOZERO_CONSTEXPR14_OR_INLINE +const char* Profiling_StackUnwindError_Name(::perfetto::protos::pbzero::Profiling_StackUnwindError value) { + switch (value) { + case ::perfetto::protos::pbzero::Profiling_StackUnwindError::UNWIND_ERROR_UNKNOWN: + return "UNWIND_ERROR_UNKNOWN"; + + case ::perfetto::protos::pbzero::Profiling_StackUnwindError::UNWIND_ERROR_NONE: + return "UNWIND_ERROR_NONE"; + + case ::perfetto::protos::pbzero::Profiling_StackUnwindError::UNWIND_ERROR_MEMORY_INVALID: + return "UNWIND_ERROR_MEMORY_INVALID"; + + case ::perfetto::protos::pbzero::Profiling_StackUnwindError::UNWIND_ERROR_UNWIND_INFO: + return "UNWIND_ERROR_UNWIND_INFO"; + + case ::perfetto::protos::pbzero::Profiling_StackUnwindError::UNWIND_ERROR_UNSUPPORTED: + return "UNWIND_ERROR_UNSUPPORTED"; + + case ::perfetto::protos::pbzero::Profiling_StackUnwindError::UNWIND_ERROR_INVALID_MAP: + return "UNWIND_ERROR_INVALID_MAP"; + + case ::perfetto::protos::pbzero::Profiling_StackUnwindError::UNWIND_ERROR_MAX_FRAMES_EXCEEDED: + return "UNWIND_ERROR_MAX_FRAMES_EXCEEDED"; + + case ::perfetto::protos::pbzero::Profiling_StackUnwindError::UNWIND_ERROR_REPEATED_FRAME: + return "UNWIND_ERROR_REPEATED_FRAME"; + + case ::perfetto::protos::pbzero::Profiling_StackUnwindError::UNWIND_ERROR_INVALID_ELF: + return "UNWIND_ERROR_INVALID_ELF"; + + case ::perfetto::protos::pbzero::Profiling_StackUnwindError::UNWIND_ERROR_SYSTEM_CALL: + return "UNWIND_ERROR_SYSTEM_CALL"; + + case ::perfetto::protos::pbzero::Profiling_StackUnwindError::UNWIND_ERROR_THREAD_TIMEOUT: + return "UNWIND_ERROR_THREAD_TIMEOUT"; + + case ::perfetto::protos::pbzero::Profiling_StackUnwindError::UNWIND_ERROR_THREAD_DOES_NOT_EXIST: + return "UNWIND_ERROR_THREAD_DOES_NOT_EXIST"; + + case ::perfetto::protos::pbzero::Profiling_StackUnwindError::UNWIND_ERROR_BAD_ARCH: + return "UNWIND_ERROR_BAD_ARCH"; + + case ::perfetto::protos::pbzero::Profiling_StackUnwindError::UNWIND_ERROR_MAPS_PARSE: + return "UNWIND_ERROR_MAPS_PARSE"; + + case ::perfetto::protos::pbzero::Profiling_StackUnwindError::UNWIND_ERROR_INVALID_PARAMETER: + return "UNWIND_ERROR_INVALID_PARAMETER"; + + case ::perfetto::protos::pbzero::Profiling_StackUnwindError::UNWIND_ERROR_PTRACE_CALL: + return "UNWIND_ERROR_PTRACE_CALL"; + } + return "PBZERO_UNKNOWN_ENUM_VALUE"; +} + +namespace perfetto_pbzero_enum_ProfilePacket_ProcessHeapSamples { +enum ClientError : int32_t { + CLIENT_ERROR_NONE = 0, + CLIENT_ERROR_HIT_TIMEOUT = 1, + CLIENT_ERROR_INVALID_STACK_BOUNDS = 2, }; +} // namespace perfetto_pbzero_enum_ProfilePacket_ProcessHeapSamples +using ProfilePacket_ProcessHeapSamples_ClientError = perfetto_pbzero_enum_ProfilePacket_ProcessHeapSamples::ClientError; -const ProfilePacket_ProcessHeapSamples_ClientError ProfilePacket_ProcessHeapSamples_ClientError_MIN = ProfilePacket_ProcessHeapSamples_ClientError_CLIENT_ERROR_NONE; -const ProfilePacket_ProcessHeapSamples_ClientError ProfilePacket_ProcessHeapSamples_ClientError_MAX = ProfilePacket_ProcessHeapSamples_ClientError_CLIENT_ERROR_INVALID_STACK_BOUNDS; -class PerfSampleDefaults_Decoder : public ::protozero::TypedProtoDecoder { +constexpr ProfilePacket_ProcessHeapSamples_ClientError ProfilePacket_ProcessHeapSamples_ClientError_MIN = ProfilePacket_ProcessHeapSamples_ClientError::CLIENT_ERROR_NONE; +constexpr ProfilePacket_ProcessHeapSamples_ClientError ProfilePacket_ProcessHeapSamples_ClientError_MAX = ProfilePacket_ProcessHeapSamples_ClientError::CLIENT_ERROR_INVALID_STACK_BOUNDS; + + +PERFETTO_PROTOZERO_CONSTEXPR14_OR_INLINE +const char* ProfilePacket_ProcessHeapSamples_ClientError_Name(::perfetto::protos::pbzero::ProfilePacket_ProcessHeapSamples_ClientError value) { + switch (value) { + case ::perfetto::protos::pbzero::ProfilePacket_ProcessHeapSamples_ClientError::CLIENT_ERROR_NONE: + return "CLIENT_ERROR_NONE"; + + case ::perfetto::protos::pbzero::ProfilePacket_ProcessHeapSamples_ClientError::CLIENT_ERROR_HIT_TIMEOUT: + return "CLIENT_ERROR_HIT_TIMEOUT"; + + case ::perfetto::protos::pbzero::ProfilePacket_ProcessHeapSamples_ClientError::CLIENT_ERROR_INVALID_STACK_BOUNDS: + return "CLIENT_ERROR_INVALID_STACK_BOUNDS"; + } + return "PBZERO_UNKNOWN_ENUM_VALUE"; +} + +class PerfSampleDefaults_Decoder : public ::protozero::TypedProtoDecoder { public: PerfSampleDefaults_Decoder(const uint8_t* data, size_t len) : TypedProtoDecoder(data, len) {} explicit PerfSampleDefaults_Decoder(const std::string& raw) : TypedProtoDecoder(reinterpret_cast(raw.data()), raw.size()) {} explicit PerfSampleDefaults_Decoder(const ::protozero::ConstBytes& raw) : TypedProtoDecoder(raw.data, raw.size) {} bool has_timebase() const { return at<1>().valid(); } ::protozero::ConstBytes timebase() const { return at<1>().as_bytes(); } + bool has_process_shard_count() const { return at<2>().valid(); } + uint32_t process_shard_count() const { return at<2>().as_uint32(); } + bool has_chosen_process_shard() const { return at<3>().valid(); } + uint32_t chosen_process_shard() const { return at<3>().as_uint32(); } }; class PerfSampleDefaults : public ::protozero::Message { @@ -117541,6 +115726,8 @@ class PerfSampleDefaults : public ::protozero::Message { using Decoder = PerfSampleDefaults_Decoder; enum : int32_t { kTimebaseFieldNumber = 1, + kProcessShardCountFieldNumber = 2, + kChosenProcessShardFieldNumber = 3, }; static constexpr const char* GetName() { return ".perfetto.protos.PerfSampleDefaults"; } @@ -117553,18 +115740,47 @@ class PerfSampleDefaults : public ::protozero::Message { PerfEvents_Timebase, PerfSampleDefaults>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Timebase kTimebase() { return {}; } + static constexpr FieldMetadata_Timebase kTimebase{}; template T* set_timebase() { return BeginNestedMessage(1); } + + using FieldMetadata_ProcessShardCount = + ::protozero::proto_utils::FieldMetadata< + 2, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint32, + uint32_t, + PerfSampleDefaults>; + + static constexpr FieldMetadata_ProcessShardCount kProcessShardCount{}; + void set_process_shard_count(uint32_t value) { + static constexpr uint32_t field_id = FieldMetadata_ProcessShardCount::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint32> + ::Append(*this, field_id, value); + } + + using FieldMetadata_ChosenProcessShard = + ::protozero::proto_utils::FieldMetadata< + 3, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint32, + uint32_t, + PerfSampleDefaults>; + + static constexpr FieldMetadata_ChosenProcessShard kChosenProcessShard{}; + void set_chosen_process_shard(uint32_t value) { + static constexpr uint32_t field_id = FieldMetadata_ChosenProcessShard::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint32> + ::Append(*this, field_id, value); + } }; class PerfSample_Decoder : public ::protozero::TypedProtoDecoder { @@ -117612,11 +115828,15 @@ class PerfSample : public ::protozero::Message { static constexpr const char* GetName() { return ".perfetto.protos.PerfSample"; } using ProducerEvent = ::perfetto::protos::pbzero::PerfSample_ProducerEvent; + using SampleSkipReason = ::perfetto::protos::pbzero::PerfSample_SampleSkipReason; - static const SampleSkipReason PROFILER_SKIP_UNKNOWN = PerfSample_SampleSkipReason_PROFILER_SKIP_UNKNOWN; - static const SampleSkipReason PROFILER_SKIP_READ_STAGE = PerfSample_SampleSkipReason_PROFILER_SKIP_READ_STAGE; - static const SampleSkipReason PROFILER_SKIP_UNWIND_STAGE = PerfSample_SampleSkipReason_PROFILER_SKIP_UNWIND_STAGE; - static const SampleSkipReason PROFILER_SKIP_UNWIND_ENQUEUE = PerfSample_SampleSkipReason_PROFILER_SKIP_UNWIND_ENQUEUE; + static inline const char* SampleSkipReason_Name(SampleSkipReason value) { + return ::perfetto::protos::pbzero::PerfSample_SampleSkipReason_Name(value); + } + static const SampleSkipReason PROFILER_SKIP_UNKNOWN = SampleSkipReason::PROFILER_SKIP_UNKNOWN; + static const SampleSkipReason PROFILER_SKIP_READ_STAGE = SampleSkipReason::PROFILER_SKIP_READ_STAGE; + static const SampleSkipReason PROFILER_SKIP_UNWIND_STAGE = SampleSkipReason::PROFILER_SKIP_UNWIND_STAGE; + static const SampleSkipReason PROFILER_SKIP_UNWIND_ENQUEUE = SampleSkipReason::PROFILER_SKIP_UNWIND_ENQUEUE; using FieldMetadata_Cpu = ::protozero::proto_utils::FieldMetadata< @@ -117626,14 +115846,7 @@ class PerfSample : public ::protozero::Message { uint32_t, PerfSample>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Cpu kCpu() { return {}; } + static constexpr FieldMetadata_Cpu kCpu{}; void set_cpu(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Cpu::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -117651,14 +115864,7 @@ class PerfSample : public ::protozero::Message { uint32_t, PerfSample>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Pid kPid() { return {}; } + static constexpr FieldMetadata_Pid kPid{}; void set_pid(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Pid::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -117676,14 +115882,7 @@ class PerfSample : public ::protozero::Message { uint32_t, PerfSample>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Tid kTid() { return {}; } + static constexpr FieldMetadata_Tid kTid{}; void set_tid(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Tid::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -117701,14 +115900,7 @@ class PerfSample : public ::protozero::Message { ::perfetto::protos::pbzero::Profiling_CpuMode, PerfSample>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_CpuMode kCpuMode() { return {}; } + static constexpr FieldMetadata_CpuMode kCpuMode{}; void set_cpu_mode(::perfetto::protos::pbzero::Profiling_CpuMode value) { static constexpr uint32_t field_id = FieldMetadata_CpuMode::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -117726,14 +115918,7 @@ class PerfSample : public ::protozero::Message { uint64_t, PerfSample>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_TimebaseCount kTimebaseCount() { return {}; } + static constexpr FieldMetadata_TimebaseCount kTimebaseCount{}; void set_timebase_count(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_TimebaseCount::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -117751,14 +115936,7 @@ class PerfSample : public ::protozero::Message { uint64_t, PerfSample>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_CallstackIid kCallstackIid() { return {}; } + static constexpr FieldMetadata_CallstackIid kCallstackIid{}; void set_callstack_iid(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_CallstackIid::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -117776,14 +115954,7 @@ class PerfSample : public ::protozero::Message { ::perfetto::protos::pbzero::Profiling_StackUnwindError, PerfSample>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_UnwindError kUnwindError() { return {}; } + static constexpr FieldMetadata_UnwindError kUnwindError{}; void set_unwind_error(::perfetto::protos::pbzero::Profiling_StackUnwindError value) { static constexpr uint32_t field_id = FieldMetadata_UnwindError::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -117801,14 +115972,7 @@ class PerfSample : public ::protozero::Message { uint64_t, PerfSample>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_KernelRecordsLost kKernelRecordsLost() { return {}; } + static constexpr FieldMetadata_KernelRecordsLost kKernelRecordsLost{}; void set_kernel_records_lost(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_KernelRecordsLost::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -117826,14 +115990,7 @@ class PerfSample : public ::protozero::Message { ::perfetto::protos::pbzero::PerfSample_SampleSkipReason, PerfSample>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_SampleSkippedReason kSampleSkippedReason() { return {}; } + static constexpr FieldMetadata_SampleSkippedReason kSampleSkippedReason{}; void set_sample_skipped_reason(::perfetto::protos::pbzero::PerfSample_SampleSkipReason value) { static constexpr uint32_t field_id = FieldMetadata_SampleSkippedReason::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -117851,14 +116008,7 @@ class PerfSample : public ::protozero::Message { PerfSample_ProducerEvent, PerfSample>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ProducerEvent kProducerEvent() { return {}; } + static constexpr FieldMetadata_ProducerEvent kProducerEvent{}; template T* set_producer_event() { return BeginNestedMessage(19); } @@ -117882,9 +116032,13 @@ class PerfSample_ProducerEvent : public ::protozero::Message { }; static constexpr const char* GetName() { return ".perfetto.protos.PerfSample.ProducerEvent"; } + using DataSourceStopReason = ::perfetto::protos::pbzero::PerfSample_ProducerEvent_DataSourceStopReason; - static const DataSourceStopReason PROFILER_STOP_UNKNOWN = PerfSample_ProducerEvent_DataSourceStopReason_PROFILER_STOP_UNKNOWN; - static const DataSourceStopReason PROFILER_STOP_GUARDRAIL = PerfSample_ProducerEvent_DataSourceStopReason_PROFILER_STOP_GUARDRAIL; + static inline const char* DataSourceStopReason_Name(DataSourceStopReason value) { + return ::perfetto::protos::pbzero::PerfSample_ProducerEvent_DataSourceStopReason_Name(value); + } + static const DataSourceStopReason PROFILER_STOP_UNKNOWN = DataSourceStopReason::PROFILER_STOP_UNKNOWN; + static const DataSourceStopReason PROFILER_STOP_GUARDRAIL = DataSourceStopReason::PROFILER_STOP_GUARDRAIL; using FieldMetadata_SourceStopReason = ::protozero::proto_utils::FieldMetadata< @@ -117894,14 +116048,7 @@ class PerfSample_ProducerEvent : public ::protozero::Message { ::perfetto::protos::pbzero::PerfSample_ProducerEvent_DataSourceStopReason, PerfSample_ProducerEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_SourceStopReason kSourceStopReason() { return {}; } + static constexpr FieldMetadata_SourceStopReason kSourceStopReason{}; void set_source_stop_reason(::perfetto::protos::pbzero::PerfSample_ProducerEvent_DataSourceStopReason value) { static constexpr uint32_t field_id = FieldMetadata_SourceStopReason::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -117924,29 +116071,38 @@ class Profiling : public ::protozero::Message { using Decoder = Profiling_Decoder; static constexpr const char* GetName() { return ".perfetto.protos.Profiling"; } + using CpuMode = ::perfetto::protos::pbzero::Profiling_CpuMode; + static inline const char* CpuMode_Name(CpuMode value) { + return ::perfetto::protos::pbzero::Profiling_CpuMode_Name(value); + } + using StackUnwindError = ::perfetto::protos::pbzero::Profiling_StackUnwindError; - static const CpuMode MODE_UNKNOWN = Profiling_CpuMode_MODE_UNKNOWN; - static const CpuMode MODE_KERNEL = Profiling_CpuMode_MODE_KERNEL; - static const CpuMode MODE_USER = Profiling_CpuMode_MODE_USER; - static const CpuMode MODE_HYPERVISOR = Profiling_CpuMode_MODE_HYPERVISOR; - static const CpuMode MODE_GUEST_KERNEL = Profiling_CpuMode_MODE_GUEST_KERNEL; - static const CpuMode MODE_GUEST_USER = Profiling_CpuMode_MODE_GUEST_USER; - static const StackUnwindError UNWIND_ERROR_UNKNOWN = Profiling_StackUnwindError_UNWIND_ERROR_UNKNOWN; - static const StackUnwindError UNWIND_ERROR_NONE = Profiling_StackUnwindError_UNWIND_ERROR_NONE; - static const StackUnwindError UNWIND_ERROR_MEMORY_INVALID = Profiling_StackUnwindError_UNWIND_ERROR_MEMORY_INVALID; - static const StackUnwindError UNWIND_ERROR_UNWIND_INFO = Profiling_StackUnwindError_UNWIND_ERROR_UNWIND_INFO; - static const StackUnwindError UNWIND_ERROR_UNSUPPORTED = Profiling_StackUnwindError_UNWIND_ERROR_UNSUPPORTED; - static const StackUnwindError UNWIND_ERROR_INVALID_MAP = Profiling_StackUnwindError_UNWIND_ERROR_INVALID_MAP; - static const StackUnwindError UNWIND_ERROR_MAX_FRAMES_EXCEEDED = Profiling_StackUnwindError_UNWIND_ERROR_MAX_FRAMES_EXCEEDED; - static const StackUnwindError UNWIND_ERROR_REPEATED_FRAME = Profiling_StackUnwindError_UNWIND_ERROR_REPEATED_FRAME; - static const StackUnwindError UNWIND_ERROR_INVALID_ELF = Profiling_StackUnwindError_UNWIND_ERROR_INVALID_ELF; - static const StackUnwindError UNWIND_ERROR_SYSTEM_CALL = Profiling_StackUnwindError_UNWIND_ERROR_SYSTEM_CALL; - static const StackUnwindError UNWIND_ERROR_THREAD_TIMEOUT = Profiling_StackUnwindError_UNWIND_ERROR_THREAD_TIMEOUT; - static const StackUnwindError UNWIND_ERROR_THREAD_DOES_NOT_EXIST = Profiling_StackUnwindError_UNWIND_ERROR_THREAD_DOES_NOT_EXIST; - static const StackUnwindError UNWIND_ERROR_BAD_ARCH = Profiling_StackUnwindError_UNWIND_ERROR_BAD_ARCH; - static const StackUnwindError UNWIND_ERROR_MAPS_PARSE = Profiling_StackUnwindError_UNWIND_ERROR_MAPS_PARSE; - static const StackUnwindError UNWIND_ERROR_INVALID_PARAMETER = Profiling_StackUnwindError_UNWIND_ERROR_INVALID_PARAMETER; + static inline const char* StackUnwindError_Name(StackUnwindError value) { + return ::perfetto::protos::pbzero::Profiling_StackUnwindError_Name(value); + } + static const CpuMode MODE_UNKNOWN = CpuMode::MODE_UNKNOWN; + static const CpuMode MODE_KERNEL = CpuMode::MODE_KERNEL; + static const CpuMode MODE_USER = CpuMode::MODE_USER; + static const CpuMode MODE_HYPERVISOR = CpuMode::MODE_HYPERVISOR; + static const CpuMode MODE_GUEST_KERNEL = CpuMode::MODE_GUEST_KERNEL; + static const CpuMode MODE_GUEST_USER = CpuMode::MODE_GUEST_USER; + static const StackUnwindError UNWIND_ERROR_UNKNOWN = StackUnwindError::UNWIND_ERROR_UNKNOWN; + static const StackUnwindError UNWIND_ERROR_NONE = StackUnwindError::UNWIND_ERROR_NONE; + static const StackUnwindError UNWIND_ERROR_MEMORY_INVALID = StackUnwindError::UNWIND_ERROR_MEMORY_INVALID; + static const StackUnwindError UNWIND_ERROR_UNWIND_INFO = StackUnwindError::UNWIND_ERROR_UNWIND_INFO; + static const StackUnwindError UNWIND_ERROR_UNSUPPORTED = StackUnwindError::UNWIND_ERROR_UNSUPPORTED; + static const StackUnwindError UNWIND_ERROR_INVALID_MAP = StackUnwindError::UNWIND_ERROR_INVALID_MAP; + static const StackUnwindError UNWIND_ERROR_MAX_FRAMES_EXCEEDED = StackUnwindError::UNWIND_ERROR_MAX_FRAMES_EXCEEDED; + static const StackUnwindError UNWIND_ERROR_REPEATED_FRAME = StackUnwindError::UNWIND_ERROR_REPEATED_FRAME; + static const StackUnwindError UNWIND_ERROR_INVALID_ELF = StackUnwindError::UNWIND_ERROR_INVALID_ELF; + static const StackUnwindError UNWIND_ERROR_SYSTEM_CALL = StackUnwindError::UNWIND_ERROR_SYSTEM_CALL; + static const StackUnwindError UNWIND_ERROR_THREAD_TIMEOUT = StackUnwindError::UNWIND_ERROR_THREAD_TIMEOUT; + static const StackUnwindError UNWIND_ERROR_THREAD_DOES_NOT_EXIST = StackUnwindError::UNWIND_ERROR_THREAD_DOES_NOT_EXIST; + static const StackUnwindError UNWIND_ERROR_BAD_ARCH = StackUnwindError::UNWIND_ERROR_BAD_ARCH; + static const StackUnwindError UNWIND_ERROR_MAPS_PARSE = StackUnwindError::UNWIND_ERROR_MAPS_PARSE; + static const StackUnwindError UNWIND_ERROR_INVALID_PARAMETER = StackUnwindError::UNWIND_ERROR_INVALID_PARAMETER; + static const StackUnwindError UNWIND_ERROR_PTRACE_CALL = StackUnwindError::UNWIND_ERROR_PTRACE_CALL; }; class StreamingProfilePacket_Decoder : public ::protozero::TypedProtoDecoder { @@ -117981,14 +116137,7 @@ class StreamingProfilePacket : public ::protozero::Message { uint64_t, StreamingProfilePacket>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_CallstackIid kCallstackIid() { return {}; } + static constexpr FieldMetadata_CallstackIid kCallstackIid{}; void add_callstack_iid(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_CallstackIid::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -118006,14 +116155,7 @@ class StreamingProfilePacket : public ::protozero::Message { int64_t, StreamingProfilePacket>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_TimestampDeltaUs kTimestampDeltaUs() { return {}; } + static constexpr FieldMetadata_TimestampDeltaUs kTimestampDeltaUs{}; void add_timestamp_delta_us(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_TimestampDeltaUs::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -118031,14 +116173,7 @@ class StreamingProfilePacket : public ::protozero::Message { int32_t, StreamingProfilePacket>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ProcessPriority kProcessPriority() { return {}; } + static constexpr FieldMetadata_ProcessPriority kProcessPriority{}; void set_process_priority(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_ProcessPriority::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -118081,14 +116216,7 @@ class StreamingFree : public ::protozero::Message { uint64_t, StreamingFree>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Address kAddress() { return {}; } + static constexpr FieldMetadata_Address kAddress{}; void add_address(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Address::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -118106,14 +116234,7 @@ class StreamingFree : public ::protozero::Message { uint32_t, StreamingFree>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_HeapId kHeapId() { return {}; } + static constexpr FieldMetadata_HeapId kHeapId{}; void add_heap_id(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_HeapId::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -118131,14 +116252,7 @@ class StreamingFree : public ::protozero::Message { uint64_t, StreamingFree>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_SequenceNumber kSequenceNumber() { return {}; } + static constexpr FieldMetadata_SequenceNumber kSequenceNumber{}; void add_sequence_number(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_SequenceNumber::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -118190,14 +116304,7 @@ class StreamingAllocation : public ::protozero::Message { uint64_t, StreamingAllocation>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Address kAddress() { return {}; } + static constexpr FieldMetadata_Address kAddress{}; void add_address(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Address::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -118215,14 +116322,7 @@ class StreamingAllocation : public ::protozero::Message { uint64_t, StreamingAllocation>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Size kSize() { return {}; } + static constexpr FieldMetadata_Size kSize{}; void add_size(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Size::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -118240,14 +116340,7 @@ class StreamingAllocation : public ::protozero::Message { uint64_t, StreamingAllocation>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_SampleSize kSampleSize() { return {}; } + static constexpr FieldMetadata_SampleSize kSampleSize{}; void add_sample_size(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_SampleSize::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -118265,14 +116358,7 @@ class StreamingAllocation : public ::protozero::Message { uint64_t, StreamingAllocation>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ClockMonotonicCoarseTimestamp kClockMonotonicCoarseTimestamp() { return {}; } + static constexpr FieldMetadata_ClockMonotonicCoarseTimestamp kClockMonotonicCoarseTimestamp{}; void add_clock_monotonic_coarse_timestamp(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_ClockMonotonicCoarseTimestamp::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -118290,14 +116376,7 @@ class StreamingAllocation : public ::protozero::Message { uint32_t, StreamingAllocation>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_HeapId kHeapId() { return {}; } + static constexpr FieldMetadata_HeapId kHeapId{}; void add_heap_id(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_HeapId::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -118315,14 +116394,7 @@ class StreamingAllocation : public ::protozero::Message { uint64_t, StreamingAllocation>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_SequenceNumber kSequenceNumber() { return {}; } + static constexpr FieldMetadata_SequenceNumber kSequenceNumber{}; void add_sequence_number(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_SequenceNumber::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -118381,14 +116453,7 @@ class ProfilePacket : public ::protozero::Message { InternedString, ProfilePacket>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Strings kStrings() { return {}; } + static constexpr FieldMetadata_Strings kStrings{}; template T* add_strings() { return BeginNestedMessage(1); } @@ -118402,14 +116467,7 @@ class ProfilePacket : public ::protozero::Message { Mapping, ProfilePacket>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Mappings kMappings() { return {}; } + static constexpr FieldMetadata_Mappings kMappings{}; template T* add_mappings() { return BeginNestedMessage(4); } @@ -118423,14 +116481,7 @@ class ProfilePacket : public ::protozero::Message { Frame, ProfilePacket>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Frames kFrames() { return {}; } + static constexpr FieldMetadata_Frames kFrames{}; template T* add_frames() { return BeginNestedMessage(2); } @@ -118444,14 +116495,7 @@ class ProfilePacket : public ::protozero::Message { Callstack, ProfilePacket>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Callstacks kCallstacks() { return {}; } + static constexpr FieldMetadata_Callstacks kCallstacks{}; template T* add_callstacks() { return BeginNestedMessage(3); } @@ -118465,14 +116509,7 @@ class ProfilePacket : public ::protozero::Message { ProfilePacket_ProcessHeapSamples, ProfilePacket>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ProcessDumps kProcessDumps() { return {}; } + static constexpr FieldMetadata_ProcessDumps kProcessDumps{}; template T* add_process_dumps() { return BeginNestedMessage(5); } @@ -118486,14 +116523,7 @@ class ProfilePacket : public ::protozero::Message { bool, ProfilePacket>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Continued kContinued() { return {}; } + static constexpr FieldMetadata_Continued kContinued{}; void set_continued(bool value) { static constexpr uint32_t field_id = FieldMetadata_Continued::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -118511,14 +116541,7 @@ class ProfilePacket : public ::protozero::Message { uint64_t, ProfilePacket>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Index kIndex() { return {}; } + static constexpr FieldMetadata_Index kIndex{}; void set_index(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Index::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -118585,10 +116608,14 @@ class ProfilePacket_ProcessHeapSamples : public ::protozero::Message { }; static constexpr const char* GetName() { return ".perfetto.protos.ProfilePacket.ProcessHeapSamples"; } + using ClientError = ::perfetto::protos::pbzero::ProfilePacket_ProcessHeapSamples_ClientError; - static const ClientError CLIENT_ERROR_NONE = ProfilePacket_ProcessHeapSamples_ClientError_CLIENT_ERROR_NONE; - static const ClientError CLIENT_ERROR_HIT_TIMEOUT = ProfilePacket_ProcessHeapSamples_ClientError_CLIENT_ERROR_HIT_TIMEOUT; - static const ClientError CLIENT_ERROR_INVALID_STACK_BOUNDS = ProfilePacket_ProcessHeapSamples_ClientError_CLIENT_ERROR_INVALID_STACK_BOUNDS; + static inline const char* ClientError_Name(ClientError value) { + return ::perfetto::protos::pbzero::ProfilePacket_ProcessHeapSamples_ClientError_Name(value); + } + static const ClientError CLIENT_ERROR_NONE = ClientError::CLIENT_ERROR_NONE; + static const ClientError CLIENT_ERROR_HIT_TIMEOUT = ClientError::CLIENT_ERROR_HIT_TIMEOUT; + static const ClientError CLIENT_ERROR_INVALID_STACK_BOUNDS = ClientError::CLIENT_ERROR_INVALID_STACK_BOUNDS; using FieldMetadata_Pid = ::protozero::proto_utils::FieldMetadata< @@ -118598,14 +116625,7 @@ class ProfilePacket_ProcessHeapSamples : public ::protozero::Message { uint64_t, ProfilePacket_ProcessHeapSamples>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Pid kPid() { return {}; } + static constexpr FieldMetadata_Pid kPid{}; void set_pid(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Pid::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -118623,14 +116643,7 @@ class ProfilePacket_ProcessHeapSamples : public ::protozero::Message { bool, ProfilePacket_ProcessHeapSamples>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_FromStartup kFromStartup() { return {}; } + static constexpr FieldMetadata_FromStartup kFromStartup{}; void set_from_startup(bool value) { static constexpr uint32_t field_id = FieldMetadata_FromStartup::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -118648,14 +116661,7 @@ class ProfilePacket_ProcessHeapSamples : public ::protozero::Message { bool, ProfilePacket_ProcessHeapSamples>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_RejectedConcurrent kRejectedConcurrent() { return {}; } + static constexpr FieldMetadata_RejectedConcurrent kRejectedConcurrent{}; void set_rejected_concurrent(bool value) { static constexpr uint32_t field_id = FieldMetadata_RejectedConcurrent::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -118673,14 +116679,7 @@ class ProfilePacket_ProcessHeapSamples : public ::protozero::Message { bool, ProfilePacket_ProcessHeapSamples>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Disconnected kDisconnected() { return {}; } + static constexpr FieldMetadata_Disconnected kDisconnected{}; void set_disconnected(bool value) { static constexpr uint32_t field_id = FieldMetadata_Disconnected::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -118698,14 +116697,7 @@ class ProfilePacket_ProcessHeapSamples : public ::protozero::Message { bool, ProfilePacket_ProcessHeapSamples>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_BufferOverran kBufferOverran() { return {}; } + static constexpr FieldMetadata_BufferOverran kBufferOverran{}; void set_buffer_overran(bool value) { static constexpr uint32_t field_id = FieldMetadata_BufferOverran::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -118723,14 +116715,7 @@ class ProfilePacket_ProcessHeapSamples : public ::protozero::Message { ::perfetto::protos::pbzero::ProfilePacket_ProcessHeapSamples_ClientError, ProfilePacket_ProcessHeapSamples>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ClientError kClientError() { return {}; } + static constexpr FieldMetadata_ClientError kClientError{}; void set_client_error(::perfetto::protos::pbzero::ProfilePacket_ProcessHeapSamples_ClientError value) { static constexpr uint32_t field_id = FieldMetadata_ClientError::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -118748,14 +116733,7 @@ class ProfilePacket_ProcessHeapSamples : public ::protozero::Message { bool, ProfilePacket_ProcessHeapSamples>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_BufferCorrupted kBufferCorrupted() { return {}; } + static constexpr FieldMetadata_BufferCorrupted kBufferCorrupted{}; void set_buffer_corrupted(bool value) { static constexpr uint32_t field_id = FieldMetadata_BufferCorrupted::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -118773,14 +116751,7 @@ class ProfilePacket_ProcessHeapSamples : public ::protozero::Message { bool, ProfilePacket_ProcessHeapSamples>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_HitGuardrail kHitGuardrail() { return {}; } + static constexpr FieldMetadata_HitGuardrail kHitGuardrail{}; void set_hit_guardrail(bool value) { static constexpr uint32_t field_id = FieldMetadata_HitGuardrail::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -118798,17 +116769,13 @@ class ProfilePacket_ProcessHeapSamples : public ::protozero::Message { std::string, ProfilePacket_ProcessHeapSamples>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_HeapName kHeapName() { return {}; } + static constexpr FieldMetadata_HeapName kHeapName{}; void set_heap_name(const char* data, size_t size) { AppendBytes(FieldMetadata_HeapName::kFieldId, data, size); } + void set_heap_name(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_HeapName::kFieldId, chars.data, chars.size); + } void set_heap_name(std::string value) { static constexpr uint32_t field_id = FieldMetadata_HeapName::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -118826,14 +116793,7 @@ class ProfilePacket_ProcessHeapSamples : public ::protozero::Message { uint64_t, ProfilePacket_ProcessHeapSamples>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_SamplingIntervalBytes kSamplingIntervalBytes() { return {}; } + static constexpr FieldMetadata_SamplingIntervalBytes kSamplingIntervalBytes{}; void set_sampling_interval_bytes(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_SamplingIntervalBytes::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -118851,14 +116811,7 @@ class ProfilePacket_ProcessHeapSamples : public ::protozero::Message { uint64_t, ProfilePacket_ProcessHeapSamples>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_OrigSamplingIntervalBytes kOrigSamplingIntervalBytes() { return {}; } + static constexpr FieldMetadata_OrigSamplingIntervalBytes kOrigSamplingIntervalBytes{}; void set_orig_sampling_interval_bytes(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_OrigSamplingIntervalBytes::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -118876,14 +116829,7 @@ class ProfilePacket_ProcessHeapSamples : public ::protozero::Message { uint64_t, ProfilePacket_ProcessHeapSamples>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Timestamp kTimestamp() { return {}; } + static constexpr FieldMetadata_Timestamp kTimestamp{}; void set_timestamp(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Timestamp::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -118901,14 +116847,7 @@ class ProfilePacket_ProcessHeapSamples : public ::protozero::Message { ProfilePacket_ProcessStats, ProfilePacket_ProcessHeapSamples>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Stats kStats() { return {}; } + static constexpr FieldMetadata_Stats kStats{}; template T* set_stats() { return BeginNestedMessage(5); } @@ -118922,14 +116861,7 @@ class ProfilePacket_ProcessHeapSamples : public ::protozero::Message { ProfilePacket_HeapSample, ProfilePacket_ProcessHeapSamples>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Samples kSamples() { return {}; } + static constexpr FieldMetadata_Samples kSamples{}; template T* add_samples() { return BeginNestedMessage(2); } @@ -118977,14 +116909,7 @@ class ProfilePacket_ProcessStats : public ::protozero::Message { uint64_t, ProfilePacket_ProcessStats>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_UnwindingErrors kUnwindingErrors() { return {}; } + static constexpr FieldMetadata_UnwindingErrors kUnwindingErrors{}; void set_unwinding_errors(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_UnwindingErrors::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -119002,14 +116927,7 @@ class ProfilePacket_ProcessStats : public ::protozero::Message { uint64_t, ProfilePacket_ProcessStats>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_HeapSamples kHeapSamples() { return {}; } + static constexpr FieldMetadata_HeapSamples kHeapSamples{}; void set_heap_samples(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_HeapSamples::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -119027,14 +116945,7 @@ class ProfilePacket_ProcessStats : public ::protozero::Message { uint64_t, ProfilePacket_ProcessStats>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_MapReparses kMapReparses() { return {}; } + static constexpr FieldMetadata_MapReparses kMapReparses{}; void set_map_reparses(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_MapReparses::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -119052,14 +116963,7 @@ class ProfilePacket_ProcessStats : public ::protozero::Message { ProfilePacket_Histogram, ProfilePacket_ProcessStats>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_UnwindingTimeUs kUnwindingTimeUs() { return {}; } + static constexpr FieldMetadata_UnwindingTimeUs kUnwindingTimeUs{}; template T* set_unwinding_time_us() { return BeginNestedMessage(4); } @@ -119073,14 +116977,7 @@ class ProfilePacket_ProcessStats : public ::protozero::Message { uint64_t, ProfilePacket_ProcessStats>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_TotalUnwindingTimeUs kTotalUnwindingTimeUs() { return {}; } + static constexpr FieldMetadata_TotalUnwindingTimeUs kTotalUnwindingTimeUs{}; void set_total_unwinding_time_us(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_TotalUnwindingTimeUs::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -119098,14 +116995,7 @@ class ProfilePacket_ProcessStats : public ::protozero::Message { uint64_t, ProfilePacket_ProcessStats>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ClientSpinlockBlockedUs kClientSpinlockBlockedUs() { return {}; } + static constexpr FieldMetadata_ClientSpinlockBlockedUs kClientSpinlockBlockedUs{}; void set_client_spinlock_blocked_us(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_ClientSpinlockBlockedUs::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -119143,14 +117033,7 @@ class ProfilePacket_Histogram : public ::protozero::Message { ProfilePacket_Histogram_Bucket, ProfilePacket_Histogram>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Buckets kBuckets() { return {}; } + static constexpr FieldMetadata_Buckets kBuckets{}; template T* add_buckets() { return BeginNestedMessage(1); } @@ -119189,14 +117072,7 @@ class ProfilePacket_Histogram_Bucket : public ::protozero::Message { uint64_t, ProfilePacket_Histogram_Bucket>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_UpperLimit kUpperLimit() { return {}; } + static constexpr FieldMetadata_UpperLimit kUpperLimit{}; void set_upper_limit(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_UpperLimit::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -119214,14 +117090,7 @@ class ProfilePacket_Histogram_Bucket : public ::protozero::Message { bool, ProfilePacket_Histogram_Bucket>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_MaxBucket kMaxBucket() { return {}; } + static constexpr FieldMetadata_MaxBucket kMaxBucket{}; void set_max_bucket(bool value) { static constexpr uint32_t field_id = FieldMetadata_MaxBucket::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -119239,14 +117108,7 @@ class ProfilePacket_Histogram_Bucket : public ::protozero::Message { uint64_t, ProfilePacket_Histogram_Bucket>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Count kCount() { return {}; } + static constexpr FieldMetadata_Count kCount{}; void set_count(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Count::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -119304,14 +117166,7 @@ class ProfilePacket_HeapSample : public ::protozero::Message { uint64_t, ProfilePacket_HeapSample>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_CallstackId kCallstackId() { return {}; } + static constexpr FieldMetadata_CallstackId kCallstackId{}; void set_callstack_id(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_CallstackId::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -119329,14 +117184,7 @@ class ProfilePacket_HeapSample : public ::protozero::Message { uint64_t, ProfilePacket_HeapSample>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_SelfAllocated kSelfAllocated() { return {}; } + static constexpr FieldMetadata_SelfAllocated kSelfAllocated{}; void set_self_allocated(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_SelfAllocated::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -119354,14 +117202,7 @@ class ProfilePacket_HeapSample : public ::protozero::Message { uint64_t, ProfilePacket_HeapSample>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_SelfFreed kSelfFreed() { return {}; } + static constexpr FieldMetadata_SelfFreed kSelfFreed{}; void set_self_freed(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_SelfFreed::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -119379,14 +117220,7 @@ class ProfilePacket_HeapSample : public ::protozero::Message { uint64_t, ProfilePacket_HeapSample>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_SelfMax kSelfMax() { return {}; } + static constexpr FieldMetadata_SelfMax kSelfMax{}; void set_self_max(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_SelfMax::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -119404,14 +117238,7 @@ class ProfilePacket_HeapSample : public ::protozero::Message { uint64_t, ProfilePacket_HeapSample>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_SelfMaxCount kSelfMaxCount() { return {}; } + static constexpr FieldMetadata_SelfMaxCount kSelfMaxCount{}; void set_self_max_count(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_SelfMaxCount::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -119429,14 +117256,7 @@ class ProfilePacket_HeapSample : public ::protozero::Message { uint64_t, ProfilePacket_HeapSample>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Timestamp kTimestamp() { return {}; } + static constexpr FieldMetadata_Timestamp kTimestamp{}; void set_timestamp(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Timestamp::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -119454,14 +117274,7 @@ class ProfilePacket_HeapSample : public ::protozero::Message { uint64_t, ProfilePacket_HeapSample>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_AllocCount kAllocCount() { return {}; } + static constexpr FieldMetadata_AllocCount kAllocCount{}; void set_alloc_count(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_AllocCount::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -119479,14 +117292,7 @@ class ProfilePacket_HeapSample : public ::protozero::Message { uint64_t, ProfilePacket_HeapSample>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_FreeCount kFreeCount() { return {}; } + static constexpr FieldMetadata_FreeCount kFreeCount{}; void set_free_count(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_FreeCount::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -119551,14 +117357,7 @@ class SmapsPacket : public ::protozero::Message { uint32_t, SmapsPacket>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Pid kPid() { return {}; } + static constexpr FieldMetadata_Pid kPid{}; void set_pid(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Pid::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -119576,14 +117375,7 @@ class SmapsPacket : public ::protozero::Message { SmapsEntry, SmapsPacket>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Entries kEntries() { return {}; } + static constexpr FieldMetadata_Entries kEntries{}; template T* add_entries() { return BeginNestedMessage(2); } @@ -119658,17 +117450,13 @@ class SmapsEntry : public ::protozero::Message { std::string, SmapsEntry>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Path kPath() { return {}; } + static constexpr FieldMetadata_Path kPath{}; void set_path(const char* data, size_t size) { AppendBytes(FieldMetadata_Path::kFieldId, data, size); } + void set_path(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Path::kFieldId, chars.data, chars.size); + } void set_path(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Path::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -119686,14 +117474,7 @@ class SmapsEntry : public ::protozero::Message { uint64_t, SmapsEntry>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_SizeKb kSizeKb() { return {}; } + static constexpr FieldMetadata_SizeKb kSizeKb{}; void set_size_kb(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_SizeKb::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -119711,14 +117492,7 @@ class SmapsEntry : public ::protozero::Message { uint64_t, SmapsEntry>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_PrivateDirtyKb kPrivateDirtyKb() { return {}; } + static constexpr FieldMetadata_PrivateDirtyKb kPrivateDirtyKb{}; void set_private_dirty_kb(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_PrivateDirtyKb::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -119736,14 +117510,7 @@ class SmapsEntry : public ::protozero::Message { uint64_t, SmapsEntry>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_SwapKb kSwapKb() { return {}; } + static constexpr FieldMetadata_SwapKb kSwapKb{}; void set_swap_kb(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_SwapKb::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -119761,17 +117528,13 @@ class SmapsEntry : public ::protozero::Message { std::string, SmapsEntry>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_FileName kFileName() { return {}; } + static constexpr FieldMetadata_FileName kFileName{}; void set_file_name(const char* data, size_t size) { AppendBytes(FieldMetadata_FileName::kFieldId, data, size); } + void set_file_name(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_FileName::kFieldId, chars.data, chars.size); + } void set_file_name(std::string value) { static constexpr uint32_t field_id = FieldMetadata_FileName::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -119789,14 +117552,7 @@ class SmapsEntry : public ::protozero::Message { uint64_t, SmapsEntry>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_StartAddress kStartAddress() { return {}; } + static constexpr FieldMetadata_StartAddress kStartAddress{}; void set_start_address(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_StartAddress::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -119814,14 +117570,7 @@ class SmapsEntry : public ::protozero::Message { uint64_t, SmapsEntry>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ModuleTimestamp kModuleTimestamp() { return {}; } + static constexpr FieldMetadata_ModuleTimestamp kModuleTimestamp{}; void set_module_timestamp(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_ModuleTimestamp::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -119839,17 +117588,13 @@ class SmapsEntry : public ::protozero::Message { std::string, SmapsEntry>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ModuleDebugid kModuleDebugid() { return {}; } + static constexpr FieldMetadata_ModuleDebugid kModuleDebugid{}; void set_module_debugid(const char* data, size_t size) { AppendBytes(FieldMetadata_ModuleDebugid::kFieldId, data, size); } + void set_module_debugid(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_ModuleDebugid::kFieldId, chars.data, chars.size); + } void set_module_debugid(std::string value) { static constexpr uint32_t field_id = FieldMetadata_ModuleDebugid::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -119867,17 +117612,13 @@ class SmapsEntry : public ::protozero::Message { std::string, SmapsEntry>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ModuleDebugPath kModuleDebugPath() { return {}; } + static constexpr FieldMetadata_ModuleDebugPath kModuleDebugPath{}; void set_module_debug_path(const char* data, size_t size) { AppendBytes(FieldMetadata_ModuleDebugPath::kFieldId, data, size); } + void set_module_debug_path(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_ModuleDebugPath::kFieldId, chars.data, chars.size); + } void set_module_debug_path(std::string value) { static constexpr uint32_t field_id = FieldMetadata_ModuleDebugPath::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -119895,14 +117636,7 @@ class SmapsEntry : public ::protozero::Message { uint32_t, SmapsEntry>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ProtectionFlags kProtectionFlags() { return {}; } + static constexpr FieldMetadata_ProtectionFlags kProtectionFlags{}; void set_protection_flags(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_ProtectionFlags::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -119920,14 +117654,7 @@ class SmapsEntry : public ::protozero::Message { uint64_t, SmapsEntry>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_PrivateCleanResidentKb kPrivateCleanResidentKb() { return {}; } + static constexpr FieldMetadata_PrivateCleanResidentKb kPrivateCleanResidentKb{}; void set_private_clean_resident_kb(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_PrivateCleanResidentKb::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -119945,14 +117672,7 @@ class SmapsEntry : public ::protozero::Message { uint64_t, SmapsEntry>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_SharedDirtyResidentKb kSharedDirtyResidentKb() { return {}; } + static constexpr FieldMetadata_SharedDirtyResidentKb kSharedDirtyResidentKb{}; void set_shared_dirty_resident_kb(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_SharedDirtyResidentKb::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -119970,14 +117690,7 @@ class SmapsEntry : public ::protozero::Message { uint64_t, SmapsEntry>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_SharedCleanResidentKb kSharedCleanResidentKb() { return {}; } + static constexpr FieldMetadata_SharedCleanResidentKb kSharedCleanResidentKb{}; void set_shared_clean_resident_kb(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_SharedCleanResidentKb::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -119995,14 +117708,7 @@ class SmapsEntry : public ::protozero::Message { uint64_t, SmapsEntry>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_LockedKb kLockedKb() { return {}; } + static constexpr FieldMetadata_LockedKb kLockedKb{}; void set_locked_kb(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_LockedKb::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -120020,14 +117726,7 @@ class SmapsEntry : public ::protozero::Message { uint64_t, SmapsEntry>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ProportionalResidentKb kProportionalResidentKb() { return {}; } + static constexpr FieldMetadata_ProportionalResidentKb kProportionalResidentKb{}; void set_proportional_resident_kb(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_ProportionalResidentKb::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -120038,6 +117737,67 @@ class SmapsEntry : public ::protozero::Message { } }; +} // Namespace. +} // Namespace. +} // Namespace. +#endif // Include guard. +// gen_amalgamated begin header: gen/protos/perfetto/trace/track_event/chrome_active_processes.pbzero.h +// Autogenerated by the ProtoZero compiler plugin. DO NOT EDIT. + +#ifndef PERFETTO_PROTOS_PROTOS_PERFETTO_TRACE_TRACK_EVENT_CHROME_ACTIVE_PROCESSES_PROTO_H_ +#define PERFETTO_PROTOS_PROTOS_PERFETTO_TRACE_TRACK_EVENT_CHROME_ACTIVE_PROCESSES_PROTO_H_ + +#include +#include + +// gen_amalgamated expanded: #include "perfetto/protozero/field_writer.h" +// gen_amalgamated expanded: #include "perfetto/protozero/message.h" +// gen_amalgamated expanded: #include "perfetto/protozero/packed_repeated_fields.h" +// gen_amalgamated expanded: #include "perfetto/protozero/proto_decoder.h" +// gen_amalgamated expanded: #include "perfetto/protozero/proto_utils.h" + +namespace perfetto { +namespace protos { +namespace pbzero { + + +class ChromeActiveProcesses_Decoder : public ::protozero::TypedProtoDecoder { + public: + ChromeActiveProcesses_Decoder(const uint8_t* data, size_t len) : TypedProtoDecoder(data, len) {} + explicit ChromeActiveProcesses_Decoder(const std::string& raw) : TypedProtoDecoder(reinterpret_cast(raw.data()), raw.size()) {} + explicit ChromeActiveProcesses_Decoder(const ::protozero::ConstBytes& raw) : TypedProtoDecoder(raw.data, raw.size) {} + bool has_pid() const { return at<1>().valid(); } + ::protozero::RepeatedFieldIterator pid() const { return GetRepeated(1); } +}; + +class ChromeActiveProcesses : public ::protozero::Message { + public: + using Decoder = ChromeActiveProcesses_Decoder; + enum : int32_t { + kPidFieldNumber = 1, + }; + static constexpr const char* GetName() { return ".perfetto.protos.ChromeActiveProcesses"; } + + + using FieldMetadata_Pid = + ::protozero::proto_utils::FieldMetadata< + 1, + ::protozero::proto_utils::RepetitionType::kRepeatedNotPacked, + ::protozero::proto_utils::ProtoSchemaType::kInt32, + int32_t, + ChromeActiveProcesses>; + + static constexpr FieldMetadata_Pid kPid{}; + void add_pid(int32_t value) { + static constexpr uint32_t field_id = FieldMetadata_Pid::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kInt32> + ::Append(*this, field_id, value); + } +}; + } // Namespace. } // Namespace. } // Namespace. @@ -120061,18 +117821,47 @@ namespace perfetto { namespace protos { namespace pbzero { -enum ChromeApplicationStateInfo_ChromeApplicationState : int32_t; +namespace perfetto_pbzero_enum_ChromeApplicationStateInfo { +enum ChromeApplicationState : int32_t; +} // namespace perfetto_pbzero_enum_ChromeApplicationStateInfo +using ChromeApplicationStateInfo_ChromeApplicationState = perfetto_pbzero_enum_ChromeApplicationStateInfo::ChromeApplicationState; -enum ChromeApplicationStateInfo_ChromeApplicationState : int32_t { - ChromeApplicationStateInfo_ChromeApplicationState_APPLICATION_STATE_UNKNOWN = 0, - ChromeApplicationStateInfo_ChromeApplicationState_APPLICATION_STATE_HAS_RUNNING_ACTIVITIES = 1, - ChromeApplicationStateInfo_ChromeApplicationState_APPLICATION_STATE_HAS_PAUSED_ACTIVITIES = 2, - ChromeApplicationStateInfo_ChromeApplicationState_APPLICATION_STATE_HAS_STOPPED_ACTIVITIES = 3, - ChromeApplicationStateInfo_ChromeApplicationState_APPLICATION_STATE_HAS_DESTROYED_ACTIVITIES = 4, +namespace perfetto_pbzero_enum_ChromeApplicationStateInfo { +enum ChromeApplicationState : int32_t { + APPLICATION_STATE_UNKNOWN = 0, + APPLICATION_STATE_HAS_RUNNING_ACTIVITIES = 1, + APPLICATION_STATE_HAS_PAUSED_ACTIVITIES = 2, + APPLICATION_STATE_HAS_STOPPED_ACTIVITIES = 3, + APPLICATION_STATE_HAS_DESTROYED_ACTIVITIES = 4, }; +} // namespace perfetto_pbzero_enum_ChromeApplicationStateInfo +using ChromeApplicationStateInfo_ChromeApplicationState = perfetto_pbzero_enum_ChromeApplicationStateInfo::ChromeApplicationState; -const ChromeApplicationStateInfo_ChromeApplicationState ChromeApplicationStateInfo_ChromeApplicationState_MIN = ChromeApplicationStateInfo_ChromeApplicationState_APPLICATION_STATE_UNKNOWN; -const ChromeApplicationStateInfo_ChromeApplicationState ChromeApplicationStateInfo_ChromeApplicationState_MAX = ChromeApplicationStateInfo_ChromeApplicationState_APPLICATION_STATE_HAS_DESTROYED_ACTIVITIES; + +constexpr ChromeApplicationStateInfo_ChromeApplicationState ChromeApplicationStateInfo_ChromeApplicationState_MIN = ChromeApplicationStateInfo_ChromeApplicationState::APPLICATION_STATE_UNKNOWN; +constexpr ChromeApplicationStateInfo_ChromeApplicationState ChromeApplicationStateInfo_ChromeApplicationState_MAX = ChromeApplicationStateInfo_ChromeApplicationState::APPLICATION_STATE_HAS_DESTROYED_ACTIVITIES; + + +PERFETTO_PROTOZERO_CONSTEXPR14_OR_INLINE +const char* ChromeApplicationStateInfo_ChromeApplicationState_Name(::perfetto::protos::pbzero::ChromeApplicationStateInfo_ChromeApplicationState value) { + switch (value) { + case ::perfetto::protos::pbzero::ChromeApplicationStateInfo_ChromeApplicationState::APPLICATION_STATE_UNKNOWN: + return "APPLICATION_STATE_UNKNOWN"; + + case ::perfetto::protos::pbzero::ChromeApplicationStateInfo_ChromeApplicationState::APPLICATION_STATE_HAS_RUNNING_ACTIVITIES: + return "APPLICATION_STATE_HAS_RUNNING_ACTIVITIES"; + + case ::perfetto::protos::pbzero::ChromeApplicationStateInfo_ChromeApplicationState::APPLICATION_STATE_HAS_PAUSED_ACTIVITIES: + return "APPLICATION_STATE_HAS_PAUSED_ACTIVITIES"; + + case ::perfetto::protos::pbzero::ChromeApplicationStateInfo_ChromeApplicationState::APPLICATION_STATE_HAS_STOPPED_ACTIVITIES: + return "APPLICATION_STATE_HAS_STOPPED_ACTIVITIES"; + + case ::perfetto::protos::pbzero::ChromeApplicationStateInfo_ChromeApplicationState::APPLICATION_STATE_HAS_DESTROYED_ACTIVITIES: + return "APPLICATION_STATE_HAS_DESTROYED_ACTIVITIES"; + } + return "PBZERO_UNKNOWN_ENUM_VALUE"; +} class ChromeApplicationStateInfo_Decoder : public ::protozero::TypedProtoDecoder { public: @@ -120091,12 +117880,16 @@ class ChromeApplicationStateInfo : public ::protozero::Message { }; static constexpr const char* GetName() { return ".perfetto.protos.ChromeApplicationStateInfo"; } + using ChromeApplicationState = ::perfetto::protos::pbzero::ChromeApplicationStateInfo_ChromeApplicationState; - static const ChromeApplicationState APPLICATION_STATE_UNKNOWN = ChromeApplicationStateInfo_ChromeApplicationState_APPLICATION_STATE_UNKNOWN; - static const ChromeApplicationState APPLICATION_STATE_HAS_RUNNING_ACTIVITIES = ChromeApplicationStateInfo_ChromeApplicationState_APPLICATION_STATE_HAS_RUNNING_ACTIVITIES; - static const ChromeApplicationState APPLICATION_STATE_HAS_PAUSED_ACTIVITIES = ChromeApplicationStateInfo_ChromeApplicationState_APPLICATION_STATE_HAS_PAUSED_ACTIVITIES; - static const ChromeApplicationState APPLICATION_STATE_HAS_STOPPED_ACTIVITIES = ChromeApplicationStateInfo_ChromeApplicationState_APPLICATION_STATE_HAS_STOPPED_ACTIVITIES; - static const ChromeApplicationState APPLICATION_STATE_HAS_DESTROYED_ACTIVITIES = ChromeApplicationStateInfo_ChromeApplicationState_APPLICATION_STATE_HAS_DESTROYED_ACTIVITIES; + static inline const char* ChromeApplicationState_Name(ChromeApplicationState value) { + return ::perfetto::protos::pbzero::ChromeApplicationStateInfo_ChromeApplicationState_Name(value); + } + static const ChromeApplicationState APPLICATION_STATE_UNKNOWN = ChromeApplicationState::APPLICATION_STATE_UNKNOWN; + static const ChromeApplicationState APPLICATION_STATE_HAS_RUNNING_ACTIVITIES = ChromeApplicationState::APPLICATION_STATE_HAS_RUNNING_ACTIVITIES; + static const ChromeApplicationState APPLICATION_STATE_HAS_PAUSED_ACTIVITIES = ChromeApplicationState::APPLICATION_STATE_HAS_PAUSED_ACTIVITIES; + static const ChromeApplicationState APPLICATION_STATE_HAS_STOPPED_ACTIVITIES = ChromeApplicationState::APPLICATION_STATE_HAS_STOPPED_ACTIVITIES; + static const ChromeApplicationState APPLICATION_STATE_HAS_DESTROYED_ACTIVITIES = ChromeApplicationState::APPLICATION_STATE_HAS_DESTROYED_ACTIVITIES; using FieldMetadata_ApplicationState = ::protozero::proto_utils::FieldMetadata< @@ -120106,14 +117899,7 @@ class ChromeApplicationStateInfo : public ::protozero::Message { ::perfetto::protos::pbzero::ChromeApplicationStateInfo_ChromeApplicationState, ChromeApplicationStateInfo>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ApplicationState kApplicationState() { return {}; } + static constexpr FieldMetadata_ApplicationState kApplicationState{}; void set_application_state(::perfetto::protos::pbzero::ChromeApplicationStateInfo_ChromeApplicationState value) { static constexpr uint32_t field_id = FieldMetadata_ApplicationState::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -120157,16 +117943,43 @@ class ChromeCompositorStateMachine_MajorState; class ChromeCompositorStateMachine_MinorState; class CompositorTimingHistory; class SourceLocation; -enum BeginFrameArgs_BeginFrameArgsType : int32_t; -enum BeginImplFrameArgs_State : int32_t; +namespace perfetto_pbzero_enum_BeginFrameArgs { +enum BeginFrameArgsType : int32_t; +} // namespace perfetto_pbzero_enum_BeginFrameArgs +using BeginFrameArgs_BeginFrameArgsType = perfetto_pbzero_enum_BeginFrameArgs::BeginFrameArgsType; +namespace perfetto_pbzero_enum_BeginImplFrameArgs { +enum State : int32_t; +} // namespace perfetto_pbzero_enum_BeginImplFrameArgs +using BeginImplFrameArgs_State = perfetto_pbzero_enum_BeginImplFrameArgs::State; enum ChromeCompositorSchedulerAction : int32_t; -enum ChromeCompositorSchedulerState_BeginImplFrameDeadlineMode : int32_t; -enum ChromeCompositorStateMachine_MajorState_BeginImplFrameState : int32_t; -enum ChromeCompositorStateMachine_MajorState_BeginMainFrameState : int32_t; -enum ChromeCompositorStateMachine_MajorState_ForcedRedrawOnTimeoutState : int32_t; -enum ChromeCompositorStateMachine_MajorState_LayerTreeFrameSinkState : int32_t; -enum ChromeCompositorStateMachine_MinorState_ScrollHandlerState : int32_t; -enum ChromeCompositorStateMachine_MinorState_TreePriority : int32_t; +namespace perfetto_pbzero_enum_ChromeCompositorSchedulerState { +enum BeginImplFrameDeadlineMode : int32_t; +} // namespace perfetto_pbzero_enum_ChromeCompositorSchedulerState +using ChromeCompositorSchedulerState_BeginImplFrameDeadlineMode = perfetto_pbzero_enum_ChromeCompositorSchedulerState::BeginImplFrameDeadlineMode; +namespace perfetto_pbzero_enum_ChromeCompositorStateMachine_MajorState { +enum BeginImplFrameState : int32_t; +} // namespace perfetto_pbzero_enum_ChromeCompositorStateMachine_MajorState +using ChromeCompositorStateMachine_MajorState_BeginImplFrameState = perfetto_pbzero_enum_ChromeCompositorStateMachine_MajorState::BeginImplFrameState; +namespace perfetto_pbzero_enum_ChromeCompositorStateMachine_MajorState { +enum BeginMainFrameState : int32_t; +} // namespace perfetto_pbzero_enum_ChromeCompositorStateMachine_MajorState +using ChromeCompositorStateMachine_MajorState_BeginMainFrameState = perfetto_pbzero_enum_ChromeCompositorStateMachine_MajorState::BeginMainFrameState; +namespace perfetto_pbzero_enum_ChromeCompositorStateMachine_MajorState { +enum ForcedRedrawOnTimeoutState : int32_t; +} // namespace perfetto_pbzero_enum_ChromeCompositorStateMachine_MajorState +using ChromeCompositorStateMachine_MajorState_ForcedRedrawOnTimeoutState = perfetto_pbzero_enum_ChromeCompositorStateMachine_MajorState::ForcedRedrawOnTimeoutState; +namespace perfetto_pbzero_enum_ChromeCompositorStateMachine_MajorState { +enum LayerTreeFrameSinkState : int32_t; +} // namespace perfetto_pbzero_enum_ChromeCompositorStateMachine_MajorState +using ChromeCompositorStateMachine_MajorState_LayerTreeFrameSinkState = perfetto_pbzero_enum_ChromeCompositorStateMachine_MajorState::LayerTreeFrameSinkState; +namespace perfetto_pbzero_enum_ChromeCompositorStateMachine_MinorState { +enum ScrollHandlerState : int32_t; +} // namespace perfetto_pbzero_enum_ChromeCompositorStateMachine_MinorState +using ChromeCompositorStateMachine_MinorState_ScrollHandlerState = perfetto_pbzero_enum_ChromeCompositorStateMachine_MinorState::ScrollHandlerState; +namespace perfetto_pbzero_enum_ChromeCompositorStateMachine_MinorState { +enum TreePriority : int32_t; +} // namespace perfetto_pbzero_enum_ChromeCompositorStateMachine_MinorState +using ChromeCompositorStateMachine_MinorState_TreePriority = perfetto_pbzero_enum_ChromeCompositorStateMachine_MinorState::TreePriority; enum ChromeCompositorSchedulerAction : int32_t { CC_SCHEDULER_ACTION_UNSPECIFIED = 0, @@ -120185,100 +117998,362 @@ enum ChromeCompositorSchedulerAction : int32_t { CC_SCHEDULER_ACTION_NOTIFY_BEGIN_MAIN_FRAME_NOT_EXPECTED_SOON = 13, }; -const ChromeCompositorSchedulerAction ChromeCompositorSchedulerAction_MIN = CC_SCHEDULER_ACTION_UNSPECIFIED; -const ChromeCompositorSchedulerAction ChromeCompositorSchedulerAction_MAX = CC_SCHEDULER_ACTION_NOTIFY_BEGIN_MAIN_FRAME_NOT_EXPECTED_SOON; +constexpr ChromeCompositorSchedulerAction ChromeCompositorSchedulerAction_MIN = ChromeCompositorSchedulerAction::CC_SCHEDULER_ACTION_UNSPECIFIED; +constexpr ChromeCompositorSchedulerAction ChromeCompositorSchedulerAction_MAX = ChromeCompositorSchedulerAction::CC_SCHEDULER_ACTION_NOTIFY_BEGIN_MAIN_FRAME_NOT_EXPECTED_SOON; -enum BeginImplFrameArgs_State : int32_t { - BeginImplFrameArgs_State_BEGIN_FRAME_FINISHED = 0, - BeginImplFrameArgs_State_BEGIN_FRAME_USING = 1, + +PERFETTO_PROTOZERO_CONSTEXPR14_OR_INLINE +const char* ChromeCompositorSchedulerAction_Name(::perfetto::protos::pbzero::ChromeCompositorSchedulerAction value) { + switch (value) { + case ::perfetto::protos::pbzero::ChromeCompositorSchedulerAction::CC_SCHEDULER_ACTION_UNSPECIFIED: + return "CC_SCHEDULER_ACTION_UNSPECIFIED"; + + case ::perfetto::protos::pbzero::ChromeCompositorSchedulerAction::CC_SCHEDULER_ACTION_NONE: + return "CC_SCHEDULER_ACTION_NONE"; + + case ::perfetto::protos::pbzero::ChromeCompositorSchedulerAction::CC_SCHEDULER_ACTION_SEND_BEGIN_MAIN_FRAME: + return "CC_SCHEDULER_ACTION_SEND_BEGIN_MAIN_FRAME"; + + case ::perfetto::protos::pbzero::ChromeCompositorSchedulerAction::CC_SCHEDULER_ACTION_COMMIT: + return "CC_SCHEDULER_ACTION_COMMIT"; + + case ::perfetto::protos::pbzero::ChromeCompositorSchedulerAction::CC_SCHEDULER_ACTION_ACTIVATE_SYNC_TREE: + return "CC_SCHEDULER_ACTION_ACTIVATE_SYNC_TREE"; + + case ::perfetto::protos::pbzero::ChromeCompositorSchedulerAction::CC_SCHEDULER_ACTION_DRAW_IF_POSSIBLE: + return "CC_SCHEDULER_ACTION_DRAW_IF_POSSIBLE"; + + case ::perfetto::protos::pbzero::ChromeCompositorSchedulerAction::CC_SCHEDULER_ACTION_DRAW_FORCED: + return "CC_SCHEDULER_ACTION_DRAW_FORCED"; + + case ::perfetto::protos::pbzero::ChromeCompositorSchedulerAction::CC_SCHEDULER_ACTION_DRAW_ABORT: + return "CC_SCHEDULER_ACTION_DRAW_ABORT"; + + case ::perfetto::protos::pbzero::ChromeCompositorSchedulerAction::CC_SCHEDULER_ACTION_BEGIN_LAYER_TREE_FRAME_SINK_CREATION: + return "CC_SCHEDULER_ACTION_BEGIN_LAYER_TREE_FRAME_SINK_CREATION"; + + case ::perfetto::protos::pbzero::ChromeCompositorSchedulerAction::CC_SCHEDULER_ACTION_PREPARE_TILES: + return "CC_SCHEDULER_ACTION_PREPARE_TILES"; + + case ::perfetto::protos::pbzero::ChromeCompositorSchedulerAction::CC_SCHEDULER_ACTION_INVALIDATE_LAYER_TREE_FRAME_SINK: + return "CC_SCHEDULER_ACTION_INVALIDATE_LAYER_TREE_FRAME_SINK"; + + case ::perfetto::protos::pbzero::ChromeCompositorSchedulerAction::CC_SCHEDULER_ACTION_PERFORM_IMPL_SIDE_INVALIDATION: + return "CC_SCHEDULER_ACTION_PERFORM_IMPL_SIDE_INVALIDATION"; + + case ::perfetto::protos::pbzero::ChromeCompositorSchedulerAction::CC_SCHEDULER_ACTION_NOTIFY_BEGIN_MAIN_FRAME_NOT_EXPECTED_UNTIL: + return "CC_SCHEDULER_ACTION_NOTIFY_BEGIN_MAIN_FRAME_NOT_EXPECTED_UNTIL"; + + case ::perfetto::protos::pbzero::ChromeCompositorSchedulerAction::CC_SCHEDULER_ACTION_NOTIFY_BEGIN_MAIN_FRAME_NOT_EXPECTED_SOON: + return "CC_SCHEDULER_ACTION_NOTIFY_BEGIN_MAIN_FRAME_NOT_EXPECTED_SOON"; + } + return "PBZERO_UNKNOWN_ENUM_VALUE"; +} + +namespace perfetto_pbzero_enum_BeginImplFrameArgs { +enum State : int32_t { + BEGIN_FRAME_FINISHED = 0, + BEGIN_FRAME_USING = 1, }; +} // namespace perfetto_pbzero_enum_BeginImplFrameArgs +using BeginImplFrameArgs_State = perfetto_pbzero_enum_BeginImplFrameArgs::State; -const BeginImplFrameArgs_State BeginImplFrameArgs_State_MIN = BeginImplFrameArgs_State_BEGIN_FRAME_FINISHED; -const BeginImplFrameArgs_State BeginImplFrameArgs_State_MAX = BeginImplFrameArgs_State_BEGIN_FRAME_USING; -enum BeginFrameArgs_BeginFrameArgsType : int32_t { - BeginFrameArgs_BeginFrameArgsType_BEGIN_FRAME_ARGS_TYPE_UNSPECIFIED = 0, - BeginFrameArgs_BeginFrameArgsType_BEGIN_FRAME_ARGS_TYPE_INVALID = 1, - BeginFrameArgs_BeginFrameArgsType_BEGIN_FRAME_ARGS_TYPE_NORMAL = 2, - BeginFrameArgs_BeginFrameArgsType_BEGIN_FRAME_ARGS_TYPE_MISSED = 3, +constexpr BeginImplFrameArgs_State BeginImplFrameArgs_State_MIN = BeginImplFrameArgs_State::BEGIN_FRAME_FINISHED; +constexpr BeginImplFrameArgs_State BeginImplFrameArgs_State_MAX = BeginImplFrameArgs_State::BEGIN_FRAME_USING; + + +PERFETTO_PROTOZERO_CONSTEXPR14_OR_INLINE +const char* BeginImplFrameArgs_State_Name(::perfetto::protos::pbzero::BeginImplFrameArgs_State value) { + switch (value) { + case ::perfetto::protos::pbzero::BeginImplFrameArgs_State::BEGIN_FRAME_FINISHED: + return "BEGIN_FRAME_FINISHED"; + + case ::perfetto::protos::pbzero::BeginImplFrameArgs_State::BEGIN_FRAME_USING: + return "BEGIN_FRAME_USING"; + } + return "PBZERO_UNKNOWN_ENUM_VALUE"; +} + +namespace perfetto_pbzero_enum_BeginFrameArgs { +enum BeginFrameArgsType : int32_t { + BEGIN_FRAME_ARGS_TYPE_UNSPECIFIED = 0, + BEGIN_FRAME_ARGS_TYPE_INVALID = 1, + BEGIN_FRAME_ARGS_TYPE_NORMAL = 2, + BEGIN_FRAME_ARGS_TYPE_MISSED = 3, }; +} // namespace perfetto_pbzero_enum_BeginFrameArgs +using BeginFrameArgs_BeginFrameArgsType = perfetto_pbzero_enum_BeginFrameArgs::BeginFrameArgsType; -const BeginFrameArgs_BeginFrameArgsType BeginFrameArgs_BeginFrameArgsType_MIN = BeginFrameArgs_BeginFrameArgsType_BEGIN_FRAME_ARGS_TYPE_UNSPECIFIED; -const BeginFrameArgs_BeginFrameArgsType BeginFrameArgs_BeginFrameArgsType_MAX = BeginFrameArgs_BeginFrameArgsType_BEGIN_FRAME_ARGS_TYPE_MISSED; -enum ChromeCompositorStateMachine_MinorState_TreePriority : int32_t { - ChromeCompositorStateMachine_MinorState_TreePriority_TREE_PRIORITY_UNSPECIFIED = 0, - ChromeCompositorStateMachine_MinorState_TreePriority_TREE_PRIORITY_SAME_PRIORITY_FOR_BOTH_TREES = 1, - ChromeCompositorStateMachine_MinorState_TreePriority_TREE_PRIORITY_SMOOTHNESS_TAKES_PRIORITY = 2, - ChromeCompositorStateMachine_MinorState_TreePriority_TREE_PRIORITY_NEW_CONTENT_TAKES_PRIORITY = 3, +constexpr BeginFrameArgs_BeginFrameArgsType BeginFrameArgs_BeginFrameArgsType_MIN = BeginFrameArgs_BeginFrameArgsType::BEGIN_FRAME_ARGS_TYPE_UNSPECIFIED; +constexpr BeginFrameArgs_BeginFrameArgsType BeginFrameArgs_BeginFrameArgsType_MAX = BeginFrameArgs_BeginFrameArgsType::BEGIN_FRAME_ARGS_TYPE_MISSED; + + +PERFETTO_PROTOZERO_CONSTEXPR14_OR_INLINE +const char* BeginFrameArgs_BeginFrameArgsType_Name(::perfetto::protos::pbzero::BeginFrameArgs_BeginFrameArgsType value) { + switch (value) { + case ::perfetto::protos::pbzero::BeginFrameArgs_BeginFrameArgsType::BEGIN_FRAME_ARGS_TYPE_UNSPECIFIED: + return "BEGIN_FRAME_ARGS_TYPE_UNSPECIFIED"; + + case ::perfetto::protos::pbzero::BeginFrameArgs_BeginFrameArgsType::BEGIN_FRAME_ARGS_TYPE_INVALID: + return "BEGIN_FRAME_ARGS_TYPE_INVALID"; + + case ::perfetto::protos::pbzero::BeginFrameArgs_BeginFrameArgsType::BEGIN_FRAME_ARGS_TYPE_NORMAL: + return "BEGIN_FRAME_ARGS_TYPE_NORMAL"; + + case ::perfetto::protos::pbzero::BeginFrameArgs_BeginFrameArgsType::BEGIN_FRAME_ARGS_TYPE_MISSED: + return "BEGIN_FRAME_ARGS_TYPE_MISSED"; + } + return "PBZERO_UNKNOWN_ENUM_VALUE"; +} + +namespace perfetto_pbzero_enum_ChromeCompositorStateMachine_MinorState { +enum TreePriority : int32_t { + TREE_PRIORITY_UNSPECIFIED = 0, + TREE_PRIORITY_SAME_PRIORITY_FOR_BOTH_TREES = 1, + TREE_PRIORITY_SMOOTHNESS_TAKES_PRIORITY = 2, + TREE_PRIORITY_NEW_CONTENT_TAKES_PRIORITY = 3, }; +} // namespace perfetto_pbzero_enum_ChromeCompositorStateMachine_MinorState +using ChromeCompositorStateMachine_MinorState_TreePriority = perfetto_pbzero_enum_ChromeCompositorStateMachine_MinorState::TreePriority; -const ChromeCompositorStateMachine_MinorState_TreePriority ChromeCompositorStateMachine_MinorState_TreePriority_MIN = ChromeCompositorStateMachine_MinorState_TreePriority_TREE_PRIORITY_UNSPECIFIED; -const ChromeCompositorStateMachine_MinorState_TreePriority ChromeCompositorStateMachine_MinorState_TreePriority_MAX = ChromeCompositorStateMachine_MinorState_TreePriority_TREE_PRIORITY_NEW_CONTENT_TAKES_PRIORITY; -enum ChromeCompositorStateMachine_MinorState_ScrollHandlerState : int32_t { - ChromeCompositorStateMachine_MinorState_ScrollHandlerState_SCROLL_HANDLER_UNSPECIFIED = 0, - ChromeCompositorStateMachine_MinorState_ScrollHandlerState_SCROLL_AFFECTS_SCROLL_HANDLER = 1, - ChromeCompositorStateMachine_MinorState_ScrollHandlerState_SCROLL_DOES_NOT_AFFECT_SCROLL_HANDLER = 2, +constexpr ChromeCompositorStateMachine_MinorState_TreePriority ChromeCompositorStateMachine_MinorState_TreePriority_MIN = ChromeCompositorStateMachine_MinorState_TreePriority::TREE_PRIORITY_UNSPECIFIED; +constexpr ChromeCompositorStateMachine_MinorState_TreePriority ChromeCompositorStateMachine_MinorState_TreePriority_MAX = ChromeCompositorStateMachine_MinorState_TreePriority::TREE_PRIORITY_NEW_CONTENT_TAKES_PRIORITY; + + +PERFETTO_PROTOZERO_CONSTEXPR14_OR_INLINE +const char* ChromeCompositorStateMachine_MinorState_TreePriority_Name(::perfetto::protos::pbzero::ChromeCompositorStateMachine_MinorState_TreePriority value) { + switch (value) { + case ::perfetto::protos::pbzero::ChromeCompositorStateMachine_MinorState_TreePriority::TREE_PRIORITY_UNSPECIFIED: + return "TREE_PRIORITY_UNSPECIFIED"; + + case ::perfetto::protos::pbzero::ChromeCompositorStateMachine_MinorState_TreePriority::TREE_PRIORITY_SAME_PRIORITY_FOR_BOTH_TREES: + return "TREE_PRIORITY_SAME_PRIORITY_FOR_BOTH_TREES"; + + case ::perfetto::protos::pbzero::ChromeCompositorStateMachine_MinorState_TreePriority::TREE_PRIORITY_SMOOTHNESS_TAKES_PRIORITY: + return "TREE_PRIORITY_SMOOTHNESS_TAKES_PRIORITY"; + + case ::perfetto::protos::pbzero::ChromeCompositorStateMachine_MinorState_TreePriority::TREE_PRIORITY_NEW_CONTENT_TAKES_PRIORITY: + return "TREE_PRIORITY_NEW_CONTENT_TAKES_PRIORITY"; + } + return "PBZERO_UNKNOWN_ENUM_VALUE"; +} + +namespace perfetto_pbzero_enum_ChromeCompositorStateMachine_MinorState { +enum ScrollHandlerState : int32_t { + SCROLL_HANDLER_UNSPECIFIED = 0, + SCROLL_AFFECTS_SCROLL_HANDLER = 1, + SCROLL_DOES_NOT_AFFECT_SCROLL_HANDLER = 2, }; +} // namespace perfetto_pbzero_enum_ChromeCompositorStateMachine_MinorState +using ChromeCompositorStateMachine_MinorState_ScrollHandlerState = perfetto_pbzero_enum_ChromeCompositorStateMachine_MinorState::ScrollHandlerState; -const ChromeCompositorStateMachine_MinorState_ScrollHandlerState ChromeCompositorStateMachine_MinorState_ScrollHandlerState_MIN = ChromeCompositorStateMachine_MinorState_ScrollHandlerState_SCROLL_HANDLER_UNSPECIFIED; -const ChromeCompositorStateMachine_MinorState_ScrollHandlerState ChromeCompositorStateMachine_MinorState_ScrollHandlerState_MAX = ChromeCompositorStateMachine_MinorState_ScrollHandlerState_SCROLL_DOES_NOT_AFFECT_SCROLL_HANDLER; -enum ChromeCompositorStateMachine_MajorState_BeginImplFrameState : int32_t { - ChromeCompositorStateMachine_MajorState_BeginImplFrameState_BEGIN_IMPL_FRAME_UNSPECIFIED = 0, - ChromeCompositorStateMachine_MajorState_BeginImplFrameState_BEGIN_IMPL_FRAME_IDLE = 1, - ChromeCompositorStateMachine_MajorState_BeginImplFrameState_BEGIN_IMPL_FRAME_INSIDE_BEGIN_FRAME = 2, - ChromeCompositorStateMachine_MajorState_BeginImplFrameState_BEGIN_IMPL_FRAME_INSIDE_DEADLINE = 3, +constexpr ChromeCompositorStateMachine_MinorState_ScrollHandlerState ChromeCompositorStateMachine_MinorState_ScrollHandlerState_MIN = ChromeCompositorStateMachine_MinorState_ScrollHandlerState::SCROLL_HANDLER_UNSPECIFIED; +constexpr ChromeCompositorStateMachine_MinorState_ScrollHandlerState ChromeCompositorStateMachine_MinorState_ScrollHandlerState_MAX = ChromeCompositorStateMachine_MinorState_ScrollHandlerState::SCROLL_DOES_NOT_AFFECT_SCROLL_HANDLER; + + +PERFETTO_PROTOZERO_CONSTEXPR14_OR_INLINE +const char* ChromeCompositorStateMachine_MinorState_ScrollHandlerState_Name(::perfetto::protos::pbzero::ChromeCompositorStateMachine_MinorState_ScrollHandlerState value) { + switch (value) { + case ::perfetto::protos::pbzero::ChromeCompositorStateMachine_MinorState_ScrollHandlerState::SCROLL_HANDLER_UNSPECIFIED: + return "SCROLL_HANDLER_UNSPECIFIED"; + + case ::perfetto::protos::pbzero::ChromeCompositorStateMachine_MinorState_ScrollHandlerState::SCROLL_AFFECTS_SCROLL_HANDLER: + return "SCROLL_AFFECTS_SCROLL_HANDLER"; + + case ::perfetto::protos::pbzero::ChromeCompositorStateMachine_MinorState_ScrollHandlerState::SCROLL_DOES_NOT_AFFECT_SCROLL_HANDLER: + return "SCROLL_DOES_NOT_AFFECT_SCROLL_HANDLER"; + } + return "PBZERO_UNKNOWN_ENUM_VALUE"; +} + +namespace perfetto_pbzero_enum_ChromeCompositorStateMachine_MajorState { +enum BeginImplFrameState : int32_t { + BEGIN_IMPL_FRAME_UNSPECIFIED = 0, + BEGIN_IMPL_FRAME_IDLE = 1, + BEGIN_IMPL_FRAME_INSIDE_BEGIN_FRAME = 2, + BEGIN_IMPL_FRAME_INSIDE_DEADLINE = 3, }; +} // namespace perfetto_pbzero_enum_ChromeCompositorStateMachine_MajorState +using ChromeCompositorStateMachine_MajorState_BeginImplFrameState = perfetto_pbzero_enum_ChromeCompositorStateMachine_MajorState::BeginImplFrameState; -const ChromeCompositorStateMachine_MajorState_BeginImplFrameState ChromeCompositorStateMachine_MajorState_BeginImplFrameState_MIN = ChromeCompositorStateMachine_MajorState_BeginImplFrameState_BEGIN_IMPL_FRAME_UNSPECIFIED; -const ChromeCompositorStateMachine_MajorState_BeginImplFrameState ChromeCompositorStateMachine_MajorState_BeginImplFrameState_MAX = ChromeCompositorStateMachine_MajorState_BeginImplFrameState_BEGIN_IMPL_FRAME_INSIDE_DEADLINE; -enum ChromeCompositorStateMachine_MajorState_BeginMainFrameState : int32_t { - ChromeCompositorStateMachine_MajorState_BeginMainFrameState_BEGIN_MAIN_FRAME_UNSPECIFIED = 0, - ChromeCompositorStateMachine_MajorState_BeginMainFrameState_BEGIN_MAIN_FRAME_IDLE = 1, - ChromeCompositorStateMachine_MajorState_BeginMainFrameState_BEGIN_MAIN_FRAME_SENT = 2, - ChromeCompositorStateMachine_MajorState_BeginMainFrameState_BEGIN_MAIN_FRAME_READY_TO_COMMIT = 3, +constexpr ChromeCompositorStateMachine_MajorState_BeginImplFrameState ChromeCompositorStateMachine_MajorState_BeginImplFrameState_MIN = ChromeCompositorStateMachine_MajorState_BeginImplFrameState::BEGIN_IMPL_FRAME_UNSPECIFIED; +constexpr ChromeCompositorStateMachine_MajorState_BeginImplFrameState ChromeCompositorStateMachine_MajorState_BeginImplFrameState_MAX = ChromeCompositorStateMachine_MajorState_BeginImplFrameState::BEGIN_IMPL_FRAME_INSIDE_DEADLINE; + + +PERFETTO_PROTOZERO_CONSTEXPR14_OR_INLINE +const char* ChromeCompositorStateMachine_MajorState_BeginImplFrameState_Name(::perfetto::protos::pbzero::ChromeCompositorStateMachine_MajorState_BeginImplFrameState value) { + switch (value) { + case ::perfetto::protos::pbzero::ChromeCompositorStateMachine_MajorState_BeginImplFrameState::BEGIN_IMPL_FRAME_UNSPECIFIED: + return "BEGIN_IMPL_FRAME_UNSPECIFIED"; + + case ::perfetto::protos::pbzero::ChromeCompositorStateMachine_MajorState_BeginImplFrameState::BEGIN_IMPL_FRAME_IDLE: + return "BEGIN_IMPL_FRAME_IDLE"; + + case ::perfetto::protos::pbzero::ChromeCompositorStateMachine_MajorState_BeginImplFrameState::BEGIN_IMPL_FRAME_INSIDE_BEGIN_FRAME: + return "BEGIN_IMPL_FRAME_INSIDE_BEGIN_FRAME"; + + case ::perfetto::protos::pbzero::ChromeCompositorStateMachine_MajorState_BeginImplFrameState::BEGIN_IMPL_FRAME_INSIDE_DEADLINE: + return "BEGIN_IMPL_FRAME_INSIDE_DEADLINE"; + } + return "PBZERO_UNKNOWN_ENUM_VALUE"; +} + +namespace perfetto_pbzero_enum_ChromeCompositorStateMachine_MajorState { +enum BeginMainFrameState : int32_t { + BEGIN_MAIN_FRAME_UNSPECIFIED = 0, + BEGIN_MAIN_FRAME_IDLE = 1, + BEGIN_MAIN_FRAME_SENT = 2, + BEGIN_MAIN_FRAME_READY_TO_COMMIT = 3, }; +} // namespace perfetto_pbzero_enum_ChromeCompositorStateMachine_MajorState +using ChromeCompositorStateMachine_MajorState_BeginMainFrameState = perfetto_pbzero_enum_ChromeCompositorStateMachine_MajorState::BeginMainFrameState; -const ChromeCompositorStateMachine_MajorState_BeginMainFrameState ChromeCompositorStateMachine_MajorState_BeginMainFrameState_MIN = ChromeCompositorStateMachine_MajorState_BeginMainFrameState_BEGIN_MAIN_FRAME_UNSPECIFIED; -const ChromeCompositorStateMachine_MajorState_BeginMainFrameState ChromeCompositorStateMachine_MajorState_BeginMainFrameState_MAX = ChromeCompositorStateMachine_MajorState_BeginMainFrameState_BEGIN_MAIN_FRAME_READY_TO_COMMIT; -enum ChromeCompositorStateMachine_MajorState_LayerTreeFrameSinkState : int32_t { - ChromeCompositorStateMachine_MajorState_LayerTreeFrameSinkState_LAYER_TREE_FRAME_UNSPECIFIED = 0, - ChromeCompositorStateMachine_MajorState_LayerTreeFrameSinkState_LAYER_TREE_FRAME_NONE = 1, - ChromeCompositorStateMachine_MajorState_LayerTreeFrameSinkState_LAYER_TREE_FRAME_ACTIVE = 2, - ChromeCompositorStateMachine_MajorState_LayerTreeFrameSinkState_LAYER_TREE_FRAME_CREATING = 3, - ChromeCompositorStateMachine_MajorState_LayerTreeFrameSinkState_LAYER_TREE_FRAME_WAITING_FOR_FIRST_COMMIT = 4, - ChromeCompositorStateMachine_MajorState_LayerTreeFrameSinkState_LAYER_TREE_FRAME_WAITING_FOR_FIRST_ACTIVATION = 5, +constexpr ChromeCompositorStateMachine_MajorState_BeginMainFrameState ChromeCompositorStateMachine_MajorState_BeginMainFrameState_MIN = ChromeCompositorStateMachine_MajorState_BeginMainFrameState::BEGIN_MAIN_FRAME_UNSPECIFIED; +constexpr ChromeCompositorStateMachine_MajorState_BeginMainFrameState ChromeCompositorStateMachine_MajorState_BeginMainFrameState_MAX = ChromeCompositorStateMachine_MajorState_BeginMainFrameState::BEGIN_MAIN_FRAME_READY_TO_COMMIT; + + +PERFETTO_PROTOZERO_CONSTEXPR14_OR_INLINE +const char* ChromeCompositorStateMachine_MajorState_BeginMainFrameState_Name(::perfetto::protos::pbzero::ChromeCompositorStateMachine_MajorState_BeginMainFrameState value) { + switch (value) { + case ::perfetto::protos::pbzero::ChromeCompositorStateMachine_MajorState_BeginMainFrameState::BEGIN_MAIN_FRAME_UNSPECIFIED: + return "BEGIN_MAIN_FRAME_UNSPECIFIED"; + + case ::perfetto::protos::pbzero::ChromeCompositorStateMachine_MajorState_BeginMainFrameState::BEGIN_MAIN_FRAME_IDLE: + return "BEGIN_MAIN_FRAME_IDLE"; + + case ::perfetto::protos::pbzero::ChromeCompositorStateMachine_MajorState_BeginMainFrameState::BEGIN_MAIN_FRAME_SENT: + return "BEGIN_MAIN_FRAME_SENT"; + + case ::perfetto::protos::pbzero::ChromeCompositorStateMachine_MajorState_BeginMainFrameState::BEGIN_MAIN_FRAME_READY_TO_COMMIT: + return "BEGIN_MAIN_FRAME_READY_TO_COMMIT"; + } + return "PBZERO_UNKNOWN_ENUM_VALUE"; +} + +namespace perfetto_pbzero_enum_ChromeCompositorStateMachine_MajorState { +enum LayerTreeFrameSinkState : int32_t { + LAYER_TREE_FRAME_UNSPECIFIED = 0, + LAYER_TREE_FRAME_NONE = 1, + LAYER_TREE_FRAME_ACTIVE = 2, + LAYER_TREE_FRAME_CREATING = 3, + LAYER_TREE_FRAME_WAITING_FOR_FIRST_COMMIT = 4, + LAYER_TREE_FRAME_WAITING_FOR_FIRST_ACTIVATION = 5, }; +} // namespace perfetto_pbzero_enum_ChromeCompositorStateMachine_MajorState +using ChromeCompositorStateMachine_MajorState_LayerTreeFrameSinkState = perfetto_pbzero_enum_ChromeCompositorStateMachine_MajorState::LayerTreeFrameSinkState; -const ChromeCompositorStateMachine_MajorState_LayerTreeFrameSinkState ChromeCompositorStateMachine_MajorState_LayerTreeFrameSinkState_MIN = ChromeCompositorStateMachine_MajorState_LayerTreeFrameSinkState_LAYER_TREE_FRAME_UNSPECIFIED; -const ChromeCompositorStateMachine_MajorState_LayerTreeFrameSinkState ChromeCompositorStateMachine_MajorState_LayerTreeFrameSinkState_MAX = ChromeCompositorStateMachine_MajorState_LayerTreeFrameSinkState_LAYER_TREE_FRAME_WAITING_FOR_FIRST_ACTIVATION; -enum ChromeCompositorStateMachine_MajorState_ForcedRedrawOnTimeoutState : int32_t { - ChromeCompositorStateMachine_MajorState_ForcedRedrawOnTimeoutState_FORCED_REDRAW_UNSPECIFIED = 0, - ChromeCompositorStateMachine_MajorState_ForcedRedrawOnTimeoutState_FORCED_REDRAW_IDLE = 1, - ChromeCompositorStateMachine_MajorState_ForcedRedrawOnTimeoutState_FORCED_REDRAW_WAITING_FOR_COMMIT = 2, - ChromeCompositorStateMachine_MajorState_ForcedRedrawOnTimeoutState_FORCED_REDRAW_WAITING_FOR_ACTIVATION = 3, - ChromeCompositorStateMachine_MajorState_ForcedRedrawOnTimeoutState_FORCED_REDRAW_WAITING_FOR_DRAW = 4, +constexpr ChromeCompositorStateMachine_MajorState_LayerTreeFrameSinkState ChromeCompositorStateMachine_MajorState_LayerTreeFrameSinkState_MIN = ChromeCompositorStateMachine_MajorState_LayerTreeFrameSinkState::LAYER_TREE_FRAME_UNSPECIFIED; +constexpr ChromeCompositorStateMachine_MajorState_LayerTreeFrameSinkState ChromeCompositorStateMachine_MajorState_LayerTreeFrameSinkState_MAX = ChromeCompositorStateMachine_MajorState_LayerTreeFrameSinkState::LAYER_TREE_FRAME_WAITING_FOR_FIRST_ACTIVATION; + + +PERFETTO_PROTOZERO_CONSTEXPR14_OR_INLINE +const char* ChromeCompositorStateMachine_MajorState_LayerTreeFrameSinkState_Name(::perfetto::protos::pbzero::ChromeCompositorStateMachine_MajorState_LayerTreeFrameSinkState value) { + switch (value) { + case ::perfetto::protos::pbzero::ChromeCompositorStateMachine_MajorState_LayerTreeFrameSinkState::LAYER_TREE_FRAME_UNSPECIFIED: + return "LAYER_TREE_FRAME_UNSPECIFIED"; + + case ::perfetto::protos::pbzero::ChromeCompositorStateMachine_MajorState_LayerTreeFrameSinkState::LAYER_TREE_FRAME_NONE: + return "LAYER_TREE_FRAME_NONE"; + + case ::perfetto::protos::pbzero::ChromeCompositorStateMachine_MajorState_LayerTreeFrameSinkState::LAYER_TREE_FRAME_ACTIVE: + return "LAYER_TREE_FRAME_ACTIVE"; + + case ::perfetto::protos::pbzero::ChromeCompositorStateMachine_MajorState_LayerTreeFrameSinkState::LAYER_TREE_FRAME_CREATING: + return "LAYER_TREE_FRAME_CREATING"; + + case ::perfetto::protos::pbzero::ChromeCompositorStateMachine_MajorState_LayerTreeFrameSinkState::LAYER_TREE_FRAME_WAITING_FOR_FIRST_COMMIT: + return "LAYER_TREE_FRAME_WAITING_FOR_FIRST_COMMIT"; + + case ::perfetto::protos::pbzero::ChromeCompositorStateMachine_MajorState_LayerTreeFrameSinkState::LAYER_TREE_FRAME_WAITING_FOR_FIRST_ACTIVATION: + return "LAYER_TREE_FRAME_WAITING_FOR_FIRST_ACTIVATION"; + } + return "PBZERO_UNKNOWN_ENUM_VALUE"; +} + +namespace perfetto_pbzero_enum_ChromeCompositorStateMachine_MajorState { +enum ForcedRedrawOnTimeoutState : int32_t { + FORCED_REDRAW_UNSPECIFIED = 0, + FORCED_REDRAW_IDLE = 1, + FORCED_REDRAW_WAITING_FOR_COMMIT = 2, + FORCED_REDRAW_WAITING_FOR_ACTIVATION = 3, + FORCED_REDRAW_WAITING_FOR_DRAW = 4, }; +} // namespace perfetto_pbzero_enum_ChromeCompositorStateMachine_MajorState +using ChromeCompositorStateMachine_MajorState_ForcedRedrawOnTimeoutState = perfetto_pbzero_enum_ChromeCompositorStateMachine_MajorState::ForcedRedrawOnTimeoutState; -const ChromeCompositorStateMachine_MajorState_ForcedRedrawOnTimeoutState ChromeCompositorStateMachine_MajorState_ForcedRedrawOnTimeoutState_MIN = ChromeCompositorStateMachine_MajorState_ForcedRedrawOnTimeoutState_FORCED_REDRAW_UNSPECIFIED; -const ChromeCompositorStateMachine_MajorState_ForcedRedrawOnTimeoutState ChromeCompositorStateMachine_MajorState_ForcedRedrawOnTimeoutState_MAX = ChromeCompositorStateMachine_MajorState_ForcedRedrawOnTimeoutState_FORCED_REDRAW_WAITING_FOR_DRAW; -enum ChromeCompositorSchedulerState_BeginImplFrameDeadlineMode : int32_t { - ChromeCompositorSchedulerState_BeginImplFrameDeadlineMode_DEADLINE_MODE_UNSPECIFIED = 0, - ChromeCompositorSchedulerState_BeginImplFrameDeadlineMode_DEADLINE_MODE_NONE = 1, - ChromeCompositorSchedulerState_BeginImplFrameDeadlineMode_DEADLINE_MODE_IMMEDIATE = 2, - ChromeCompositorSchedulerState_BeginImplFrameDeadlineMode_DEADLINE_MODE_REGULAR = 3, - ChromeCompositorSchedulerState_BeginImplFrameDeadlineMode_DEADLINE_MODE_LATE = 4, - ChromeCompositorSchedulerState_BeginImplFrameDeadlineMode_DEADLINE_MODE_BLOCKED = 5, +constexpr ChromeCompositorStateMachine_MajorState_ForcedRedrawOnTimeoutState ChromeCompositorStateMachine_MajorState_ForcedRedrawOnTimeoutState_MIN = ChromeCompositorStateMachine_MajorState_ForcedRedrawOnTimeoutState::FORCED_REDRAW_UNSPECIFIED; +constexpr ChromeCompositorStateMachine_MajorState_ForcedRedrawOnTimeoutState ChromeCompositorStateMachine_MajorState_ForcedRedrawOnTimeoutState_MAX = ChromeCompositorStateMachine_MajorState_ForcedRedrawOnTimeoutState::FORCED_REDRAW_WAITING_FOR_DRAW; + + +PERFETTO_PROTOZERO_CONSTEXPR14_OR_INLINE +const char* ChromeCompositorStateMachine_MajorState_ForcedRedrawOnTimeoutState_Name(::perfetto::protos::pbzero::ChromeCompositorStateMachine_MajorState_ForcedRedrawOnTimeoutState value) { + switch (value) { + case ::perfetto::protos::pbzero::ChromeCompositorStateMachine_MajorState_ForcedRedrawOnTimeoutState::FORCED_REDRAW_UNSPECIFIED: + return "FORCED_REDRAW_UNSPECIFIED"; + + case ::perfetto::protos::pbzero::ChromeCompositorStateMachine_MajorState_ForcedRedrawOnTimeoutState::FORCED_REDRAW_IDLE: + return "FORCED_REDRAW_IDLE"; + + case ::perfetto::protos::pbzero::ChromeCompositorStateMachine_MajorState_ForcedRedrawOnTimeoutState::FORCED_REDRAW_WAITING_FOR_COMMIT: + return "FORCED_REDRAW_WAITING_FOR_COMMIT"; + + case ::perfetto::protos::pbzero::ChromeCompositorStateMachine_MajorState_ForcedRedrawOnTimeoutState::FORCED_REDRAW_WAITING_FOR_ACTIVATION: + return "FORCED_REDRAW_WAITING_FOR_ACTIVATION"; + + case ::perfetto::protos::pbzero::ChromeCompositorStateMachine_MajorState_ForcedRedrawOnTimeoutState::FORCED_REDRAW_WAITING_FOR_DRAW: + return "FORCED_REDRAW_WAITING_FOR_DRAW"; + } + return "PBZERO_UNKNOWN_ENUM_VALUE"; +} + +namespace perfetto_pbzero_enum_ChromeCompositorSchedulerState { +enum BeginImplFrameDeadlineMode : int32_t { + DEADLINE_MODE_UNSPECIFIED = 0, + DEADLINE_MODE_NONE = 1, + DEADLINE_MODE_IMMEDIATE = 2, + DEADLINE_MODE_REGULAR = 3, + DEADLINE_MODE_LATE = 4, + DEADLINE_MODE_BLOCKED = 5, }; +} // namespace perfetto_pbzero_enum_ChromeCompositorSchedulerState +using ChromeCompositorSchedulerState_BeginImplFrameDeadlineMode = perfetto_pbzero_enum_ChromeCompositorSchedulerState::BeginImplFrameDeadlineMode; -const ChromeCompositorSchedulerState_BeginImplFrameDeadlineMode ChromeCompositorSchedulerState_BeginImplFrameDeadlineMode_MIN = ChromeCompositorSchedulerState_BeginImplFrameDeadlineMode_DEADLINE_MODE_UNSPECIFIED; -const ChromeCompositorSchedulerState_BeginImplFrameDeadlineMode ChromeCompositorSchedulerState_BeginImplFrameDeadlineMode_MAX = ChromeCompositorSchedulerState_BeginImplFrameDeadlineMode_DEADLINE_MODE_BLOCKED; + +constexpr ChromeCompositorSchedulerState_BeginImplFrameDeadlineMode ChromeCompositorSchedulerState_BeginImplFrameDeadlineMode_MIN = ChromeCompositorSchedulerState_BeginImplFrameDeadlineMode::DEADLINE_MODE_UNSPECIFIED; +constexpr ChromeCompositorSchedulerState_BeginImplFrameDeadlineMode ChromeCompositorSchedulerState_BeginImplFrameDeadlineMode_MAX = ChromeCompositorSchedulerState_BeginImplFrameDeadlineMode::DEADLINE_MODE_BLOCKED; + + +PERFETTO_PROTOZERO_CONSTEXPR14_OR_INLINE +const char* ChromeCompositorSchedulerState_BeginImplFrameDeadlineMode_Name(::perfetto::protos::pbzero::ChromeCompositorSchedulerState_BeginImplFrameDeadlineMode value) { + switch (value) { + case ::perfetto::protos::pbzero::ChromeCompositorSchedulerState_BeginImplFrameDeadlineMode::DEADLINE_MODE_UNSPECIFIED: + return "DEADLINE_MODE_UNSPECIFIED"; + + case ::perfetto::protos::pbzero::ChromeCompositorSchedulerState_BeginImplFrameDeadlineMode::DEADLINE_MODE_NONE: + return "DEADLINE_MODE_NONE"; + + case ::perfetto::protos::pbzero::ChromeCompositorSchedulerState_BeginImplFrameDeadlineMode::DEADLINE_MODE_IMMEDIATE: + return "DEADLINE_MODE_IMMEDIATE"; + + case ::perfetto::protos::pbzero::ChromeCompositorSchedulerState_BeginImplFrameDeadlineMode::DEADLINE_MODE_REGULAR: + return "DEADLINE_MODE_REGULAR"; + + case ::perfetto::protos::pbzero::ChromeCompositorSchedulerState_BeginImplFrameDeadlineMode::DEADLINE_MODE_LATE: + return "DEADLINE_MODE_LATE"; + + case ::perfetto::protos::pbzero::ChromeCompositorSchedulerState_BeginImplFrameDeadlineMode::DEADLINE_MODE_BLOCKED: + return "DEADLINE_MODE_BLOCKED"; + } + return "PBZERO_UNKNOWN_ENUM_VALUE"; +} class CompositorTimingHistory_Decoder : public ::protozero::TypedProtoDecoder { public: @@ -120324,14 +118399,7 @@ class CompositorTimingHistory : public ::protozero::Message { int64_t, CompositorTimingHistory>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_BeginMainFrameQueueCriticalEstimateDeltaUs kBeginMainFrameQueueCriticalEstimateDeltaUs() { return {}; } + static constexpr FieldMetadata_BeginMainFrameQueueCriticalEstimateDeltaUs kBeginMainFrameQueueCriticalEstimateDeltaUs{}; void set_begin_main_frame_queue_critical_estimate_delta_us(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_BeginMainFrameQueueCriticalEstimateDeltaUs::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -120349,14 +118417,7 @@ class CompositorTimingHistory : public ::protozero::Message { int64_t, CompositorTimingHistory>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_BeginMainFrameQueueNotCriticalEstimateDeltaUs kBeginMainFrameQueueNotCriticalEstimateDeltaUs() { return {}; } + static constexpr FieldMetadata_BeginMainFrameQueueNotCriticalEstimateDeltaUs kBeginMainFrameQueueNotCriticalEstimateDeltaUs{}; void set_begin_main_frame_queue_not_critical_estimate_delta_us(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_BeginMainFrameQueueNotCriticalEstimateDeltaUs::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -120374,14 +118435,7 @@ class CompositorTimingHistory : public ::protozero::Message { int64_t, CompositorTimingHistory>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_BeginMainFrameStartToReadyToCommitEstimateDeltaUs kBeginMainFrameStartToReadyToCommitEstimateDeltaUs() { return {}; } + static constexpr FieldMetadata_BeginMainFrameStartToReadyToCommitEstimateDeltaUs kBeginMainFrameStartToReadyToCommitEstimateDeltaUs{}; void set_begin_main_frame_start_to_ready_to_commit_estimate_delta_us(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_BeginMainFrameStartToReadyToCommitEstimateDeltaUs::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -120399,14 +118453,7 @@ class CompositorTimingHistory : public ::protozero::Message { int64_t, CompositorTimingHistory>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_CommitToReadyToActivateEstimateDeltaUs kCommitToReadyToActivateEstimateDeltaUs() { return {}; } + static constexpr FieldMetadata_CommitToReadyToActivateEstimateDeltaUs kCommitToReadyToActivateEstimateDeltaUs{}; void set_commit_to_ready_to_activate_estimate_delta_us(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_CommitToReadyToActivateEstimateDeltaUs::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -120424,14 +118471,7 @@ class CompositorTimingHistory : public ::protozero::Message { int64_t, CompositorTimingHistory>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_PrepareTilesEstimateDeltaUs kPrepareTilesEstimateDeltaUs() { return {}; } + static constexpr FieldMetadata_PrepareTilesEstimateDeltaUs kPrepareTilesEstimateDeltaUs{}; void set_prepare_tiles_estimate_delta_us(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_PrepareTilesEstimateDeltaUs::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -120449,14 +118489,7 @@ class CompositorTimingHistory : public ::protozero::Message { int64_t, CompositorTimingHistory>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ActivateEstimateDeltaUs kActivateEstimateDeltaUs() { return {}; } + static constexpr FieldMetadata_ActivateEstimateDeltaUs kActivateEstimateDeltaUs{}; void set_activate_estimate_delta_us(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_ActivateEstimateDeltaUs::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -120474,14 +118507,7 @@ class CompositorTimingHistory : public ::protozero::Message { int64_t, CompositorTimingHistory>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_DrawEstimateDeltaUs kDrawEstimateDeltaUs() { return {}; } + static constexpr FieldMetadata_DrawEstimateDeltaUs kDrawEstimateDeltaUs{}; void set_draw_estimate_delta_us(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_DrawEstimateDeltaUs::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -120527,14 +118553,7 @@ class BeginFrameSourceState : public ::protozero::Message { uint32_t, BeginFrameSourceState>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_SourceId kSourceId() { return {}; } + static constexpr FieldMetadata_SourceId kSourceId{}; void set_source_id(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_SourceId::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -120552,14 +118571,7 @@ class BeginFrameSourceState : public ::protozero::Message { bool, BeginFrameSourceState>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Paused kPaused() { return {}; } + static constexpr FieldMetadata_Paused kPaused{}; void set_paused(bool value) { static constexpr uint32_t field_id = FieldMetadata_Paused::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -120577,14 +118589,7 @@ class BeginFrameSourceState : public ::protozero::Message { uint32_t, BeginFrameSourceState>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_NumObservers kNumObservers() { return {}; } + static constexpr FieldMetadata_NumObservers kNumObservers{}; void set_num_observers(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_NumObservers::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -120602,14 +118607,7 @@ class BeginFrameSourceState : public ::protozero::Message { BeginFrameArgs, BeginFrameSourceState>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_LastBeginFrameArgs kLastBeginFrameArgs() { return {}; } + static constexpr FieldMetadata_LastBeginFrameArgs kLastBeginFrameArgs{}; template T* set_last_begin_frame_args() { return BeginNestedMessage(4); } @@ -120645,14 +118643,7 @@ class BeginFrameObserverState : public ::protozero::Message { int64_t, BeginFrameObserverState>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_DroppedBeginFrameArgs kDroppedBeginFrameArgs() { return {}; } + static constexpr FieldMetadata_DroppedBeginFrameArgs kDroppedBeginFrameArgs{}; void set_dropped_begin_frame_args(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_DroppedBeginFrameArgs::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -120670,14 +118661,7 @@ class BeginFrameObserverState : public ::protozero::Message { BeginFrameArgs, BeginFrameObserverState>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_LastBeginFrameArgs kLastBeginFrameArgs() { return {}; } + static constexpr FieldMetadata_LastBeginFrameArgs kLastBeginFrameArgs{}; template T* set_last_begin_frame_args() { return BeginNestedMessage(2); } @@ -120717,9 +118701,13 @@ class BeginImplFrameArgs : public ::protozero::Message { static constexpr const char* GetName() { return ".perfetto.protos.BeginImplFrameArgs"; } using TimestampsInUs = ::perfetto::protos::pbzero::BeginImplFrameArgs_TimestampsInUs; + using State = ::perfetto::protos::pbzero::BeginImplFrameArgs_State; - static const State BEGIN_FRAME_FINISHED = BeginImplFrameArgs_State_BEGIN_FRAME_FINISHED; - static const State BEGIN_FRAME_USING = BeginImplFrameArgs_State_BEGIN_FRAME_USING; + static inline const char* State_Name(State value) { + return ::perfetto::protos::pbzero::BeginImplFrameArgs_State_Name(value); + } + static const State BEGIN_FRAME_FINISHED = State::BEGIN_FRAME_FINISHED; + static const State BEGIN_FRAME_USING = State::BEGIN_FRAME_USING; using FieldMetadata_UpdatedAtUs = ::protozero::proto_utils::FieldMetadata< @@ -120729,14 +118717,7 @@ class BeginImplFrameArgs : public ::protozero::Message { int64_t, BeginImplFrameArgs>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_UpdatedAtUs kUpdatedAtUs() { return {}; } + static constexpr FieldMetadata_UpdatedAtUs kUpdatedAtUs{}; void set_updated_at_us(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_UpdatedAtUs::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -120754,14 +118735,7 @@ class BeginImplFrameArgs : public ::protozero::Message { int64_t, BeginImplFrameArgs>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_FinishedAtUs kFinishedAtUs() { return {}; } + static constexpr FieldMetadata_FinishedAtUs kFinishedAtUs{}; void set_finished_at_us(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_FinishedAtUs::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -120779,14 +118753,7 @@ class BeginImplFrameArgs : public ::protozero::Message { ::perfetto::protos::pbzero::BeginImplFrameArgs_State, BeginImplFrameArgs>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_State kState() { return {}; } + static constexpr FieldMetadata_State kState{}; void set_state(::perfetto::protos::pbzero::BeginImplFrameArgs_State value) { static constexpr uint32_t field_id = FieldMetadata_State::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -120804,14 +118771,7 @@ class BeginImplFrameArgs : public ::protozero::Message { BeginFrameArgs, BeginImplFrameArgs>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_CurrentArgs kCurrentArgs() { return {}; } + static constexpr FieldMetadata_CurrentArgs kCurrentArgs{}; template T* set_current_args() { return BeginNestedMessage(4); } @@ -120825,14 +118785,7 @@ class BeginImplFrameArgs : public ::protozero::Message { BeginFrameArgs, BeginImplFrameArgs>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_LastArgs kLastArgs() { return {}; } + static constexpr FieldMetadata_LastArgs kLastArgs{}; template T* set_last_args() { return BeginNestedMessage(5); } @@ -120846,14 +118799,7 @@ class BeginImplFrameArgs : public ::protozero::Message { BeginImplFrameArgs_TimestampsInUs, BeginImplFrameArgs>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_TimestampsInUs kTimestampsInUs() { return {}; } + static constexpr FieldMetadata_TimestampsInUs kTimestampsInUs{}; template T* set_timestamps_in_us() { return BeginNestedMessage(6); } @@ -120904,14 +118850,7 @@ class BeginImplFrameArgs_TimestampsInUs : public ::protozero::Message { int64_t, BeginImplFrameArgs_TimestampsInUs>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_IntervalDelta kIntervalDelta() { return {}; } + static constexpr FieldMetadata_IntervalDelta kIntervalDelta{}; void set_interval_delta(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_IntervalDelta::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -120929,14 +118868,7 @@ class BeginImplFrameArgs_TimestampsInUs : public ::protozero::Message { int64_t, BeginImplFrameArgs_TimestampsInUs>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_NowToDeadlineDelta kNowToDeadlineDelta() { return {}; } + static constexpr FieldMetadata_NowToDeadlineDelta kNowToDeadlineDelta{}; void set_now_to_deadline_delta(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_NowToDeadlineDelta::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -120954,14 +118886,7 @@ class BeginImplFrameArgs_TimestampsInUs : public ::protozero::Message { int64_t, BeginImplFrameArgs_TimestampsInUs>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_FrameTimeToNowDelta kFrameTimeToNowDelta() { return {}; } + static constexpr FieldMetadata_FrameTimeToNowDelta kFrameTimeToNowDelta{}; void set_frame_time_to_now_delta(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_FrameTimeToNowDelta::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -120979,14 +118904,7 @@ class BeginImplFrameArgs_TimestampsInUs : public ::protozero::Message { int64_t, BeginImplFrameArgs_TimestampsInUs>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_FrameTimeToDeadlineDelta kFrameTimeToDeadlineDelta() { return {}; } + static constexpr FieldMetadata_FrameTimeToDeadlineDelta kFrameTimeToDeadlineDelta{}; void set_frame_time_to_deadline_delta(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_FrameTimeToDeadlineDelta::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -121004,14 +118922,7 @@ class BeginImplFrameArgs_TimestampsInUs : public ::protozero::Message { int64_t, BeginImplFrameArgs_TimestampsInUs>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Now kNow() { return {}; } + static constexpr FieldMetadata_Now kNow{}; void set_now(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_Now::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -121029,14 +118940,7 @@ class BeginImplFrameArgs_TimestampsInUs : public ::protozero::Message { int64_t, BeginImplFrameArgs_TimestampsInUs>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_FrameTime kFrameTime() { return {}; } + static constexpr FieldMetadata_FrameTime kFrameTime{}; void set_frame_time(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_FrameTime::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -121054,14 +118958,7 @@ class BeginImplFrameArgs_TimestampsInUs : public ::protozero::Message { int64_t, BeginImplFrameArgs_TimestampsInUs>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Deadline kDeadline() { return {}; } + static constexpr FieldMetadata_Deadline kDeadline{}; void set_deadline(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_Deadline::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -121119,11 +119016,15 @@ class BeginFrameArgs : public ::protozero::Message { }; static constexpr const char* GetName() { return ".perfetto.protos.BeginFrameArgs"; } + using BeginFrameArgsType = ::perfetto::protos::pbzero::BeginFrameArgs_BeginFrameArgsType; - static const BeginFrameArgsType BEGIN_FRAME_ARGS_TYPE_UNSPECIFIED = BeginFrameArgs_BeginFrameArgsType_BEGIN_FRAME_ARGS_TYPE_UNSPECIFIED; - static const BeginFrameArgsType BEGIN_FRAME_ARGS_TYPE_INVALID = BeginFrameArgs_BeginFrameArgsType_BEGIN_FRAME_ARGS_TYPE_INVALID; - static const BeginFrameArgsType BEGIN_FRAME_ARGS_TYPE_NORMAL = BeginFrameArgs_BeginFrameArgsType_BEGIN_FRAME_ARGS_TYPE_NORMAL; - static const BeginFrameArgsType BEGIN_FRAME_ARGS_TYPE_MISSED = BeginFrameArgs_BeginFrameArgsType_BEGIN_FRAME_ARGS_TYPE_MISSED; + static inline const char* BeginFrameArgsType_Name(BeginFrameArgsType value) { + return ::perfetto::protos::pbzero::BeginFrameArgs_BeginFrameArgsType_Name(value); + } + static const BeginFrameArgsType BEGIN_FRAME_ARGS_TYPE_UNSPECIFIED = BeginFrameArgsType::BEGIN_FRAME_ARGS_TYPE_UNSPECIFIED; + static const BeginFrameArgsType BEGIN_FRAME_ARGS_TYPE_INVALID = BeginFrameArgsType::BEGIN_FRAME_ARGS_TYPE_INVALID; + static const BeginFrameArgsType BEGIN_FRAME_ARGS_TYPE_NORMAL = BeginFrameArgsType::BEGIN_FRAME_ARGS_TYPE_NORMAL; + static const BeginFrameArgsType BEGIN_FRAME_ARGS_TYPE_MISSED = BeginFrameArgsType::BEGIN_FRAME_ARGS_TYPE_MISSED; using FieldMetadata_Type = ::protozero::proto_utils::FieldMetadata< @@ -121133,14 +119034,7 @@ class BeginFrameArgs : public ::protozero::Message { ::perfetto::protos::pbzero::BeginFrameArgs_BeginFrameArgsType, BeginFrameArgs>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Type kType() { return {}; } + static constexpr FieldMetadata_Type kType{}; void set_type(::perfetto::protos::pbzero::BeginFrameArgs_BeginFrameArgsType value) { static constexpr uint32_t field_id = FieldMetadata_Type::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -121158,14 +119052,7 @@ class BeginFrameArgs : public ::protozero::Message { uint64_t, BeginFrameArgs>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_SourceId kSourceId() { return {}; } + static constexpr FieldMetadata_SourceId kSourceId{}; void set_source_id(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_SourceId::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -121183,14 +119070,7 @@ class BeginFrameArgs : public ::protozero::Message { uint64_t, BeginFrameArgs>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_SequenceNumber kSequenceNumber() { return {}; } + static constexpr FieldMetadata_SequenceNumber kSequenceNumber{}; void set_sequence_number(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_SequenceNumber::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -121208,14 +119088,7 @@ class BeginFrameArgs : public ::protozero::Message { int64_t, BeginFrameArgs>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_FrameTimeUs kFrameTimeUs() { return {}; } + static constexpr FieldMetadata_FrameTimeUs kFrameTimeUs{}; void set_frame_time_us(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_FrameTimeUs::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -121233,14 +119106,7 @@ class BeginFrameArgs : public ::protozero::Message { int64_t, BeginFrameArgs>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_DeadlineUs kDeadlineUs() { return {}; } + static constexpr FieldMetadata_DeadlineUs kDeadlineUs{}; void set_deadline_us(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_DeadlineUs::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -121258,14 +119124,7 @@ class BeginFrameArgs : public ::protozero::Message { int64_t, BeginFrameArgs>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_IntervalDeltaUs kIntervalDeltaUs() { return {}; } + static constexpr FieldMetadata_IntervalDeltaUs kIntervalDeltaUs{}; void set_interval_delta_us(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_IntervalDeltaUs::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -121283,14 +119142,7 @@ class BeginFrameArgs : public ::protozero::Message { bool, BeginFrameArgs>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_OnCriticalPath kOnCriticalPath() { return {}; } + static constexpr FieldMetadata_OnCriticalPath kOnCriticalPath{}; void set_on_critical_path(bool value) { static constexpr uint32_t field_id = FieldMetadata_OnCriticalPath::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -121308,14 +119160,7 @@ class BeginFrameArgs : public ::protozero::Message { bool, BeginFrameArgs>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_AnimateOnly kAnimateOnly() { return {}; } + static constexpr FieldMetadata_AnimateOnly kAnimateOnly{}; void set_animate_only(bool value) { static constexpr uint32_t field_id = FieldMetadata_AnimateOnly::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -121333,14 +119178,7 @@ class BeginFrameArgs : public ::protozero::Message { uint64_t, BeginFrameArgs>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_SourceLocationIid kSourceLocationIid() { return {}; } + static constexpr FieldMetadata_SourceLocationIid kSourceLocationIid{}; void set_source_location_iid(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_SourceLocationIid::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -121358,14 +119196,7 @@ class BeginFrameArgs : public ::protozero::Message { SourceLocation, BeginFrameArgs>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_SourceLocation kSourceLocation() { return {}; } + static constexpr FieldMetadata_SourceLocation kSourceLocation{}; template T* set_source_location() { return BeginNestedMessage(10); } @@ -121379,14 +119210,7 @@ class BeginFrameArgs : public ::protozero::Message { int64_t, BeginFrameArgs>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_FramesThrottledSinceLast kFramesThrottledSinceLast() { return {}; } + static constexpr FieldMetadata_FramesThrottledSinceLast kFramesThrottledSinceLast{}; void set_frames_throttled_since_last(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_FramesThrottledSinceLast::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -121428,14 +119252,7 @@ class ChromeCompositorStateMachine : public ::protozero::Message { ChromeCompositorStateMachine_MajorState, ChromeCompositorStateMachine>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_MajorState kMajorState() { return {}; } + static constexpr FieldMetadata_MajorState kMajorState{}; template T* set_major_state() { return BeginNestedMessage(1); } @@ -121449,14 +119266,7 @@ class ChromeCompositorStateMachine : public ::protozero::Message { ChromeCompositorStateMachine_MinorState, ChromeCompositorStateMachine>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_MinorState kMinorState() { return {}; } + static constexpr FieldMetadata_MinorState kMinorState{}; template T* set_minor_state() { return BeginNestedMessage(2); } @@ -121612,15 +119422,23 @@ class ChromeCompositorStateMachine_MinorState : public ::protozero::Message { }; static constexpr const char* GetName() { return ".perfetto.protos.ChromeCompositorStateMachine.MinorState"; } + using TreePriority = ::perfetto::protos::pbzero::ChromeCompositorStateMachine_MinorState_TreePriority; + static inline const char* TreePriority_Name(TreePriority value) { + return ::perfetto::protos::pbzero::ChromeCompositorStateMachine_MinorState_TreePriority_Name(value); + } + using ScrollHandlerState = ::perfetto::protos::pbzero::ChromeCompositorStateMachine_MinorState_ScrollHandlerState; - static const TreePriority TREE_PRIORITY_UNSPECIFIED = ChromeCompositorStateMachine_MinorState_TreePriority_TREE_PRIORITY_UNSPECIFIED; - static const TreePriority TREE_PRIORITY_SAME_PRIORITY_FOR_BOTH_TREES = ChromeCompositorStateMachine_MinorState_TreePriority_TREE_PRIORITY_SAME_PRIORITY_FOR_BOTH_TREES; - static const TreePriority TREE_PRIORITY_SMOOTHNESS_TAKES_PRIORITY = ChromeCompositorStateMachine_MinorState_TreePriority_TREE_PRIORITY_SMOOTHNESS_TAKES_PRIORITY; - static const TreePriority TREE_PRIORITY_NEW_CONTENT_TAKES_PRIORITY = ChromeCompositorStateMachine_MinorState_TreePriority_TREE_PRIORITY_NEW_CONTENT_TAKES_PRIORITY; - static const ScrollHandlerState SCROLL_HANDLER_UNSPECIFIED = ChromeCompositorStateMachine_MinorState_ScrollHandlerState_SCROLL_HANDLER_UNSPECIFIED; - static const ScrollHandlerState SCROLL_AFFECTS_SCROLL_HANDLER = ChromeCompositorStateMachine_MinorState_ScrollHandlerState_SCROLL_AFFECTS_SCROLL_HANDLER; - static const ScrollHandlerState SCROLL_DOES_NOT_AFFECT_SCROLL_HANDLER = ChromeCompositorStateMachine_MinorState_ScrollHandlerState_SCROLL_DOES_NOT_AFFECT_SCROLL_HANDLER; + static inline const char* ScrollHandlerState_Name(ScrollHandlerState value) { + return ::perfetto::protos::pbzero::ChromeCompositorStateMachine_MinorState_ScrollHandlerState_Name(value); + } + static const TreePriority TREE_PRIORITY_UNSPECIFIED = TreePriority::TREE_PRIORITY_UNSPECIFIED; + static const TreePriority TREE_PRIORITY_SAME_PRIORITY_FOR_BOTH_TREES = TreePriority::TREE_PRIORITY_SAME_PRIORITY_FOR_BOTH_TREES; + static const TreePriority TREE_PRIORITY_SMOOTHNESS_TAKES_PRIORITY = TreePriority::TREE_PRIORITY_SMOOTHNESS_TAKES_PRIORITY; + static const TreePriority TREE_PRIORITY_NEW_CONTENT_TAKES_PRIORITY = TreePriority::TREE_PRIORITY_NEW_CONTENT_TAKES_PRIORITY; + static const ScrollHandlerState SCROLL_HANDLER_UNSPECIFIED = ScrollHandlerState::SCROLL_HANDLER_UNSPECIFIED; + static const ScrollHandlerState SCROLL_AFFECTS_SCROLL_HANDLER = ScrollHandlerState::SCROLL_AFFECTS_SCROLL_HANDLER; + static const ScrollHandlerState SCROLL_DOES_NOT_AFFECT_SCROLL_HANDLER = ScrollHandlerState::SCROLL_DOES_NOT_AFFECT_SCROLL_HANDLER; using FieldMetadata_CommitCount = ::protozero::proto_utils::FieldMetadata< @@ -121630,14 +119448,7 @@ class ChromeCompositorStateMachine_MinorState : public ::protozero::Message { int32_t, ChromeCompositorStateMachine_MinorState>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_CommitCount kCommitCount() { return {}; } + static constexpr FieldMetadata_CommitCount kCommitCount{}; void set_commit_count(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_CommitCount::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -121655,14 +119466,7 @@ class ChromeCompositorStateMachine_MinorState : public ::protozero::Message { int32_t, ChromeCompositorStateMachine_MinorState>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_CurrentFrameNumber kCurrentFrameNumber() { return {}; } + static constexpr FieldMetadata_CurrentFrameNumber kCurrentFrameNumber{}; void set_current_frame_number(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_CurrentFrameNumber::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -121680,14 +119484,7 @@ class ChromeCompositorStateMachine_MinorState : public ::protozero::Message { int32_t, ChromeCompositorStateMachine_MinorState>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_LastFrameNumberSubmitPerformed kLastFrameNumberSubmitPerformed() { return {}; } + static constexpr FieldMetadata_LastFrameNumberSubmitPerformed kLastFrameNumberSubmitPerformed{}; void set_last_frame_number_submit_performed(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_LastFrameNumberSubmitPerformed::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -121705,14 +119502,7 @@ class ChromeCompositorStateMachine_MinorState : public ::protozero::Message { int32_t, ChromeCompositorStateMachine_MinorState>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_LastFrameNumberDrawPerformed kLastFrameNumberDrawPerformed() { return {}; } + static constexpr FieldMetadata_LastFrameNumberDrawPerformed kLastFrameNumberDrawPerformed{}; void set_last_frame_number_draw_performed(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_LastFrameNumberDrawPerformed::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -121730,14 +119520,7 @@ class ChromeCompositorStateMachine_MinorState : public ::protozero::Message { int32_t, ChromeCompositorStateMachine_MinorState>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_LastFrameNumberBeginMainFrameSent kLastFrameNumberBeginMainFrameSent() { return {}; } + static constexpr FieldMetadata_LastFrameNumberBeginMainFrameSent kLastFrameNumberBeginMainFrameSent{}; void set_last_frame_number_begin_main_frame_sent(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_LastFrameNumberBeginMainFrameSent::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -121755,14 +119538,7 @@ class ChromeCompositorStateMachine_MinorState : public ::protozero::Message { bool, ChromeCompositorStateMachine_MinorState>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_DidDraw kDidDraw() { return {}; } + static constexpr FieldMetadata_DidDraw kDidDraw{}; void set_did_draw(bool value) { static constexpr uint32_t field_id = FieldMetadata_DidDraw::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -121780,14 +119556,7 @@ class ChromeCompositorStateMachine_MinorState : public ::protozero::Message { bool, ChromeCompositorStateMachine_MinorState>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_DidSendBeginMainFrameForCurrentFrame kDidSendBeginMainFrameForCurrentFrame() { return {}; } + static constexpr FieldMetadata_DidSendBeginMainFrameForCurrentFrame kDidSendBeginMainFrameForCurrentFrame{}; void set_did_send_begin_main_frame_for_current_frame(bool value) { static constexpr uint32_t field_id = FieldMetadata_DidSendBeginMainFrameForCurrentFrame::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -121805,14 +119574,7 @@ class ChromeCompositorStateMachine_MinorState : public ::protozero::Message { bool, ChromeCompositorStateMachine_MinorState>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_DidNotifyBeginMainFrameNotExpectedUntil kDidNotifyBeginMainFrameNotExpectedUntil() { return {}; } + static constexpr FieldMetadata_DidNotifyBeginMainFrameNotExpectedUntil kDidNotifyBeginMainFrameNotExpectedUntil{}; void set_did_notify_begin_main_frame_not_expected_until(bool value) { static constexpr uint32_t field_id = FieldMetadata_DidNotifyBeginMainFrameNotExpectedUntil::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -121830,14 +119592,7 @@ class ChromeCompositorStateMachine_MinorState : public ::protozero::Message { bool, ChromeCompositorStateMachine_MinorState>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_DidNotifyBeginMainFrameNotExpectedSoon kDidNotifyBeginMainFrameNotExpectedSoon() { return {}; } + static constexpr FieldMetadata_DidNotifyBeginMainFrameNotExpectedSoon kDidNotifyBeginMainFrameNotExpectedSoon{}; void set_did_notify_begin_main_frame_not_expected_soon(bool value) { static constexpr uint32_t field_id = FieldMetadata_DidNotifyBeginMainFrameNotExpectedSoon::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -121855,14 +119610,7 @@ class ChromeCompositorStateMachine_MinorState : public ::protozero::Message { bool, ChromeCompositorStateMachine_MinorState>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_WantsBeginMainFrameNotExpected kWantsBeginMainFrameNotExpected() { return {}; } + static constexpr FieldMetadata_WantsBeginMainFrameNotExpected kWantsBeginMainFrameNotExpected{}; void set_wants_begin_main_frame_not_expected(bool value) { static constexpr uint32_t field_id = FieldMetadata_WantsBeginMainFrameNotExpected::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -121880,14 +119628,7 @@ class ChromeCompositorStateMachine_MinorState : public ::protozero::Message { bool, ChromeCompositorStateMachine_MinorState>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_DidCommitDuringFrame kDidCommitDuringFrame() { return {}; } + static constexpr FieldMetadata_DidCommitDuringFrame kDidCommitDuringFrame{}; void set_did_commit_during_frame(bool value) { static constexpr uint32_t field_id = FieldMetadata_DidCommitDuringFrame::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -121905,14 +119646,7 @@ class ChromeCompositorStateMachine_MinorState : public ::protozero::Message { bool, ChromeCompositorStateMachine_MinorState>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_DidInvalidateLayerTreeFrameSink kDidInvalidateLayerTreeFrameSink() { return {}; } + static constexpr FieldMetadata_DidInvalidateLayerTreeFrameSink kDidInvalidateLayerTreeFrameSink{}; void set_did_invalidate_layer_tree_frame_sink(bool value) { static constexpr uint32_t field_id = FieldMetadata_DidInvalidateLayerTreeFrameSink::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -121930,14 +119664,7 @@ class ChromeCompositorStateMachine_MinorState : public ::protozero::Message { bool, ChromeCompositorStateMachine_MinorState>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_DidPerformImplSideInvalidaion kDidPerformImplSideInvalidaion() { return {}; } + static constexpr FieldMetadata_DidPerformImplSideInvalidaion kDidPerformImplSideInvalidaion{}; void set_did_perform_impl_side_invalidaion(bool value) { static constexpr uint32_t field_id = FieldMetadata_DidPerformImplSideInvalidaion::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -121955,14 +119682,7 @@ class ChromeCompositorStateMachine_MinorState : public ::protozero::Message { bool, ChromeCompositorStateMachine_MinorState>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_DidPrepareTiles kDidPrepareTiles() { return {}; } + static constexpr FieldMetadata_DidPrepareTiles kDidPrepareTiles{}; void set_did_prepare_tiles(bool value) { static constexpr uint32_t field_id = FieldMetadata_DidPrepareTiles::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -121980,14 +119700,7 @@ class ChromeCompositorStateMachine_MinorState : public ::protozero::Message { int32_t, ChromeCompositorStateMachine_MinorState>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ConsecutiveCheckerboardAnimations kConsecutiveCheckerboardAnimations() { return {}; } + static constexpr FieldMetadata_ConsecutiveCheckerboardAnimations kConsecutiveCheckerboardAnimations{}; void set_consecutive_checkerboard_animations(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_ConsecutiveCheckerboardAnimations::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -122005,14 +119718,7 @@ class ChromeCompositorStateMachine_MinorState : public ::protozero::Message { int32_t, ChromeCompositorStateMachine_MinorState>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_PendingSubmitFrames kPendingSubmitFrames() { return {}; } + static constexpr FieldMetadata_PendingSubmitFrames kPendingSubmitFrames{}; void set_pending_submit_frames(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_PendingSubmitFrames::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -122030,14 +119736,7 @@ class ChromeCompositorStateMachine_MinorState : public ::protozero::Message { int32_t, ChromeCompositorStateMachine_MinorState>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_SubmitFramesWithCurrentLayerTreeFrameSink kSubmitFramesWithCurrentLayerTreeFrameSink() { return {}; } + static constexpr FieldMetadata_SubmitFramesWithCurrentLayerTreeFrameSink kSubmitFramesWithCurrentLayerTreeFrameSink{}; void set_submit_frames_with_current_layer_tree_frame_sink(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_SubmitFramesWithCurrentLayerTreeFrameSink::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -122055,14 +119754,7 @@ class ChromeCompositorStateMachine_MinorState : public ::protozero::Message { bool, ChromeCompositorStateMachine_MinorState>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_NeedsRedraw kNeedsRedraw() { return {}; } + static constexpr FieldMetadata_NeedsRedraw kNeedsRedraw{}; void set_needs_redraw(bool value) { static constexpr uint32_t field_id = FieldMetadata_NeedsRedraw::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -122080,14 +119772,7 @@ class ChromeCompositorStateMachine_MinorState : public ::protozero::Message { bool, ChromeCompositorStateMachine_MinorState>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_NeedsPrepareTiles kNeedsPrepareTiles() { return {}; } + static constexpr FieldMetadata_NeedsPrepareTiles kNeedsPrepareTiles{}; void set_needs_prepare_tiles(bool value) { static constexpr uint32_t field_id = FieldMetadata_NeedsPrepareTiles::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -122105,14 +119790,7 @@ class ChromeCompositorStateMachine_MinorState : public ::protozero::Message { bool, ChromeCompositorStateMachine_MinorState>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_NeedsBeginMainFrame kNeedsBeginMainFrame() { return {}; } + static constexpr FieldMetadata_NeedsBeginMainFrame kNeedsBeginMainFrame{}; void set_needs_begin_main_frame(bool value) { static constexpr uint32_t field_id = FieldMetadata_NeedsBeginMainFrame::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -122130,14 +119808,7 @@ class ChromeCompositorStateMachine_MinorState : public ::protozero::Message { bool, ChromeCompositorStateMachine_MinorState>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_NeedsOneBeginImplFrame kNeedsOneBeginImplFrame() { return {}; } + static constexpr FieldMetadata_NeedsOneBeginImplFrame kNeedsOneBeginImplFrame{}; void set_needs_one_begin_impl_frame(bool value) { static constexpr uint32_t field_id = FieldMetadata_NeedsOneBeginImplFrame::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -122155,14 +119826,7 @@ class ChromeCompositorStateMachine_MinorState : public ::protozero::Message { bool, ChromeCompositorStateMachine_MinorState>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Visible kVisible() { return {}; } + static constexpr FieldMetadata_Visible kVisible{}; void set_visible(bool value) { static constexpr uint32_t field_id = FieldMetadata_Visible::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -122180,14 +119844,7 @@ class ChromeCompositorStateMachine_MinorState : public ::protozero::Message { bool, ChromeCompositorStateMachine_MinorState>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_BeginFrameSourcePaused kBeginFrameSourcePaused() { return {}; } + static constexpr FieldMetadata_BeginFrameSourcePaused kBeginFrameSourcePaused{}; void set_begin_frame_source_paused(bool value) { static constexpr uint32_t field_id = FieldMetadata_BeginFrameSourcePaused::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -122205,14 +119862,7 @@ class ChromeCompositorStateMachine_MinorState : public ::protozero::Message { bool, ChromeCompositorStateMachine_MinorState>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_CanDraw kCanDraw() { return {}; } + static constexpr FieldMetadata_CanDraw kCanDraw{}; void set_can_draw(bool value) { static constexpr uint32_t field_id = FieldMetadata_CanDraw::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -122230,14 +119880,7 @@ class ChromeCompositorStateMachine_MinorState : public ::protozero::Message { bool, ChromeCompositorStateMachine_MinorState>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ResourcelessDraw kResourcelessDraw() { return {}; } + static constexpr FieldMetadata_ResourcelessDraw kResourcelessDraw{}; void set_resourceless_draw(bool value) { static constexpr uint32_t field_id = FieldMetadata_ResourcelessDraw::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -122255,14 +119898,7 @@ class ChromeCompositorStateMachine_MinorState : public ::protozero::Message { bool, ChromeCompositorStateMachine_MinorState>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_HasPendingTree kHasPendingTree() { return {}; } + static constexpr FieldMetadata_HasPendingTree kHasPendingTree{}; void set_has_pending_tree(bool value) { static constexpr uint32_t field_id = FieldMetadata_HasPendingTree::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -122280,14 +119916,7 @@ class ChromeCompositorStateMachine_MinorState : public ::protozero::Message { bool, ChromeCompositorStateMachine_MinorState>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_PendingTreeIsReadyForActivation kPendingTreeIsReadyForActivation() { return {}; } + static constexpr FieldMetadata_PendingTreeIsReadyForActivation kPendingTreeIsReadyForActivation{}; void set_pending_tree_is_ready_for_activation(bool value) { static constexpr uint32_t field_id = FieldMetadata_PendingTreeIsReadyForActivation::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -122305,14 +119934,7 @@ class ChromeCompositorStateMachine_MinorState : public ::protozero::Message { bool, ChromeCompositorStateMachine_MinorState>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ActiveTreeNeedsFirstDraw kActiveTreeNeedsFirstDraw() { return {}; } + static constexpr FieldMetadata_ActiveTreeNeedsFirstDraw kActiveTreeNeedsFirstDraw{}; void set_active_tree_needs_first_draw(bool value) { static constexpr uint32_t field_id = FieldMetadata_ActiveTreeNeedsFirstDraw::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -122330,14 +119952,7 @@ class ChromeCompositorStateMachine_MinorState : public ::protozero::Message { bool, ChromeCompositorStateMachine_MinorState>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ActiveTreeIsReadyToDraw kActiveTreeIsReadyToDraw() { return {}; } + static constexpr FieldMetadata_ActiveTreeIsReadyToDraw kActiveTreeIsReadyToDraw{}; void set_active_tree_is_ready_to_draw(bool value) { static constexpr uint32_t field_id = FieldMetadata_ActiveTreeIsReadyToDraw::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -122355,14 +119970,7 @@ class ChromeCompositorStateMachine_MinorState : public ::protozero::Message { bool, ChromeCompositorStateMachine_MinorState>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_DidCreateAndInitializeFirstLayerTreeFrameSink kDidCreateAndInitializeFirstLayerTreeFrameSink() { return {}; } + static constexpr FieldMetadata_DidCreateAndInitializeFirstLayerTreeFrameSink kDidCreateAndInitializeFirstLayerTreeFrameSink{}; void set_did_create_and_initialize_first_layer_tree_frame_sink(bool value) { static constexpr uint32_t field_id = FieldMetadata_DidCreateAndInitializeFirstLayerTreeFrameSink::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -122380,14 +119988,7 @@ class ChromeCompositorStateMachine_MinorState : public ::protozero::Message { ::perfetto::protos::pbzero::ChromeCompositorStateMachine_MinorState_TreePriority, ChromeCompositorStateMachine_MinorState>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_TreePriority kTreePriority() { return {}; } + static constexpr FieldMetadata_TreePriority kTreePriority{}; void set_tree_priority(::perfetto::protos::pbzero::ChromeCompositorStateMachine_MinorState_TreePriority value) { static constexpr uint32_t field_id = FieldMetadata_TreePriority::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -122405,14 +120006,7 @@ class ChromeCompositorStateMachine_MinorState : public ::protozero::Message { ::perfetto::protos::pbzero::ChromeCompositorStateMachine_MinorState_ScrollHandlerState, ChromeCompositorStateMachine_MinorState>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ScrollHandlerState kScrollHandlerState() { return {}; } + static constexpr FieldMetadata_ScrollHandlerState kScrollHandlerState{}; void set_scroll_handler_state(::perfetto::protos::pbzero::ChromeCompositorStateMachine_MinorState_ScrollHandlerState value) { static constexpr uint32_t field_id = FieldMetadata_ScrollHandlerState::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -122430,14 +120024,7 @@ class ChromeCompositorStateMachine_MinorState : public ::protozero::Message { bool, ChromeCompositorStateMachine_MinorState>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_CriticalBeginMainFrameToActivateIsFast kCriticalBeginMainFrameToActivateIsFast() { return {}; } + static constexpr FieldMetadata_CriticalBeginMainFrameToActivateIsFast kCriticalBeginMainFrameToActivateIsFast{}; void set_critical_begin_main_frame_to_activate_is_fast(bool value) { static constexpr uint32_t field_id = FieldMetadata_CriticalBeginMainFrameToActivateIsFast::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -122455,14 +120042,7 @@ class ChromeCompositorStateMachine_MinorState : public ::protozero::Message { bool, ChromeCompositorStateMachine_MinorState>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_MainThreadMissedLastDeadline kMainThreadMissedLastDeadline() { return {}; } + static constexpr FieldMetadata_MainThreadMissedLastDeadline kMainThreadMissedLastDeadline{}; void set_main_thread_missed_last_deadline(bool value) { static constexpr uint32_t field_id = FieldMetadata_MainThreadMissedLastDeadline::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -122480,14 +120060,7 @@ class ChromeCompositorStateMachine_MinorState : public ::protozero::Message { bool, ChromeCompositorStateMachine_MinorState>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_VideoNeedsBeginFrames kVideoNeedsBeginFrames() { return {}; } + static constexpr FieldMetadata_VideoNeedsBeginFrames kVideoNeedsBeginFrames{}; void set_video_needs_begin_frames(bool value) { static constexpr uint32_t field_id = FieldMetadata_VideoNeedsBeginFrames::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -122505,14 +120078,7 @@ class ChromeCompositorStateMachine_MinorState : public ::protozero::Message { bool, ChromeCompositorStateMachine_MinorState>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_DeferBeginMainFrame kDeferBeginMainFrame() { return {}; } + static constexpr FieldMetadata_DeferBeginMainFrame kDeferBeginMainFrame{}; void set_defer_begin_main_frame(bool value) { static constexpr uint32_t field_id = FieldMetadata_DeferBeginMainFrame::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -122530,14 +120096,7 @@ class ChromeCompositorStateMachine_MinorState : public ::protozero::Message { bool, ChromeCompositorStateMachine_MinorState>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_LastCommitHadNoUpdates kLastCommitHadNoUpdates() { return {}; } + static constexpr FieldMetadata_LastCommitHadNoUpdates kLastCommitHadNoUpdates{}; void set_last_commit_had_no_updates(bool value) { static constexpr uint32_t field_id = FieldMetadata_LastCommitHadNoUpdates::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -122555,14 +120114,7 @@ class ChromeCompositorStateMachine_MinorState : public ::protozero::Message { bool, ChromeCompositorStateMachine_MinorState>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_DidDrawInLastFrame kDidDrawInLastFrame() { return {}; } + static constexpr FieldMetadata_DidDrawInLastFrame kDidDrawInLastFrame{}; void set_did_draw_in_last_frame(bool value) { static constexpr uint32_t field_id = FieldMetadata_DidDrawInLastFrame::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -122580,14 +120132,7 @@ class ChromeCompositorStateMachine_MinorState : public ::protozero::Message { bool, ChromeCompositorStateMachine_MinorState>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_DidSubmitInLastFrame kDidSubmitInLastFrame() { return {}; } + static constexpr FieldMetadata_DidSubmitInLastFrame kDidSubmitInLastFrame{}; void set_did_submit_in_last_frame(bool value) { static constexpr uint32_t field_id = FieldMetadata_DidSubmitInLastFrame::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -122605,14 +120150,7 @@ class ChromeCompositorStateMachine_MinorState : public ::protozero::Message { bool, ChromeCompositorStateMachine_MinorState>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_NeedsImplSideInvalidation kNeedsImplSideInvalidation() { return {}; } + static constexpr FieldMetadata_NeedsImplSideInvalidation kNeedsImplSideInvalidation{}; void set_needs_impl_side_invalidation(bool value) { static constexpr uint32_t field_id = FieldMetadata_NeedsImplSideInvalidation::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -122630,14 +120168,7 @@ class ChromeCompositorStateMachine_MinorState : public ::protozero::Message { bool, ChromeCompositorStateMachine_MinorState>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_CurrentPendingTreeIsImplSide kCurrentPendingTreeIsImplSide() { return {}; } + static constexpr FieldMetadata_CurrentPendingTreeIsImplSide kCurrentPendingTreeIsImplSide{}; void set_current_pending_tree_is_impl_side(bool value) { static constexpr uint32_t field_id = FieldMetadata_CurrentPendingTreeIsImplSide::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -122655,14 +120186,7 @@ class ChromeCompositorStateMachine_MinorState : public ::protozero::Message { bool, ChromeCompositorStateMachine_MinorState>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_PreviousPendingTreeWasImplSide kPreviousPendingTreeWasImplSide() { return {}; } + static constexpr FieldMetadata_PreviousPendingTreeWasImplSide kPreviousPendingTreeWasImplSide{}; void set_previous_pending_tree_was_impl_side(bool value) { static constexpr uint32_t field_id = FieldMetadata_PreviousPendingTreeWasImplSide::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -122680,14 +120204,7 @@ class ChromeCompositorStateMachine_MinorState : public ::protozero::Message { bool, ChromeCompositorStateMachine_MinorState>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ProcessingAnimationWorkletsForActiveTree kProcessingAnimationWorkletsForActiveTree() { return {}; } + static constexpr FieldMetadata_ProcessingAnimationWorkletsForActiveTree kProcessingAnimationWorkletsForActiveTree{}; void set_processing_animation_worklets_for_active_tree(bool value) { static constexpr uint32_t field_id = FieldMetadata_ProcessingAnimationWorkletsForActiveTree::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -122705,14 +120222,7 @@ class ChromeCompositorStateMachine_MinorState : public ::protozero::Message { bool, ChromeCompositorStateMachine_MinorState>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ProcessingAnimationWorkletsForPendingTree kProcessingAnimationWorkletsForPendingTree() { return {}; } + static constexpr FieldMetadata_ProcessingAnimationWorkletsForPendingTree kProcessingAnimationWorkletsForPendingTree{}; void set_processing_animation_worklets_for_pending_tree(bool value) { static constexpr uint32_t field_id = FieldMetadata_ProcessingAnimationWorkletsForPendingTree::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -122730,14 +120240,7 @@ class ChromeCompositorStateMachine_MinorState : public ::protozero::Message { bool, ChromeCompositorStateMachine_MinorState>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ProcessingPaintWorkletsForPendingTree kProcessingPaintWorkletsForPendingTree() { return {}; } + static constexpr FieldMetadata_ProcessingPaintWorkletsForPendingTree kProcessingPaintWorkletsForPendingTree{}; void set_processing_paint_worklets_for_pending_tree(bool value) { static constexpr uint32_t field_id = FieldMetadata_ProcessingPaintWorkletsForPendingTree::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -122777,29 +120280,45 @@ class ChromeCompositorStateMachine_MajorState : public ::protozero::Message { }; static constexpr const char* GetName() { return ".perfetto.protos.ChromeCompositorStateMachine.MajorState"; } + using BeginImplFrameState = ::perfetto::protos::pbzero::ChromeCompositorStateMachine_MajorState_BeginImplFrameState; + static inline const char* BeginImplFrameState_Name(BeginImplFrameState value) { + return ::perfetto::protos::pbzero::ChromeCompositorStateMachine_MajorState_BeginImplFrameState_Name(value); + } + using BeginMainFrameState = ::perfetto::protos::pbzero::ChromeCompositorStateMachine_MajorState_BeginMainFrameState; + static inline const char* BeginMainFrameState_Name(BeginMainFrameState value) { + return ::perfetto::protos::pbzero::ChromeCompositorStateMachine_MajorState_BeginMainFrameState_Name(value); + } + using LayerTreeFrameSinkState = ::perfetto::protos::pbzero::ChromeCompositorStateMachine_MajorState_LayerTreeFrameSinkState; + static inline const char* LayerTreeFrameSinkState_Name(LayerTreeFrameSinkState value) { + return ::perfetto::protos::pbzero::ChromeCompositorStateMachine_MajorState_LayerTreeFrameSinkState_Name(value); + } + using ForcedRedrawOnTimeoutState = ::perfetto::protos::pbzero::ChromeCompositorStateMachine_MajorState_ForcedRedrawOnTimeoutState; - static const BeginImplFrameState BEGIN_IMPL_FRAME_UNSPECIFIED = ChromeCompositorStateMachine_MajorState_BeginImplFrameState_BEGIN_IMPL_FRAME_UNSPECIFIED; - static const BeginImplFrameState BEGIN_IMPL_FRAME_IDLE = ChromeCompositorStateMachine_MajorState_BeginImplFrameState_BEGIN_IMPL_FRAME_IDLE; - static const BeginImplFrameState BEGIN_IMPL_FRAME_INSIDE_BEGIN_FRAME = ChromeCompositorStateMachine_MajorState_BeginImplFrameState_BEGIN_IMPL_FRAME_INSIDE_BEGIN_FRAME; - static const BeginImplFrameState BEGIN_IMPL_FRAME_INSIDE_DEADLINE = ChromeCompositorStateMachine_MajorState_BeginImplFrameState_BEGIN_IMPL_FRAME_INSIDE_DEADLINE; - static const BeginMainFrameState BEGIN_MAIN_FRAME_UNSPECIFIED = ChromeCompositorStateMachine_MajorState_BeginMainFrameState_BEGIN_MAIN_FRAME_UNSPECIFIED; - static const BeginMainFrameState BEGIN_MAIN_FRAME_IDLE = ChromeCompositorStateMachine_MajorState_BeginMainFrameState_BEGIN_MAIN_FRAME_IDLE; - static const BeginMainFrameState BEGIN_MAIN_FRAME_SENT = ChromeCompositorStateMachine_MajorState_BeginMainFrameState_BEGIN_MAIN_FRAME_SENT; - static const BeginMainFrameState BEGIN_MAIN_FRAME_READY_TO_COMMIT = ChromeCompositorStateMachine_MajorState_BeginMainFrameState_BEGIN_MAIN_FRAME_READY_TO_COMMIT; - static const LayerTreeFrameSinkState LAYER_TREE_FRAME_UNSPECIFIED = ChromeCompositorStateMachine_MajorState_LayerTreeFrameSinkState_LAYER_TREE_FRAME_UNSPECIFIED; - static const LayerTreeFrameSinkState LAYER_TREE_FRAME_NONE = ChromeCompositorStateMachine_MajorState_LayerTreeFrameSinkState_LAYER_TREE_FRAME_NONE; - static const LayerTreeFrameSinkState LAYER_TREE_FRAME_ACTIVE = ChromeCompositorStateMachine_MajorState_LayerTreeFrameSinkState_LAYER_TREE_FRAME_ACTIVE; - static const LayerTreeFrameSinkState LAYER_TREE_FRAME_CREATING = ChromeCompositorStateMachine_MajorState_LayerTreeFrameSinkState_LAYER_TREE_FRAME_CREATING; - static const LayerTreeFrameSinkState LAYER_TREE_FRAME_WAITING_FOR_FIRST_COMMIT = ChromeCompositorStateMachine_MajorState_LayerTreeFrameSinkState_LAYER_TREE_FRAME_WAITING_FOR_FIRST_COMMIT; - static const LayerTreeFrameSinkState LAYER_TREE_FRAME_WAITING_FOR_FIRST_ACTIVATION = ChromeCompositorStateMachine_MajorState_LayerTreeFrameSinkState_LAYER_TREE_FRAME_WAITING_FOR_FIRST_ACTIVATION; - static const ForcedRedrawOnTimeoutState FORCED_REDRAW_UNSPECIFIED = ChromeCompositorStateMachine_MajorState_ForcedRedrawOnTimeoutState_FORCED_REDRAW_UNSPECIFIED; - static const ForcedRedrawOnTimeoutState FORCED_REDRAW_IDLE = ChromeCompositorStateMachine_MajorState_ForcedRedrawOnTimeoutState_FORCED_REDRAW_IDLE; - static const ForcedRedrawOnTimeoutState FORCED_REDRAW_WAITING_FOR_COMMIT = ChromeCompositorStateMachine_MajorState_ForcedRedrawOnTimeoutState_FORCED_REDRAW_WAITING_FOR_COMMIT; - static const ForcedRedrawOnTimeoutState FORCED_REDRAW_WAITING_FOR_ACTIVATION = ChromeCompositorStateMachine_MajorState_ForcedRedrawOnTimeoutState_FORCED_REDRAW_WAITING_FOR_ACTIVATION; - static const ForcedRedrawOnTimeoutState FORCED_REDRAW_WAITING_FOR_DRAW = ChromeCompositorStateMachine_MajorState_ForcedRedrawOnTimeoutState_FORCED_REDRAW_WAITING_FOR_DRAW; + static inline const char* ForcedRedrawOnTimeoutState_Name(ForcedRedrawOnTimeoutState value) { + return ::perfetto::protos::pbzero::ChromeCompositorStateMachine_MajorState_ForcedRedrawOnTimeoutState_Name(value); + } + static const BeginImplFrameState BEGIN_IMPL_FRAME_UNSPECIFIED = BeginImplFrameState::BEGIN_IMPL_FRAME_UNSPECIFIED; + static const BeginImplFrameState BEGIN_IMPL_FRAME_IDLE = BeginImplFrameState::BEGIN_IMPL_FRAME_IDLE; + static const BeginImplFrameState BEGIN_IMPL_FRAME_INSIDE_BEGIN_FRAME = BeginImplFrameState::BEGIN_IMPL_FRAME_INSIDE_BEGIN_FRAME; + static const BeginImplFrameState BEGIN_IMPL_FRAME_INSIDE_DEADLINE = BeginImplFrameState::BEGIN_IMPL_FRAME_INSIDE_DEADLINE; + static const BeginMainFrameState BEGIN_MAIN_FRAME_UNSPECIFIED = BeginMainFrameState::BEGIN_MAIN_FRAME_UNSPECIFIED; + static const BeginMainFrameState BEGIN_MAIN_FRAME_IDLE = BeginMainFrameState::BEGIN_MAIN_FRAME_IDLE; + static const BeginMainFrameState BEGIN_MAIN_FRAME_SENT = BeginMainFrameState::BEGIN_MAIN_FRAME_SENT; + static const BeginMainFrameState BEGIN_MAIN_FRAME_READY_TO_COMMIT = BeginMainFrameState::BEGIN_MAIN_FRAME_READY_TO_COMMIT; + static const LayerTreeFrameSinkState LAYER_TREE_FRAME_UNSPECIFIED = LayerTreeFrameSinkState::LAYER_TREE_FRAME_UNSPECIFIED; + static const LayerTreeFrameSinkState LAYER_TREE_FRAME_NONE = LayerTreeFrameSinkState::LAYER_TREE_FRAME_NONE; + static const LayerTreeFrameSinkState LAYER_TREE_FRAME_ACTIVE = LayerTreeFrameSinkState::LAYER_TREE_FRAME_ACTIVE; + static const LayerTreeFrameSinkState LAYER_TREE_FRAME_CREATING = LayerTreeFrameSinkState::LAYER_TREE_FRAME_CREATING; + static const LayerTreeFrameSinkState LAYER_TREE_FRAME_WAITING_FOR_FIRST_COMMIT = LayerTreeFrameSinkState::LAYER_TREE_FRAME_WAITING_FOR_FIRST_COMMIT; + static const LayerTreeFrameSinkState LAYER_TREE_FRAME_WAITING_FOR_FIRST_ACTIVATION = LayerTreeFrameSinkState::LAYER_TREE_FRAME_WAITING_FOR_FIRST_ACTIVATION; + static const ForcedRedrawOnTimeoutState FORCED_REDRAW_UNSPECIFIED = ForcedRedrawOnTimeoutState::FORCED_REDRAW_UNSPECIFIED; + static const ForcedRedrawOnTimeoutState FORCED_REDRAW_IDLE = ForcedRedrawOnTimeoutState::FORCED_REDRAW_IDLE; + static const ForcedRedrawOnTimeoutState FORCED_REDRAW_WAITING_FOR_COMMIT = ForcedRedrawOnTimeoutState::FORCED_REDRAW_WAITING_FOR_COMMIT; + static const ForcedRedrawOnTimeoutState FORCED_REDRAW_WAITING_FOR_ACTIVATION = ForcedRedrawOnTimeoutState::FORCED_REDRAW_WAITING_FOR_ACTIVATION; + static const ForcedRedrawOnTimeoutState FORCED_REDRAW_WAITING_FOR_DRAW = ForcedRedrawOnTimeoutState::FORCED_REDRAW_WAITING_FOR_DRAW; using FieldMetadata_NextAction = ::protozero::proto_utils::FieldMetadata< @@ -122809,14 +120328,7 @@ class ChromeCompositorStateMachine_MajorState : public ::protozero::Message { ::perfetto::protos::pbzero::ChromeCompositorSchedulerAction, ChromeCompositorStateMachine_MajorState>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_NextAction kNextAction() { return {}; } + static constexpr FieldMetadata_NextAction kNextAction{}; void set_next_action(::perfetto::protos::pbzero::ChromeCompositorSchedulerAction value) { static constexpr uint32_t field_id = FieldMetadata_NextAction::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -122834,14 +120346,7 @@ class ChromeCompositorStateMachine_MajorState : public ::protozero::Message { ::perfetto::protos::pbzero::ChromeCompositorStateMachine_MajorState_BeginImplFrameState, ChromeCompositorStateMachine_MajorState>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_BeginImplFrameState kBeginImplFrameState() { return {}; } + static constexpr FieldMetadata_BeginImplFrameState kBeginImplFrameState{}; void set_begin_impl_frame_state(::perfetto::protos::pbzero::ChromeCompositorStateMachine_MajorState_BeginImplFrameState value) { static constexpr uint32_t field_id = FieldMetadata_BeginImplFrameState::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -122859,14 +120364,7 @@ class ChromeCompositorStateMachine_MajorState : public ::protozero::Message { ::perfetto::protos::pbzero::ChromeCompositorStateMachine_MajorState_BeginMainFrameState, ChromeCompositorStateMachine_MajorState>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_BeginMainFrameState kBeginMainFrameState() { return {}; } + static constexpr FieldMetadata_BeginMainFrameState kBeginMainFrameState{}; void set_begin_main_frame_state(::perfetto::protos::pbzero::ChromeCompositorStateMachine_MajorState_BeginMainFrameState value) { static constexpr uint32_t field_id = FieldMetadata_BeginMainFrameState::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -122884,14 +120382,7 @@ class ChromeCompositorStateMachine_MajorState : public ::protozero::Message { ::perfetto::protos::pbzero::ChromeCompositorStateMachine_MajorState_LayerTreeFrameSinkState, ChromeCompositorStateMachine_MajorState>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_LayerTreeFrameSinkState kLayerTreeFrameSinkState() { return {}; } + static constexpr FieldMetadata_LayerTreeFrameSinkState kLayerTreeFrameSinkState{}; void set_layer_tree_frame_sink_state(::perfetto::protos::pbzero::ChromeCompositorStateMachine_MajorState_LayerTreeFrameSinkState value) { static constexpr uint32_t field_id = FieldMetadata_LayerTreeFrameSinkState::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -122909,14 +120400,7 @@ class ChromeCompositorStateMachine_MajorState : public ::protozero::Message { ::perfetto::protos::pbzero::ChromeCompositorStateMachine_MajorState_ForcedRedrawOnTimeoutState, ChromeCompositorStateMachine_MajorState>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ForcedRedrawState kForcedRedrawState() { return {}; } + static constexpr FieldMetadata_ForcedRedrawState kForcedRedrawState{}; void set_forced_redraw_state(::perfetto::protos::pbzero::ChromeCompositorStateMachine_MajorState_ForcedRedrawOnTimeoutState value) { static constexpr uint32_t field_id = FieldMetadata_ForcedRedrawState::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -122989,13 +120473,17 @@ class ChromeCompositorSchedulerState : public ::protozero::Message { }; static constexpr const char* GetName() { return ".perfetto.protos.ChromeCompositorSchedulerState"; } + using BeginImplFrameDeadlineMode = ::perfetto::protos::pbzero::ChromeCompositorSchedulerState_BeginImplFrameDeadlineMode; - static const BeginImplFrameDeadlineMode DEADLINE_MODE_UNSPECIFIED = ChromeCompositorSchedulerState_BeginImplFrameDeadlineMode_DEADLINE_MODE_UNSPECIFIED; - static const BeginImplFrameDeadlineMode DEADLINE_MODE_NONE = ChromeCompositorSchedulerState_BeginImplFrameDeadlineMode_DEADLINE_MODE_NONE; - static const BeginImplFrameDeadlineMode DEADLINE_MODE_IMMEDIATE = ChromeCompositorSchedulerState_BeginImplFrameDeadlineMode_DEADLINE_MODE_IMMEDIATE; - static const BeginImplFrameDeadlineMode DEADLINE_MODE_REGULAR = ChromeCompositorSchedulerState_BeginImplFrameDeadlineMode_DEADLINE_MODE_REGULAR; - static const BeginImplFrameDeadlineMode DEADLINE_MODE_LATE = ChromeCompositorSchedulerState_BeginImplFrameDeadlineMode_DEADLINE_MODE_LATE; - static const BeginImplFrameDeadlineMode DEADLINE_MODE_BLOCKED = ChromeCompositorSchedulerState_BeginImplFrameDeadlineMode_DEADLINE_MODE_BLOCKED; + static inline const char* BeginImplFrameDeadlineMode_Name(BeginImplFrameDeadlineMode value) { + return ::perfetto::protos::pbzero::ChromeCompositorSchedulerState_BeginImplFrameDeadlineMode_Name(value); + } + static const BeginImplFrameDeadlineMode DEADLINE_MODE_UNSPECIFIED = BeginImplFrameDeadlineMode::DEADLINE_MODE_UNSPECIFIED; + static const BeginImplFrameDeadlineMode DEADLINE_MODE_NONE = BeginImplFrameDeadlineMode::DEADLINE_MODE_NONE; + static const BeginImplFrameDeadlineMode DEADLINE_MODE_IMMEDIATE = BeginImplFrameDeadlineMode::DEADLINE_MODE_IMMEDIATE; + static const BeginImplFrameDeadlineMode DEADLINE_MODE_REGULAR = BeginImplFrameDeadlineMode::DEADLINE_MODE_REGULAR; + static const BeginImplFrameDeadlineMode DEADLINE_MODE_LATE = BeginImplFrameDeadlineMode::DEADLINE_MODE_LATE; + static const BeginImplFrameDeadlineMode DEADLINE_MODE_BLOCKED = BeginImplFrameDeadlineMode::DEADLINE_MODE_BLOCKED; using FieldMetadata_StateMachine = ::protozero::proto_utils::FieldMetadata< @@ -123005,14 +120493,7 @@ class ChromeCompositorSchedulerState : public ::protozero::Message { ChromeCompositorStateMachine, ChromeCompositorSchedulerState>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_StateMachine kStateMachine() { return {}; } + static constexpr FieldMetadata_StateMachine kStateMachine{}; template T* set_state_machine() { return BeginNestedMessage(1); } @@ -123026,14 +120507,7 @@ class ChromeCompositorSchedulerState : public ::protozero::Message { bool, ChromeCompositorSchedulerState>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ObservingBeginFrameSource kObservingBeginFrameSource() { return {}; } + static constexpr FieldMetadata_ObservingBeginFrameSource kObservingBeginFrameSource{}; void set_observing_begin_frame_source(bool value) { static constexpr uint32_t field_id = FieldMetadata_ObservingBeginFrameSource::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -123051,14 +120525,7 @@ class ChromeCompositorSchedulerState : public ::protozero::Message { bool, ChromeCompositorSchedulerState>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_BeginImplFrameDeadlineTask kBeginImplFrameDeadlineTask() { return {}; } + static constexpr FieldMetadata_BeginImplFrameDeadlineTask kBeginImplFrameDeadlineTask{}; void set_begin_impl_frame_deadline_task(bool value) { static constexpr uint32_t field_id = FieldMetadata_BeginImplFrameDeadlineTask::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -123076,14 +120543,7 @@ class ChromeCompositorSchedulerState : public ::protozero::Message { bool, ChromeCompositorSchedulerState>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_PendingBeginFrameTask kPendingBeginFrameTask() { return {}; } + static constexpr FieldMetadata_PendingBeginFrameTask kPendingBeginFrameTask{}; void set_pending_begin_frame_task(bool value) { static constexpr uint32_t field_id = FieldMetadata_PendingBeginFrameTask::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -123101,14 +120561,7 @@ class ChromeCompositorSchedulerState : public ::protozero::Message { bool, ChromeCompositorSchedulerState>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_SkippedLastFrameMissedExceededDeadline kSkippedLastFrameMissedExceededDeadline() { return {}; } + static constexpr FieldMetadata_SkippedLastFrameMissedExceededDeadline kSkippedLastFrameMissedExceededDeadline{}; void set_skipped_last_frame_missed_exceeded_deadline(bool value) { static constexpr uint32_t field_id = FieldMetadata_SkippedLastFrameMissedExceededDeadline::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -123126,14 +120579,7 @@ class ChromeCompositorSchedulerState : public ::protozero::Message { ::perfetto::protos::pbzero::ChromeCompositorSchedulerAction, ChromeCompositorSchedulerState>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_InsideAction kInsideAction() { return {}; } + static constexpr FieldMetadata_InsideAction kInsideAction{}; void set_inside_action(::perfetto::protos::pbzero::ChromeCompositorSchedulerAction value) { static constexpr uint32_t field_id = FieldMetadata_InsideAction::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -123151,14 +120597,7 @@ class ChromeCompositorSchedulerState : public ::protozero::Message { ::perfetto::protos::pbzero::ChromeCompositorSchedulerState_BeginImplFrameDeadlineMode, ChromeCompositorSchedulerState>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_DeadlineMode kDeadlineMode() { return {}; } + static constexpr FieldMetadata_DeadlineMode kDeadlineMode{}; void set_deadline_mode(::perfetto::protos::pbzero::ChromeCompositorSchedulerState_BeginImplFrameDeadlineMode value) { static constexpr uint32_t field_id = FieldMetadata_DeadlineMode::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -123176,14 +120615,7 @@ class ChromeCompositorSchedulerState : public ::protozero::Message { int64_t, ChromeCompositorSchedulerState>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_DeadlineUs kDeadlineUs() { return {}; } + static constexpr FieldMetadata_DeadlineUs kDeadlineUs{}; void set_deadline_us(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_DeadlineUs::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -123201,14 +120633,7 @@ class ChromeCompositorSchedulerState : public ::protozero::Message { int64_t, ChromeCompositorSchedulerState>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_DeadlineScheduledAtUs kDeadlineScheduledAtUs() { return {}; } + static constexpr FieldMetadata_DeadlineScheduledAtUs kDeadlineScheduledAtUs{}; void set_deadline_scheduled_at_us(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_DeadlineScheduledAtUs::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -123226,14 +120651,7 @@ class ChromeCompositorSchedulerState : public ::protozero::Message { int64_t, ChromeCompositorSchedulerState>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_NowUs kNowUs() { return {}; } + static constexpr FieldMetadata_NowUs kNowUs{}; void set_now_us(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_NowUs::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -123251,14 +120669,7 @@ class ChromeCompositorSchedulerState : public ::protozero::Message { int64_t, ChromeCompositorSchedulerState>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_NowToDeadlineDeltaUs kNowToDeadlineDeltaUs() { return {}; } + static constexpr FieldMetadata_NowToDeadlineDeltaUs kNowToDeadlineDeltaUs{}; void set_now_to_deadline_delta_us(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_NowToDeadlineDeltaUs::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -123276,14 +120687,7 @@ class ChromeCompositorSchedulerState : public ::protozero::Message { int64_t, ChromeCompositorSchedulerState>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_NowToDeadlineScheduledAtDeltaUs kNowToDeadlineScheduledAtDeltaUs() { return {}; } + static constexpr FieldMetadata_NowToDeadlineScheduledAtDeltaUs kNowToDeadlineScheduledAtDeltaUs{}; void set_now_to_deadline_scheduled_at_delta_us(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_NowToDeadlineScheduledAtDeltaUs::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -123301,14 +120705,7 @@ class ChromeCompositorSchedulerState : public ::protozero::Message { BeginImplFrameArgs, ChromeCompositorSchedulerState>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_BeginImplFrameArgs kBeginImplFrameArgs() { return {}; } + static constexpr FieldMetadata_BeginImplFrameArgs kBeginImplFrameArgs{}; template T* set_begin_impl_frame_args() { return BeginNestedMessage(14); } @@ -123322,14 +120719,7 @@ class ChromeCompositorSchedulerState : public ::protozero::Message { BeginFrameObserverState, ChromeCompositorSchedulerState>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_BeginFrameObserverState kBeginFrameObserverState() { return {}; } + static constexpr FieldMetadata_BeginFrameObserverState kBeginFrameObserverState{}; template T* set_begin_frame_observer_state() { return BeginNestedMessage(15); } @@ -123343,14 +120733,7 @@ class ChromeCompositorSchedulerState : public ::protozero::Message { BeginFrameSourceState, ChromeCompositorSchedulerState>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_BeginFrameSourceState kBeginFrameSourceState() { return {}; } + static constexpr FieldMetadata_BeginFrameSourceState kBeginFrameSourceState{}; template T* set_begin_frame_source_state() { return BeginNestedMessage(16); } @@ -123364,14 +120747,7 @@ class ChromeCompositorSchedulerState : public ::protozero::Message { CompositorTimingHistory, ChromeCompositorSchedulerState>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_CompositorTimingHistory kCompositorTimingHistory() { return {}; } + static constexpr FieldMetadata_CompositorTimingHistory kCompositorTimingHistory{}; template T* set_compositor_timing_history() { return BeginNestedMessage(17); } @@ -123428,14 +120804,7 @@ class ChromeContentSettingsEventInfo : public ::protozero::Message { uint32_t, ChromeContentSettingsEventInfo>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_NumberOfExceptions kNumberOfExceptions() { return {}; } + static constexpr FieldMetadata_NumberOfExceptions kNumberOfExceptions{}; void set_number_of_exceptions(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_NumberOfExceptions::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -123469,41 +120838,148 @@ namespace perfetto { namespace protos { namespace pbzero { -enum ChromeFrameReporter_FrameDropReason : int32_t; -enum ChromeFrameReporter_ScrollState : int32_t; -enum ChromeFrameReporter_State : int32_t; +namespace perfetto_pbzero_enum_ChromeFrameReporter { +enum FrameDropReason : int32_t; +} // namespace perfetto_pbzero_enum_ChromeFrameReporter +using ChromeFrameReporter_FrameDropReason = perfetto_pbzero_enum_ChromeFrameReporter::FrameDropReason; +namespace perfetto_pbzero_enum_ChromeFrameReporter { +enum FrameType : int32_t; +} // namespace perfetto_pbzero_enum_ChromeFrameReporter +using ChromeFrameReporter_FrameType = perfetto_pbzero_enum_ChromeFrameReporter::FrameType; +namespace perfetto_pbzero_enum_ChromeFrameReporter { +enum ScrollState : int32_t; +} // namespace perfetto_pbzero_enum_ChromeFrameReporter +using ChromeFrameReporter_ScrollState = perfetto_pbzero_enum_ChromeFrameReporter::ScrollState; +namespace perfetto_pbzero_enum_ChromeFrameReporter { +enum State : int32_t; +} // namespace perfetto_pbzero_enum_ChromeFrameReporter +using ChromeFrameReporter_State = perfetto_pbzero_enum_ChromeFrameReporter::State; -enum ChromeFrameReporter_State : int32_t { - ChromeFrameReporter_State_STATE_NO_UPDATE_DESIRED = 0, - ChromeFrameReporter_State_STATE_PRESENTED_ALL = 1, - ChromeFrameReporter_State_STATE_PRESENTED_PARTIAL = 2, - ChromeFrameReporter_State_STATE_DROPPED = 3, +namespace perfetto_pbzero_enum_ChromeFrameReporter { +enum State : int32_t { + STATE_NO_UPDATE_DESIRED = 0, + STATE_PRESENTED_ALL = 1, + STATE_PRESENTED_PARTIAL = 2, + STATE_DROPPED = 3, }; +} // namespace perfetto_pbzero_enum_ChromeFrameReporter +using ChromeFrameReporter_State = perfetto_pbzero_enum_ChromeFrameReporter::State; -const ChromeFrameReporter_State ChromeFrameReporter_State_MIN = ChromeFrameReporter_State_STATE_NO_UPDATE_DESIRED; -const ChromeFrameReporter_State ChromeFrameReporter_State_MAX = ChromeFrameReporter_State_STATE_DROPPED; -enum ChromeFrameReporter_FrameDropReason : int32_t { - ChromeFrameReporter_FrameDropReason_REASON_UNSPECIFIED = 0, - ChromeFrameReporter_FrameDropReason_REASON_DISPLAY_COMPOSITOR = 1, - ChromeFrameReporter_FrameDropReason_REASON_MAIN_THREAD = 2, - ChromeFrameReporter_FrameDropReason_REASON_CLIENT_COMPOSITOR = 3, +constexpr ChromeFrameReporter_State ChromeFrameReporter_State_MIN = ChromeFrameReporter_State::STATE_NO_UPDATE_DESIRED; +constexpr ChromeFrameReporter_State ChromeFrameReporter_State_MAX = ChromeFrameReporter_State::STATE_DROPPED; + + +PERFETTO_PROTOZERO_CONSTEXPR14_OR_INLINE +const char* ChromeFrameReporter_State_Name(::perfetto::protos::pbzero::ChromeFrameReporter_State value) { + switch (value) { + case ::perfetto::protos::pbzero::ChromeFrameReporter_State::STATE_NO_UPDATE_DESIRED: + return "STATE_NO_UPDATE_DESIRED"; + + case ::perfetto::protos::pbzero::ChromeFrameReporter_State::STATE_PRESENTED_ALL: + return "STATE_PRESENTED_ALL"; + + case ::perfetto::protos::pbzero::ChromeFrameReporter_State::STATE_PRESENTED_PARTIAL: + return "STATE_PRESENTED_PARTIAL"; + + case ::perfetto::protos::pbzero::ChromeFrameReporter_State::STATE_DROPPED: + return "STATE_DROPPED"; + } + return "PBZERO_UNKNOWN_ENUM_VALUE"; +} + +namespace perfetto_pbzero_enum_ChromeFrameReporter { +enum FrameDropReason : int32_t { + REASON_UNSPECIFIED = 0, + REASON_DISPLAY_COMPOSITOR = 1, + REASON_MAIN_THREAD = 2, + REASON_CLIENT_COMPOSITOR = 3, }; +} // namespace perfetto_pbzero_enum_ChromeFrameReporter +using ChromeFrameReporter_FrameDropReason = perfetto_pbzero_enum_ChromeFrameReporter::FrameDropReason; -const ChromeFrameReporter_FrameDropReason ChromeFrameReporter_FrameDropReason_MIN = ChromeFrameReporter_FrameDropReason_REASON_UNSPECIFIED; -const ChromeFrameReporter_FrameDropReason ChromeFrameReporter_FrameDropReason_MAX = ChromeFrameReporter_FrameDropReason_REASON_CLIENT_COMPOSITOR; -enum ChromeFrameReporter_ScrollState : int32_t { - ChromeFrameReporter_ScrollState_SCROLL_NONE = 0, - ChromeFrameReporter_ScrollState_SCROLL_MAIN_THREAD = 1, - ChromeFrameReporter_ScrollState_SCROLL_COMPOSITOR_THREAD = 2, - ChromeFrameReporter_ScrollState_SCROLL_UNKNOWN = 3, +constexpr ChromeFrameReporter_FrameDropReason ChromeFrameReporter_FrameDropReason_MIN = ChromeFrameReporter_FrameDropReason::REASON_UNSPECIFIED; +constexpr ChromeFrameReporter_FrameDropReason ChromeFrameReporter_FrameDropReason_MAX = ChromeFrameReporter_FrameDropReason::REASON_CLIENT_COMPOSITOR; + + +PERFETTO_PROTOZERO_CONSTEXPR14_OR_INLINE +const char* ChromeFrameReporter_FrameDropReason_Name(::perfetto::protos::pbzero::ChromeFrameReporter_FrameDropReason value) { + switch (value) { + case ::perfetto::protos::pbzero::ChromeFrameReporter_FrameDropReason::REASON_UNSPECIFIED: + return "REASON_UNSPECIFIED"; + + case ::perfetto::protos::pbzero::ChromeFrameReporter_FrameDropReason::REASON_DISPLAY_COMPOSITOR: + return "REASON_DISPLAY_COMPOSITOR"; + + case ::perfetto::protos::pbzero::ChromeFrameReporter_FrameDropReason::REASON_MAIN_THREAD: + return "REASON_MAIN_THREAD"; + + case ::perfetto::protos::pbzero::ChromeFrameReporter_FrameDropReason::REASON_CLIENT_COMPOSITOR: + return "REASON_CLIENT_COMPOSITOR"; + } + return "PBZERO_UNKNOWN_ENUM_VALUE"; +} + +namespace perfetto_pbzero_enum_ChromeFrameReporter { +enum ScrollState : int32_t { + SCROLL_NONE = 0, + SCROLL_MAIN_THREAD = 1, + SCROLL_COMPOSITOR_THREAD = 2, + SCROLL_UNKNOWN = 3, }; +} // namespace perfetto_pbzero_enum_ChromeFrameReporter +using ChromeFrameReporter_ScrollState = perfetto_pbzero_enum_ChromeFrameReporter::ScrollState; -const ChromeFrameReporter_ScrollState ChromeFrameReporter_ScrollState_MIN = ChromeFrameReporter_ScrollState_SCROLL_NONE; -const ChromeFrameReporter_ScrollState ChromeFrameReporter_ScrollState_MAX = ChromeFrameReporter_ScrollState_SCROLL_UNKNOWN; -class ChromeFrameReporter_Decoder : public ::protozero::TypedProtoDecoder { +constexpr ChromeFrameReporter_ScrollState ChromeFrameReporter_ScrollState_MIN = ChromeFrameReporter_ScrollState::SCROLL_NONE; +constexpr ChromeFrameReporter_ScrollState ChromeFrameReporter_ScrollState_MAX = ChromeFrameReporter_ScrollState::SCROLL_UNKNOWN; + + +PERFETTO_PROTOZERO_CONSTEXPR14_OR_INLINE +const char* ChromeFrameReporter_ScrollState_Name(::perfetto::protos::pbzero::ChromeFrameReporter_ScrollState value) { + switch (value) { + case ::perfetto::protos::pbzero::ChromeFrameReporter_ScrollState::SCROLL_NONE: + return "SCROLL_NONE"; + + case ::perfetto::protos::pbzero::ChromeFrameReporter_ScrollState::SCROLL_MAIN_THREAD: + return "SCROLL_MAIN_THREAD"; + + case ::perfetto::protos::pbzero::ChromeFrameReporter_ScrollState::SCROLL_COMPOSITOR_THREAD: + return "SCROLL_COMPOSITOR_THREAD"; + + case ::perfetto::protos::pbzero::ChromeFrameReporter_ScrollState::SCROLL_UNKNOWN: + return "SCROLL_UNKNOWN"; + } + return "PBZERO_UNKNOWN_ENUM_VALUE"; +} + +namespace perfetto_pbzero_enum_ChromeFrameReporter { +enum FrameType : int32_t { + FORKED = 0, + BACKFILL = 1, +}; +} // namespace perfetto_pbzero_enum_ChromeFrameReporter +using ChromeFrameReporter_FrameType = perfetto_pbzero_enum_ChromeFrameReporter::FrameType; + + +constexpr ChromeFrameReporter_FrameType ChromeFrameReporter_FrameType_MIN = ChromeFrameReporter_FrameType::FORKED; +constexpr ChromeFrameReporter_FrameType ChromeFrameReporter_FrameType_MAX = ChromeFrameReporter_FrameType::BACKFILL; + + +PERFETTO_PROTOZERO_CONSTEXPR14_OR_INLINE +const char* ChromeFrameReporter_FrameType_Name(::perfetto::protos::pbzero::ChromeFrameReporter_FrameType value) { + switch (value) { + case ::perfetto::protos::pbzero::ChromeFrameReporter_FrameType::FORKED: + return "FORKED"; + + case ::perfetto::protos::pbzero::ChromeFrameReporter_FrameType::BACKFILL: + return "BACKFILL"; + } + return "PBZERO_UNKNOWN_ENUM_VALUE"; +} + +class ChromeFrameReporter_Decoder : public ::protozero::TypedProtoDecoder { public: ChromeFrameReporter_Decoder(const uint8_t* data, size_t len) : TypedProtoDecoder(data, len) {} explicit ChromeFrameReporter_Decoder(const std::string& raw) : TypedProtoDecoder(reinterpret_cast(raw.data()), raw.size()) {} @@ -123532,6 +121008,10 @@ class ChromeFrameReporter_Decoder : public ::protozero::TypedProtoDecoder().as_uint64(); } bool has_has_high_latency() const { return at<12>().valid(); } bool has_high_latency() const { return at<12>().as_bool(); } + bool has_frame_type() const { return at<13>().valid(); } + int32_t frame_type() const { return at<13>().as_int32(); } + bool has_high_latency_contribution_stage() const { return at<14>().valid(); } + ::protozero::RepeatedFieldIterator<::protozero::ConstChars> high_latency_contribution_stage() const { return GetRepeated<::protozero::ConstChars>(14); } }; class ChromeFrameReporter : public ::protozero::Message { @@ -123550,24 +121030,45 @@ class ChromeFrameReporter : public ::protozero::Message { kHasMissingContentFieldNumber = 10, kLayerTreeHostIdFieldNumber = 11, kHasHighLatencyFieldNumber = 12, + kFrameTypeFieldNumber = 13, + kHighLatencyContributionStageFieldNumber = 14, }; static constexpr const char* GetName() { return ".perfetto.protos.ChromeFrameReporter"; } + using State = ::perfetto::protos::pbzero::ChromeFrameReporter_State; + static inline const char* State_Name(State value) { + return ::perfetto::protos::pbzero::ChromeFrameReporter_State_Name(value); + } + using FrameDropReason = ::perfetto::protos::pbzero::ChromeFrameReporter_FrameDropReason; + static inline const char* FrameDropReason_Name(FrameDropReason value) { + return ::perfetto::protos::pbzero::ChromeFrameReporter_FrameDropReason_Name(value); + } + using ScrollState = ::perfetto::protos::pbzero::ChromeFrameReporter_ScrollState; - static const State STATE_NO_UPDATE_DESIRED = ChromeFrameReporter_State_STATE_NO_UPDATE_DESIRED; - static const State STATE_PRESENTED_ALL = ChromeFrameReporter_State_STATE_PRESENTED_ALL; - static const State STATE_PRESENTED_PARTIAL = ChromeFrameReporter_State_STATE_PRESENTED_PARTIAL; - static const State STATE_DROPPED = ChromeFrameReporter_State_STATE_DROPPED; - static const FrameDropReason REASON_UNSPECIFIED = ChromeFrameReporter_FrameDropReason_REASON_UNSPECIFIED; - static const FrameDropReason REASON_DISPLAY_COMPOSITOR = ChromeFrameReporter_FrameDropReason_REASON_DISPLAY_COMPOSITOR; - static const FrameDropReason REASON_MAIN_THREAD = ChromeFrameReporter_FrameDropReason_REASON_MAIN_THREAD; - static const FrameDropReason REASON_CLIENT_COMPOSITOR = ChromeFrameReporter_FrameDropReason_REASON_CLIENT_COMPOSITOR; - static const ScrollState SCROLL_NONE = ChromeFrameReporter_ScrollState_SCROLL_NONE; - static const ScrollState SCROLL_MAIN_THREAD = ChromeFrameReporter_ScrollState_SCROLL_MAIN_THREAD; - static const ScrollState SCROLL_COMPOSITOR_THREAD = ChromeFrameReporter_ScrollState_SCROLL_COMPOSITOR_THREAD; - static const ScrollState SCROLL_UNKNOWN = ChromeFrameReporter_ScrollState_SCROLL_UNKNOWN; + static inline const char* ScrollState_Name(ScrollState value) { + return ::perfetto::protos::pbzero::ChromeFrameReporter_ScrollState_Name(value); + } + + using FrameType = ::perfetto::protos::pbzero::ChromeFrameReporter_FrameType; + static inline const char* FrameType_Name(FrameType value) { + return ::perfetto::protos::pbzero::ChromeFrameReporter_FrameType_Name(value); + } + static const State STATE_NO_UPDATE_DESIRED = State::STATE_NO_UPDATE_DESIRED; + static const State STATE_PRESENTED_ALL = State::STATE_PRESENTED_ALL; + static const State STATE_PRESENTED_PARTIAL = State::STATE_PRESENTED_PARTIAL; + static const State STATE_DROPPED = State::STATE_DROPPED; + static const FrameDropReason REASON_UNSPECIFIED = FrameDropReason::REASON_UNSPECIFIED; + static const FrameDropReason REASON_DISPLAY_COMPOSITOR = FrameDropReason::REASON_DISPLAY_COMPOSITOR; + static const FrameDropReason REASON_MAIN_THREAD = FrameDropReason::REASON_MAIN_THREAD; + static const FrameDropReason REASON_CLIENT_COMPOSITOR = FrameDropReason::REASON_CLIENT_COMPOSITOR; + static const ScrollState SCROLL_NONE = ScrollState::SCROLL_NONE; + static const ScrollState SCROLL_MAIN_THREAD = ScrollState::SCROLL_MAIN_THREAD; + static const ScrollState SCROLL_COMPOSITOR_THREAD = ScrollState::SCROLL_COMPOSITOR_THREAD; + static const ScrollState SCROLL_UNKNOWN = ScrollState::SCROLL_UNKNOWN; + static const FrameType FORKED = FrameType::FORKED; + static const FrameType BACKFILL = FrameType::BACKFILL; using FieldMetadata_State = ::protozero::proto_utils::FieldMetadata< @@ -123577,14 +121078,7 @@ class ChromeFrameReporter : public ::protozero::Message { ::perfetto::protos::pbzero::ChromeFrameReporter_State, ChromeFrameReporter>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_State kState() { return {}; } + static constexpr FieldMetadata_State kState{}; void set_state(::perfetto::protos::pbzero::ChromeFrameReporter_State value) { static constexpr uint32_t field_id = FieldMetadata_State::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -123602,14 +121096,7 @@ class ChromeFrameReporter : public ::protozero::Message { ::perfetto::protos::pbzero::ChromeFrameReporter_FrameDropReason, ChromeFrameReporter>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Reason kReason() { return {}; } + static constexpr FieldMetadata_Reason kReason{}; void set_reason(::perfetto::protos::pbzero::ChromeFrameReporter_FrameDropReason value) { static constexpr uint32_t field_id = FieldMetadata_Reason::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -123627,14 +121114,7 @@ class ChromeFrameReporter : public ::protozero::Message { uint64_t, ChromeFrameReporter>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_FrameSource kFrameSource() { return {}; } + static constexpr FieldMetadata_FrameSource kFrameSource{}; void set_frame_source(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_FrameSource::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -123652,14 +121132,7 @@ class ChromeFrameReporter : public ::protozero::Message { uint64_t, ChromeFrameReporter>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_FrameSequence kFrameSequence() { return {}; } + static constexpr FieldMetadata_FrameSequence kFrameSequence{}; void set_frame_sequence(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_FrameSequence::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -123677,14 +121150,7 @@ class ChromeFrameReporter : public ::protozero::Message { bool, ChromeFrameReporter>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_AffectsSmoothness kAffectsSmoothness() { return {}; } + static constexpr FieldMetadata_AffectsSmoothness kAffectsSmoothness{}; void set_affects_smoothness(bool value) { static constexpr uint32_t field_id = FieldMetadata_AffectsSmoothness::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -123702,14 +121168,7 @@ class ChromeFrameReporter : public ::protozero::Message { ::perfetto::protos::pbzero::ChromeFrameReporter_ScrollState, ChromeFrameReporter>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ScrollState kScrollState() { return {}; } + static constexpr FieldMetadata_ScrollState kScrollState{}; void set_scroll_state(::perfetto::protos::pbzero::ChromeFrameReporter_ScrollState value) { static constexpr uint32_t field_id = FieldMetadata_ScrollState::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -123727,14 +121186,7 @@ class ChromeFrameReporter : public ::protozero::Message { bool, ChromeFrameReporter>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_HasMainAnimation kHasMainAnimation() { return {}; } + static constexpr FieldMetadata_HasMainAnimation kHasMainAnimation{}; void set_has_main_animation(bool value) { static constexpr uint32_t field_id = FieldMetadata_HasMainAnimation::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -123752,14 +121204,7 @@ class ChromeFrameReporter : public ::protozero::Message { bool, ChromeFrameReporter>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_HasCompositorAnimation kHasCompositorAnimation() { return {}; } + static constexpr FieldMetadata_HasCompositorAnimation kHasCompositorAnimation{}; void set_has_compositor_animation(bool value) { static constexpr uint32_t field_id = FieldMetadata_HasCompositorAnimation::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -123777,14 +121222,7 @@ class ChromeFrameReporter : public ::protozero::Message { bool, ChromeFrameReporter>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_HasSmoothInputMain kHasSmoothInputMain() { return {}; } + static constexpr FieldMetadata_HasSmoothInputMain kHasSmoothInputMain{}; void set_has_smooth_input_main(bool value) { static constexpr uint32_t field_id = FieldMetadata_HasSmoothInputMain::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -123802,14 +121240,7 @@ class ChromeFrameReporter : public ::protozero::Message { bool, ChromeFrameReporter>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_HasMissingContent kHasMissingContent() { return {}; } + static constexpr FieldMetadata_HasMissingContent kHasMissingContent{}; void set_has_missing_content(bool value) { static constexpr uint32_t field_id = FieldMetadata_HasMissingContent::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -123827,14 +121258,7 @@ class ChromeFrameReporter : public ::protozero::Message { uint64_t, ChromeFrameReporter>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_LayerTreeHostId kLayerTreeHostId() { return {}; } + static constexpr FieldMetadata_LayerTreeHostId kLayerTreeHostId{}; void set_layer_tree_host_id(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_LayerTreeHostId::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -123852,14 +121276,7 @@ class ChromeFrameReporter : public ::protozero::Message { bool, ChromeFrameReporter>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_HasHighLatency kHasHighLatency() { return {}; } + static constexpr FieldMetadata_HasHighLatency kHasHighLatency{}; void set_has_high_latency(bool value) { static constexpr uint32_t field_id = FieldMetadata_HasHighLatency::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -123868,6 +121285,48 @@ class ChromeFrameReporter : public ::protozero::Message { ::protozero::proto_utils::ProtoSchemaType::kBool> ::Append(*this, field_id, value); } + + using FieldMetadata_FrameType = + ::protozero::proto_utils::FieldMetadata< + 13, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kEnum, + ::perfetto::protos::pbzero::ChromeFrameReporter_FrameType, + ChromeFrameReporter>; + + static constexpr FieldMetadata_FrameType kFrameType{}; + void set_frame_type(::perfetto::protos::pbzero::ChromeFrameReporter_FrameType value) { + static constexpr uint32_t field_id = FieldMetadata_FrameType::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kEnum> + ::Append(*this, field_id, value); + } + + using FieldMetadata_HighLatencyContributionStage = + ::protozero::proto_utils::FieldMetadata< + 14, + ::protozero::proto_utils::RepetitionType::kRepeatedNotPacked, + ::protozero::proto_utils::ProtoSchemaType::kString, + std::string, + ChromeFrameReporter>; + + static constexpr FieldMetadata_HighLatencyContributionStage kHighLatencyContributionStage{}; + void add_high_latency_contribution_stage(const char* data, size_t size) { + AppendBytes(FieldMetadata_HighLatencyContributionStage::kFieldId, data, size); + } + void add_high_latency_contribution_stage(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_HighLatencyContributionStage::kFieldId, chars.data, chars.size); + } + void add_high_latency_contribution_stage(std::string value) { + static constexpr uint32_t field_id = FieldMetadata_HighLatencyContributionStage::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kString> + ::Append(*this, field_id, value); + } }; } // Namespace. @@ -123929,14 +121388,7 @@ class ChromeHistogramSample : public ::protozero::Message { uint64_t, ChromeHistogramSample>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_NameHash kNameHash() { return {}; } + static constexpr FieldMetadata_NameHash kNameHash{}; void set_name_hash(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_NameHash::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -123954,17 +121406,13 @@ class ChromeHistogramSample : public ::protozero::Message { std::string, ChromeHistogramSample>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Name kName() { return {}; } + static constexpr FieldMetadata_Name kName{}; void set_name(const char* data, size_t size) { AppendBytes(FieldMetadata_Name::kFieldId, data, size); } + void set_name(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Name::kFieldId, chars.data, chars.size); + } void set_name(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Name::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -123982,14 +121430,7 @@ class ChromeHistogramSample : public ::protozero::Message { int64_t, ChromeHistogramSample>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Sample kSample() { return {}; } + static constexpr FieldMetadata_Sample kSample{}; void set_sample(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_Sample::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -124007,14 +121448,7 @@ class ChromeHistogramSample : public ::protozero::Message { uint64_t, ChromeHistogramSample>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_NameIid kNameIid() { return {}; } + static constexpr FieldMetadata_NameIid kNameIid{}; void set_name_iid(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_NameIid::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -124054,14 +121488,7 @@ class HistogramName : public ::protozero::Message { uint64_t, HistogramName>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Iid kIid() { return {}; } + static constexpr FieldMetadata_Iid kIid{}; void set_iid(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Iid::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -124079,17 +121506,13 @@ class HistogramName : public ::protozero::Message { std::string, HistogramName>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Name kName() { return {}; } + static constexpr FieldMetadata_Name kName{}; void set_name(const char* data, size_t size) { AppendBytes(FieldMetadata_Name::kFieldId, data, size); } + void set_name(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Name::kFieldId, chars.data, chars.size); + } void set_name(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Name::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -124150,17 +121573,13 @@ class ChromeKeyedService : public ::protozero::Message { std::string, ChromeKeyedService>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Name kName() { return {}; } + static constexpr FieldMetadata_Name kName{}; void set_name(const char* data, size_t size) { AppendBytes(FieldMetadata_Name::kFieldId, data, size); } + void set_name(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Name::kFieldId, chars.data, chars.size); + } void set_name(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Name::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -124195,47 +121614,156 @@ namespace protos { namespace pbzero { class ChromeLatencyInfo_ComponentInfo; -enum ChromeLatencyInfo_LatencyComponentType : int32_t; -enum ChromeLatencyInfo_Step : int32_t; +namespace perfetto_pbzero_enum_ChromeLatencyInfo { +enum LatencyComponentType : int32_t; +} // namespace perfetto_pbzero_enum_ChromeLatencyInfo +using ChromeLatencyInfo_LatencyComponentType = perfetto_pbzero_enum_ChromeLatencyInfo::LatencyComponentType; +namespace perfetto_pbzero_enum_ChromeLatencyInfo { +enum Step : int32_t; +} // namespace perfetto_pbzero_enum_ChromeLatencyInfo +using ChromeLatencyInfo_Step = perfetto_pbzero_enum_ChromeLatencyInfo::Step; -enum ChromeLatencyInfo_Step : int32_t { - ChromeLatencyInfo_Step_STEP_UNSPECIFIED = 0, - ChromeLatencyInfo_Step_STEP_SEND_INPUT_EVENT_UI = 3, - ChromeLatencyInfo_Step_STEP_HANDLE_INPUT_EVENT_IMPL = 5, - ChromeLatencyInfo_Step_STEP_DID_HANDLE_INPUT_AND_OVERSCROLL = 8, - ChromeLatencyInfo_Step_STEP_HANDLE_INPUT_EVENT_MAIN = 4, - ChromeLatencyInfo_Step_STEP_MAIN_THREAD_SCROLL_UPDATE = 2, - ChromeLatencyInfo_Step_STEP_HANDLE_INPUT_EVENT_MAIN_COMMIT = 1, - ChromeLatencyInfo_Step_STEP_HANDLED_INPUT_EVENT_MAIN_OR_IMPL = 9, - ChromeLatencyInfo_Step_STEP_HANDLED_INPUT_EVENT_IMPL = 10, - ChromeLatencyInfo_Step_STEP_SWAP_BUFFERS = 6, - ChromeLatencyInfo_Step_STEP_DRAW_AND_SWAP = 7, - ChromeLatencyInfo_Step_STEP_FINISHED_SWAP_BUFFERS = 11, +namespace perfetto_pbzero_enum_ChromeLatencyInfo { +enum Step : int32_t { + STEP_UNSPECIFIED = 0, + STEP_SEND_INPUT_EVENT_UI = 3, + STEP_HANDLE_INPUT_EVENT_IMPL = 5, + STEP_DID_HANDLE_INPUT_AND_OVERSCROLL = 8, + STEP_HANDLE_INPUT_EVENT_MAIN = 4, + STEP_MAIN_THREAD_SCROLL_UPDATE = 2, + STEP_HANDLE_INPUT_EVENT_MAIN_COMMIT = 1, + STEP_HANDLED_INPUT_EVENT_MAIN_OR_IMPL = 9, + STEP_HANDLED_INPUT_EVENT_IMPL = 10, + STEP_SWAP_BUFFERS = 6, + STEP_DRAW_AND_SWAP = 7, + STEP_FINISHED_SWAP_BUFFERS = 11, }; +} // namespace perfetto_pbzero_enum_ChromeLatencyInfo +using ChromeLatencyInfo_Step = perfetto_pbzero_enum_ChromeLatencyInfo::Step; -const ChromeLatencyInfo_Step ChromeLatencyInfo_Step_MIN = ChromeLatencyInfo_Step_STEP_UNSPECIFIED; -const ChromeLatencyInfo_Step ChromeLatencyInfo_Step_MAX = ChromeLatencyInfo_Step_STEP_FINISHED_SWAP_BUFFERS; -enum ChromeLatencyInfo_LatencyComponentType : int32_t { - ChromeLatencyInfo_LatencyComponentType_COMPONENT_UNSPECIFIED = 0, - ChromeLatencyInfo_LatencyComponentType_COMPONENT_INPUT_EVENT_LATENCY_BEGIN_RWH = 1, - ChromeLatencyInfo_LatencyComponentType_COMPONENT_INPUT_EVENT_LATENCY_SCROLL_UPDATE_ORIGINAL = 2, - ChromeLatencyInfo_LatencyComponentType_COMPONENT_INPUT_EVENT_LATENCY_FIRST_SCROLL_UPDATE_ORIGINAL = 3, - ChromeLatencyInfo_LatencyComponentType_COMPONENT_INPUT_EVENT_LATENCY_ORIGINAL = 4, - ChromeLatencyInfo_LatencyComponentType_COMPONENT_INPUT_EVENT_LATENCY_UI = 5, - ChromeLatencyInfo_LatencyComponentType_COMPONENT_INPUT_EVENT_LATENCY_RENDERER_MAIN = 6, - ChromeLatencyInfo_LatencyComponentType_COMPONENT_INPUT_EVENT_LATENCY_RENDERING_SCHEDULED_MAIN = 7, - ChromeLatencyInfo_LatencyComponentType_COMPONENT_INPUT_EVENT_LATENCY_RENDERING_SCHEDULED_IMPL = 8, - ChromeLatencyInfo_LatencyComponentType_COMPONENT_INPUT_EVENT_LATENCY_SCROLL_UPDATE_LAST_EVENT = 9, - ChromeLatencyInfo_LatencyComponentType_COMPONENT_INPUT_EVENT_LATENCY_ACK_RWH = 10, - ChromeLatencyInfo_LatencyComponentType_COMPONENT_INPUT_EVENT_LATENCY_RENDERER_SWAP = 11, - ChromeLatencyInfo_LatencyComponentType_COMPONENT_DISPLAY_COMPOSITOR_RECEIVED_FRAME = 12, - ChromeLatencyInfo_LatencyComponentType_COMPONENT_INPUT_EVENT_GPU_SWAP_BUFFER = 13, - ChromeLatencyInfo_LatencyComponentType_COMPONENT_INPUT_EVENT_LATENCY_FRAME_SWAP = 14, +constexpr ChromeLatencyInfo_Step ChromeLatencyInfo_Step_MIN = ChromeLatencyInfo_Step::STEP_UNSPECIFIED; +constexpr ChromeLatencyInfo_Step ChromeLatencyInfo_Step_MAX = ChromeLatencyInfo_Step::STEP_FINISHED_SWAP_BUFFERS; + + +PERFETTO_PROTOZERO_CONSTEXPR14_OR_INLINE +const char* ChromeLatencyInfo_Step_Name(::perfetto::protos::pbzero::ChromeLatencyInfo_Step value) { + switch (value) { + case ::perfetto::protos::pbzero::ChromeLatencyInfo_Step::STEP_UNSPECIFIED: + return "STEP_UNSPECIFIED"; + + case ::perfetto::protos::pbzero::ChromeLatencyInfo_Step::STEP_SEND_INPUT_EVENT_UI: + return "STEP_SEND_INPUT_EVENT_UI"; + + case ::perfetto::protos::pbzero::ChromeLatencyInfo_Step::STEP_HANDLE_INPUT_EVENT_IMPL: + return "STEP_HANDLE_INPUT_EVENT_IMPL"; + + case ::perfetto::protos::pbzero::ChromeLatencyInfo_Step::STEP_DID_HANDLE_INPUT_AND_OVERSCROLL: + return "STEP_DID_HANDLE_INPUT_AND_OVERSCROLL"; + + case ::perfetto::protos::pbzero::ChromeLatencyInfo_Step::STEP_HANDLE_INPUT_EVENT_MAIN: + return "STEP_HANDLE_INPUT_EVENT_MAIN"; + + case ::perfetto::protos::pbzero::ChromeLatencyInfo_Step::STEP_MAIN_THREAD_SCROLL_UPDATE: + return "STEP_MAIN_THREAD_SCROLL_UPDATE"; + + case ::perfetto::protos::pbzero::ChromeLatencyInfo_Step::STEP_HANDLE_INPUT_EVENT_MAIN_COMMIT: + return "STEP_HANDLE_INPUT_EVENT_MAIN_COMMIT"; + + case ::perfetto::protos::pbzero::ChromeLatencyInfo_Step::STEP_HANDLED_INPUT_EVENT_MAIN_OR_IMPL: + return "STEP_HANDLED_INPUT_EVENT_MAIN_OR_IMPL"; + + case ::perfetto::protos::pbzero::ChromeLatencyInfo_Step::STEP_HANDLED_INPUT_EVENT_IMPL: + return "STEP_HANDLED_INPUT_EVENT_IMPL"; + + case ::perfetto::protos::pbzero::ChromeLatencyInfo_Step::STEP_SWAP_BUFFERS: + return "STEP_SWAP_BUFFERS"; + + case ::perfetto::protos::pbzero::ChromeLatencyInfo_Step::STEP_DRAW_AND_SWAP: + return "STEP_DRAW_AND_SWAP"; + + case ::perfetto::protos::pbzero::ChromeLatencyInfo_Step::STEP_FINISHED_SWAP_BUFFERS: + return "STEP_FINISHED_SWAP_BUFFERS"; + } + return "PBZERO_UNKNOWN_ENUM_VALUE"; +} + +namespace perfetto_pbzero_enum_ChromeLatencyInfo { +enum LatencyComponentType : int32_t { + COMPONENT_UNSPECIFIED = 0, + COMPONENT_INPUT_EVENT_LATENCY_BEGIN_RWH = 1, + COMPONENT_INPUT_EVENT_LATENCY_SCROLL_UPDATE_ORIGINAL = 2, + COMPONENT_INPUT_EVENT_LATENCY_FIRST_SCROLL_UPDATE_ORIGINAL = 3, + COMPONENT_INPUT_EVENT_LATENCY_ORIGINAL = 4, + COMPONENT_INPUT_EVENT_LATENCY_UI = 5, + COMPONENT_INPUT_EVENT_LATENCY_RENDERER_MAIN = 6, + COMPONENT_INPUT_EVENT_LATENCY_RENDERING_SCHEDULED_MAIN = 7, + COMPONENT_INPUT_EVENT_LATENCY_RENDERING_SCHEDULED_IMPL = 8, + COMPONENT_INPUT_EVENT_LATENCY_SCROLL_UPDATE_LAST_EVENT = 9, + COMPONENT_INPUT_EVENT_LATENCY_ACK_RWH = 10, + COMPONENT_INPUT_EVENT_LATENCY_RENDERER_SWAP = 11, + COMPONENT_DISPLAY_COMPOSITOR_RECEIVED_FRAME = 12, + COMPONENT_INPUT_EVENT_GPU_SWAP_BUFFER = 13, + COMPONENT_INPUT_EVENT_LATENCY_FRAME_SWAP = 14, }; +} // namespace perfetto_pbzero_enum_ChromeLatencyInfo +using ChromeLatencyInfo_LatencyComponentType = perfetto_pbzero_enum_ChromeLatencyInfo::LatencyComponentType; -const ChromeLatencyInfo_LatencyComponentType ChromeLatencyInfo_LatencyComponentType_MIN = ChromeLatencyInfo_LatencyComponentType_COMPONENT_UNSPECIFIED; -const ChromeLatencyInfo_LatencyComponentType ChromeLatencyInfo_LatencyComponentType_MAX = ChromeLatencyInfo_LatencyComponentType_COMPONENT_INPUT_EVENT_LATENCY_FRAME_SWAP; + +constexpr ChromeLatencyInfo_LatencyComponentType ChromeLatencyInfo_LatencyComponentType_MIN = ChromeLatencyInfo_LatencyComponentType::COMPONENT_UNSPECIFIED; +constexpr ChromeLatencyInfo_LatencyComponentType ChromeLatencyInfo_LatencyComponentType_MAX = ChromeLatencyInfo_LatencyComponentType::COMPONENT_INPUT_EVENT_LATENCY_FRAME_SWAP; + + +PERFETTO_PROTOZERO_CONSTEXPR14_OR_INLINE +const char* ChromeLatencyInfo_LatencyComponentType_Name(::perfetto::protos::pbzero::ChromeLatencyInfo_LatencyComponentType value) { + switch (value) { + case ::perfetto::protos::pbzero::ChromeLatencyInfo_LatencyComponentType::COMPONENT_UNSPECIFIED: + return "COMPONENT_UNSPECIFIED"; + + case ::perfetto::protos::pbzero::ChromeLatencyInfo_LatencyComponentType::COMPONENT_INPUT_EVENT_LATENCY_BEGIN_RWH: + return "COMPONENT_INPUT_EVENT_LATENCY_BEGIN_RWH"; + + case ::perfetto::protos::pbzero::ChromeLatencyInfo_LatencyComponentType::COMPONENT_INPUT_EVENT_LATENCY_SCROLL_UPDATE_ORIGINAL: + return "COMPONENT_INPUT_EVENT_LATENCY_SCROLL_UPDATE_ORIGINAL"; + + case ::perfetto::protos::pbzero::ChromeLatencyInfo_LatencyComponentType::COMPONENT_INPUT_EVENT_LATENCY_FIRST_SCROLL_UPDATE_ORIGINAL: + return "COMPONENT_INPUT_EVENT_LATENCY_FIRST_SCROLL_UPDATE_ORIGINAL"; + + case ::perfetto::protos::pbzero::ChromeLatencyInfo_LatencyComponentType::COMPONENT_INPUT_EVENT_LATENCY_ORIGINAL: + return "COMPONENT_INPUT_EVENT_LATENCY_ORIGINAL"; + + case ::perfetto::protos::pbzero::ChromeLatencyInfo_LatencyComponentType::COMPONENT_INPUT_EVENT_LATENCY_UI: + return "COMPONENT_INPUT_EVENT_LATENCY_UI"; + + case ::perfetto::protos::pbzero::ChromeLatencyInfo_LatencyComponentType::COMPONENT_INPUT_EVENT_LATENCY_RENDERER_MAIN: + return "COMPONENT_INPUT_EVENT_LATENCY_RENDERER_MAIN"; + + case ::perfetto::protos::pbzero::ChromeLatencyInfo_LatencyComponentType::COMPONENT_INPUT_EVENT_LATENCY_RENDERING_SCHEDULED_MAIN: + return "COMPONENT_INPUT_EVENT_LATENCY_RENDERING_SCHEDULED_MAIN"; + + case ::perfetto::protos::pbzero::ChromeLatencyInfo_LatencyComponentType::COMPONENT_INPUT_EVENT_LATENCY_RENDERING_SCHEDULED_IMPL: + return "COMPONENT_INPUT_EVENT_LATENCY_RENDERING_SCHEDULED_IMPL"; + + case ::perfetto::protos::pbzero::ChromeLatencyInfo_LatencyComponentType::COMPONENT_INPUT_EVENT_LATENCY_SCROLL_UPDATE_LAST_EVENT: + return "COMPONENT_INPUT_EVENT_LATENCY_SCROLL_UPDATE_LAST_EVENT"; + + case ::perfetto::protos::pbzero::ChromeLatencyInfo_LatencyComponentType::COMPONENT_INPUT_EVENT_LATENCY_ACK_RWH: + return "COMPONENT_INPUT_EVENT_LATENCY_ACK_RWH"; + + case ::perfetto::protos::pbzero::ChromeLatencyInfo_LatencyComponentType::COMPONENT_INPUT_EVENT_LATENCY_RENDERER_SWAP: + return "COMPONENT_INPUT_EVENT_LATENCY_RENDERER_SWAP"; + + case ::perfetto::protos::pbzero::ChromeLatencyInfo_LatencyComponentType::COMPONENT_DISPLAY_COMPOSITOR_RECEIVED_FRAME: + return "COMPONENT_DISPLAY_COMPOSITOR_RECEIVED_FRAME"; + + case ::perfetto::protos::pbzero::ChromeLatencyInfo_LatencyComponentType::COMPONENT_INPUT_EVENT_GPU_SWAP_BUFFER: + return "COMPONENT_INPUT_EVENT_GPU_SWAP_BUFFER"; + + case ::perfetto::protos::pbzero::ChromeLatencyInfo_LatencyComponentType::COMPONENT_INPUT_EVENT_LATENCY_FRAME_SWAP: + return "COMPONENT_INPUT_EVENT_LATENCY_FRAME_SWAP"; + } + return "PBZERO_UNKNOWN_ENUM_VALUE"; +} class ChromeLatencyInfo_Decoder : public ::protozero::TypedProtoDecoder { public: @@ -124273,35 +121801,43 @@ class ChromeLatencyInfo : public ::protozero::Message { static constexpr const char* GetName() { return ".perfetto.protos.ChromeLatencyInfo"; } using ComponentInfo = ::perfetto::protos::pbzero::ChromeLatencyInfo_ComponentInfo; + using Step = ::perfetto::protos::pbzero::ChromeLatencyInfo_Step; + static inline const char* Step_Name(Step value) { + return ::perfetto::protos::pbzero::ChromeLatencyInfo_Step_Name(value); + } + using LatencyComponentType = ::perfetto::protos::pbzero::ChromeLatencyInfo_LatencyComponentType; - static const Step STEP_UNSPECIFIED = ChromeLatencyInfo_Step_STEP_UNSPECIFIED; - static const Step STEP_SEND_INPUT_EVENT_UI = ChromeLatencyInfo_Step_STEP_SEND_INPUT_EVENT_UI; - static const Step STEP_HANDLE_INPUT_EVENT_IMPL = ChromeLatencyInfo_Step_STEP_HANDLE_INPUT_EVENT_IMPL; - static const Step STEP_DID_HANDLE_INPUT_AND_OVERSCROLL = ChromeLatencyInfo_Step_STEP_DID_HANDLE_INPUT_AND_OVERSCROLL; - static const Step STEP_HANDLE_INPUT_EVENT_MAIN = ChromeLatencyInfo_Step_STEP_HANDLE_INPUT_EVENT_MAIN; - static const Step STEP_MAIN_THREAD_SCROLL_UPDATE = ChromeLatencyInfo_Step_STEP_MAIN_THREAD_SCROLL_UPDATE; - static const Step STEP_HANDLE_INPUT_EVENT_MAIN_COMMIT = ChromeLatencyInfo_Step_STEP_HANDLE_INPUT_EVENT_MAIN_COMMIT; - static const Step STEP_HANDLED_INPUT_EVENT_MAIN_OR_IMPL = ChromeLatencyInfo_Step_STEP_HANDLED_INPUT_EVENT_MAIN_OR_IMPL; - static const Step STEP_HANDLED_INPUT_EVENT_IMPL = ChromeLatencyInfo_Step_STEP_HANDLED_INPUT_EVENT_IMPL; - static const Step STEP_SWAP_BUFFERS = ChromeLatencyInfo_Step_STEP_SWAP_BUFFERS; - static const Step STEP_DRAW_AND_SWAP = ChromeLatencyInfo_Step_STEP_DRAW_AND_SWAP; - static const Step STEP_FINISHED_SWAP_BUFFERS = ChromeLatencyInfo_Step_STEP_FINISHED_SWAP_BUFFERS; - static const LatencyComponentType COMPONENT_UNSPECIFIED = ChromeLatencyInfo_LatencyComponentType_COMPONENT_UNSPECIFIED; - static const LatencyComponentType COMPONENT_INPUT_EVENT_LATENCY_BEGIN_RWH = ChromeLatencyInfo_LatencyComponentType_COMPONENT_INPUT_EVENT_LATENCY_BEGIN_RWH; - static const LatencyComponentType COMPONENT_INPUT_EVENT_LATENCY_SCROLL_UPDATE_ORIGINAL = ChromeLatencyInfo_LatencyComponentType_COMPONENT_INPUT_EVENT_LATENCY_SCROLL_UPDATE_ORIGINAL; - static const LatencyComponentType COMPONENT_INPUT_EVENT_LATENCY_FIRST_SCROLL_UPDATE_ORIGINAL = ChromeLatencyInfo_LatencyComponentType_COMPONENT_INPUT_EVENT_LATENCY_FIRST_SCROLL_UPDATE_ORIGINAL; - static const LatencyComponentType COMPONENT_INPUT_EVENT_LATENCY_ORIGINAL = ChromeLatencyInfo_LatencyComponentType_COMPONENT_INPUT_EVENT_LATENCY_ORIGINAL; - static const LatencyComponentType COMPONENT_INPUT_EVENT_LATENCY_UI = ChromeLatencyInfo_LatencyComponentType_COMPONENT_INPUT_EVENT_LATENCY_UI; - static const LatencyComponentType COMPONENT_INPUT_EVENT_LATENCY_RENDERER_MAIN = ChromeLatencyInfo_LatencyComponentType_COMPONENT_INPUT_EVENT_LATENCY_RENDERER_MAIN; - static const LatencyComponentType COMPONENT_INPUT_EVENT_LATENCY_RENDERING_SCHEDULED_MAIN = ChromeLatencyInfo_LatencyComponentType_COMPONENT_INPUT_EVENT_LATENCY_RENDERING_SCHEDULED_MAIN; - static const LatencyComponentType COMPONENT_INPUT_EVENT_LATENCY_RENDERING_SCHEDULED_IMPL = ChromeLatencyInfo_LatencyComponentType_COMPONENT_INPUT_EVENT_LATENCY_RENDERING_SCHEDULED_IMPL; - static const LatencyComponentType COMPONENT_INPUT_EVENT_LATENCY_SCROLL_UPDATE_LAST_EVENT = ChromeLatencyInfo_LatencyComponentType_COMPONENT_INPUT_EVENT_LATENCY_SCROLL_UPDATE_LAST_EVENT; - static const LatencyComponentType COMPONENT_INPUT_EVENT_LATENCY_ACK_RWH = ChromeLatencyInfo_LatencyComponentType_COMPONENT_INPUT_EVENT_LATENCY_ACK_RWH; - static const LatencyComponentType COMPONENT_INPUT_EVENT_LATENCY_RENDERER_SWAP = ChromeLatencyInfo_LatencyComponentType_COMPONENT_INPUT_EVENT_LATENCY_RENDERER_SWAP; - static const LatencyComponentType COMPONENT_DISPLAY_COMPOSITOR_RECEIVED_FRAME = ChromeLatencyInfo_LatencyComponentType_COMPONENT_DISPLAY_COMPOSITOR_RECEIVED_FRAME; - static const LatencyComponentType COMPONENT_INPUT_EVENT_GPU_SWAP_BUFFER = ChromeLatencyInfo_LatencyComponentType_COMPONENT_INPUT_EVENT_GPU_SWAP_BUFFER; - static const LatencyComponentType COMPONENT_INPUT_EVENT_LATENCY_FRAME_SWAP = ChromeLatencyInfo_LatencyComponentType_COMPONENT_INPUT_EVENT_LATENCY_FRAME_SWAP; + static inline const char* LatencyComponentType_Name(LatencyComponentType value) { + return ::perfetto::protos::pbzero::ChromeLatencyInfo_LatencyComponentType_Name(value); + } + static const Step STEP_UNSPECIFIED = Step::STEP_UNSPECIFIED; + static const Step STEP_SEND_INPUT_EVENT_UI = Step::STEP_SEND_INPUT_EVENT_UI; + static const Step STEP_HANDLE_INPUT_EVENT_IMPL = Step::STEP_HANDLE_INPUT_EVENT_IMPL; + static const Step STEP_DID_HANDLE_INPUT_AND_OVERSCROLL = Step::STEP_DID_HANDLE_INPUT_AND_OVERSCROLL; + static const Step STEP_HANDLE_INPUT_EVENT_MAIN = Step::STEP_HANDLE_INPUT_EVENT_MAIN; + static const Step STEP_MAIN_THREAD_SCROLL_UPDATE = Step::STEP_MAIN_THREAD_SCROLL_UPDATE; + static const Step STEP_HANDLE_INPUT_EVENT_MAIN_COMMIT = Step::STEP_HANDLE_INPUT_EVENT_MAIN_COMMIT; + static const Step STEP_HANDLED_INPUT_EVENT_MAIN_OR_IMPL = Step::STEP_HANDLED_INPUT_EVENT_MAIN_OR_IMPL; + static const Step STEP_HANDLED_INPUT_EVENT_IMPL = Step::STEP_HANDLED_INPUT_EVENT_IMPL; + static const Step STEP_SWAP_BUFFERS = Step::STEP_SWAP_BUFFERS; + static const Step STEP_DRAW_AND_SWAP = Step::STEP_DRAW_AND_SWAP; + static const Step STEP_FINISHED_SWAP_BUFFERS = Step::STEP_FINISHED_SWAP_BUFFERS; + static const LatencyComponentType COMPONENT_UNSPECIFIED = LatencyComponentType::COMPONENT_UNSPECIFIED; + static const LatencyComponentType COMPONENT_INPUT_EVENT_LATENCY_BEGIN_RWH = LatencyComponentType::COMPONENT_INPUT_EVENT_LATENCY_BEGIN_RWH; + static const LatencyComponentType COMPONENT_INPUT_EVENT_LATENCY_SCROLL_UPDATE_ORIGINAL = LatencyComponentType::COMPONENT_INPUT_EVENT_LATENCY_SCROLL_UPDATE_ORIGINAL; + static const LatencyComponentType COMPONENT_INPUT_EVENT_LATENCY_FIRST_SCROLL_UPDATE_ORIGINAL = LatencyComponentType::COMPONENT_INPUT_EVENT_LATENCY_FIRST_SCROLL_UPDATE_ORIGINAL; + static const LatencyComponentType COMPONENT_INPUT_EVENT_LATENCY_ORIGINAL = LatencyComponentType::COMPONENT_INPUT_EVENT_LATENCY_ORIGINAL; + static const LatencyComponentType COMPONENT_INPUT_EVENT_LATENCY_UI = LatencyComponentType::COMPONENT_INPUT_EVENT_LATENCY_UI; + static const LatencyComponentType COMPONENT_INPUT_EVENT_LATENCY_RENDERER_MAIN = LatencyComponentType::COMPONENT_INPUT_EVENT_LATENCY_RENDERER_MAIN; + static const LatencyComponentType COMPONENT_INPUT_EVENT_LATENCY_RENDERING_SCHEDULED_MAIN = LatencyComponentType::COMPONENT_INPUT_EVENT_LATENCY_RENDERING_SCHEDULED_MAIN; + static const LatencyComponentType COMPONENT_INPUT_EVENT_LATENCY_RENDERING_SCHEDULED_IMPL = LatencyComponentType::COMPONENT_INPUT_EVENT_LATENCY_RENDERING_SCHEDULED_IMPL; + static const LatencyComponentType COMPONENT_INPUT_EVENT_LATENCY_SCROLL_UPDATE_LAST_EVENT = LatencyComponentType::COMPONENT_INPUT_EVENT_LATENCY_SCROLL_UPDATE_LAST_EVENT; + static const LatencyComponentType COMPONENT_INPUT_EVENT_LATENCY_ACK_RWH = LatencyComponentType::COMPONENT_INPUT_EVENT_LATENCY_ACK_RWH; + static const LatencyComponentType COMPONENT_INPUT_EVENT_LATENCY_RENDERER_SWAP = LatencyComponentType::COMPONENT_INPUT_EVENT_LATENCY_RENDERER_SWAP; + static const LatencyComponentType COMPONENT_DISPLAY_COMPOSITOR_RECEIVED_FRAME = LatencyComponentType::COMPONENT_DISPLAY_COMPOSITOR_RECEIVED_FRAME; + static const LatencyComponentType COMPONENT_INPUT_EVENT_GPU_SWAP_BUFFER = LatencyComponentType::COMPONENT_INPUT_EVENT_GPU_SWAP_BUFFER; + static const LatencyComponentType COMPONENT_INPUT_EVENT_LATENCY_FRAME_SWAP = LatencyComponentType::COMPONENT_INPUT_EVENT_LATENCY_FRAME_SWAP; using FieldMetadata_TraceId = ::protozero::proto_utils::FieldMetadata< @@ -124311,14 +121847,7 @@ class ChromeLatencyInfo : public ::protozero::Message { int64_t, ChromeLatencyInfo>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_TraceId kTraceId() { return {}; } + static constexpr FieldMetadata_TraceId kTraceId{}; void set_trace_id(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_TraceId::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -124336,14 +121865,7 @@ class ChromeLatencyInfo : public ::protozero::Message { ::perfetto::protos::pbzero::ChromeLatencyInfo_Step, ChromeLatencyInfo>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Step kStep() { return {}; } + static constexpr FieldMetadata_Step kStep{}; void set_step(::perfetto::protos::pbzero::ChromeLatencyInfo_Step value) { static constexpr uint32_t field_id = FieldMetadata_Step::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -124361,14 +121883,7 @@ class ChromeLatencyInfo : public ::protozero::Message { int32_t, ChromeLatencyInfo>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_FrameTreeNodeId kFrameTreeNodeId() { return {}; } + static constexpr FieldMetadata_FrameTreeNodeId kFrameTreeNodeId{}; void set_frame_tree_node_id(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_FrameTreeNodeId::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -124386,14 +121901,7 @@ class ChromeLatencyInfo : public ::protozero::Message { ChromeLatencyInfo_ComponentInfo, ChromeLatencyInfo>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ComponentInfo kComponentInfo() { return {}; } + static constexpr FieldMetadata_ComponentInfo kComponentInfo{}; template T* add_component_info() { return BeginNestedMessage(4); } @@ -124407,14 +121915,7 @@ class ChromeLatencyInfo : public ::protozero::Message { bool, ChromeLatencyInfo>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_IsCoalesced kIsCoalesced() { return {}; } + static constexpr FieldMetadata_IsCoalesced kIsCoalesced{}; void set_is_coalesced(bool value) { static constexpr uint32_t field_id = FieldMetadata_IsCoalesced::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -124432,14 +121933,7 @@ class ChromeLatencyInfo : public ::protozero::Message { int64_t, ChromeLatencyInfo>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_GestureScrollId kGestureScrollId() { return {}; } + static constexpr FieldMetadata_GestureScrollId kGestureScrollId{}; void set_gesture_scroll_id(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_GestureScrollId::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -124457,14 +121951,7 @@ class ChromeLatencyInfo : public ::protozero::Message { int64_t, ChromeLatencyInfo>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_TouchId kTouchId() { return {}; } + static constexpr FieldMetadata_TouchId kTouchId{}; void set_touch_id(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_TouchId::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -124504,14 +121991,7 @@ class ChromeLatencyInfo_ComponentInfo : public ::protozero::Message { ::perfetto::protos::pbzero::ChromeLatencyInfo_LatencyComponentType, ChromeLatencyInfo_ComponentInfo>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ComponentType kComponentType() { return {}; } + static constexpr FieldMetadata_ComponentType kComponentType{}; void set_component_type(::perfetto::protos::pbzero::ChromeLatencyInfo_LatencyComponentType value) { static constexpr uint32_t field_id = FieldMetadata_ComponentType::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -124529,14 +122009,7 @@ class ChromeLatencyInfo_ComponentInfo : public ::protozero::Message { uint64_t, ChromeLatencyInfo_ComponentInfo>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_TimeUs kTimeUs() { return {}; } + static constexpr FieldMetadata_TimeUs kTimeUs{}; void set_time_us(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_TimeUs::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -124570,51 +122043,179 @@ namespace perfetto { namespace protos { namespace pbzero { -enum ChromeLegacyIpc_MessageClass : int32_t; +namespace perfetto_pbzero_enum_ChromeLegacyIpc { +enum MessageClass : int32_t; +} // namespace perfetto_pbzero_enum_ChromeLegacyIpc +using ChromeLegacyIpc_MessageClass = perfetto_pbzero_enum_ChromeLegacyIpc::MessageClass; -enum ChromeLegacyIpc_MessageClass : int32_t { - ChromeLegacyIpc_MessageClass_CLASS_UNSPECIFIED = 0, - ChromeLegacyIpc_MessageClass_CLASS_AUTOMATION = 1, - ChromeLegacyIpc_MessageClass_CLASS_FRAME = 2, - ChromeLegacyIpc_MessageClass_CLASS_PAGE = 3, - ChromeLegacyIpc_MessageClass_CLASS_VIEW = 4, - ChromeLegacyIpc_MessageClass_CLASS_WIDGET = 5, - ChromeLegacyIpc_MessageClass_CLASS_INPUT = 6, - ChromeLegacyIpc_MessageClass_CLASS_TEST = 7, - ChromeLegacyIpc_MessageClass_CLASS_WORKER = 8, - ChromeLegacyIpc_MessageClass_CLASS_NACL = 9, - ChromeLegacyIpc_MessageClass_CLASS_GPU_CHANNEL = 10, - ChromeLegacyIpc_MessageClass_CLASS_MEDIA = 11, - ChromeLegacyIpc_MessageClass_CLASS_PPAPI = 12, - ChromeLegacyIpc_MessageClass_CLASS_CHROME = 13, - ChromeLegacyIpc_MessageClass_CLASS_DRAG = 14, - ChromeLegacyIpc_MessageClass_CLASS_PRINT = 15, - ChromeLegacyIpc_MessageClass_CLASS_EXTENSION = 16, - ChromeLegacyIpc_MessageClass_CLASS_TEXT_INPUT_CLIENT = 17, - ChromeLegacyIpc_MessageClass_CLASS_BLINK_TEST = 18, - ChromeLegacyIpc_MessageClass_CLASS_ACCESSIBILITY = 19, - ChromeLegacyIpc_MessageClass_CLASS_PRERENDER = 20, - ChromeLegacyIpc_MessageClass_CLASS_CHROMOTING = 21, - ChromeLegacyIpc_MessageClass_CLASS_BROWSER_PLUGIN = 22, - ChromeLegacyIpc_MessageClass_CLASS_ANDROID_WEB_VIEW = 23, - ChromeLegacyIpc_MessageClass_CLASS_NACL_HOST = 24, - ChromeLegacyIpc_MessageClass_CLASS_ENCRYPTED_MEDIA = 25, - ChromeLegacyIpc_MessageClass_CLASS_CAST = 26, - ChromeLegacyIpc_MessageClass_CLASS_GIN_JAVA_BRIDGE = 27, - ChromeLegacyIpc_MessageClass_CLASS_CHROME_UTILITY_PRINTING = 28, - ChromeLegacyIpc_MessageClass_CLASS_OZONE_GPU = 29, - ChromeLegacyIpc_MessageClass_CLASS_WEB_TEST = 30, - ChromeLegacyIpc_MessageClass_CLASS_NETWORK_HINTS = 31, - ChromeLegacyIpc_MessageClass_CLASS_EXTENSIONS_GUEST_VIEW = 32, - ChromeLegacyIpc_MessageClass_CLASS_GUEST_VIEW = 33, - ChromeLegacyIpc_MessageClass_CLASS_MEDIA_PLAYER_DELEGATE = 34, - ChromeLegacyIpc_MessageClass_CLASS_EXTENSION_WORKER = 35, - ChromeLegacyIpc_MessageClass_CLASS_SUBRESOURCE_FILTER = 36, - ChromeLegacyIpc_MessageClass_CLASS_UNFREEZABLE_FRAME = 37, +namespace perfetto_pbzero_enum_ChromeLegacyIpc { +enum MessageClass : int32_t { + CLASS_UNSPECIFIED = 0, + CLASS_AUTOMATION = 1, + CLASS_FRAME = 2, + CLASS_PAGE = 3, + CLASS_VIEW = 4, + CLASS_WIDGET = 5, + CLASS_INPUT = 6, + CLASS_TEST = 7, + CLASS_WORKER = 8, + CLASS_NACL = 9, + CLASS_GPU_CHANNEL = 10, + CLASS_MEDIA = 11, + CLASS_PPAPI = 12, + CLASS_CHROME = 13, + CLASS_DRAG = 14, + CLASS_PRINT = 15, + CLASS_EXTENSION = 16, + CLASS_TEXT_INPUT_CLIENT = 17, + CLASS_BLINK_TEST = 18, + CLASS_ACCESSIBILITY = 19, + CLASS_PRERENDER = 20, + CLASS_CHROMOTING = 21, + CLASS_BROWSER_PLUGIN = 22, + CLASS_ANDROID_WEB_VIEW = 23, + CLASS_NACL_HOST = 24, + CLASS_ENCRYPTED_MEDIA = 25, + CLASS_CAST = 26, + CLASS_GIN_JAVA_BRIDGE = 27, + CLASS_CHROME_UTILITY_PRINTING = 28, + CLASS_OZONE_GPU = 29, + CLASS_WEB_TEST = 30, + CLASS_NETWORK_HINTS = 31, + CLASS_EXTENSIONS_GUEST_VIEW = 32, + CLASS_GUEST_VIEW = 33, + CLASS_MEDIA_PLAYER_DELEGATE = 34, + CLASS_EXTENSION_WORKER = 35, + CLASS_SUBRESOURCE_FILTER = 36, + CLASS_UNFREEZABLE_FRAME = 37, }; +} // namespace perfetto_pbzero_enum_ChromeLegacyIpc +using ChromeLegacyIpc_MessageClass = perfetto_pbzero_enum_ChromeLegacyIpc::MessageClass; -const ChromeLegacyIpc_MessageClass ChromeLegacyIpc_MessageClass_MIN = ChromeLegacyIpc_MessageClass_CLASS_UNSPECIFIED; -const ChromeLegacyIpc_MessageClass ChromeLegacyIpc_MessageClass_MAX = ChromeLegacyIpc_MessageClass_CLASS_UNFREEZABLE_FRAME; + +constexpr ChromeLegacyIpc_MessageClass ChromeLegacyIpc_MessageClass_MIN = ChromeLegacyIpc_MessageClass::CLASS_UNSPECIFIED; +constexpr ChromeLegacyIpc_MessageClass ChromeLegacyIpc_MessageClass_MAX = ChromeLegacyIpc_MessageClass::CLASS_UNFREEZABLE_FRAME; + + +PERFETTO_PROTOZERO_CONSTEXPR14_OR_INLINE +const char* ChromeLegacyIpc_MessageClass_Name(::perfetto::protos::pbzero::ChromeLegacyIpc_MessageClass value) { + switch (value) { + case ::perfetto::protos::pbzero::ChromeLegacyIpc_MessageClass::CLASS_UNSPECIFIED: + return "CLASS_UNSPECIFIED"; + + case ::perfetto::protos::pbzero::ChromeLegacyIpc_MessageClass::CLASS_AUTOMATION: + return "CLASS_AUTOMATION"; + + case ::perfetto::protos::pbzero::ChromeLegacyIpc_MessageClass::CLASS_FRAME: + return "CLASS_FRAME"; + + case ::perfetto::protos::pbzero::ChromeLegacyIpc_MessageClass::CLASS_PAGE: + return "CLASS_PAGE"; + + case ::perfetto::protos::pbzero::ChromeLegacyIpc_MessageClass::CLASS_VIEW: + return "CLASS_VIEW"; + + case ::perfetto::protos::pbzero::ChromeLegacyIpc_MessageClass::CLASS_WIDGET: + return "CLASS_WIDGET"; + + case ::perfetto::protos::pbzero::ChromeLegacyIpc_MessageClass::CLASS_INPUT: + return "CLASS_INPUT"; + + case ::perfetto::protos::pbzero::ChromeLegacyIpc_MessageClass::CLASS_TEST: + return "CLASS_TEST"; + + case ::perfetto::protos::pbzero::ChromeLegacyIpc_MessageClass::CLASS_WORKER: + return "CLASS_WORKER"; + + case ::perfetto::protos::pbzero::ChromeLegacyIpc_MessageClass::CLASS_NACL: + return "CLASS_NACL"; + + case ::perfetto::protos::pbzero::ChromeLegacyIpc_MessageClass::CLASS_GPU_CHANNEL: + return "CLASS_GPU_CHANNEL"; + + case ::perfetto::protos::pbzero::ChromeLegacyIpc_MessageClass::CLASS_MEDIA: + return "CLASS_MEDIA"; + + case ::perfetto::protos::pbzero::ChromeLegacyIpc_MessageClass::CLASS_PPAPI: + return "CLASS_PPAPI"; + + case ::perfetto::protos::pbzero::ChromeLegacyIpc_MessageClass::CLASS_CHROME: + return "CLASS_CHROME"; + + case ::perfetto::protos::pbzero::ChromeLegacyIpc_MessageClass::CLASS_DRAG: + return "CLASS_DRAG"; + + case ::perfetto::protos::pbzero::ChromeLegacyIpc_MessageClass::CLASS_PRINT: + return "CLASS_PRINT"; + + case ::perfetto::protos::pbzero::ChromeLegacyIpc_MessageClass::CLASS_EXTENSION: + return "CLASS_EXTENSION"; + + case ::perfetto::protos::pbzero::ChromeLegacyIpc_MessageClass::CLASS_TEXT_INPUT_CLIENT: + return "CLASS_TEXT_INPUT_CLIENT"; + + case ::perfetto::protos::pbzero::ChromeLegacyIpc_MessageClass::CLASS_BLINK_TEST: + return "CLASS_BLINK_TEST"; + + case ::perfetto::protos::pbzero::ChromeLegacyIpc_MessageClass::CLASS_ACCESSIBILITY: + return "CLASS_ACCESSIBILITY"; + + case ::perfetto::protos::pbzero::ChromeLegacyIpc_MessageClass::CLASS_PRERENDER: + return "CLASS_PRERENDER"; + + case ::perfetto::protos::pbzero::ChromeLegacyIpc_MessageClass::CLASS_CHROMOTING: + return "CLASS_CHROMOTING"; + + case ::perfetto::protos::pbzero::ChromeLegacyIpc_MessageClass::CLASS_BROWSER_PLUGIN: + return "CLASS_BROWSER_PLUGIN"; + + case ::perfetto::protos::pbzero::ChromeLegacyIpc_MessageClass::CLASS_ANDROID_WEB_VIEW: + return "CLASS_ANDROID_WEB_VIEW"; + + case ::perfetto::protos::pbzero::ChromeLegacyIpc_MessageClass::CLASS_NACL_HOST: + return "CLASS_NACL_HOST"; + + case ::perfetto::protos::pbzero::ChromeLegacyIpc_MessageClass::CLASS_ENCRYPTED_MEDIA: + return "CLASS_ENCRYPTED_MEDIA"; + + case ::perfetto::protos::pbzero::ChromeLegacyIpc_MessageClass::CLASS_CAST: + return "CLASS_CAST"; + + case ::perfetto::protos::pbzero::ChromeLegacyIpc_MessageClass::CLASS_GIN_JAVA_BRIDGE: + return "CLASS_GIN_JAVA_BRIDGE"; + + case ::perfetto::protos::pbzero::ChromeLegacyIpc_MessageClass::CLASS_CHROME_UTILITY_PRINTING: + return "CLASS_CHROME_UTILITY_PRINTING"; + + case ::perfetto::protos::pbzero::ChromeLegacyIpc_MessageClass::CLASS_OZONE_GPU: + return "CLASS_OZONE_GPU"; + + case ::perfetto::protos::pbzero::ChromeLegacyIpc_MessageClass::CLASS_WEB_TEST: + return "CLASS_WEB_TEST"; + + case ::perfetto::protos::pbzero::ChromeLegacyIpc_MessageClass::CLASS_NETWORK_HINTS: + return "CLASS_NETWORK_HINTS"; + + case ::perfetto::protos::pbzero::ChromeLegacyIpc_MessageClass::CLASS_EXTENSIONS_GUEST_VIEW: + return "CLASS_EXTENSIONS_GUEST_VIEW"; + + case ::perfetto::protos::pbzero::ChromeLegacyIpc_MessageClass::CLASS_GUEST_VIEW: + return "CLASS_GUEST_VIEW"; + + case ::perfetto::protos::pbzero::ChromeLegacyIpc_MessageClass::CLASS_MEDIA_PLAYER_DELEGATE: + return "CLASS_MEDIA_PLAYER_DELEGATE"; + + case ::perfetto::protos::pbzero::ChromeLegacyIpc_MessageClass::CLASS_EXTENSION_WORKER: + return "CLASS_EXTENSION_WORKER"; + + case ::perfetto::protos::pbzero::ChromeLegacyIpc_MessageClass::CLASS_SUBRESOURCE_FILTER: + return "CLASS_SUBRESOURCE_FILTER"; + + case ::perfetto::protos::pbzero::ChromeLegacyIpc_MessageClass::CLASS_UNFREEZABLE_FRAME: + return "CLASS_UNFREEZABLE_FRAME"; + } + return "PBZERO_UNKNOWN_ENUM_VALUE"; +} class ChromeLegacyIpc_Decoder : public ::protozero::TypedProtoDecoder { public: @@ -124636,45 +122237,49 @@ class ChromeLegacyIpc : public ::protozero::Message { }; static constexpr const char* GetName() { return ".perfetto.protos.ChromeLegacyIpc"; } + using MessageClass = ::perfetto::protos::pbzero::ChromeLegacyIpc_MessageClass; - static const MessageClass CLASS_UNSPECIFIED = ChromeLegacyIpc_MessageClass_CLASS_UNSPECIFIED; - static const MessageClass CLASS_AUTOMATION = ChromeLegacyIpc_MessageClass_CLASS_AUTOMATION; - static const MessageClass CLASS_FRAME = ChromeLegacyIpc_MessageClass_CLASS_FRAME; - static const MessageClass CLASS_PAGE = ChromeLegacyIpc_MessageClass_CLASS_PAGE; - static const MessageClass CLASS_VIEW = ChromeLegacyIpc_MessageClass_CLASS_VIEW; - static const MessageClass CLASS_WIDGET = ChromeLegacyIpc_MessageClass_CLASS_WIDGET; - static const MessageClass CLASS_INPUT = ChromeLegacyIpc_MessageClass_CLASS_INPUT; - static const MessageClass CLASS_TEST = ChromeLegacyIpc_MessageClass_CLASS_TEST; - static const MessageClass CLASS_WORKER = ChromeLegacyIpc_MessageClass_CLASS_WORKER; - static const MessageClass CLASS_NACL = ChromeLegacyIpc_MessageClass_CLASS_NACL; - static const MessageClass CLASS_GPU_CHANNEL = ChromeLegacyIpc_MessageClass_CLASS_GPU_CHANNEL; - static const MessageClass CLASS_MEDIA = ChromeLegacyIpc_MessageClass_CLASS_MEDIA; - static const MessageClass CLASS_PPAPI = ChromeLegacyIpc_MessageClass_CLASS_PPAPI; - static const MessageClass CLASS_CHROME = ChromeLegacyIpc_MessageClass_CLASS_CHROME; - static const MessageClass CLASS_DRAG = ChromeLegacyIpc_MessageClass_CLASS_DRAG; - static const MessageClass CLASS_PRINT = ChromeLegacyIpc_MessageClass_CLASS_PRINT; - static const MessageClass CLASS_EXTENSION = ChromeLegacyIpc_MessageClass_CLASS_EXTENSION; - static const MessageClass CLASS_TEXT_INPUT_CLIENT = ChromeLegacyIpc_MessageClass_CLASS_TEXT_INPUT_CLIENT; - static const MessageClass CLASS_BLINK_TEST = ChromeLegacyIpc_MessageClass_CLASS_BLINK_TEST; - static const MessageClass CLASS_ACCESSIBILITY = ChromeLegacyIpc_MessageClass_CLASS_ACCESSIBILITY; - static const MessageClass CLASS_PRERENDER = ChromeLegacyIpc_MessageClass_CLASS_PRERENDER; - static const MessageClass CLASS_CHROMOTING = ChromeLegacyIpc_MessageClass_CLASS_CHROMOTING; - static const MessageClass CLASS_BROWSER_PLUGIN = ChromeLegacyIpc_MessageClass_CLASS_BROWSER_PLUGIN; - static const MessageClass CLASS_ANDROID_WEB_VIEW = ChromeLegacyIpc_MessageClass_CLASS_ANDROID_WEB_VIEW; - static const MessageClass CLASS_NACL_HOST = ChromeLegacyIpc_MessageClass_CLASS_NACL_HOST; - static const MessageClass CLASS_ENCRYPTED_MEDIA = ChromeLegacyIpc_MessageClass_CLASS_ENCRYPTED_MEDIA; - static const MessageClass CLASS_CAST = ChromeLegacyIpc_MessageClass_CLASS_CAST; - static const MessageClass CLASS_GIN_JAVA_BRIDGE = ChromeLegacyIpc_MessageClass_CLASS_GIN_JAVA_BRIDGE; - static const MessageClass CLASS_CHROME_UTILITY_PRINTING = ChromeLegacyIpc_MessageClass_CLASS_CHROME_UTILITY_PRINTING; - static const MessageClass CLASS_OZONE_GPU = ChromeLegacyIpc_MessageClass_CLASS_OZONE_GPU; - static const MessageClass CLASS_WEB_TEST = ChromeLegacyIpc_MessageClass_CLASS_WEB_TEST; - static const MessageClass CLASS_NETWORK_HINTS = ChromeLegacyIpc_MessageClass_CLASS_NETWORK_HINTS; - static const MessageClass CLASS_EXTENSIONS_GUEST_VIEW = ChromeLegacyIpc_MessageClass_CLASS_EXTENSIONS_GUEST_VIEW; - static const MessageClass CLASS_GUEST_VIEW = ChromeLegacyIpc_MessageClass_CLASS_GUEST_VIEW; - static const MessageClass CLASS_MEDIA_PLAYER_DELEGATE = ChromeLegacyIpc_MessageClass_CLASS_MEDIA_PLAYER_DELEGATE; - static const MessageClass CLASS_EXTENSION_WORKER = ChromeLegacyIpc_MessageClass_CLASS_EXTENSION_WORKER; - static const MessageClass CLASS_SUBRESOURCE_FILTER = ChromeLegacyIpc_MessageClass_CLASS_SUBRESOURCE_FILTER; - static const MessageClass CLASS_UNFREEZABLE_FRAME = ChromeLegacyIpc_MessageClass_CLASS_UNFREEZABLE_FRAME; + static inline const char* MessageClass_Name(MessageClass value) { + return ::perfetto::protos::pbzero::ChromeLegacyIpc_MessageClass_Name(value); + } + static const MessageClass CLASS_UNSPECIFIED = MessageClass::CLASS_UNSPECIFIED; + static const MessageClass CLASS_AUTOMATION = MessageClass::CLASS_AUTOMATION; + static const MessageClass CLASS_FRAME = MessageClass::CLASS_FRAME; + static const MessageClass CLASS_PAGE = MessageClass::CLASS_PAGE; + static const MessageClass CLASS_VIEW = MessageClass::CLASS_VIEW; + static const MessageClass CLASS_WIDGET = MessageClass::CLASS_WIDGET; + static const MessageClass CLASS_INPUT = MessageClass::CLASS_INPUT; + static const MessageClass CLASS_TEST = MessageClass::CLASS_TEST; + static const MessageClass CLASS_WORKER = MessageClass::CLASS_WORKER; + static const MessageClass CLASS_NACL = MessageClass::CLASS_NACL; + static const MessageClass CLASS_GPU_CHANNEL = MessageClass::CLASS_GPU_CHANNEL; + static const MessageClass CLASS_MEDIA = MessageClass::CLASS_MEDIA; + static const MessageClass CLASS_PPAPI = MessageClass::CLASS_PPAPI; + static const MessageClass CLASS_CHROME = MessageClass::CLASS_CHROME; + static const MessageClass CLASS_DRAG = MessageClass::CLASS_DRAG; + static const MessageClass CLASS_PRINT = MessageClass::CLASS_PRINT; + static const MessageClass CLASS_EXTENSION = MessageClass::CLASS_EXTENSION; + static const MessageClass CLASS_TEXT_INPUT_CLIENT = MessageClass::CLASS_TEXT_INPUT_CLIENT; + static const MessageClass CLASS_BLINK_TEST = MessageClass::CLASS_BLINK_TEST; + static const MessageClass CLASS_ACCESSIBILITY = MessageClass::CLASS_ACCESSIBILITY; + static const MessageClass CLASS_PRERENDER = MessageClass::CLASS_PRERENDER; + static const MessageClass CLASS_CHROMOTING = MessageClass::CLASS_CHROMOTING; + static const MessageClass CLASS_BROWSER_PLUGIN = MessageClass::CLASS_BROWSER_PLUGIN; + static const MessageClass CLASS_ANDROID_WEB_VIEW = MessageClass::CLASS_ANDROID_WEB_VIEW; + static const MessageClass CLASS_NACL_HOST = MessageClass::CLASS_NACL_HOST; + static const MessageClass CLASS_ENCRYPTED_MEDIA = MessageClass::CLASS_ENCRYPTED_MEDIA; + static const MessageClass CLASS_CAST = MessageClass::CLASS_CAST; + static const MessageClass CLASS_GIN_JAVA_BRIDGE = MessageClass::CLASS_GIN_JAVA_BRIDGE; + static const MessageClass CLASS_CHROME_UTILITY_PRINTING = MessageClass::CLASS_CHROME_UTILITY_PRINTING; + static const MessageClass CLASS_OZONE_GPU = MessageClass::CLASS_OZONE_GPU; + static const MessageClass CLASS_WEB_TEST = MessageClass::CLASS_WEB_TEST; + static const MessageClass CLASS_NETWORK_HINTS = MessageClass::CLASS_NETWORK_HINTS; + static const MessageClass CLASS_EXTENSIONS_GUEST_VIEW = MessageClass::CLASS_EXTENSIONS_GUEST_VIEW; + static const MessageClass CLASS_GUEST_VIEW = MessageClass::CLASS_GUEST_VIEW; + static const MessageClass CLASS_MEDIA_PLAYER_DELEGATE = MessageClass::CLASS_MEDIA_PLAYER_DELEGATE; + static const MessageClass CLASS_EXTENSION_WORKER = MessageClass::CLASS_EXTENSION_WORKER; + static const MessageClass CLASS_SUBRESOURCE_FILTER = MessageClass::CLASS_SUBRESOURCE_FILTER; + static const MessageClass CLASS_UNFREEZABLE_FRAME = MessageClass::CLASS_UNFREEZABLE_FRAME; using FieldMetadata_MessageClass = ::protozero::proto_utils::FieldMetadata< @@ -124684,14 +122289,7 @@ class ChromeLegacyIpc : public ::protozero::Message { ::perfetto::protos::pbzero::ChromeLegacyIpc_MessageClass, ChromeLegacyIpc>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_MessageClass kMessageClass() { return {}; } + static constexpr FieldMetadata_MessageClass kMessageClass{}; void set_message_class(::perfetto::protos::pbzero::ChromeLegacyIpc_MessageClass value) { static constexpr uint32_t field_id = FieldMetadata_MessageClass::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -124709,14 +122307,7 @@ class ChromeLegacyIpc : public ::protozero::Message { uint32_t, ChromeLegacyIpc>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_MessageLine kMessageLine() { return {}; } + static constexpr FieldMetadata_MessageLine kMessageLine{}; void set_message_line(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_MessageLine::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -124780,14 +122371,7 @@ class ChromeMessagePump : public ::protozero::Message { bool, ChromeMessagePump>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_SentMessagesInQueue kSentMessagesInQueue() { return {}; } + static constexpr FieldMetadata_SentMessagesInQueue kSentMessagesInQueue{}; void set_sent_messages_in_queue(bool value) { static constexpr uint32_t field_id = FieldMetadata_SentMessagesInQueue::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -124805,14 +122389,7 @@ class ChromeMessagePump : public ::protozero::Message { uint64_t, ChromeMessagePump>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_IoHandlerLocationIid kIoHandlerLocationIid() { return {}; } + static constexpr FieldMetadata_IoHandlerLocationIid kIoHandlerLocationIid{}; void set_io_handler_location_iid(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_IoHandlerLocationIid::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -124847,7 +122424,7 @@ namespace protos { namespace pbzero { -class ChromeMojoEventInfo_Decoder : public ::protozero::TypedProtoDecoder { +class ChromeMojoEventInfo_Decoder : public ::protozero::TypedProtoDecoder { public: ChromeMojoEventInfo_Decoder(const uint8_t* data, size_t len) : TypedProtoDecoder(data, len) {} explicit ChromeMojoEventInfo_Decoder(const std::string& raw) : TypedProtoDecoder(reinterpret_cast(raw.data()), raw.size()) {} @@ -124860,6 +122437,12 @@ class ChromeMojoEventInfo_Decoder : public ::protozero::TypedProtoDecoder().as_string(); } bool has_mojo_interface_method_iid() const { return at<4>().valid(); } uint64_t mojo_interface_method_iid() const { return at<4>().as_uint64(); } + bool has_is_reply() const { return at<5>().valid(); } + bool is_reply() const { return at<5>().as_bool(); } + bool has_payload_size() const { return at<6>().valid(); } + uint64_t payload_size() const { return at<6>().as_uint64(); } + bool has_data_num_bytes() const { return at<7>().valid(); } + uint64_t data_num_bytes() const { return at<7>().as_uint64(); } }; class ChromeMojoEventInfo : public ::protozero::Message { @@ -124870,6 +122453,9 @@ class ChromeMojoEventInfo : public ::protozero::Message { kIpcHashFieldNumber = 2, kMojoInterfaceTagFieldNumber = 3, kMojoInterfaceMethodIidFieldNumber = 4, + kIsReplyFieldNumber = 5, + kPayloadSizeFieldNumber = 6, + kDataNumBytesFieldNumber = 7, }; static constexpr const char* GetName() { return ".perfetto.protos.ChromeMojoEventInfo"; } @@ -124882,17 +122468,13 @@ class ChromeMojoEventInfo : public ::protozero::Message { std::string, ChromeMojoEventInfo>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_WatcherNotifyInterfaceTag kWatcherNotifyInterfaceTag() { return {}; } + static constexpr FieldMetadata_WatcherNotifyInterfaceTag kWatcherNotifyInterfaceTag{}; void set_watcher_notify_interface_tag(const char* data, size_t size) { AppendBytes(FieldMetadata_WatcherNotifyInterfaceTag::kFieldId, data, size); } + void set_watcher_notify_interface_tag(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_WatcherNotifyInterfaceTag::kFieldId, chars.data, chars.size); + } void set_watcher_notify_interface_tag(std::string value) { static constexpr uint32_t field_id = FieldMetadata_WatcherNotifyInterfaceTag::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -124910,14 +122492,7 @@ class ChromeMojoEventInfo : public ::protozero::Message { uint32_t, ChromeMojoEventInfo>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_IpcHash kIpcHash() { return {}; } + static constexpr FieldMetadata_IpcHash kIpcHash{}; void set_ipc_hash(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_IpcHash::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -124935,17 +122510,13 @@ class ChromeMojoEventInfo : public ::protozero::Message { std::string, ChromeMojoEventInfo>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_MojoInterfaceTag kMojoInterfaceTag() { return {}; } + static constexpr FieldMetadata_MojoInterfaceTag kMojoInterfaceTag{}; void set_mojo_interface_tag(const char* data, size_t size) { AppendBytes(FieldMetadata_MojoInterfaceTag::kFieldId, data, size); } + void set_mojo_interface_tag(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_MojoInterfaceTag::kFieldId, chars.data, chars.size); + } void set_mojo_interface_tag(std::string value) { static constexpr uint32_t field_id = FieldMetadata_MojoInterfaceTag::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -124963,14 +122534,7 @@ class ChromeMojoEventInfo : public ::protozero::Message { uint64_t, ChromeMojoEventInfo>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_MojoInterfaceMethodIid kMojoInterfaceMethodIid() { return {}; } + static constexpr FieldMetadata_MojoInterfaceMethodIid kMojoInterfaceMethodIid{}; void set_mojo_interface_method_iid(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_MojoInterfaceMethodIid::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -124979,6 +122543,60 @@ class ChromeMojoEventInfo : public ::protozero::Message { ::protozero::proto_utils::ProtoSchemaType::kUint64> ::Append(*this, field_id, value); } + + using FieldMetadata_IsReply = + ::protozero::proto_utils::FieldMetadata< + 5, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kBool, + bool, + ChromeMojoEventInfo>; + + static constexpr FieldMetadata_IsReply kIsReply{}; + void set_is_reply(bool value) { + static constexpr uint32_t field_id = FieldMetadata_IsReply::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kBool> + ::Append(*this, field_id, value); + } + + using FieldMetadata_PayloadSize = + ::protozero::proto_utils::FieldMetadata< + 6, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint64, + uint64_t, + ChromeMojoEventInfo>; + + static constexpr FieldMetadata_PayloadSize kPayloadSize{}; + void set_payload_size(uint64_t value) { + static constexpr uint32_t field_id = FieldMetadata_PayloadSize::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint64> + ::Append(*this, field_id, value); + } + + using FieldMetadata_DataNumBytes = + ::protozero::proto_utils::FieldMetadata< + 7, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint64, + uint64_t, + ChromeMojoEventInfo>; + + static constexpr FieldMetadata_DataNumBytes kDataNumBytes{}; + void set_data_num_bytes(uint64_t value) { + static constexpr uint32_t field_id = FieldMetadata_DataNumBytes::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint64> + ::Append(*this, field_id, value); + } }; } // Namespace. @@ -125004,54 +122622,191 @@ namespace perfetto { namespace protos { namespace pbzero { -enum ChromeProcessDescriptor_ProcessType : int32_t; +namespace perfetto_pbzero_enum_ChromeProcessDescriptor { +enum ProcessType : int32_t; +} // namespace perfetto_pbzero_enum_ChromeProcessDescriptor +using ChromeProcessDescriptor_ProcessType = perfetto_pbzero_enum_ChromeProcessDescriptor::ProcessType; -enum ChromeProcessDescriptor_ProcessType : int32_t { - ChromeProcessDescriptor_ProcessType_PROCESS_UNSPECIFIED = 0, - ChromeProcessDescriptor_ProcessType_PROCESS_BROWSER = 1, - ChromeProcessDescriptor_ProcessType_PROCESS_RENDERER = 2, - ChromeProcessDescriptor_ProcessType_PROCESS_UTILITY = 3, - ChromeProcessDescriptor_ProcessType_PROCESS_ZYGOTE = 4, - ChromeProcessDescriptor_ProcessType_PROCESS_SANDBOX_HELPER = 5, - ChromeProcessDescriptor_ProcessType_PROCESS_GPU = 6, - ChromeProcessDescriptor_ProcessType_PROCESS_PPAPI_PLUGIN = 7, - ChromeProcessDescriptor_ProcessType_PROCESS_PPAPI_BROKER = 8, - ChromeProcessDescriptor_ProcessType_PROCESS_SERVICE_NETWORK = 9, - ChromeProcessDescriptor_ProcessType_PROCESS_SERVICE_TRACING = 10, - ChromeProcessDescriptor_ProcessType_PROCESS_SERVICE_STORAGE = 11, - ChromeProcessDescriptor_ProcessType_PROCESS_SERVICE_AUDIO = 12, - ChromeProcessDescriptor_ProcessType_PROCESS_SERVICE_DATA_DECODER = 13, - ChromeProcessDescriptor_ProcessType_PROCESS_SERVICE_UTIL_WIN = 14, - ChromeProcessDescriptor_ProcessType_PROCESS_SERVICE_PROXY_RESOLVER = 15, - ChromeProcessDescriptor_ProcessType_PROCESS_SERVICE_CDM = 16, - ChromeProcessDescriptor_ProcessType_PROCESS_SERVICE_VIDEO_CAPTURE = 17, - ChromeProcessDescriptor_ProcessType_PROCESS_SERVICE_UNZIPPER = 18, - ChromeProcessDescriptor_ProcessType_PROCESS_SERVICE_MIRRORING = 19, - ChromeProcessDescriptor_ProcessType_PROCESS_SERVICE_FILEPATCHER = 20, - ChromeProcessDescriptor_ProcessType_PROCESS_SERVICE_TTS = 21, - ChromeProcessDescriptor_ProcessType_PROCESS_SERVICE_PRINTING = 22, - ChromeProcessDescriptor_ProcessType_PROCESS_SERVICE_QUARANTINE = 23, - ChromeProcessDescriptor_ProcessType_PROCESS_SERVICE_CROS_LOCALSEARCH = 24, - ChromeProcessDescriptor_ProcessType_PROCESS_SERVICE_CROS_ASSISTANT_AUDIO_DECODER = 25, - ChromeProcessDescriptor_ProcessType_PROCESS_SERVICE_FILEUTIL = 26, - ChromeProcessDescriptor_ProcessType_PROCESS_SERVICE_PRINTCOMPOSITOR = 27, - ChromeProcessDescriptor_ProcessType_PROCESS_SERVICE_PAINTPREVIEW = 28, - ChromeProcessDescriptor_ProcessType_PROCESS_SERVICE_SPEECHRECOGNITION = 29, - ChromeProcessDescriptor_ProcessType_PROCESS_SERVICE_XRDEVICE = 30, - ChromeProcessDescriptor_ProcessType_PROCESS_SERVICE_READICON = 31, - ChromeProcessDescriptor_ProcessType_PROCESS_SERVICE_LANGUAGEDETECTION = 32, - ChromeProcessDescriptor_ProcessType_PROCESS_SERVICE_SHARING = 33, - ChromeProcessDescriptor_ProcessType_PROCESS_SERVICE_MEDIAPARSER = 34, - ChromeProcessDescriptor_ProcessType_PROCESS_SERVICE_QRCODEGENERATOR = 35, - ChromeProcessDescriptor_ProcessType_PROCESS_SERVICE_PROFILEIMPORT = 36, - ChromeProcessDescriptor_ProcessType_PROCESS_SERVICE_IME = 37, - ChromeProcessDescriptor_ProcessType_PROCESS_SERVICE_RECORDING = 38, - ChromeProcessDescriptor_ProcessType_PROCESS_SERVICE_SHAPEDETECTION = 39, - ChromeProcessDescriptor_ProcessType_PROCESS_RENDERER_EXTENSION = 40, +namespace perfetto_pbzero_enum_ChromeProcessDescriptor { +enum ProcessType : int32_t { + PROCESS_UNSPECIFIED = 0, + PROCESS_BROWSER = 1, + PROCESS_RENDERER = 2, + PROCESS_UTILITY = 3, + PROCESS_ZYGOTE = 4, + PROCESS_SANDBOX_HELPER = 5, + PROCESS_GPU = 6, + PROCESS_PPAPI_PLUGIN = 7, + PROCESS_PPAPI_BROKER = 8, + PROCESS_SERVICE_NETWORK = 9, + PROCESS_SERVICE_TRACING = 10, + PROCESS_SERVICE_STORAGE = 11, + PROCESS_SERVICE_AUDIO = 12, + PROCESS_SERVICE_DATA_DECODER = 13, + PROCESS_SERVICE_UTIL_WIN = 14, + PROCESS_SERVICE_PROXY_RESOLVER = 15, + PROCESS_SERVICE_CDM = 16, + PROCESS_SERVICE_VIDEO_CAPTURE = 17, + PROCESS_SERVICE_UNZIPPER = 18, + PROCESS_SERVICE_MIRRORING = 19, + PROCESS_SERVICE_FILEPATCHER = 20, + PROCESS_SERVICE_TTS = 21, + PROCESS_SERVICE_PRINTING = 22, + PROCESS_SERVICE_QUARANTINE = 23, + PROCESS_SERVICE_CROS_LOCALSEARCH = 24, + PROCESS_SERVICE_CROS_ASSISTANT_AUDIO_DECODER = 25, + PROCESS_SERVICE_FILEUTIL = 26, + PROCESS_SERVICE_PRINTCOMPOSITOR = 27, + PROCESS_SERVICE_PAINTPREVIEW = 28, + PROCESS_SERVICE_SPEECHRECOGNITION = 29, + PROCESS_SERVICE_XRDEVICE = 30, + PROCESS_SERVICE_READICON = 31, + PROCESS_SERVICE_LANGUAGEDETECTION = 32, + PROCESS_SERVICE_SHARING = 33, + PROCESS_SERVICE_MEDIAPARSER = 34, + PROCESS_SERVICE_QRCODEGENERATOR = 35, + PROCESS_SERVICE_PROFILEIMPORT = 36, + PROCESS_SERVICE_IME = 37, + PROCESS_SERVICE_RECORDING = 38, + PROCESS_SERVICE_SHAPEDETECTION = 39, + PROCESS_RENDERER_EXTENSION = 40, }; +} // namespace perfetto_pbzero_enum_ChromeProcessDescriptor +using ChromeProcessDescriptor_ProcessType = perfetto_pbzero_enum_ChromeProcessDescriptor::ProcessType; -const ChromeProcessDescriptor_ProcessType ChromeProcessDescriptor_ProcessType_MIN = ChromeProcessDescriptor_ProcessType_PROCESS_UNSPECIFIED; -const ChromeProcessDescriptor_ProcessType ChromeProcessDescriptor_ProcessType_MAX = ChromeProcessDescriptor_ProcessType_PROCESS_RENDERER_EXTENSION; + +constexpr ChromeProcessDescriptor_ProcessType ChromeProcessDescriptor_ProcessType_MIN = ChromeProcessDescriptor_ProcessType::PROCESS_UNSPECIFIED; +constexpr ChromeProcessDescriptor_ProcessType ChromeProcessDescriptor_ProcessType_MAX = ChromeProcessDescriptor_ProcessType::PROCESS_RENDERER_EXTENSION; + + +PERFETTO_PROTOZERO_CONSTEXPR14_OR_INLINE +const char* ChromeProcessDescriptor_ProcessType_Name(::perfetto::protos::pbzero::ChromeProcessDescriptor_ProcessType value) { + switch (value) { + case ::perfetto::protos::pbzero::ChromeProcessDescriptor_ProcessType::PROCESS_UNSPECIFIED: + return "PROCESS_UNSPECIFIED"; + + case ::perfetto::protos::pbzero::ChromeProcessDescriptor_ProcessType::PROCESS_BROWSER: + return "PROCESS_BROWSER"; + + case ::perfetto::protos::pbzero::ChromeProcessDescriptor_ProcessType::PROCESS_RENDERER: + return "PROCESS_RENDERER"; + + case ::perfetto::protos::pbzero::ChromeProcessDescriptor_ProcessType::PROCESS_UTILITY: + return "PROCESS_UTILITY"; + + case ::perfetto::protos::pbzero::ChromeProcessDescriptor_ProcessType::PROCESS_ZYGOTE: + return "PROCESS_ZYGOTE"; + + case ::perfetto::protos::pbzero::ChromeProcessDescriptor_ProcessType::PROCESS_SANDBOX_HELPER: + return "PROCESS_SANDBOX_HELPER"; + + case ::perfetto::protos::pbzero::ChromeProcessDescriptor_ProcessType::PROCESS_GPU: + return "PROCESS_GPU"; + + case ::perfetto::protos::pbzero::ChromeProcessDescriptor_ProcessType::PROCESS_PPAPI_PLUGIN: + return "PROCESS_PPAPI_PLUGIN"; + + case ::perfetto::protos::pbzero::ChromeProcessDescriptor_ProcessType::PROCESS_PPAPI_BROKER: + return "PROCESS_PPAPI_BROKER"; + + case ::perfetto::protos::pbzero::ChromeProcessDescriptor_ProcessType::PROCESS_SERVICE_NETWORK: + return "PROCESS_SERVICE_NETWORK"; + + case ::perfetto::protos::pbzero::ChromeProcessDescriptor_ProcessType::PROCESS_SERVICE_TRACING: + return "PROCESS_SERVICE_TRACING"; + + case ::perfetto::protos::pbzero::ChromeProcessDescriptor_ProcessType::PROCESS_SERVICE_STORAGE: + return "PROCESS_SERVICE_STORAGE"; + + case ::perfetto::protos::pbzero::ChromeProcessDescriptor_ProcessType::PROCESS_SERVICE_AUDIO: + return "PROCESS_SERVICE_AUDIO"; + + case ::perfetto::protos::pbzero::ChromeProcessDescriptor_ProcessType::PROCESS_SERVICE_DATA_DECODER: + return "PROCESS_SERVICE_DATA_DECODER"; + + case ::perfetto::protos::pbzero::ChromeProcessDescriptor_ProcessType::PROCESS_SERVICE_UTIL_WIN: + return "PROCESS_SERVICE_UTIL_WIN"; + + case ::perfetto::protos::pbzero::ChromeProcessDescriptor_ProcessType::PROCESS_SERVICE_PROXY_RESOLVER: + return "PROCESS_SERVICE_PROXY_RESOLVER"; + + case ::perfetto::protos::pbzero::ChromeProcessDescriptor_ProcessType::PROCESS_SERVICE_CDM: + return "PROCESS_SERVICE_CDM"; + + case ::perfetto::protos::pbzero::ChromeProcessDescriptor_ProcessType::PROCESS_SERVICE_VIDEO_CAPTURE: + return "PROCESS_SERVICE_VIDEO_CAPTURE"; + + case ::perfetto::protos::pbzero::ChromeProcessDescriptor_ProcessType::PROCESS_SERVICE_UNZIPPER: + return "PROCESS_SERVICE_UNZIPPER"; + + case ::perfetto::protos::pbzero::ChromeProcessDescriptor_ProcessType::PROCESS_SERVICE_MIRRORING: + return "PROCESS_SERVICE_MIRRORING"; + + case ::perfetto::protos::pbzero::ChromeProcessDescriptor_ProcessType::PROCESS_SERVICE_FILEPATCHER: + return "PROCESS_SERVICE_FILEPATCHER"; + + case ::perfetto::protos::pbzero::ChromeProcessDescriptor_ProcessType::PROCESS_SERVICE_TTS: + return "PROCESS_SERVICE_TTS"; + + case ::perfetto::protos::pbzero::ChromeProcessDescriptor_ProcessType::PROCESS_SERVICE_PRINTING: + return "PROCESS_SERVICE_PRINTING"; + + case ::perfetto::protos::pbzero::ChromeProcessDescriptor_ProcessType::PROCESS_SERVICE_QUARANTINE: + return "PROCESS_SERVICE_QUARANTINE"; + + case ::perfetto::protos::pbzero::ChromeProcessDescriptor_ProcessType::PROCESS_SERVICE_CROS_LOCALSEARCH: + return "PROCESS_SERVICE_CROS_LOCALSEARCH"; + + case ::perfetto::protos::pbzero::ChromeProcessDescriptor_ProcessType::PROCESS_SERVICE_CROS_ASSISTANT_AUDIO_DECODER: + return "PROCESS_SERVICE_CROS_ASSISTANT_AUDIO_DECODER"; + + case ::perfetto::protos::pbzero::ChromeProcessDescriptor_ProcessType::PROCESS_SERVICE_FILEUTIL: + return "PROCESS_SERVICE_FILEUTIL"; + + case ::perfetto::protos::pbzero::ChromeProcessDescriptor_ProcessType::PROCESS_SERVICE_PRINTCOMPOSITOR: + return "PROCESS_SERVICE_PRINTCOMPOSITOR"; + + case ::perfetto::protos::pbzero::ChromeProcessDescriptor_ProcessType::PROCESS_SERVICE_PAINTPREVIEW: + return "PROCESS_SERVICE_PAINTPREVIEW"; + + case ::perfetto::protos::pbzero::ChromeProcessDescriptor_ProcessType::PROCESS_SERVICE_SPEECHRECOGNITION: + return "PROCESS_SERVICE_SPEECHRECOGNITION"; + + case ::perfetto::protos::pbzero::ChromeProcessDescriptor_ProcessType::PROCESS_SERVICE_XRDEVICE: + return "PROCESS_SERVICE_XRDEVICE"; + + case ::perfetto::protos::pbzero::ChromeProcessDescriptor_ProcessType::PROCESS_SERVICE_READICON: + return "PROCESS_SERVICE_READICON"; + + case ::perfetto::protos::pbzero::ChromeProcessDescriptor_ProcessType::PROCESS_SERVICE_LANGUAGEDETECTION: + return "PROCESS_SERVICE_LANGUAGEDETECTION"; + + case ::perfetto::protos::pbzero::ChromeProcessDescriptor_ProcessType::PROCESS_SERVICE_SHARING: + return "PROCESS_SERVICE_SHARING"; + + case ::perfetto::protos::pbzero::ChromeProcessDescriptor_ProcessType::PROCESS_SERVICE_MEDIAPARSER: + return "PROCESS_SERVICE_MEDIAPARSER"; + + case ::perfetto::protos::pbzero::ChromeProcessDescriptor_ProcessType::PROCESS_SERVICE_QRCODEGENERATOR: + return "PROCESS_SERVICE_QRCODEGENERATOR"; + + case ::perfetto::protos::pbzero::ChromeProcessDescriptor_ProcessType::PROCESS_SERVICE_PROFILEIMPORT: + return "PROCESS_SERVICE_PROFILEIMPORT"; + + case ::perfetto::protos::pbzero::ChromeProcessDescriptor_ProcessType::PROCESS_SERVICE_IME: + return "PROCESS_SERVICE_IME"; + + case ::perfetto::protos::pbzero::ChromeProcessDescriptor_ProcessType::PROCESS_SERVICE_RECORDING: + return "PROCESS_SERVICE_RECORDING"; + + case ::perfetto::protos::pbzero::ChromeProcessDescriptor_ProcessType::PROCESS_SERVICE_SHAPEDETECTION: + return "PROCESS_SERVICE_SHAPEDETECTION"; + + case ::perfetto::protos::pbzero::ChromeProcessDescriptor_ProcessType::PROCESS_RENDERER_EXTENSION: + return "PROCESS_RENDERER_EXTENSION"; + } + return "PBZERO_UNKNOWN_ENUM_VALUE"; +} class ChromeProcessDescriptor_Decoder : public ::protozero::TypedProtoDecoder { public: @@ -125082,48 +122837,52 @@ class ChromeProcessDescriptor : public ::protozero::Message { }; static constexpr const char* GetName() { return ".perfetto.protos.ChromeProcessDescriptor"; } + using ProcessType = ::perfetto::protos::pbzero::ChromeProcessDescriptor_ProcessType; - static const ProcessType PROCESS_UNSPECIFIED = ChromeProcessDescriptor_ProcessType_PROCESS_UNSPECIFIED; - static const ProcessType PROCESS_BROWSER = ChromeProcessDescriptor_ProcessType_PROCESS_BROWSER; - static const ProcessType PROCESS_RENDERER = ChromeProcessDescriptor_ProcessType_PROCESS_RENDERER; - static const ProcessType PROCESS_UTILITY = ChromeProcessDescriptor_ProcessType_PROCESS_UTILITY; - static const ProcessType PROCESS_ZYGOTE = ChromeProcessDescriptor_ProcessType_PROCESS_ZYGOTE; - static const ProcessType PROCESS_SANDBOX_HELPER = ChromeProcessDescriptor_ProcessType_PROCESS_SANDBOX_HELPER; - static const ProcessType PROCESS_GPU = ChromeProcessDescriptor_ProcessType_PROCESS_GPU; - static const ProcessType PROCESS_PPAPI_PLUGIN = ChromeProcessDescriptor_ProcessType_PROCESS_PPAPI_PLUGIN; - static const ProcessType PROCESS_PPAPI_BROKER = ChromeProcessDescriptor_ProcessType_PROCESS_PPAPI_BROKER; - static const ProcessType PROCESS_SERVICE_NETWORK = ChromeProcessDescriptor_ProcessType_PROCESS_SERVICE_NETWORK; - static const ProcessType PROCESS_SERVICE_TRACING = ChromeProcessDescriptor_ProcessType_PROCESS_SERVICE_TRACING; - static const ProcessType PROCESS_SERVICE_STORAGE = ChromeProcessDescriptor_ProcessType_PROCESS_SERVICE_STORAGE; - static const ProcessType PROCESS_SERVICE_AUDIO = ChromeProcessDescriptor_ProcessType_PROCESS_SERVICE_AUDIO; - static const ProcessType PROCESS_SERVICE_DATA_DECODER = ChromeProcessDescriptor_ProcessType_PROCESS_SERVICE_DATA_DECODER; - static const ProcessType PROCESS_SERVICE_UTIL_WIN = ChromeProcessDescriptor_ProcessType_PROCESS_SERVICE_UTIL_WIN; - static const ProcessType PROCESS_SERVICE_PROXY_RESOLVER = ChromeProcessDescriptor_ProcessType_PROCESS_SERVICE_PROXY_RESOLVER; - static const ProcessType PROCESS_SERVICE_CDM = ChromeProcessDescriptor_ProcessType_PROCESS_SERVICE_CDM; - static const ProcessType PROCESS_SERVICE_VIDEO_CAPTURE = ChromeProcessDescriptor_ProcessType_PROCESS_SERVICE_VIDEO_CAPTURE; - static const ProcessType PROCESS_SERVICE_UNZIPPER = ChromeProcessDescriptor_ProcessType_PROCESS_SERVICE_UNZIPPER; - static const ProcessType PROCESS_SERVICE_MIRRORING = ChromeProcessDescriptor_ProcessType_PROCESS_SERVICE_MIRRORING; - static const ProcessType PROCESS_SERVICE_FILEPATCHER = ChromeProcessDescriptor_ProcessType_PROCESS_SERVICE_FILEPATCHER; - static const ProcessType PROCESS_SERVICE_TTS = ChromeProcessDescriptor_ProcessType_PROCESS_SERVICE_TTS; - static const ProcessType PROCESS_SERVICE_PRINTING = ChromeProcessDescriptor_ProcessType_PROCESS_SERVICE_PRINTING; - static const ProcessType PROCESS_SERVICE_QUARANTINE = ChromeProcessDescriptor_ProcessType_PROCESS_SERVICE_QUARANTINE; - static const ProcessType PROCESS_SERVICE_CROS_LOCALSEARCH = ChromeProcessDescriptor_ProcessType_PROCESS_SERVICE_CROS_LOCALSEARCH; - static const ProcessType PROCESS_SERVICE_CROS_ASSISTANT_AUDIO_DECODER = ChromeProcessDescriptor_ProcessType_PROCESS_SERVICE_CROS_ASSISTANT_AUDIO_DECODER; - static const ProcessType PROCESS_SERVICE_FILEUTIL = ChromeProcessDescriptor_ProcessType_PROCESS_SERVICE_FILEUTIL; - static const ProcessType PROCESS_SERVICE_PRINTCOMPOSITOR = ChromeProcessDescriptor_ProcessType_PROCESS_SERVICE_PRINTCOMPOSITOR; - static const ProcessType PROCESS_SERVICE_PAINTPREVIEW = ChromeProcessDescriptor_ProcessType_PROCESS_SERVICE_PAINTPREVIEW; - static const ProcessType PROCESS_SERVICE_SPEECHRECOGNITION = ChromeProcessDescriptor_ProcessType_PROCESS_SERVICE_SPEECHRECOGNITION; - static const ProcessType PROCESS_SERVICE_XRDEVICE = ChromeProcessDescriptor_ProcessType_PROCESS_SERVICE_XRDEVICE; - static const ProcessType PROCESS_SERVICE_READICON = ChromeProcessDescriptor_ProcessType_PROCESS_SERVICE_READICON; - static const ProcessType PROCESS_SERVICE_LANGUAGEDETECTION = ChromeProcessDescriptor_ProcessType_PROCESS_SERVICE_LANGUAGEDETECTION; - static const ProcessType PROCESS_SERVICE_SHARING = ChromeProcessDescriptor_ProcessType_PROCESS_SERVICE_SHARING; - static const ProcessType PROCESS_SERVICE_MEDIAPARSER = ChromeProcessDescriptor_ProcessType_PROCESS_SERVICE_MEDIAPARSER; - static const ProcessType PROCESS_SERVICE_QRCODEGENERATOR = ChromeProcessDescriptor_ProcessType_PROCESS_SERVICE_QRCODEGENERATOR; - static const ProcessType PROCESS_SERVICE_PROFILEIMPORT = ChromeProcessDescriptor_ProcessType_PROCESS_SERVICE_PROFILEIMPORT; - static const ProcessType PROCESS_SERVICE_IME = ChromeProcessDescriptor_ProcessType_PROCESS_SERVICE_IME; - static const ProcessType PROCESS_SERVICE_RECORDING = ChromeProcessDescriptor_ProcessType_PROCESS_SERVICE_RECORDING; - static const ProcessType PROCESS_SERVICE_SHAPEDETECTION = ChromeProcessDescriptor_ProcessType_PROCESS_SERVICE_SHAPEDETECTION; - static const ProcessType PROCESS_RENDERER_EXTENSION = ChromeProcessDescriptor_ProcessType_PROCESS_RENDERER_EXTENSION; + static inline const char* ProcessType_Name(ProcessType value) { + return ::perfetto::protos::pbzero::ChromeProcessDescriptor_ProcessType_Name(value); + } + static const ProcessType PROCESS_UNSPECIFIED = ProcessType::PROCESS_UNSPECIFIED; + static const ProcessType PROCESS_BROWSER = ProcessType::PROCESS_BROWSER; + static const ProcessType PROCESS_RENDERER = ProcessType::PROCESS_RENDERER; + static const ProcessType PROCESS_UTILITY = ProcessType::PROCESS_UTILITY; + static const ProcessType PROCESS_ZYGOTE = ProcessType::PROCESS_ZYGOTE; + static const ProcessType PROCESS_SANDBOX_HELPER = ProcessType::PROCESS_SANDBOX_HELPER; + static const ProcessType PROCESS_GPU = ProcessType::PROCESS_GPU; + static const ProcessType PROCESS_PPAPI_PLUGIN = ProcessType::PROCESS_PPAPI_PLUGIN; + static const ProcessType PROCESS_PPAPI_BROKER = ProcessType::PROCESS_PPAPI_BROKER; + static const ProcessType PROCESS_SERVICE_NETWORK = ProcessType::PROCESS_SERVICE_NETWORK; + static const ProcessType PROCESS_SERVICE_TRACING = ProcessType::PROCESS_SERVICE_TRACING; + static const ProcessType PROCESS_SERVICE_STORAGE = ProcessType::PROCESS_SERVICE_STORAGE; + static const ProcessType PROCESS_SERVICE_AUDIO = ProcessType::PROCESS_SERVICE_AUDIO; + static const ProcessType PROCESS_SERVICE_DATA_DECODER = ProcessType::PROCESS_SERVICE_DATA_DECODER; + static const ProcessType PROCESS_SERVICE_UTIL_WIN = ProcessType::PROCESS_SERVICE_UTIL_WIN; + static const ProcessType PROCESS_SERVICE_PROXY_RESOLVER = ProcessType::PROCESS_SERVICE_PROXY_RESOLVER; + static const ProcessType PROCESS_SERVICE_CDM = ProcessType::PROCESS_SERVICE_CDM; + static const ProcessType PROCESS_SERVICE_VIDEO_CAPTURE = ProcessType::PROCESS_SERVICE_VIDEO_CAPTURE; + static const ProcessType PROCESS_SERVICE_UNZIPPER = ProcessType::PROCESS_SERVICE_UNZIPPER; + static const ProcessType PROCESS_SERVICE_MIRRORING = ProcessType::PROCESS_SERVICE_MIRRORING; + static const ProcessType PROCESS_SERVICE_FILEPATCHER = ProcessType::PROCESS_SERVICE_FILEPATCHER; + static const ProcessType PROCESS_SERVICE_TTS = ProcessType::PROCESS_SERVICE_TTS; + static const ProcessType PROCESS_SERVICE_PRINTING = ProcessType::PROCESS_SERVICE_PRINTING; + static const ProcessType PROCESS_SERVICE_QUARANTINE = ProcessType::PROCESS_SERVICE_QUARANTINE; + static const ProcessType PROCESS_SERVICE_CROS_LOCALSEARCH = ProcessType::PROCESS_SERVICE_CROS_LOCALSEARCH; + static const ProcessType PROCESS_SERVICE_CROS_ASSISTANT_AUDIO_DECODER = ProcessType::PROCESS_SERVICE_CROS_ASSISTANT_AUDIO_DECODER; + static const ProcessType PROCESS_SERVICE_FILEUTIL = ProcessType::PROCESS_SERVICE_FILEUTIL; + static const ProcessType PROCESS_SERVICE_PRINTCOMPOSITOR = ProcessType::PROCESS_SERVICE_PRINTCOMPOSITOR; + static const ProcessType PROCESS_SERVICE_PAINTPREVIEW = ProcessType::PROCESS_SERVICE_PAINTPREVIEW; + static const ProcessType PROCESS_SERVICE_SPEECHRECOGNITION = ProcessType::PROCESS_SERVICE_SPEECHRECOGNITION; + static const ProcessType PROCESS_SERVICE_XRDEVICE = ProcessType::PROCESS_SERVICE_XRDEVICE; + static const ProcessType PROCESS_SERVICE_READICON = ProcessType::PROCESS_SERVICE_READICON; + static const ProcessType PROCESS_SERVICE_LANGUAGEDETECTION = ProcessType::PROCESS_SERVICE_LANGUAGEDETECTION; + static const ProcessType PROCESS_SERVICE_SHARING = ProcessType::PROCESS_SERVICE_SHARING; + static const ProcessType PROCESS_SERVICE_MEDIAPARSER = ProcessType::PROCESS_SERVICE_MEDIAPARSER; + static const ProcessType PROCESS_SERVICE_QRCODEGENERATOR = ProcessType::PROCESS_SERVICE_QRCODEGENERATOR; + static const ProcessType PROCESS_SERVICE_PROFILEIMPORT = ProcessType::PROCESS_SERVICE_PROFILEIMPORT; + static const ProcessType PROCESS_SERVICE_IME = ProcessType::PROCESS_SERVICE_IME; + static const ProcessType PROCESS_SERVICE_RECORDING = ProcessType::PROCESS_SERVICE_RECORDING; + static const ProcessType PROCESS_SERVICE_SHAPEDETECTION = ProcessType::PROCESS_SERVICE_SHAPEDETECTION; + static const ProcessType PROCESS_RENDERER_EXTENSION = ProcessType::PROCESS_RENDERER_EXTENSION; using FieldMetadata_ProcessType = ::protozero::proto_utils::FieldMetadata< @@ -125133,14 +122892,7 @@ class ChromeProcessDescriptor : public ::protozero::Message { ::perfetto::protos::pbzero::ChromeProcessDescriptor_ProcessType, ChromeProcessDescriptor>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ProcessType kProcessType() { return {}; } + static constexpr FieldMetadata_ProcessType kProcessType{}; void set_process_type(::perfetto::protos::pbzero::ChromeProcessDescriptor_ProcessType value) { static constexpr uint32_t field_id = FieldMetadata_ProcessType::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -125158,14 +122910,7 @@ class ChromeProcessDescriptor : public ::protozero::Message { int32_t, ChromeProcessDescriptor>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ProcessPriority kProcessPriority() { return {}; } + static constexpr FieldMetadata_ProcessPriority kProcessPriority{}; void set_process_priority(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_ProcessPriority::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -125183,14 +122928,7 @@ class ChromeProcessDescriptor : public ::protozero::Message { int32_t, ChromeProcessDescriptor>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_LegacySortIndex kLegacySortIndex() { return {}; } + static constexpr FieldMetadata_LegacySortIndex kLegacySortIndex{}; void set_legacy_sort_index(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_LegacySortIndex::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -125208,17 +122946,13 @@ class ChromeProcessDescriptor : public ::protozero::Message { std::string, ChromeProcessDescriptor>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_HostAppPackageName kHostAppPackageName() { return {}; } + static constexpr FieldMetadata_HostAppPackageName kHostAppPackageName{}; void set_host_app_package_name(const char* data, size_t size) { AppendBytes(FieldMetadata_HostAppPackageName::kFieldId, data, size); } + void set_host_app_package_name(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_HostAppPackageName::kFieldId, chars.data, chars.size); + } void set_host_app_package_name(std::string value) { static constexpr uint32_t field_id = FieldMetadata_HostAppPackageName::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -125236,14 +122970,7 @@ class ChromeProcessDescriptor : public ::protozero::Message { uint64_t, ChromeProcessDescriptor>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_CrashTraceId kCrashTraceId() { return {}; } + static constexpr FieldMetadata_CrashTraceId kCrashTraceId{}; void set_crash_trace_id(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_CrashTraceId::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -125287,8 +123014,30 @@ enum ChromeRAILMode : int32_t { RAIL_MODE_LOAD = 4, }; -const ChromeRAILMode ChromeRAILMode_MIN = RAIL_MODE_NONE; -const ChromeRAILMode ChromeRAILMode_MAX = RAIL_MODE_LOAD; +constexpr ChromeRAILMode ChromeRAILMode_MIN = ChromeRAILMode::RAIL_MODE_NONE; +constexpr ChromeRAILMode ChromeRAILMode_MAX = ChromeRAILMode::RAIL_MODE_LOAD; + + +PERFETTO_PROTOZERO_CONSTEXPR14_OR_INLINE +const char* ChromeRAILMode_Name(::perfetto::protos::pbzero::ChromeRAILMode value) { + switch (value) { + case ::perfetto::protos::pbzero::ChromeRAILMode::RAIL_MODE_NONE: + return "RAIL_MODE_NONE"; + + case ::perfetto::protos::pbzero::ChromeRAILMode::RAIL_MODE_RESPONSE: + return "RAIL_MODE_RESPONSE"; + + case ::perfetto::protos::pbzero::ChromeRAILMode::RAIL_MODE_ANIMATION: + return "RAIL_MODE_ANIMATION"; + + case ::perfetto::protos::pbzero::ChromeRAILMode::RAIL_MODE_IDLE: + return "RAIL_MODE_IDLE"; + + case ::perfetto::protos::pbzero::ChromeRAILMode::RAIL_MODE_LOAD: + return "RAIL_MODE_LOAD"; + } + return "PBZERO_UNKNOWN_ENUM_VALUE"; +} class ChromeRendererSchedulerState_Decoder : public ::protozero::TypedProtoDecoder { public: @@ -125322,14 +123071,7 @@ class ChromeRendererSchedulerState : public ::protozero::Message { ::perfetto::protos::pbzero::ChromeRAILMode, ChromeRendererSchedulerState>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_RailMode kRailMode() { return {}; } + static constexpr FieldMetadata_RailMode kRailMode{}; void set_rail_mode(::perfetto::protos::pbzero::ChromeRAILMode value) { static constexpr uint32_t field_id = FieldMetadata_RailMode::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -125347,14 +123089,7 @@ class ChromeRendererSchedulerState : public ::protozero::Message { bool, ChromeRendererSchedulerState>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_IsBackgrounded kIsBackgrounded() { return {}; } + static constexpr FieldMetadata_IsBackgrounded kIsBackgrounded{}; void set_is_backgrounded(bool value) { static constexpr uint32_t field_id = FieldMetadata_IsBackgrounded::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -125372,14 +123107,7 @@ class ChromeRendererSchedulerState : public ::protozero::Message { bool, ChromeRendererSchedulerState>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_IsHidden kIsHidden() { return {}; } + static constexpr FieldMetadata_IsHidden kIsHidden{}; void set_is_hidden(bool value) { static constexpr uint32_t field_id = FieldMetadata_IsHidden::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -125413,57 +123141,203 @@ namespace perfetto { namespace protos { namespace pbzero { -enum ChromeThreadDescriptor_ThreadType : int32_t; +namespace perfetto_pbzero_enum_ChromeThreadDescriptor { +enum ThreadType : int32_t; +} // namespace perfetto_pbzero_enum_ChromeThreadDescriptor +using ChromeThreadDescriptor_ThreadType = perfetto_pbzero_enum_ChromeThreadDescriptor::ThreadType; -enum ChromeThreadDescriptor_ThreadType : int32_t { - ChromeThreadDescriptor_ThreadType_THREAD_UNSPECIFIED = 0, - ChromeThreadDescriptor_ThreadType_THREAD_MAIN = 1, - ChromeThreadDescriptor_ThreadType_THREAD_IO = 2, - ChromeThreadDescriptor_ThreadType_THREAD_POOL_BG_WORKER = 3, - ChromeThreadDescriptor_ThreadType_THREAD_POOL_FG_WORKER = 4, - ChromeThreadDescriptor_ThreadType_THREAD_POOL_FG_BLOCKING = 5, - ChromeThreadDescriptor_ThreadType_THREAD_POOL_BG_BLOCKING = 6, - ChromeThreadDescriptor_ThreadType_THREAD_POOL_SERVICE = 7, - ChromeThreadDescriptor_ThreadType_THREAD_COMPOSITOR = 8, - ChromeThreadDescriptor_ThreadType_THREAD_VIZ_COMPOSITOR = 9, - ChromeThreadDescriptor_ThreadType_THREAD_COMPOSITOR_WORKER = 10, - ChromeThreadDescriptor_ThreadType_THREAD_SERVICE_WORKER = 11, - ChromeThreadDescriptor_ThreadType_THREAD_NETWORK_SERVICE = 12, - ChromeThreadDescriptor_ThreadType_THREAD_CHILD_IO = 13, - ChromeThreadDescriptor_ThreadType_THREAD_BROWSER_IO = 14, - ChromeThreadDescriptor_ThreadType_THREAD_BROWSER_MAIN = 15, - ChromeThreadDescriptor_ThreadType_THREAD_RENDERER_MAIN = 16, - ChromeThreadDescriptor_ThreadType_THREAD_UTILITY_MAIN = 17, - ChromeThreadDescriptor_ThreadType_THREAD_GPU_MAIN = 18, - ChromeThreadDescriptor_ThreadType_THREAD_CACHE_BLOCKFILE = 19, - ChromeThreadDescriptor_ThreadType_THREAD_MEDIA = 20, - ChromeThreadDescriptor_ThreadType_THREAD_AUDIO_OUTPUTDEVICE = 21, - ChromeThreadDescriptor_ThreadType_THREAD_AUDIO_INPUTDEVICE = 22, - ChromeThreadDescriptor_ThreadType_THREAD_GPU_MEMORY = 23, - ChromeThreadDescriptor_ThreadType_THREAD_GPU_VSYNC = 24, - ChromeThreadDescriptor_ThreadType_THREAD_DXA_VIDEODECODER = 25, - ChromeThreadDescriptor_ThreadType_THREAD_BROWSER_WATCHDOG = 26, - ChromeThreadDescriptor_ThreadType_THREAD_WEBRTC_NETWORK = 27, - ChromeThreadDescriptor_ThreadType_THREAD_WINDOW_OWNER = 28, - ChromeThreadDescriptor_ThreadType_THREAD_WEBRTC_SIGNALING = 29, - ChromeThreadDescriptor_ThreadType_THREAD_WEBRTC_WORKER = 30, - ChromeThreadDescriptor_ThreadType_THREAD_PPAPI_MAIN = 31, - ChromeThreadDescriptor_ThreadType_THREAD_GPU_WATCHDOG = 32, - ChromeThreadDescriptor_ThreadType_THREAD_SWAPPER = 33, - ChromeThreadDescriptor_ThreadType_THREAD_GAMEPAD_POLLING = 34, - ChromeThreadDescriptor_ThreadType_THREAD_WEBCRYPTO = 35, - ChromeThreadDescriptor_ThreadType_THREAD_DATABASE = 36, - ChromeThreadDescriptor_ThreadType_THREAD_PROXYRESOLVER = 37, - ChromeThreadDescriptor_ThreadType_THREAD_DEVTOOLSADB = 38, - ChromeThreadDescriptor_ThreadType_THREAD_NETWORKCONFIGWATCHER = 39, - ChromeThreadDescriptor_ThreadType_THREAD_WASAPI_RENDER = 40, - ChromeThreadDescriptor_ThreadType_THREAD_LOADER_LOCK_SAMPLER = 41, - ChromeThreadDescriptor_ThreadType_THREAD_MEMORY_INFRA = 50, - ChromeThreadDescriptor_ThreadType_THREAD_SAMPLING_PROFILER = 51, +namespace perfetto_pbzero_enum_ChromeThreadDescriptor { +enum ThreadType : int32_t { + THREAD_UNSPECIFIED = 0, + THREAD_MAIN = 1, + THREAD_IO = 2, + THREAD_POOL_BG_WORKER = 3, + THREAD_POOL_FG_WORKER = 4, + THREAD_POOL_FG_BLOCKING = 5, + THREAD_POOL_BG_BLOCKING = 6, + THREAD_POOL_SERVICE = 7, + THREAD_COMPOSITOR = 8, + THREAD_VIZ_COMPOSITOR = 9, + THREAD_COMPOSITOR_WORKER = 10, + THREAD_SERVICE_WORKER = 11, + THREAD_NETWORK_SERVICE = 12, + THREAD_CHILD_IO = 13, + THREAD_BROWSER_IO = 14, + THREAD_BROWSER_MAIN = 15, + THREAD_RENDERER_MAIN = 16, + THREAD_UTILITY_MAIN = 17, + THREAD_GPU_MAIN = 18, + THREAD_CACHE_BLOCKFILE = 19, + THREAD_MEDIA = 20, + THREAD_AUDIO_OUTPUTDEVICE = 21, + THREAD_AUDIO_INPUTDEVICE = 22, + THREAD_GPU_MEMORY = 23, + THREAD_GPU_VSYNC = 24, + THREAD_DXA_VIDEODECODER = 25, + THREAD_BROWSER_WATCHDOG = 26, + THREAD_WEBRTC_NETWORK = 27, + THREAD_WINDOW_OWNER = 28, + THREAD_WEBRTC_SIGNALING = 29, + THREAD_WEBRTC_WORKER = 30, + THREAD_PPAPI_MAIN = 31, + THREAD_GPU_WATCHDOG = 32, + THREAD_SWAPPER = 33, + THREAD_GAMEPAD_POLLING = 34, + THREAD_WEBCRYPTO = 35, + THREAD_DATABASE = 36, + THREAD_PROXYRESOLVER = 37, + THREAD_DEVTOOLSADB = 38, + THREAD_NETWORKCONFIGWATCHER = 39, + THREAD_WASAPI_RENDER = 40, + THREAD_LOADER_LOCK_SAMPLER = 41, + THREAD_MEMORY_INFRA = 50, + THREAD_SAMPLING_PROFILER = 51, }; +} // namespace perfetto_pbzero_enum_ChromeThreadDescriptor +using ChromeThreadDescriptor_ThreadType = perfetto_pbzero_enum_ChromeThreadDescriptor::ThreadType; -const ChromeThreadDescriptor_ThreadType ChromeThreadDescriptor_ThreadType_MIN = ChromeThreadDescriptor_ThreadType_THREAD_UNSPECIFIED; -const ChromeThreadDescriptor_ThreadType ChromeThreadDescriptor_ThreadType_MAX = ChromeThreadDescriptor_ThreadType_THREAD_SAMPLING_PROFILER; + +constexpr ChromeThreadDescriptor_ThreadType ChromeThreadDescriptor_ThreadType_MIN = ChromeThreadDescriptor_ThreadType::THREAD_UNSPECIFIED; +constexpr ChromeThreadDescriptor_ThreadType ChromeThreadDescriptor_ThreadType_MAX = ChromeThreadDescriptor_ThreadType::THREAD_SAMPLING_PROFILER; + + +PERFETTO_PROTOZERO_CONSTEXPR14_OR_INLINE +const char* ChromeThreadDescriptor_ThreadType_Name(::perfetto::protos::pbzero::ChromeThreadDescriptor_ThreadType value) { + switch (value) { + case ::perfetto::protos::pbzero::ChromeThreadDescriptor_ThreadType::THREAD_UNSPECIFIED: + return "THREAD_UNSPECIFIED"; + + case ::perfetto::protos::pbzero::ChromeThreadDescriptor_ThreadType::THREAD_MAIN: + return "THREAD_MAIN"; + + case ::perfetto::protos::pbzero::ChromeThreadDescriptor_ThreadType::THREAD_IO: + return "THREAD_IO"; + + case ::perfetto::protos::pbzero::ChromeThreadDescriptor_ThreadType::THREAD_POOL_BG_WORKER: + return "THREAD_POOL_BG_WORKER"; + + case ::perfetto::protos::pbzero::ChromeThreadDescriptor_ThreadType::THREAD_POOL_FG_WORKER: + return "THREAD_POOL_FG_WORKER"; + + case ::perfetto::protos::pbzero::ChromeThreadDescriptor_ThreadType::THREAD_POOL_FG_BLOCKING: + return "THREAD_POOL_FG_BLOCKING"; + + case ::perfetto::protos::pbzero::ChromeThreadDescriptor_ThreadType::THREAD_POOL_BG_BLOCKING: + return "THREAD_POOL_BG_BLOCKING"; + + case ::perfetto::protos::pbzero::ChromeThreadDescriptor_ThreadType::THREAD_POOL_SERVICE: + return "THREAD_POOL_SERVICE"; + + case ::perfetto::protos::pbzero::ChromeThreadDescriptor_ThreadType::THREAD_COMPOSITOR: + return "THREAD_COMPOSITOR"; + + case ::perfetto::protos::pbzero::ChromeThreadDescriptor_ThreadType::THREAD_VIZ_COMPOSITOR: + return "THREAD_VIZ_COMPOSITOR"; + + case ::perfetto::protos::pbzero::ChromeThreadDescriptor_ThreadType::THREAD_COMPOSITOR_WORKER: + return "THREAD_COMPOSITOR_WORKER"; + + case ::perfetto::protos::pbzero::ChromeThreadDescriptor_ThreadType::THREAD_SERVICE_WORKER: + return "THREAD_SERVICE_WORKER"; + + case ::perfetto::protos::pbzero::ChromeThreadDescriptor_ThreadType::THREAD_NETWORK_SERVICE: + return "THREAD_NETWORK_SERVICE"; + + case ::perfetto::protos::pbzero::ChromeThreadDescriptor_ThreadType::THREAD_CHILD_IO: + return "THREAD_CHILD_IO"; + + case ::perfetto::protos::pbzero::ChromeThreadDescriptor_ThreadType::THREAD_BROWSER_IO: + return "THREAD_BROWSER_IO"; + + case ::perfetto::protos::pbzero::ChromeThreadDescriptor_ThreadType::THREAD_BROWSER_MAIN: + return "THREAD_BROWSER_MAIN"; + + case ::perfetto::protos::pbzero::ChromeThreadDescriptor_ThreadType::THREAD_RENDERER_MAIN: + return "THREAD_RENDERER_MAIN"; + + case ::perfetto::protos::pbzero::ChromeThreadDescriptor_ThreadType::THREAD_UTILITY_MAIN: + return "THREAD_UTILITY_MAIN"; + + case ::perfetto::protos::pbzero::ChromeThreadDescriptor_ThreadType::THREAD_GPU_MAIN: + return "THREAD_GPU_MAIN"; + + case ::perfetto::protos::pbzero::ChromeThreadDescriptor_ThreadType::THREAD_CACHE_BLOCKFILE: + return "THREAD_CACHE_BLOCKFILE"; + + case ::perfetto::protos::pbzero::ChromeThreadDescriptor_ThreadType::THREAD_MEDIA: + return "THREAD_MEDIA"; + + case ::perfetto::protos::pbzero::ChromeThreadDescriptor_ThreadType::THREAD_AUDIO_OUTPUTDEVICE: + return "THREAD_AUDIO_OUTPUTDEVICE"; + + case ::perfetto::protos::pbzero::ChromeThreadDescriptor_ThreadType::THREAD_AUDIO_INPUTDEVICE: + return "THREAD_AUDIO_INPUTDEVICE"; + + case ::perfetto::protos::pbzero::ChromeThreadDescriptor_ThreadType::THREAD_GPU_MEMORY: + return "THREAD_GPU_MEMORY"; + + case ::perfetto::protos::pbzero::ChromeThreadDescriptor_ThreadType::THREAD_GPU_VSYNC: + return "THREAD_GPU_VSYNC"; + + case ::perfetto::protos::pbzero::ChromeThreadDescriptor_ThreadType::THREAD_DXA_VIDEODECODER: + return "THREAD_DXA_VIDEODECODER"; + + case ::perfetto::protos::pbzero::ChromeThreadDescriptor_ThreadType::THREAD_BROWSER_WATCHDOG: + return "THREAD_BROWSER_WATCHDOG"; + + case ::perfetto::protos::pbzero::ChromeThreadDescriptor_ThreadType::THREAD_WEBRTC_NETWORK: + return "THREAD_WEBRTC_NETWORK"; + + case ::perfetto::protos::pbzero::ChromeThreadDescriptor_ThreadType::THREAD_WINDOW_OWNER: + return "THREAD_WINDOW_OWNER"; + + case ::perfetto::protos::pbzero::ChromeThreadDescriptor_ThreadType::THREAD_WEBRTC_SIGNALING: + return "THREAD_WEBRTC_SIGNALING"; + + case ::perfetto::protos::pbzero::ChromeThreadDescriptor_ThreadType::THREAD_WEBRTC_WORKER: + return "THREAD_WEBRTC_WORKER"; + + case ::perfetto::protos::pbzero::ChromeThreadDescriptor_ThreadType::THREAD_PPAPI_MAIN: + return "THREAD_PPAPI_MAIN"; + + case ::perfetto::protos::pbzero::ChromeThreadDescriptor_ThreadType::THREAD_GPU_WATCHDOG: + return "THREAD_GPU_WATCHDOG"; + + case ::perfetto::protos::pbzero::ChromeThreadDescriptor_ThreadType::THREAD_SWAPPER: + return "THREAD_SWAPPER"; + + case ::perfetto::protos::pbzero::ChromeThreadDescriptor_ThreadType::THREAD_GAMEPAD_POLLING: + return "THREAD_GAMEPAD_POLLING"; + + case ::perfetto::protos::pbzero::ChromeThreadDescriptor_ThreadType::THREAD_WEBCRYPTO: + return "THREAD_WEBCRYPTO"; + + case ::perfetto::protos::pbzero::ChromeThreadDescriptor_ThreadType::THREAD_DATABASE: + return "THREAD_DATABASE"; + + case ::perfetto::protos::pbzero::ChromeThreadDescriptor_ThreadType::THREAD_PROXYRESOLVER: + return "THREAD_PROXYRESOLVER"; + + case ::perfetto::protos::pbzero::ChromeThreadDescriptor_ThreadType::THREAD_DEVTOOLSADB: + return "THREAD_DEVTOOLSADB"; + + case ::perfetto::protos::pbzero::ChromeThreadDescriptor_ThreadType::THREAD_NETWORKCONFIGWATCHER: + return "THREAD_NETWORKCONFIGWATCHER"; + + case ::perfetto::protos::pbzero::ChromeThreadDescriptor_ThreadType::THREAD_WASAPI_RENDER: + return "THREAD_WASAPI_RENDER"; + + case ::perfetto::protos::pbzero::ChromeThreadDescriptor_ThreadType::THREAD_LOADER_LOCK_SAMPLER: + return "THREAD_LOADER_LOCK_SAMPLER"; + + case ::perfetto::protos::pbzero::ChromeThreadDescriptor_ThreadType::THREAD_MEMORY_INFRA: + return "THREAD_MEMORY_INFRA"; + + case ::perfetto::protos::pbzero::ChromeThreadDescriptor_ThreadType::THREAD_SAMPLING_PROFILER: + return "THREAD_SAMPLING_PROFILER"; + } + return "PBZERO_UNKNOWN_ENUM_VALUE"; +} class ChromeThreadDescriptor_Decoder : public ::protozero::TypedProtoDecoder { public: @@ -125485,51 +123359,55 @@ class ChromeThreadDescriptor : public ::protozero::Message { }; static constexpr const char* GetName() { return ".perfetto.protos.ChromeThreadDescriptor"; } + using ThreadType = ::perfetto::protos::pbzero::ChromeThreadDescriptor_ThreadType; - static const ThreadType THREAD_UNSPECIFIED = ChromeThreadDescriptor_ThreadType_THREAD_UNSPECIFIED; - static const ThreadType THREAD_MAIN = ChromeThreadDescriptor_ThreadType_THREAD_MAIN; - static const ThreadType THREAD_IO = ChromeThreadDescriptor_ThreadType_THREAD_IO; - static const ThreadType THREAD_POOL_BG_WORKER = ChromeThreadDescriptor_ThreadType_THREAD_POOL_BG_WORKER; - static const ThreadType THREAD_POOL_FG_WORKER = ChromeThreadDescriptor_ThreadType_THREAD_POOL_FG_WORKER; - static const ThreadType THREAD_POOL_FG_BLOCKING = ChromeThreadDescriptor_ThreadType_THREAD_POOL_FG_BLOCKING; - static const ThreadType THREAD_POOL_BG_BLOCKING = ChromeThreadDescriptor_ThreadType_THREAD_POOL_BG_BLOCKING; - static const ThreadType THREAD_POOL_SERVICE = ChromeThreadDescriptor_ThreadType_THREAD_POOL_SERVICE; - static const ThreadType THREAD_COMPOSITOR = ChromeThreadDescriptor_ThreadType_THREAD_COMPOSITOR; - static const ThreadType THREAD_VIZ_COMPOSITOR = ChromeThreadDescriptor_ThreadType_THREAD_VIZ_COMPOSITOR; - static const ThreadType THREAD_COMPOSITOR_WORKER = ChromeThreadDescriptor_ThreadType_THREAD_COMPOSITOR_WORKER; - static const ThreadType THREAD_SERVICE_WORKER = ChromeThreadDescriptor_ThreadType_THREAD_SERVICE_WORKER; - static const ThreadType THREAD_NETWORK_SERVICE = ChromeThreadDescriptor_ThreadType_THREAD_NETWORK_SERVICE; - static const ThreadType THREAD_CHILD_IO = ChromeThreadDescriptor_ThreadType_THREAD_CHILD_IO; - static const ThreadType THREAD_BROWSER_IO = ChromeThreadDescriptor_ThreadType_THREAD_BROWSER_IO; - static const ThreadType THREAD_BROWSER_MAIN = ChromeThreadDescriptor_ThreadType_THREAD_BROWSER_MAIN; - static const ThreadType THREAD_RENDERER_MAIN = ChromeThreadDescriptor_ThreadType_THREAD_RENDERER_MAIN; - static const ThreadType THREAD_UTILITY_MAIN = ChromeThreadDescriptor_ThreadType_THREAD_UTILITY_MAIN; - static const ThreadType THREAD_GPU_MAIN = ChromeThreadDescriptor_ThreadType_THREAD_GPU_MAIN; - static const ThreadType THREAD_CACHE_BLOCKFILE = ChromeThreadDescriptor_ThreadType_THREAD_CACHE_BLOCKFILE; - static const ThreadType THREAD_MEDIA = ChromeThreadDescriptor_ThreadType_THREAD_MEDIA; - static const ThreadType THREAD_AUDIO_OUTPUTDEVICE = ChromeThreadDescriptor_ThreadType_THREAD_AUDIO_OUTPUTDEVICE; - static const ThreadType THREAD_AUDIO_INPUTDEVICE = ChromeThreadDescriptor_ThreadType_THREAD_AUDIO_INPUTDEVICE; - static const ThreadType THREAD_GPU_MEMORY = ChromeThreadDescriptor_ThreadType_THREAD_GPU_MEMORY; - static const ThreadType THREAD_GPU_VSYNC = ChromeThreadDescriptor_ThreadType_THREAD_GPU_VSYNC; - static const ThreadType THREAD_DXA_VIDEODECODER = ChromeThreadDescriptor_ThreadType_THREAD_DXA_VIDEODECODER; - static const ThreadType THREAD_BROWSER_WATCHDOG = ChromeThreadDescriptor_ThreadType_THREAD_BROWSER_WATCHDOG; - static const ThreadType THREAD_WEBRTC_NETWORK = ChromeThreadDescriptor_ThreadType_THREAD_WEBRTC_NETWORK; - static const ThreadType THREAD_WINDOW_OWNER = ChromeThreadDescriptor_ThreadType_THREAD_WINDOW_OWNER; - static const ThreadType THREAD_WEBRTC_SIGNALING = ChromeThreadDescriptor_ThreadType_THREAD_WEBRTC_SIGNALING; - static const ThreadType THREAD_WEBRTC_WORKER = ChromeThreadDescriptor_ThreadType_THREAD_WEBRTC_WORKER; - static const ThreadType THREAD_PPAPI_MAIN = ChromeThreadDescriptor_ThreadType_THREAD_PPAPI_MAIN; - static const ThreadType THREAD_GPU_WATCHDOG = ChromeThreadDescriptor_ThreadType_THREAD_GPU_WATCHDOG; - static const ThreadType THREAD_SWAPPER = ChromeThreadDescriptor_ThreadType_THREAD_SWAPPER; - static const ThreadType THREAD_GAMEPAD_POLLING = ChromeThreadDescriptor_ThreadType_THREAD_GAMEPAD_POLLING; - static const ThreadType THREAD_WEBCRYPTO = ChromeThreadDescriptor_ThreadType_THREAD_WEBCRYPTO; - static const ThreadType THREAD_DATABASE = ChromeThreadDescriptor_ThreadType_THREAD_DATABASE; - static const ThreadType THREAD_PROXYRESOLVER = ChromeThreadDescriptor_ThreadType_THREAD_PROXYRESOLVER; - static const ThreadType THREAD_DEVTOOLSADB = ChromeThreadDescriptor_ThreadType_THREAD_DEVTOOLSADB; - static const ThreadType THREAD_NETWORKCONFIGWATCHER = ChromeThreadDescriptor_ThreadType_THREAD_NETWORKCONFIGWATCHER; - static const ThreadType THREAD_WASAPI_RENDER = ChromeThreadDescriptor_ThreadType_THREAD_WASAPI_RENDER; - static const ThreadType THREAD_LOADER_LOCK_SAMPLER = ChromeThreadDescriptor_ThreadType_THREAD_LOADER_LOCK_SAMPLER; - static const ThreadType THREAD_MEMORY_INFRA = ChromeThreadDescriptor_ThreadType_THREAD_MEMORY_INFRA; - static const ThreadType THREAD_SAMPLING_PROFILER = ChromeThreadDescriptor_ThreadType_THREAD_SAMPLING_PROFILER; + static inline const char* ThreadType_Name(ThreadType value) { + return ::perfetto::protos::pbzero::ChromeThreadDescriptor_ThreadType_Name(value); + } + static const ThreadType THREAD_UNSPECIFIED = ThreadType::THREAD_UNSPECIFIED; + static const ThreadType THREAD_MAIN = ThreadType::THREAD_MAIN; + static const ThreadType THREAD_IO = ThreadType::THREAD_IO; + static const ThreadType THREAD_POOL_BG_WORKER = ThreadType::THREAD_POOL_BG_WORKER; + static const ThreadType THREAD_POOL_FG_WORKER = ThreadType::THREAD_POOL_FG_WORKER; + static const ThreadType THREAD_POOL_FG_BLOCKING = ThreadType::THREAD_POOL_FG_BLOCKING; + static const ThreadType THREAD_POOL_BG_BLOCKING = ThreadType::THREAD_POOL_BG_BLOCKING; + static const ThreadType THREAD_POOL_SERVICE = ThreadType::THREAD_POOL_SERVICE; + static const ThreadType THREAD_COMPOSITOR = ThreadType::THREAD_COMPOSITOR; + static const ThreadType THREAD_VIZ_COMPOSITOR = ThreadType::THREAD_VIZ_COMPOSITOR; + static const ThreadType THREAD_COMPOSITOR_WORKER = ThreadType::THREAD_COMPOSITOR_WORKER; + static const ThreadType THREAD_SERVICE_WORKER = ThreadType::THREAD_SERVICE_WORKER; + static const ThreadType THREAD_NETWORK_SERVICE = ThreadType::THREAD_NETWORK_SERVICE; + static const ThreadType THREAD_CHILD_IO = ThreadType::THREAD_CHILD_IO; + static const ThreadType THREAD_BROWSER_IO = ThreadType::THREAD_BROWSER_IO; + static const ThreadType THREAD_BROWSER_MAIN = ThreadType::THREAD_BROWSER_MAIN; + static const ThreadType THREAD_RENDERER_MAIN = ThreadType::THREAD_RENDERER_MAIN; + static const ThreadType THREAD_UTILITY_MAIN = ThreadType::THREAD_UTILITY_MAIN; + static const ThreadType THREAD_GPU_MAIN = ThreadType::THREAD_GPU_MAIN; + static const ThreadType THREAD_CACHE_BLOCKFILE = ThreadType::THREAD_CACHE_BLOCKFILE; + static const ThreadType THREAD_MEDIA = ThreadType::THREAD_MEDIA; + static const ThreadType THREAD_AUDIO_OUTPUTDEVICE = ThreadType::THREAD_AUDIO_OUTPUTDEVICE; + static const ThreadType THREAD_AUDIO_INPUTDEVICE = ThreadType::THREAD_AUDIO_INPUTDEVICE; + static const ThreadType THREAD_GPU_MEMORY = ThreadType::THREAD_GPU_MEMORY; + static const ThreadType THREAD_GPU_VSYNC = ThreadType::THREAD_GPU_VSYNC; + static const ThreadType THREAD_DXA_VIDEODECODER = ThreadType::THREAD_DXA_VIDEODECODER; + static const ThreadType THREAD_BROWSER_WATCHDOG = ThreadType::THREAD_BROWSER_WATCHDOG; + static const ThreadType THREAD_WEBRTC_NETWORK = ThreadType::THREAD_WEBRTC_NETWORK; + static const ThreadType THREAD_WINDOW_OWNER = ThreadType::THREAD_WINDOW_OWNER; + static const ThreadType THREAD_WEBRTC_SIGNALING = ThreadType::THREAD_WEBRTC_SIGNALING; + static const ThreadType THREAD_WEBRTC_WORKER = ThreadType::THREAD_WEBRTC_WORKER; + static const ThreadType THREAD_PPAPI_MAIN = ThreadType::THREAD_PPAPI_MAIN; + static const ThreadType THREAD_GPU_WATCHDOG = ThreadType::THREAD_GPU_WATCHDOG; + static const ThreadType THREAD_SWAPPER = ThreadType::THREAD_SWAPPER; + static const ThreadType THREAD_GAMEPAD_POLLING = ThreadType::THREAD_GAMEPAD_POLLING; + static const ThreadType THREAD_WEBCRYPTO = ThreadType::THREAD_WEBCRYPTO; + static const ThreadType THREAD_DATABASE = ThreadType::THREAD_DATABASE; + static const ThreadType THREAD_PROXYRESOLVER = ThreadType::THREAD_PROXYRESOLVER; + static const ThreadType THREAD_DEVTOOLSADB = ThreadType::THREAD_DEVTOOLSADB; + static const ThreadType THREAD_NETWORKCONFIGWATCHER = ThreadType::THREAD_NETWORKCONFIGWATCHER; + static const ThreadType THREAD_WASAPI_RENDER = ThreadType::THREAD_WASAPI_RENDER; + static const ThreadType THREAD_LOADER_LOCK_SAMPLER = ThreadType::THREAD_LOADER_LOCK_SAMPLER; + static const ThreadType THREAD_MEMORY_INFRA = ThreadType::THREAD_MEMORY_INFRA; + static const ThreadType THREAD_SAMPLING_PROFILER = ThreadType::THREAD_SAMPLING_PROFILER; using FieldMetadata_ThreadType = ::protozero::proto_utils::FieldMetadata< @@ -125539,14 +123417,7 @@ class ChromeThreadDescriptor : public ::protozero::Message { ::perfetto::protos::pbzero::ChromeThreadDescriptor_ThreadType, ChromeThreadDescriptor>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ThreadType kThreadType() { return {}; } + static constexpr FieldMetadata_ThreadType kThreadType{}; void set_thread_type(::perfetto::protos::pbzero::ChromeThreadDescriptor_ThreadType value) { static constexpr uint32_t field_id = FieldMetadata_ThreadType::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -125564,14 +123435,7 @@ class ChromeThreadDescriptor : public ::protozero::Message { int32_t, ChromeThreadDescriptor>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_LegacySortIndex kLegacySortIndex() { return {}; } + static constexpr FieldMetadata_LegacySortIndex kLegacySortIndex{}; void set_legacy_sort_index(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_LegacySortIndex::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -125635,17 +123499,13 @@ class ChromeUserEvent : public ::protozero::Message { std::string, ChromeUserEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Action kAction() { return {}; } + static constexpr FieldMetadata_Action kAction{}; void set_action(const char* data, size_t size) { AppendBytes(FieldMetadata_Action::kFieldId, data, size); } + void set_action(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Action::kFieldId, chars.data, chars.size); + } void set_action(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Action::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -125663,14 +123523,7 @@ class ChromeUserEvent : public ::protozero::Message { uint64_t, ChromeUserEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ActionHash kActionHash() { return {}; } + static constexpr FieldMetadata_ActionHash kActionHash{}; void set_action_hash(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_ActionHash::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -125737,14 +123590,7 @@ class ChromeWindowHandleEventInfo : public ::protozero::Message { uint32_t, ChromeWindowHandleEventInfo>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Dpi kDpi() { return {}; } + static constexpr FieldMetadata_Dpi kDpi{}; void set_dpi(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Dpi::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -125762,14 +123608,7 @@ class ChromeWindowHandleEventInfo : public ::protozero::Message { uint32_t, ChromeWindowHandleEventInfo>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_MessageId kMessageId() { return {}; } + static constexpr FieldMetadata_MessageId kMessageId{}; void set_message_id(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_MessageId::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -125787,14 +123626,7 @@ class ChromeWindowHandleEventInfo : public ::protozero::Message { uint64_t, ChromeWindowHandleEventInfo>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_HwndPtr kHwndPtr() { return {}; } + static constexpr FieldMetadata_HwndPtr kHwndPtr{}; void set_hwnd_ptr(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_HwndPtr::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -125828,27 +123660,76 @@ namespace perfetto { namespace protos { namespace pbzero { -enum CounterDescriptor_BuiltinCounterType : int32_t; -enum CounterDescriptor_Unit : int32_t; +namespace perfetto_pbzero_enum_CounterDescriptor { +enum BuiltinCounterType : int32_t; +} // namespace perfetto_pbzero_enum_CounterDescriptor +using CounterDescriptor_BuiltinCounterType = perfetto_pbzero_enum_CounterDescriptor::BuiltinCounterType; +namespace perfetto_pbzero_enum_CounterDescriptor { +enum Unit : int32_t; +} // namespace perfetto_pbzero_enum_CounterDescriptor +using CounterDescriptor_Unit = perfetto_pbzero_enum_CounterDescriptor::Unit; -enum CounterDescriptor_BuiltinCounterType : int32_t { - CounterDescriptor_BuiltinCounterType_COUNTER_UNSPECIFIED = 0, - CounterDescriptor_BuiltinCounterType_COUNTER_THREAD_TIME_NS = 1, - CounterDescriptor_BuiltinCounterType_COUNTER_THREAD_INSTRUCTION_COUNT = 2, +namespace perfetto_pbzero_enum_CounterDescriptor { +enum BuiltinCounterType : int32_t { + COUNTER_UNSPECIFIED = 0, + COUNTER_THREAD_TIME_NS = 1, + COUNTER_THREAD_INSTRUCTION_COUNT = 2, }; +} // namespace perfetto_pbzero_enum_CounterDescriptor +using CounterDescriptor_BuiltinCounterType = perfetto_pbzero_enum_CounterDescriptor::BuiltinCounterType; -const CounterDescriptor_BuiltinCounterType CounterDescriptor_BuiltinCounterType_MIN = CounterDescriptor_BuiltinCounterType_COUNTER_UNSPECIFIED; -const CounterDescriptor_BuiltinCounterType CounterDescriptor_BuiltinCounterType_MAX = CounterDescriptor_BuiltinCounterType_COUNTER_THREAD_INSTRUCTION_COUNT; -enum CounterDescriptor_Unit : int32_t { - CounterDescriptor_Unit_UNIT_UNSPECIFIED = 0, - CounterDescriptor_Unit_UNIT_TIME_NS = 1, - CounterDescriptor_Unit_UNIT_COUNT = 2, - CounterDescriptor_Unit_UNIT_SIZE_BYTES = 3, +constexpr CounterDescriptor_BuiltinCounterType CounterDescriptor_BuiltinCounterType_MIN = CounterDescriptor_BuiltinCounterType::COUNTER_UNSPECIFIED; +constexpr CounterDescriptor_BuiltinCounterType CounterDescriptor_BuiltinCounterType_MAX = CounterDescriptor_BuiltinCounterType::COUNTER_THREAD_INSTRUCTION_COUNT; + + +PERFETTO_PROTOZERO_CONSTEXPR14_OR_INLINE +const char* CounterDescriptor_BuiltinCounterType_Name(::perfetto::protos::pbzero::CounterDescriptor_BuiltinCounterType value) { + switch (value) { + case ::perfetto::protos::pbzero::CounterDescriptor_BuiltinCounterType::COUNTER_UNSPECIFIED: + return "COUNTER_UNSPECIFIED"; + + case ::perfetto::protos::pbzero::CounterDescriptor_BuiltinCounterType::COUNTER_THREAD_TIME_NS: + return "COUNTER_THREAD_TIME_NS"; + + case ::perfetto::protos::pbzero::CounterDescriptor_BuiltinCounterType::COUNTER_THREAD_INSTRUCTION_COUNT: + return "COUNTER_THREAD_INSTRUCTION_COUNT"; + } + return "PBZERO_UNKNOWN_ENUM_VALUE"; +} + +namespace perfetto_pbzero_enum_CounterDescriptor { +enum Unit : int32_t { + UNIT_UNSPECIFIED = 0, + UNIT_TIME_NS = 1, + UNIT_COUNT = 2, + UNIT_SIZE_BYTES = 3, }; +} // namespace perfetto_pbzero_enum_CounterDescriptor +using CounterDescriptor_Unit = perfetto_pbzero_enum_CounterDescriptor::Unit; -const CounterDescriptor_Unit CounterDescriptor_Unit_MIN = CounterDescriptor_Unit_UNIT_UNSPECIFIED; -const CounterDescriptor_Unit CounterDescriptor_Unit_MAX = CounterDescriptor_Unit_UNIT_SIZE_BYTES; + +constexpr CounterDescriptor_Unit CounterDescriptor_Unit_MIN = CounterDescriptor_Unit::UNIT_UNSPECIFIED; +constexpr CounterDescriptor_Unit CounterDescriptor_Unit_MAX = CounterDescriptor_Unit::UNIT_SIZE_BYTES; + + +PERFETTO_PROTOZERO_CONSTEXPR14_OR_INLINE +const char* CounterDescriptor_Unit_Name(::perfetto::protos::pbzero::CounterDescriptor_Unit value) { + switch (value) { + case ::perfetto::protos::pbzero::CounterDescriptor_Unit::UNIT_UNSPECIFIED: + return "UNIT_UNSPECIFIED"; + + case ::perfetto::protos::pbzero::CounterDescriptor_Unit::UNIT_TIME_NS: + return "UNIT_TIME_NS"; + + case ::perfetto::protos::pbzero::CounterDescriptor_Unit::UNIT_COUNT: + return "UNIT_COUNT"; + + case ::perfetto::protos::pbzero::CounterDescriptor_Unit::UNIT_SIZE_BYTES: + return "UNIT_SIZE_BYTES"; + } + return "PBZERO_UNKNOWN_ENUM_VALUE"; +} class CounterDescriptor_Decoder : public ::protozero::TypedProtoDecoder { public: @@ -125882,15 +123763,23 @@ class CounterDescriptor : public ::protozero::Message { }; static constexpr const char* GetName() { return ".perfetto.protos.CounterDescriptor"; } + using BuiltinCounterType = ::perfetto::protos::pbzero::CounterDescriptor_BuiltinCounterType; + static inline const char* BuiltinCounterType_Name(BuiltinCounterType value) { + return ::perfetto::protos::pbzero::CounterDescriptor_BuiltinCounterType_Name(value); + } + using Unit = ::perfetto::protos::pbzero::CounterDescriptor_Unit; - static const BuiltinCounterType COUNTER_UNSPECIFIED = CounterDescriptor_BuiltinCounterType_COUNTER_UNSPECIFIED; - static const BuiltinCounterType COUNTER_THREAD_TIME_NS = CounterDescriptor_BuiltinCounterType_COUNTER_THREAD_TIME_NS; - static const BuiltinCounterType COUNTER_THREAD_INSTRUCTION_COUNT = CounterDescriptor_BuiltinCounterType_COUNTER_THREAD_INSTRUCTION_COUNT; - static const Unit UNIT_UNSPECIFIED = CounterDescriptor_Unit_UNIT_UNSPECIFIED; - static const Unit UNIT_TIME_NS = CounterDescriptor_Unit_UNIT_TIME_NS; - static const Unit UNIT_COUNT = CounterDescriptor_Unit_UNIT_COUNT; - static const Unit UNIT_SIZE_BYTES = CounterDescriptor_Unit_UNIT_SIZE_BYTES; + static inline const char* Unit_Name(Unit value) { + return ::perfetto::protos::pbzero::CounterDescriptor_Unit_Name(value); + } + static const BuiltinCounterType COUNTER_UNSPECIFIED = BuiltinCounterType::COUNTER_UNSPECIFIED; + static const BuiltinCounterType COUNTER_THREAD_TIME_NS = BuiltinCounterType::COUNTER_THREAD_TIME_NS; + static const BuiltinCounterType COUNTER_THREAD_INSTRUCTION_COUNT = BuiltinCounterType::COUNTER_THREAD_INSTRUCTION_COUNT; + static const Unit UNIT_UNSPECIFIED = Unit::UNIT_UNSPECIFIED; + static const Unit UNIT_TIME_NS = Unit::UNIT_TIME_NS; + static const Unit UNIT_COUNT = Unit::UNIT_COUNT; + static const Unit UNIT_SIZE_BYTES = Unit::UNIT_SIZE_BYTES; using FieldMetadata_Type = ::protozero::proto_utils::FieldMetadata< @@ -125900,14 +123789,7 @@ class CounterDescriptor : public ::protozero::Message { ::perfetto::protos::pbzero::CounterDescriptor_BuiltinCounterType, CounterDescriptor>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Type kType() { return {}; } + static constexpr FieldMetadata_Type kType{}; void set_type(::perfetto::protos::pbzero::CounterDescriptor_BuiltinCounterType value) { static constexpr uint32_t field_id = FieldMetadata_Type::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -125925,17 +123807,13 @@ class CounterDescriptor : public ::protozero::Message { std::string, CounterDescriptor>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Categories kCategories() { return {}; } + static constexpr FieldMetadata_Categories kCategories{}; void add_categories(const char* data, size_t size) { AppendBytes(FieldMetadata_Categories::kFieldId, data, size); } + void add_categories(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Categories::kFieldId, chars.data, chars.size); + } void add_categories(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Categories::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -125953,14 +123831,7 @@ class CounterDescriptor : public ::protozero::Message { ::perfetto::protos::pbzero::CounterDescriptor_Unit, CounterDescriptor>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Unit kUnit() { return {}; } + static constexpr FieldMetadata_Unit kUnit{}; void set_unit(::perfetto::protos::pbzero::CounterDescriptor_Unit value) { static constexpr uint32_t field_id = FieldMetadata_Unit::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -125978,17 +123849,13 @@ class CounterDescriptor : public ::protozero::Message { std::string, CounterDescriptor>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_UnitName kUnitName() { return {}; } + static constexpr FieldMetadata_UnitName kUnitName{}; void set_unit_name(const char* data, size_t size) { AppendBytes(FieldMetadata_UnitName::kFieldId, data, size); } + void set_unit_name(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_UnitName::kFieldId, chars.data, chars.size); + } void set_unit_name(std::string value) { static constexpr uint32_t field_id = FieldMetadata_UnitName::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -126006,14 +123873,7 @@ class CounterDescriptor : public ::protozero::Message { int64_t, CounterDescriptor>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_UnitMultiplier kUnitMultiplier() { return {}; } + static constexpr FieldMetadata_UnitMultiplier kUnitMultiplier{}; void set_unit_multiplier(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_UnitMultiplier::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -126031,14 +123891,7 @@ class CounterDescriptor : public ::protozero::Message { bool, CounterDescriptor>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_IsIncremental kIsIncremental() { return {}; } + static constexpr FieldMetadata_IsIncremental kIsIncremental{}; void set_is_incremental(bool value) { static constexpr uint32_t field_id = FieldMetadata_IsIncremental::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -126074,16 +123927,39 @@ namespace pbzero { class DebugAnnotation; class DebugAnnotation_NestedValue; -enum DebugAnnotation_NestedValue_NestedType : int32_t; +namespace perfetto_pbzero_enum_DebugAnnotation_NestedValue { +enum NestedType : int32_t; +} // namespace perfetto_pbzero_enum_DebugAnnotation_NestedValue +using DebugAnnotation_NestedValue_NestedType = perfetto_pbzero_enum_DebugAnnotation_NestedValue::NestedType; -enum DebugAnnotation_NestedValue_NestedType : int32_t { - DebugAnnotation_NestedValue_NestedType_UNSPECIFIED = 0, - DebugAnnotation_NestedValue_NestedType_DICT = 1, - DebugAnnotation_NestedValue_NestedType_ARRAY = 2, +namespace perfetto_pbzero_enum_DebugAnnotation_NestedValue { +enum NestedType : int32_t { + UNSPECIFIED = 0, + DICT = 1, + ARRAY = 2, }; +} // namespace perfetto_pbzero_enum_DebugAnnotation_NestedValue +using DebugAnnotation_NestedValue_NestedType = perfetto_pbzero_enum_DebugAnnotation_NestedValue::NestedType; -const DebugAnnotation_NestedValue_NestedType DebugAnnotation_NestedValue_NestedType_MIN = DebugAnnotation_NestedValue_NestedType_UNSPECIFIED; -const DebugAnnotation_NestedValue_NestedType DebugAnnotation_NestedValue_NestedType_MAX = DebugAnnotation_NestedValue_NestedType_ARRAY; + +constexpr DebugAnnotation_NestedValue_NestedType DebugAnnotation_NestedValue_NestedType_MIN = DebugAnnotation_NestedValue_NestedType::UNSPECIFIED; +constexpr DebugAnnotation_NestedValue_NestedType DebugAnnotation_NestedValue_NestedType_MAX = DebugAnnotation_NestedValue_NestedType::ARRAY; + + +PERFETTO_PROTOZERO_CONSTEXPR14_OR_INLINE +const char* DebugAnnotation_NestedValue_NestedType_Name(::perfetto::protos::pbzero::DebugAnnotation_NestedValue_NestedType value) { + switch (value) { + case ::perfetto::protos::pbzero::DebugAnnotation_NestedValue_NestedType::UNSPECIFIED: + return "UNSPECIFIED"; + + case ::perfetto::protos::pbzero::DebugAnnotation_NestedValue_NestedType::DICT: + return "DICT"; + + case ::perfetto::protos::pbzero::DebugAnnotation_NestedValue_NestedType::ARRAY: + return "ARRAY"; + } + return "PBZERO_UNKNOWN_ENUM_VALUE"; +} class DebugAnnotationValueTypeName_Decoder : public ::protozero::TypedProtoDecoder { public: @@ -126114,14 +123990,7 @@ class DebugAnnotationValueTypeName : public ::protozero::Message { uint64_t, DebugAnnotationValueTypeName>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Iid kIid() { return {}; } + static constexpr FieldMetadata_Iid kIid{}; void set_iid(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Iid::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -126139,17 +124008,13 @@ class DebugAnnotationValueTypeName : public ::protozero::Message { std::string, DebugAnnotationValueTypeName>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Name kName() { return {}; } + static constexpr FieldMetadata_Name kName{}; void set_name(const char* data, size_t size) { AppendBytes(FieldMetadata_Name::kFieldId, data, size); } + void set_name(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Name::kFieldId, chars.data, chars.size); + } void set_name(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Name::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -126189,14 +124054,7 @@ class DebugAnnotationName : public ::protozero::Message { uint64_t, DebugAnnotationName>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Iid kIid() { return {}; } + static constexpr FieldMetadata_Iid kIid{}; void set_iid(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Iid::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -126214,17 +124072,13 @@ class DebugAnnotationName : public ::protozero::Message { std::string, DebugAnnotationName>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Name kName() { return {}; } + static constexpr FieldMetadata_Name kName{}; void set_name(const char* data, size_t size) { AppendBytes(FieldMetadata_Name::kFieldId, data, size); } + void set_name(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Name::kFieldId, chars.data, chars.size); + } void set_name(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Name::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -126235,7 +124089,7 @@ class DebugAnnotationName : public ::protozero::Message { } }; -class DebugAnnotation_Decoder : public ::protozero::TypedProtoDecoder { +class DebugAnnotation_Decoder : public ::protozero::TypedProtoDecoder { public: DebugAnnotation_Decoder(const uint8_t* data, size_t len) : TypedProtoDecoder(data, len) {} explicit DebugAnnotation_Decoder(const std::string& raw) : TypedProtoDecoder(reinterpret_cast(raw.data()), raw.size()) {} @@ -126252,14 +124106,16 @@ class DebugAnnotation_Decoder : public ::protozero::TypedProtoDecoder().as_int64(); } bool has_double_value() const { return at<5>().valid(); } double double_value() const { return at<5>().as_double(); } - bool has_string_value() const { return at<6>().valid(); } - ::protozero::ConstChars string_value() const { return at<6>().as_string(); } bool has_pointer_value() const { return at<7>().valid(); } uint64_t pointer_value() const { return at<7>().as_uint64(); } bool has_nested_value() const { return at<8>().valid(); } ::protozero::ConstBytes nested_value() const { return at<8>().as_bytes(); } bool has_legacy_json_value() const { return at<9>().valid(); } ::protozero::ConstChars legacy_json_value() const { return at<9>().as_string(); } + bool has_string_value() const { return at<6>().valid(); } + ::protozero::ConstChars string_value() const { return at<6>().as_string(); } + bool has_string_value_iid() const { return at<17>().valid(); } + uint64_t string_value_iid() const { return at<17>().as_uint64(); } bool has_proto_type_name() const { return at<16>().valid(); } ::protozero::ConstChars proto_type_name() const { return at<16>().as_string(); } bool has_proto_type_name_iid() const { return at<13>().valid(); } @@ -126282,10 +124138,11 @@ class DebugAnnotation : public ::protozero::Message { kUintValueFieldNumber = 3, kIntValueFieldNumber = 4, kDoubleValueFieldNumber = 5, - kStringValueFieldNumber = 6, kPointerValueFieldNumber = 7, kNestedValueFieldNumber = 8, kLegacyJsonValueFieldNumber = 9, + kStringValueFieldNumber = 6, + kStringValueIidFieldNumber = 17, kProtoTypeNameFieldNumber = 16, kProtoTypeNameIidFieldNumber = 13, kProtoValueFieldNumber = 14, @@ -126304,14 +124161,7 @@ class DebugAnnotation : public ::protozero::Message { uint64_t, DebugAnnotation>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_NameIid kNameIid() { return {}; } + static constexpr FieldMetadata_NameIid kNameIid{}; void set_name_iid(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_NameIid::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -126329,17 +124179,13 @@ class DebugAnnotation : public ::protozero::Message { std::string, DebugAnnotation>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Name kName() { return {}; } + static constexpr FieldMetadata_Name kName{}; void set_name(const char* data, size_t size) { AppendBytes(FieldMetadata_Name::kFieldId, data, size); } + void set_name(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Name::kFieldId, chars.data, chars.size); + } void set_name(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Name::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -126357,14 +124203,7 @@ class DebugAnnotation : public ::protozero::Message { bool, DebugAnnotation>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_BoolValue kBoolValue() { return {}; } + static constexpr FieldMetadata_BoolValue kBoolValue{}; void set_bool_value(bool value) { static constexpr uint32_t field_id = FieldMetadata_BoolValue::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -126382,14 +124221,7 @@ class DebugAnnotation : public ::protozero::Message { uint64_t, DebugAnnotation>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_UintValue kUintValue() { return {}; } + static constexpr FieldMetadata_UintValue kUintValue{}; void set_uint_value(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_UintValue::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -126407,14 +124239,7 @@ class DebugAnnotation : public ::protozero::Message { int64_t, DebugAnnotation>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_IntValue kIntValue() { return {}; } + static constexpr FieldMetadata_IntValue kIntValue{}; void set_int_value(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_IntValue::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -126432,14 +124257,7 @@ class DebugAnnotation : public ::protozero::Message { double, DebugAnnotation>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_DoubleValue kDoubleValue() { return {}; } + static constexpr FieldMetadata_DoubleValue kDoubleValue{}; void set_double_value(double value) { static constexpr uint32_t field_id = FieldMetadata_DoubleValue::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -126449,34 +124267,6 @@ class DebugAnnotation : public ::protozero::Message { ::Append(*this, field_id, value); } - using FieldMetadata_StringValue = - ::protozero::proto_utils::FieldMetadata< - 6, - ::protozero::proto_utils::RepetitionType::kNotRepeated, - ::protozero::proto_utils::ProtoSchemaType::kString, - std::string, - DebugAnnotation>; - - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_StringValue kStringValue() { return {}; } - void set_string_value(const char* data, size_t size) { - AppendBytes(FieldMetadata_StringValue::kFieldId, data, size); - } - void set_string_value(std::string value) { - static constexpr uint32_t field_id = FieldMetadata_StringValue::kFieldId; - // Call the appropriate protozero::Message::Append(field_id, ...) - // method based on the type of the field. - ::protozero::internal::FieldWriter< - ::protozero::proto_utils::ProtoSchemaType::kString> - ::Append(*this, field_id, value); - } - using FieldMetadata_PointerValue = ::protozero::proto_utils::FieldMetadata< 7, @@ -126485,14 +124275,7 @@ class DebugAnnotation : public ::protozero::Message { uint64_t, DebugAnnotation>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_PointerValue kPointerValue() { return {}; } + static constexpr FieldMetadata_PointerValue kPointerValue{}; void set_pointer_value(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_PointerValue::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -126510,14 +124293,7 @@ class DebugAnnotation : public ::protozero::Message { DebugAnnotation_NestedValue, DebugAnnotation>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_NestedValue kNestedValue() { return {}; } + static constexpr FieldMetadata_NestedValue kNestedValue{}; template T* set_nested_value() { return BeginNestedMessage(8); } @@ -126531,17 +124307,13 @@ class DebugAnnotation : public ::protozero::Message { std::string, DebugAnnotation>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_LegacyJsonValue kLegacyJsonValue() { return {}; } + static constexpr FieldMetadata_LegacyJsonValue kLegacyJsonValue{}; void set_legacy_json_value(const char* data, size_t size) { AppendBytes(FieldMetadata_LegacyJsonValue::kFieldId, data, size); } + void set_legacy_json_value(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_LegacyJsonValue::kFieldId, chars.data, chars.size); + } void set_legacy_json_value(std::string value) { static constexpr uint32_t field_id = FieldMetadata_LegacyJsonValue::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -126551,6 +124323,48 @@ class DebugAnnotation : public ::protozero::Message { ::Append(*this, field_id, value); } + using FieldMetadata_StringValue = + ::protozero::proto_utils::FieldMetadata< + 6, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kString, + std::string, + DebugAnnotation>; + + static constexpr FieldMetadata_StringValue kStringValue{}; + void set_string_value(const char* data, size_t size) { + AppendBytes(FieldMetadata_StringValue::kFieldId, data, size); + } + void set_string_value(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_StringValue::kFieldId, chars.data, chars.size); + } + void set_string_value(std::string value) { + static constexpr uint32_t field_id = FieldMetadata_StringValue::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kString> + ::Append(*this, field_id, value); + } + + using FieldMetadata_StringValueIid = + ::protozero::proto_utils::FieldMetadata< + 17, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint64, + uint64_t, + DebugAnnotation>; + + static constexpr FieldMetadata_StringValueIid kStringValueIid{}; + void set_string_value_iid(uint64_t value) { + static constexpr uint32_t field_id = FieldMetadata_StringValueIid::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint64> + ::Append(*this, field_id, value); + } + using FieldMetadata_ProtoTypeName = ::protozero::proto_utils::FieldMetadata< 16, @@ -126559,17 +124373,13 @@ class DebugAnnotation : public ::protozero::Message { std::string, DebugAnnotation>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ProtoTypeName kProtoTypeName() { return {}; } + static constexpr FieldMetadata_ProtoTypeName kProtoTypeName{}; void set_proto_type_name(const char* data, size_t size) { AppendBytes(FieldMetadata_ProtoTypeName::kFieldId, data, size); } + void set_proto_type_name(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_ProtoTypeName::kFieldId, chars.data, chars.size); + } void set_proto_type_name(std::string value) { static constexpr uint32_t field_id = FieldMetadata_ProtoTypeName::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -126587,14 +124397,7 @@ class DebugAnnotation : public ::protozero::Message { uint64_t, DebugAnnotation>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ProtoTypeNameIid kProtoTypeNameIid() { return {}; } + static constexpr FieldMetadata_ProtoTypeNameIid kProtoTypeNameIid{}; void set_proto_type_name_iid(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_ProtoTypeNameIid::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -126612,17 +124415,13 @@ class DebugAnnotation : public ::protozero::Message { std::string, DebugAnnotation>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ProtoValue kProtoValue() { return {}; } + static constexpr FieldMetadata_ProtoValue kProtoValue{}; void set_proto_value(const uint8_t* data, size_t size) { AppendBytes(FieldMetadata_ProtoValue::kFieldId, data, size); } + void set_proto_value(::protozero::ConstBytes bytes) { + AppendBytes(FieldMetadata_ProtoValue::kFieldId, bytes.data, bytes.size); + } void set_proto_value(std::string value) { static constexpr uint32_t field_id = FieldMetadata_ProtoValue::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -126640,14 +124439,7 @@ class DebugAnnotation : public ::protozero::Message { DebugAnnotation, DebugAnnotation>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_DictEntries kDictEntries() { return {}; } + static constexpr FieldMetadata_DictEntries kDictEntries{}; template T* add_dict_entries() { return BeginNestedMessage(11); } @@ -126661,14 +124453,7 @@ class DebugAnnotation : public ::protozero::Message { DebugAnnotation, DebugAnnotation>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ArrayValues kArrayValues() { return {}; } + static constexpr FieldMetadata_ArrayValues kArrayValues{}; template T* add_array_values() { return BeginNestedMessage(12); } @@ -126713,10 +124498,14 @@ class DebugAnnotation_NestedValue : public ::protozero::Message { }; static constexpr const char* GetName() { return ".perfetto.protos.DebugAnnotation.NestedValue"; } + using NestedType = ::perfetto::protos::pbzero::DebugAnnotation_NestedValue_NestedType; - static const NestedType UNSPECIFIED = DebugAnnotation_NestedValue_NestedType_UNSPECIFIED; - static const NestedType DICT = DebugAnnotation_NestedValue_NestedType_DICT; - static const NestedType ARRAY = DebugAnnotation_NestedValue_NestedType_ARRAY; + static inline const char* NestedType_Name(NestedType value) { + return ::perfetto::protos::pbzero::DebugAnnotation_NestedValue_NestedType_Name(value); + } + static const NestedType UNSPECIFIED = NestedType::UNSPECIFIED; + static const NestedType DICT = NestedType::DICT; + static const NestedType ARRAY = NestedType::ARRAY; using FieldMetadata_NestedType = ::protozero::proto_utils::FieldMetadata< @@ -126726,14 +124515,7 @@ class DebugAnnotation_NestedValue : public ::protozero::Message { ::perfetto::protos::pbzero::DebugAnnotation_NestedValue_NestedType, DebugAnnotation_NestedValue>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_NestedType kNestedType() { return {}; } + static constexpr FieldMetadata_NestedType kNestedType{}; void set_nested_type(::perfetto::protos::pbzero::DebugAnnotation_NestedValue_NestedType value) { static constexpr uint32_t field_id = FieldMetadata_NestedType::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -126751,17 +124533,13 @@ class DebugAnnotation_NestedValue : public ::protozero::Message { std::string, DebugAnnotation_NestedValue>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_DictKeys kDictKeys() { return {}; } + static constexpr FieldMetadata_DictKeys kDictKeys{}; void add_dict_keys(const char* data, size_t size) { AppendBytes(FieldMetadata_DictKeys::kFieldId, data, size); } + void add_dict_keys(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_DictKeys::kFieldId, chars.data, chars.size); + } void add_dict_keys(std::string value) { static constexpr uint32_t field_id = FieldMetadata_DictKeys::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -126779,14 +124557,7 @@ class DebugAnnotation_NestedValue : public ::protozero::Message { DebugAnnotation_NestedValue, DebugAnnotation_NestedValue>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_DictValues kDictValues() { return {}; } + static constexpr FieldMetadata_DictValues kDictValues{}; template T* add_dict_values() { return BeginNestedMessage(3); } @@ -126800,14 +124571,7 @@ class DebugAnnotation_NestedValue : public ::protozero::Message { DebugAnnotation_NestedValue, DebugAnnotation_NestedValue>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ArrayValues kArrayValues() { return {}; } + static constexpr FieldMetadata_ArrayValues kArrayValues{}; template T* add_array_values() { return BeginNestedMessage(4); } @@ -126821,14 +124585,7 @@ class DebugAnnotation_NestedValue : public ::protozero::Message { int64_t, DebugAnnotation_NestedValue>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_IntValue kIntValue() { return {}; } + static constexpr FieldMetadata_IntValue kIntValue{}; void set_int_value(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_IntValue::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -126846,14 +124603,7 @@ class DebugAnnotation_NestedValue : public ::protozero::Message { double, DebugAnnotation_NestedValue>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_DoubleValue kDoubleValue() { return {}; } + static constexpr FieldMetadata_DoubleValue kDoubleValue{}; void set_double_value(double value) { static constexpr uint32_t field_id = FieldMetadata_DoubleValue::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -126871,14 +124621,7 @@ class DebugAnnotation_NestedValue : public ::protozero::Message { bool, DebugAnnotation_NestedValue>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_BoolValue kBoolValue() { return {}; } + static constexpr FieldMetadata_BoolValue kBoolValue{}; void set_bool_value(bool value) { static constexpr uint32_t field_id = FieldMetadata_BoolValue::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -126896,17 +124639,13 @@ class DebugAnnotation_NestedValue : public ::protozero::Message { std::string, DebugAnnotation_NestedValue>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_StringValue kStringValue() { return {}; } + static constexpr FieldMetadata_StringValue kStringValue{}; void set_string_value(const char* data, size_t size) { AppendBytes(FieldMetadata_StringValue::kFieldId, data, size); } + void set_string_value(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_StringValue::kFieldId, chars.data, chars.size); + } void set_string_value(std::string value) { static constexpr uint32_t field_id = FieldMetadata_StringValue::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -126970,14 +124709,7 @@ class LogMessageBody : public ::protozero::Message { uint64_t, LogMessageBody>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Iid kIid() { return {}; } + static constexpr FieldMetadata_Iid kIid{}; void set_iid(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Iid::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -126995,17 +124727,13 @@ class LogMessageBody : public ::protozero::Message { std::string, LogMessageBody>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Body kBody() { return {}; } + static constexpr FieldMetadata_Body kBody{}; void set_body(const char* data, size_t size) { AppendBytes(FieldMetadata_Body::kFieldId, data, size); } + void set_body(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Body::kFieldId, chars.data, chars.size); + } void set_body(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Body::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -127045,14 +124773,7 @@ class LogMessage : public ::protozero::Message { uint64_t, LogMessage>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_SourceLocationIid kSourceLocationIid() { return {}; } + static constexpr FieldMetadata_SourceLocationIid kSourceLocationIid{}; void set_source_location_iid(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_SourceLocationIid::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -127070,14 +124791,7 @@ class LogMessage : public ::protozero::Message { uint64_t, LogMessage>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_BodyIid kBodyIid() { return {}; } + static constexpr FieldMetadata_BodyIid kBodyIid{}; void set_body_iid(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_BodyIid::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -127111,22 +124825,63 @@ namespace perfetto { namespace protos { namespace pbzero { -enum ProcessDescriptor_ChromeProcessType : int32_t; +namespace perfetto_pbzero_enum_ProcessDescriptor { +enum ChromeProcessType : int32_t; +} // namespace perfetto_pbzero_enum_ProcessDescriptor +using ProcessDescriptor_ChromeProcessType = perfetto_pbzero_enum_ProcessDescriptor::ChromeProcessType; -enum ProcessDescriptor_ChromeProcessType : int32_t { - ProcessDescriptor_ChromeProcessType_PROCESS_UNSPECIFIED = 0, - ProcessDescriptor_ChromeProcessType_PROCESS_BROWSER = 1, - ProcessDescriptor_ChromeProcessType_PROCESS_RENDERER = 2, - ProcessDescriptor_ChromeProcessType_PROCESS_UTILITY = 3, - ProcessDescriptor_ChromeProcessType_PROCESS_ZYGOTE = 4, - ProcessDescriptor_ChromeProcessType_PROCESS_SANDBOX_HELPER = 5, - ProcessDescriptor_ChromeProcessType_PROCESS_GPU = 6, - ProcessDescriptor_ChromeProcessType_PROCESS_PPAPI_PLUGIN = 7, - ProcessDescriptor_ChromeProcessType_PROCESS_PPAPI_BROKER = 8, +namespace perfetto_pbzero_enum_ProcessDescriptor { +enum ChromeProcessType : int32_t { + PROCESS_UNSPECIFIED = 0, + PROCESS_BROWSER = 1, + PROCESS_RENDERER = 2, + PROCESS_UTILITY = 3, + PROCESS_ZYGOTE = 4, + PROCESS_SANDBOX_HELPER = 5, + PROCESS_GPU = 6, + PROCESS_PPAPI_PLUGIN = 7, + PROCESS_PPAPI_BROKER = 8, }; +} // namespace perfetto_pbzero_enum_ProcessDescriptor +using ProcessDescriptor_ChromeProcessType = perfetto_pbzero_enum_ProcessDescriptor::ChromeProcessType; -const ProcessDescriptor_ChromeProcessType ProcessDescriptor_ChromeProcessType_MIN = ProcessDescriptor_ChromeProcessType_PROCESS_UNSPECIFIED; -const ProcessDescriptor_ChromeProcessType ProcessDescriptor_ChromeProcessType_MAX = ProcessDescriptor_ChromeProcessType_PROCESS_PPAPI_BROKER; + +constexpr ProcessDescriptor_ChromeProcessType ProcessDescriptor_ChromeProcessType_MIN = ProcessDescriptor_ChromeProcessType::PROCESS_UNSPECIFIED; +constexpr ProcessDescriptor_ChromeProcessType ProcessDescriptor_ChromeProcessType_MAX = ProcessDescriptor_ChromeProcessType::PROCESS_PPAPI_BROKER; + + +PERFETTO_PROTOZERO_CONSTEXPR14_OR_INLINE +const char* ProcessDescriptor_ChromeProcessType_Name(::perfetto::protos::pbzero::ProcessDescriptor_ChromeProcessType value) { + switch (value) { + case ::perfetto::protos::pbzero::ProcessDescriptor_ChromeProcessType::PROCESS_UNSPECIFIED: + return "PROCESS_UNSPECIFIED"; + + case ::perfetto::protos::pbzero::ProcessDescriptor_ChromeProcessType::PROCESS_BROWSER: + return "PROCESS_BROWSER"; + + case ::perfetto::protos::pbzero::ProcessDescriptor_ChromeProcessType::PROCESS_RENDERER: + return "PROCESS_RENDERER"; + + case ::perfetto::protos::pbzero::ProcessDescriptor_ChromeProcessType::PROCESS_UTILITY: + return "PROCESS_UTILITY"; + + case ::perfetto::protos::pbzero::ProcessDescriptor_ChromeProcessType::PROCESS_ZYGOTE: + return "PROCESS_ZYGOTE"; + + case ::perfetto::protos::pbzero::ProcessDescriptor_ChromeProcessType::PROCESS_SANDBOX_HELPER: + return "PROCESS_SANDBOX_HELPER"; + + case ::perfetto::protos::pbzero::ProcessDescriptor_ChromeProcessType::PROCESS_GPU: + return "PROCESS_GPU"; + + case ::perfetto::protos::pbzero::ProcessDescriptor_ChromeProcessType::PROCESS_PPAPI_PLUGIN: + return "PROCESS_PPAPI_PLUGIN"; + + case ::perfetto::protos::pbzero::ProcessDescriptor_ChromeProcessType::PROCESS_PPAPI_BROKER: + return "PROCESS_PPAPI_BROKER"; + } + return "PBZERO_UNKNOWN_ENUM_VALUE"; +} class ProcessDescriptor_Decoder : public ::protozero::TypedProtoDecoder { public: @@ -127166,16 +124921,20 @@ class ProcessDescriptor : public ::protozero::Message { }; static constexpr const char* GetName() { return ".perfetto.protos.ProcessDescriptor"; } + using ChromeProcessType = ::perfetto::protos::pbzero::ProcessDescriptor_ChromeProcessType; - static const ChromeProcessType PROCESS_UNSPECIFIED = ProcessDescriptor_ChromeProcessType_PROCESS_UNSPECIFIED; - static const ChromeProcessType PROCESS_BROWSER = ProcessDescriptor_ChromeProcessType_PROCESS_BROWSER; - static const ChromeProcessType PROCESS_RENDERER = ProcessDescriptor_ChromeProcessType_PROCESS_RENDERER; - static const ChromeProcessType PROCESS_UTILITY = ProcessDescriptor_ChromeProcessType_PROCESS_UTILITY; - static const ChromeProcessType PROCESS_ZYGOTE = ProcessDescriptor_ChromeProcessType_PROCESS_ZYGOTE; - static const ChromeProcessType PROCESS_SANDBOX_HELPER = ProcessDescriptor_ChromeProcessType_PROCESS_SANDBOX_HELPER; - static const ChromeProcessType PROCESS_GPU = ProcessDescriptor_ChromeProcessType_PROCESS_GPU; - static const ChromeProcessType PROCESS_PPAPI_PLUGIN = ProcessDescriptor_ChromeProcessType_PROCESS_PPAPI_PLUGIN; - static const ChromeProcessType PROCESS_PPAPI_BROKER = ProcessDescriptor_ChromeProcessType_PROCESS_PPAPI_BROKER; + static inline const char* ChromeProcessType_Name(ChromeProcessType value) { + return ::perfetto::protos::pbzero::ProcessDescriptor_ChromeProcessType_Name(value); + } + static const ChromeProcessType PROCESS_UNSPECIFIED = ChromeProcessType::PROCESS_UNSPECIFIED; + static const ChromeProcessType PROCESS_BROWSER = ChromeProcessType::PROCESS_BROWSER; + static const ChromeProcessType PROCESS_RENDERER = ChromeProcessType::PROCESS_RENDERER; + static const ChromeProcessType PROCESS_UTILITY = ChromeProcessType::PROCESS_UTILITY; + static const ChromeProcessType PROCESS_ZYGOTE = ChromeProcessType::PROCESS_ZYGOTE; + static const ChromeProcessType PROCESS_SANDBOX_HELPER = ChromeProcessType::PROCESS_SANDBOX_HELPER; + static const ChromeProcessType PROCESS_GPU = ChromeProcessType::PROCESS_GPU; + static const ChromeProcessType PROCESS_PPAPI_PLUGIN = ChromeProcessType::PROCESS_PPAPI_PLUGIN; + static const ChromeProcessType PROCESS_PPAPI_BROKER = ChromeProcessType::PROCESS_PPAPI_BROKER; using FieldMetadata_Pid = ::protozero::proto_utils::FieldMetadata< @@ -127185,14 +124944,7 @@ class ProcessDescriptor : public ::protozero::Message { int32_t, ProcessDescriptor>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Pid kPid() { return {}; } + static constexpr FieldMetadata_Pid kPid{}; void set_pid(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Pid::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -127210,17 +124962,13 @@ class ProcessDescriptor : public ::protozero::Message { std::string, ProcessDescriptor>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Cmdline kCmdline() { return {}; } + static constexpr FieldMetadata_Cmdline kCmdline{}; void add_cmdline(const char* data, size_t size) { AppendBytes(FieldMetadata_Cmdline::kFieldId, data, size); } + void add_cmdline(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Cmdline::kFieldId, chars.data, chars.size); + } void add_cmdline(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Cmdline::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -127238,17 +124986,13 @@ class ProcessDescriptor : public ::protozero::Message { std::string, ProcessDescriptor>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ProcessName kProcessName() { return {}; } + static constexpr FieldMetadata_ProcessName kProcessName{}; void set_process_name(const char* data, size_t size) { AppendBytes(FieldMetadata_ProcessName::kFieldId, data, size); } + void set_process_name(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_ProcessName::kFieldId, chars.data, chars.size); + } void set_process_name(std::string value) { static constexpr uint32_t field_id = FieldMetadata_ProcessName::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -127266,14 +125010,7 @@ class ProcessDescriptor : public ::protozero::Message { int32_t, ProcessDescriptor>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ProcessPriority kProcessPriority() { return {}; } + static constexpr FieldMetadata_ProcessPriority kProcessPriority{}; void set_process_priority(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_ProcessPriority::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -127291,14 +125028,7 @@ class ProcessDescriptor : public ::protozero::Message { int64_t, ProcessDescriptor>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_StartTimestampNs kStartTimestampNs() { return {}; } + static constexpr FieldMetadata_StartTimestampNs kStartTimestampNs{}; void set_start_timestamp_ns(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_StartTimestampNs::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -127316,14 +125046,7 @@ class ProcessDescriptor : public ::protozero::Message { ::perfetto::protos::pbzero::ProcessDescriptor_ChromeProcessType, ProcessDescriptor>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ChromeProcessType kChromeProcessType() { return {}; } + static constexpr FieldMetadata_ChromeProcessType kChromeProcessType{}; void set_chrome_process_type(::perfetto::protos::pbzero::ProcessDescriptor_ChromeProcessType value) { static constexpr uint32_t field_id = FieldMetadata_ChromeProcessType::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -127341,14 +125064,7 @@ class ProcessDescriptor : public ::protozero::Message { int32_t, ProcessDescriptor>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_LegacySortIndex kLegacySortIndex() { return {}; } + static constexpr FieldMetadata_LegacySortIndex kLegacySortIndex{}; void set_legacy_sort_index(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_LegacySortIndex::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -127366,17 +125082,13 @@ class ProcessDescriptor : public ::protozero::Message { std::string, ProcessDescriptor>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ProcessLabels kProcessLabels() { return {}; } + static constexpr FieldMetadata_ProcessLabels kProcessLabels{}; void add_process_labels(const char* data, size_t size) { AppendBytes(FieldMetadata_ProcessLabels::kFieldId, data, size); } + void add_process_labels(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_ProcessLabels::kFieldId, chars.data, chars.size); + } void add_process_labels(std::string value) { static constexpr uint32_t field_id = FieldMetadata_ProcessLabels::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -127387,6 +125099,67 @@ class ProcessDescriptor : public ::protozero::Message { } }; +} // Namespace. +} // Namespace. +} // Namespace. +#endif // Include guard. +// gen_amalgamated begin header: gen/protos/perfetto/trace/track_event/range_of_interest.pbzero.h +// Autogenerated by the ProtoZero compiler plugin. DO NOT EDIT. + +#ifndef PERFETTO_PROTOS_PROTOS_PERFETTO_TRACE_TRACK_EVENT_RANGE_OF_INTEREST_PROTO_H_ +#define PERFETTO_PROTOS_PROTOS_PERFETTO_TRACE_TRACK_EVENT_RANGE_OF_INTEREST_PROTO_H_ + +#include +#include + +// gen_amalgamated expanded: #include "perfetto/protozero/field_writer.h" +// gen_amalgamated expanded: #include "perfetto/protozero/message.h" +// gen_amalgamated expanded: #include "perfetto/protozero/packed_repeated_fields.h" +// gen_amalgamated expanded: #include "perfetto/protozero/proto_decoder.h" +// gen_amalgamated expanded: #include "perfetto/protozero/proto_utils.h" + +namespace perfetto { +namespace protos { +namespace pbzero { + + +class TrackEventRangeOfInterest_Decoder : public ::protozero::TypedProtoDecoder { + public: + TrackEventRangeOfInterest_Decoder(const uint8_t* data, size_t len) : TypedProtoDecoder(data, len) {} + explicit TrackEventRangeOfInterest_Decoder(const std::string& raw) : TypedProtoDecoder(reinterpret_cast(raw.data()), raw.size()) {} + explicit TrackEventRangeOfInterest_Decoder(const ::protozero::ConstBytes& raw) : TypedProtoDecoder(raw.data, raw.size) {} + bool has_start_us() const { return at<1>().valid(); } + int64_t start_us() const { return at<1>().as_int64(); } +}; + +class TrackEventRangeOfInterest : public ::protozero::Message { + public: + using Decoder = TrackEventRangeOfInterest_Decoder; + enum : int32_t { + kStartUsFieldNumber = 1, + }; + static constexpr const char* GetName() { return ".perfetto.protos.TrackEventRangeOfInterest"; } + + + using FieldMetadata_StartUs = + ::protozero::proto_utils::FieldMetadata< + 1, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kInt64, + int64_t, + TrackEventRangeOfInterest>; + + static constexpr FieldMetadata_StartUs kStartUs{}; + void set_start_us(int64_t value) { + static constexpr uint32_t field_id = FieldMetadata_StartUs::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kInt64> + ::Append(*this, field_id, value); + } +}; + } // Namespace. } // Namespace. } // Namespace. @@ -127446,14 +125219,7 @@ class SourceLocation : public ::protozero::Message { uint64_t, SourceLocation>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Iid kIid() { return {}; } + static constexpr FieldMetadata_Iid kIid{}; void set_iid(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Iid::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -127471,17 +125237,13 @@ class SourceLocation : public ::protozero::Message { std::string, SourceLocation>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_FileName kFileName() { return {}; } + static constexpr FieldMetadata_FileName kFileName{}; void set_file_name(const char* data, size_t size) { AppendBytes(FieldMetadata_FileName::kFieldId, data, size); } + void set_file_name(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_FileName::kFieldId, chars.data, chars.size); + } void set_file_name(std::string value) { static constexpr uint32_t field_id = FieldMetadata_FileName::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -127499,17 +125261,13 @@ class SourceLocation : public ::protozero::Message { std::string, SourceLocation>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_FunctionName kFunctionName() { return {}; } + static constexpr FieldMetadata_FunctionName kFunctionName{}; void set_function_name(const char* data, size_t size) { AppendBytes(FieldMetadata_FunctionName::kFieldId, data, size); } + void set_function_name(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_FunctionName::kFieldId, chars.data, chars.size); + } void set_function_name(std::string value) { static constexpr uint32_t field_id = FieldMetadata_FunctionName::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -127527,14 +125285,7 @@ class SourceLocation : public ::protozero::Message { uint32_t, SourceLocation>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_LineNumber kLineNumber() { return {}; } + static constexpr FieldMetadata_LineNumber kLineNumber{}; void set_line_number(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_LineNumber::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -127577,14 +125328,7 @@ class UnsymbolizedSourceLocation : public ::protozero::Message { uint64_t, UnsymbolizedSourceLocation>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Iid kIid() { return {}; } + static constexpr FieldMetadata_Iid kIid{}; void set_iid(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Iid::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -127602,14 +125346,7 @@ class UnsymbolizedSourceLocation : public ::protozero::Message { uint64_t, UnsymbolizedSourceLocation>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_MappingId kMappingId() { return {}; } + static constexpr FieldMetadata_MappingId kMappingId{}; void set_mapping_id(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_MappingId::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -127627,14 +125364,7 @@ class UnsymbolizedSourceLocation : public ::protozero::Message { uint64_t, UnsymbolizedSourceLocation>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_RelPc kRelPc() { return {}; } + static constexpr FieldMetadata_RelPc kRelPc{}; void set_rel_pc(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_RelPc::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -127695,14 +125425,7 @@ class TaskExecution : public ::protozero::Message { uint64_t, TaskExecution>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_PostedFromIid kPostedFromIid() { return {}; } + static constexpr FieldMetadata_PostedFromIid kPostedFromIid{}; void set_posted_from_iid(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_PostedFromIid::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -127736,27 +125459,83 @@ namespace perfetto { namespace protos { namespace pbzero { -enum ThreadDescriptor_ChromeThreadType : int32_t; +namespace perfetto_pbzero_enum_ThreadDescriptor { +enum ChromeThreadType : int32_t; +} // namespace perfetto_pbzero_enum_ThreadDescriptor +using ThreadDescriptor_ChromeThreadType = perfetto_pbzero_enum_ThreadDescriptor::ChromeThreadType; -enum ThreadDescriptor_ChromeThreadType : int32_t { - ThreadDescriptor_ChromeThreadType_CHROME_THREAD_UNSPECIFIED = 0, - ThreadDescriptor_ChromeThreadType_CHROME_THREAD_MAIN = 1, - ThreadDescriptor_ChromeThreadType_CHROME_THREAD_IO = 2, - ThreadDescriptor_ChromeThreadType_CHROME_THREAD_POOL_BG_WORKER = 3, - ThreadDescriptor_ChromeThreadType_CHROME_THREAD_POOL_FG_WORKER = 4, - ThreadDescriptor_ChromeThreadType_CHROME_THREAD_POOL_FB_BLOCKING = 5, - ThreadDescriptor_ChromeThreadType_CHROME_THREAD_POOL_BG_BLOCKING = 6, - ThreadDescriptor_ChromeThreadType_CHROME_THREAD_POOL_SERVICE = 7, - ThreadDescriptor_ChromeThreadType_CHROME_THREAD_COMPOSITOR = 8, - ThreadDescriptor_ChromeThreadType_CHROME_THREAD_VIZ_COMPOSITOR = 9, - ThreadDescriptor_ChromeThreadType_CHROME_THREAD_COMPOSITOR_WORKER = 10, - ThreadDescriptor_ChromeThreadType_CHROME_THREAD_SERVICE_WORKER = 11, - ThreadDescriptor_ChromeThreadType_CHROME_THREAD_MEMORY_INFRA = 50, - ThreadDescriptor_ChromeThreadType_CHROME_THREAD_SAMPLING_PROFILER = 51, +namespace perfetto_pbzero_enum_ThreadDescriptor { +enum ChromeThreadType : int32_t { + CHROME_THREAD_UNSPECIFIED = 0, + CHROME_THREAD_MAIN = 1, + CHROME_THREAD_IO = 2, + CHROME_THREAD_POOL_BG_WORKER = 3, + CHROME_THREAD_POOL_FG_WORKER = 4, + CHROME_THREAD_POOL_FB_BLOCKING = 5, + CHROME_THREAD_POOL_BG_BLOCKING = 6, + CHROME_THREAD_POOL_SERVICE = 7, + CHROME_THREAD_COMPOSITOR = 8, + CHROME_THREAD_VIZ_COMPOSITOR = 9, + CHROME_THREAD_COMPOSITOR_WORKER = 10, + CHROME_THREAD_SERVICE_WORKER = 11, + CHROME_THREAD_MEMORY_INFRA = 50, + CHROME_THREAD_SAMPLING_PROFILER = 51, }; +} // namespace perfetto_pbzero_enum_ThreadDescriptor +using ThreadDescriptor_ChromeThreadType = perfetto_pbzero_enum_ThreadDescriptor::ChromeThreadType; -const ThreadDescriptor_ChromeThreadType ThreadDescriptor_ChromeThreadType_MIN = ThreadDescriptor_ChromeThreadType_CHROME_THREAD_UNSPECIFIED; -const ThreadDescriptor_ChromeThreadType ThreadDescriptor_ChromeThreadType_MAX = ThreadDescriptor_ChromeThreadType_CHROME_THREAD_SAMPLING_PROFILER; + +constexpr ThreadDescriptor_ChromeThreadType ThreadDescriptor_ChromeThreadType_MIN = ThreadDescriptor_ChromeThreadType::CHROME_THREAD_UNSPECIFIED; +constexpr ThreadDescriptor_ChromeThreadType ThreadDescriptor_ChromeThreadType_MAX = ThreadDescriptor_ChromeThreadType::CHROME_THREAD_SAMPLING_PROFILER; + + +PERFETTO_PROTOZERO_CONSTEXPR14_OR_INLINE +const char* ThreadDescriptor_ChromeThreadType_Name(::perfetto::protos::pbzero::ThreadDescriptor_ChromeThreadType value) { + switch (value) { + case ::perfetto::protos::pbzero::ThreadDescriptor_ChromeThreadType::CHROME_THREAD_UNSPECIFIED: + return "CHROME_THREAD_UNSPECIFIED"; + + case ::perfetto::protos::pbzero::ThreadDescriptor_ChromeThreadType::CHROME_THREAD_MAIN: + return "CHROME_THREAD_MAIN"; + + case ::perfetto::protos::pbzero::ThreadDescriptor_ChromeThreadType::CHROME_THREAD_IO: + return "CHROME_THREAD_IO"; + + case ::perfetto::protos::pbzero::ThreadDescriptor_ChromeThreadType::CHROME_THREAD_POOL_BG_WORKER: + return "CHROME_THREAD_POOL_BG_WORKER"; + + case ::perfetto::protos::pbzero::ThreadDescriptor_ChromeThreadType::CHROME_THREAD_POOL_FG_WORKER: + return "CHROME_THREAD_POOL_FG_WORKER"; + + case ::perfetto::protos::pbzero::ThreadDescriptor_ChromeThreadType::CHROME_THREAD_POOL_FB_BLOCKING: + return "CHROME_THREAD_POOL_FB_BLOCKING"; + + case ::perfetto::protos::pbzero::ThreadDescriptor_ChromeThreadType::CHROME_THREAD_POOL_BG_BLOCKING: + return "CHROME_THREAD_POOL_BG_BLOCKING"; + + case ::perfetto::protos::pbzero::ThreadDescriptor_ChromeThreadType::CHROME_THREAD_POOL_SERVICE: + return "CHROME_THREAD_POOL_SERVICE"; + + case ::perfetto::protos::pbzero::ThreadDescriptor_ChromeThreadType::CHROME_THREAD_COMPOSITOR: + return "CHROME_THREAD_COMPOSITOR"; + + case ::perfetto::protos::pbzero::ThreadDescriptor_ChromeThreadType::CHROME_THREAD_VIZ_COMPOSITOR: + return "CHROME_THREAD_VIZ_COMPOSITOR"; + + case ::perfetto::protos::pbzero::ThreadDescriptor_ChromeThreadType::CHROME_THREAD_COMPOSITOR_WORKER: + return "CHROME_THREAD_COMPOSITOR_WORKER"; + + case ::perfetto::protos::pbzero::ThreadDescriptor_ChromeThreadType::CHROME_THREAD_SERVICE_WORKER: + return "CHROME_THREAD_SERVICE_WORKER"; + + case ::perfetto::protos::pbzero::ThreadDescriptor_ChromeThreadType::CHROME_THREAD_MEMORY_INFRA: + return "CHROME_THREAD_MEMORY_INFRA"; + + case ::perfetto::protos::pbzero::ThreadDescriptor_ChromeThreadType::CHROME_THREAD_SAMPLING_PROFILER: + return "CHROME_THREAD_SAMPLING_PROFILER"; + } + return "PBZERO_UNKNOWN_ENUM_VALUE"; +} class ThreadDescriptor_Decoder : public ::protozero::TypedProtoDecoder { public: @@ -127796,21 +125575,25 @@ class ThreadDescriptor : public ::protozero::Message { }; static constexpr const char* GetName() { return ".perfetto.protos.ThreadDescriptor"; } + using ChromeThreadType = ::perfetto::protos::pbzero::ThreadDescriptor_ChromeThreadType; - static const ChromeThreadType CHROME_THREAD_UNSPECIFIED = ThreadDescriptor_ChromeThreadType_CHROME_THREAD_UNSPECIFIED; - static const ChromeThreadType CHROME_THREAD_MAIN = ThreadDescriptor_ChromeThreadType_CHROME_THREAD_MAIN; - static const ChromeThreadType CHROME_THREAD_IO = ThreadDescriptor_ChromeThreadType_CHROME_THREAD_IO; - static const ChromeThreadType CHROME_THREAD_POOL_BG_WORKER = ThreadDescriptor_ChromeThreadType_CHROME_THREAD_POOL_BG_WORKER; - static const ChromeThreadType CHROME_THREAD_POOL_FG_WORKER = ThreadDescriptor_ChromeThreadType_CHROME_THREAD_POOL_FG_WORKER; - static const ChromeThreadType CHROME_THREAD_POOL_FB_BLOCKING = ThreadDescriptor_ChromeThreadType_CHROME_THREAD_POOL_FB_BLOCKING; - static const ChromeThreadType CHROME_THREAD_POOL_BG_BLOCKING = ThreadDescriptor_ChromeThreadType_CHROME_THREAD_POOL_BG_BLOCKING; - static const ChromeThreadType CHROME_THREAD_POOL_SERVICE = ThreadDescriptor_ChromeThreadType_CHROME_THREAD_POOL_SERVICE; - static const ChromeThreadType CHROME_THREAD_COMPOSITOR = ThreadDescriptor_ChromeThreadType_CHROME_THREAD_COMPOSITOR; - static const ChromeThreadType CHROME_THREAD_VIZ_COMPOSITOR = ThreadDescriptor_ChromeThreadType_CHROME_THREAD_VIZ_COMPOSITOR; - static const ChromeThreadType CHROME_THREAD_COMPOSITOR_WORKER = ThreadDescriptor_ChromeThreadType_CHROME_THREAD_COMPOSITOR_WORKER; - static const ChromeThreadType CHROME_THREAD_SERVICE_WORKER = ThreadDescriptor_ChromeThreadType_CHROME_THREAD_SERVICE_WORKER; - static const ChromeThreadType CHROME_THREAD_MEMORY_INFRA = ThreadDescriptor_ChromeThreadType_CHROME_THREAD_MEMORY_INFRA; - static const ChromeThreadType CHROME_THREAD_SAMPLING_PROFILER = ThreadDescriptor_ChromeThreadType_CHROME_THREAD_SAMPLING_PROFILER; + static inline const char* ChromeThreadType_Name(ChromeThreadType value) { + return ::perfetto::protos::pbzero::ThreadDescriptor_ChromeThreadType_Name(value); + } + static const ChromeThreadType CHROME_THREAD_UNSPECIFIED = ChromeThreadType::CHROME_THREAD_UNSPECIFIED; + static const ChromeThreadType CHROME_THREAD_MAIN = ChromeThreadType::CHROME_THREAD_MAIN; + static const ChromeThreadType CHROME_THREAD_IO = ChromeThreadType::CHROME_THREAD_IO; + static const ChromeThreadType CHROME_THREAD_POOL_BG_WORKER = ChromeThreadType::CHROME_THREAD_POOL_BG_WORKER; + static const ChromeThreadType CHROME_THREAD_POOL_FG_WORKER = ChromeThreadType::CHROME_THREAD_POOL_FG_WORKER; + static const ChromeThreadType CHROME_THREAD_POOL_FB_BLOCKING = ChromeThreadType::CHROME_THREAD_POOL_FB_BLOCKING; + static const ChromeThreadType CHROME_THREAD_POOL_BG_BLOCKING = ChromeThreadType::CHROME_THREAD_POOL_BG_BLOCKING; + static const ChromeThreadType CHROME_THREAD_POOL_SERVICE = ChromeThreadType::CHROME_THREAD_POOL_SERVICE; + static const ChromeThreadType CHROME_THREAD_COMPOSITOR = ChromeThreadType::CHROME_THREAD_COMPOSITOR; + static const ChromeThreadType CHROME_THREAD_VIZ_COMPOSITOR = ChromeThreadType::CHROME_THREAD_VIZ_COMPOSITOR; + static const ChromeThreadType CHROME_THREAD_COMPOSITOR_WORKER = ChromeThreadType::CHROME_THREAD_COMPOSITOR_WORKER; + static const ChromeThreadType CHROME_THREAD_SERVICE_WORKER = ChromeThreadType::CHROME_THREAD_SERVICE_WORKER; + static const ChromeThreadType CHROME_THREAD_MEMORY_INFRA = ChromeThreadType::CHROME_THREAD_MEMORY_INFRA; + static const ChromeThreadType CHROME_THREAD_SAMPLING_PROFILER = ChromeThreadType::CHROME_THREAD_SAMPLING_PROFILER; using FieldMetadata_Pid = ::protozero::proto_utils::FieldMetadata< @@ -127820,14 +125603,7 @@ class ThreadDescriptor : public ::protozero::Message { int32_t, ThreadDescriptor>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Pid kPid() { return {}; } + static constexpr FieldMetadata_Pid kPid{}; void set_pid(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Pid::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -127845,14 +125621,7 @@ class ThreadDescriptor : public ::protozero::Message { int32_t, ThreadDescriptor>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Tid kTid() { return {}; } + static constexpr FieldMetadata_Tid kTid{}; void set_tid(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Tid::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -127870,17 +125639,13 @@ class ThreadDescriptor : public ::protozero::Message { std::string, ThreadDescriptor>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ThreadName kThreadName() { return {}; } + static constexpr FieldMetadata_ThreadName kThreadName{}; void set_thread_name(const char* data, size_t size) { AppendBytes(FieldMetadata_ThreadName::kFieldId, data, size); } + void set_thread_name(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_ThreadName::kFieldId, chars.data, chars.size); + } void set_thread_name(std::string value) { static constexpr uint32_t field_id = FieldMetadata_ThreadName::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -127898,14 +125663,7 @@ class ThreadDescriptor : public ::protozero::Message { ::perfetto::protos::pbzero::ThreadDescriptor_ChromeThreadType, ThreadDescriptor>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ChromeThreadType kChromeThreadType() { return {}; } + static constexpr FieldMetadata_ChromeThreadType kChromeThreadType{}; void set_chrome_thread_type(::perfetto::protos::pbzero::ThreadDescriptor_ChromeThreadType value) { static constexpr uint32_t field_id = FieldMetadata_ChromeThreadType::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -127923,14 +125681,7 @@ class ThreadDescriptor : public ::protozero::Message { int64_t, ThreadDescriptor>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ReferenceTimestampUs kReferenceTimestampUs() { return {}; } + static constexpr FieldMetadata_ReferenceTimestampUs kReferenceTimestampUs{}; void set_reference_timestamp_us(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_ReferenceTimestampUs::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -127948,14 +125699,7 @@ class ThreadDescriptor : public ::protozero::Message { int64_t, ThreadDescriptor>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ReferenceThreadTimeUs kReferenceThreadTimeUs() { return {}; } + static constexpr FieldMetadata_ReferenceThreadTimeUs kReferenceThreadTimeUs{}; void set_reference_thread_time_us(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_ReferenceThreadTimeUs::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -127973,14 +125717,7 @@ class ThreadDescriptor : public ::protozero::Message { int64_t, ThreadDescriptor>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ReferenceThreadInstructionCount kReferenceThreadInstructionCount() { return {}; } + static constexpr FieldMetadata_ReferenceThreadInstructionCount kReferenceThreadInstructionCount{}; void set_reference_thread_instruction_count(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_ReferenceThreadInstructionCount::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -127998,14 +125735,7 @@ class ThreadDescriptor : public ::protozero::Message { int32_t, ThreadDescriptor>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_LegacySortIndex kLegacySortIndex() { return {}; } + static constexpr FieldMetadata_LegacySortIndex kLegacySortIndex{}; void set_legacy_sort_index(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_LegacySortIndex::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -128045,7 +125775,7 @@ class CounterDescriptor; class ProcessDescriptor; class ThreadDescriptor; -class TrackDescriptor_Decoder : public ::protozero::TypedProtoDecoder { +class TrackDescriptor_Decoder : public ::protozero::TypedProtoDecoder { public: TrackDescriptor_Decoder(const uint8_t* data, size_t len) : TypedProtoDecoder(data, len) {} explicit TrackDescriptor_Decoder(const std::string& raw) : TypedProtoDecoder(reinterpret_cast(raw.data()), raw.size()) {} @@ -128066,6 +125796,8 @@ class TrackDescriptor_Decoder : public ::protozero::TypedProtoDecoder().as_bytes(); } bool has_counter() const { return at<8>().valid(); } ::protozero::ConstBytes counter() const { return at<8>().as_bytes(); } + bool has_disallow_merging_with_system_tracks() const { return at<9>().valid(); } + bool disallow_merging_with_system_tracks() const { return at<9>().as_bool(); } }; class TrackDescriptor : public ::protozero::Message { @@ -128080,6 +125812,7 @@ class TrackDescriptor : public ::protozero::Message { kThreadFieldNumber = 4, kChromeThreadFieldNumber = 7, kCounterFieldNumber = 8, + kDisallowMergingWithSystemTracksFieldNumber = 9, }; static constexpr const char* GetName() { return ".perfetto.protos.TrackDescriptor"; } @@ -128092,14 +125825,7 @@ class TrackDescriptor : public ::protozero::Message { uint64_t, TrackDescriptor>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Uuid kUuid() { return {}; } + static constexpr FieldMetadata_Uuid kUuid{}; void set_uuid(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Uuid::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -128117,14 +125843,7 @@ class TrackDescriptor : public ::protozero::Message { uint64_t, TrackDescriptor>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ParentUuid kParentUuid() { return {}; } + static constexpr FieldMetadata_ParentUuid kParentUuid{}; void set_parent_uuid(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_ParentUuid::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -128142,17 +125861,13 @@ class TrackDescriptor : public ::protozero::Message { std::string, TrackDescriptor>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Name kName() { return {}; } + static constexpr FieldMetadata_Name kName{}; void set_name(const char* data, size_t size) { AppendBytes(FieldMetadata_Name::kFieldId, data, size); } + void set_name(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Name::kFieldId, chars.data, chars.size); + } void set_name(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Name::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -128170,14 +125885,7 @@ class TrackDescriptor : public ::protozero::Message { ProcessDescriptor, TrackDescriptor>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Process kProcess() { return {}; } + static constexpr FieldMetadata_Process kProcess{}; template T* set_process() { return BeginNestedMessage(3); } @@ -128191,14 +125899,7 @@ class TrackDescriptor : public ::protozero::Message { ChromeProcessDescriptor, TrackDescriptor>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ChromeProcess kChromeProcess() { return {}; } + static constexpr FieldMetadata_ChromeProcess kChromeProcess{}; template T* set_chrome_process() { return BeginNestedMessage(6); } @@ -128212,14 +125913,7 @@ class TrackDescriptor : public ::protozero::Message { ThreadDescriptor, TrackDescriptor>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Thread kThread() { return {}; } + static constexpr FieldMetadata_Thread kThread{}; template T* set_thread() { return BeginNestedMessage(4); } @@ -128233,14 +125927,7 @@ class TrackDescriptor : public ::protozero::Message { ChromeThreadDescriptor, TrackDescriptor>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ChromeThread kChromeThread() { return {}; } + static constexpr FieldMetadata_ChromeThread kChromeThread{}; template T* set_chrome_thread() { return BeginNestedMessage(7); } @@ -128254,18 +125941,29 @@ class TrackDescriptor : public ::protozero::Message { CounterDescriptor, TrackDescriptor>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Counter kCounter() { return {}; } + static constexpr FieldMetadata_Counter kCounter{}; template T* set_counter() { return BeginNestedMessage(8); } + + using FieldMetadata_DisallowMergingWithSystemTracks = + ::protozero::proto_utils::FieldMetadata< + 9, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kBool, + bool, + TrackDescriptor>; + + static constexpr FieldMetadata_DisallowMergingWithSystemTracks kDisallowMergingWithSystemTracks{}; + void set_disallow_merging_with_system_tracks(bool value) { + static constexpr uint32_t field_id = FieldMetadata_DisallowMergingWithSystemTracks::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kBool> + ::Append(*this, field_id, value); + } }; } // Namespace. @@ -128291,6 +125989,7 @@ namespace perfetto { namespace protos { namespace pbzero { +class ChromeActiveProcesses; class ChromeApplicationStateInfo; class ChromeCompositorSchedulerState; class ChromeContentSettingsEventInfo; @@ -128309,40 +126008,121 @@ class LogMessage; class SourceLocation; class TaskExecution; class TrackEvent_LegacyEvent; -enum TrackEvent_LegacyEvent_FlowDirection : int32_t; -enum TrackEvent_LegacyEvent_InstantEventScope : int32_t; -enum TrackEvent_Type : int32_t; +namespace perfetto_pbzero_enum_TrackEvent_LegacyEvent { +enum FlowDirection : int32_t; +} // namespace perfetto_pbzero_enum_TrackEvent_LegacyEvent +using TrackEvent_LegacyEvent_FlowDirection = perfetto_pbzero_enum_TrackEvent_LegacyEvent::FlowDirection; +namespace perfetto_pbzero_enum_TrackEvent_LegacyEvent { +enum InstantEventScope : int32_t; +} // namespace perfetto_pbzero_enum_TrackEvent_LegacyEvent +using TrackEvent_LegacyEvent_InstantEventScope = perfetto_pbzero_enum_TrackEvent_LegacyEvent::InstantEventScope; +namespace perfetto_pbzero_enum_TrackEvent { +enum Type : int32_t; +} // namespace perfetto_pbzero_enum_TrackEvent +using TrackEvent_Type = perfetto_pbzero_enum_TrackEvent::Type; -enum TrackEvent_Type : int32_t { - TrackEvent_Type_TYPE_UNSPECIFIED = 0, - TrackEvent_Type_TYPE_SLICE_BEGIN = 1, - TrackEvent_Type_TYPE_SLICE_END = 2, - TrackEvent_Type_TYPE_INSTANT = 3, - TrackEvent_Type_TYPE_COUNTER = 4, +namespace perfetto_pbzero_enum_TrackEvent { +enum Type : int32_t { + TYPE_UNSPECIFIED = 0, + TYPE_SLICE_BEGIN = 1, + TYPE_SLICE_END = 2, + TYPE_INSTANT = 3, + TYPE_COUNTER = 4, }; +} // namespace perfetto_pbzero_enum_TrackEvent +using TrackEvent_Type = perfetto_pbzero_enum_TrackEvent::Type; -const TrackEvent_Type TrackEvent_Type_MIN = TrackEvent_Type_TYPE_UNSPECIFIED; -const TrackEvent_Type TrackEvent_Type_MAX = TrackEvent_Type_TYPE_COUNTER; -enum TrackEvent_LegacyEvent_FlowDirection : int32_t { - TrackEvent_LegacyEvent_FlowDirection_FLOW_UNSPECIFIED = 0, - TrackEvent_LegacyEvent_FlowDirection_FLOW_IN = 1, - TrackEvent_LegacyEvent_FlowDirection_FLOW_OUT = 2, - TrackEvent_LegacyEvent_FlowDirection_FLOW_INOUT = 3, +constexpr TrackEvent_Type TrackEvent_Type_MIN = TrackEvent_Type::TYPE_UNSPECIFIED; +constexpr TrackEvent_Type TrackEvent_Type_MAX = TrackEvent_Type::TYPE_COUNTER; + + +PERFETTO_PROTOZERO_CONSTEXPR14_OR_INLINE +const char* TrackEvent_Type_Name(::perfetto::protos::pbzero::TrackEvent_Type value) { + switch (value) { + case ::perfetto::protos::pbzero::TrackEvent_Type::TYPE_UNSPECIFIED: + return "TYPE_UNSPECIFIED"; + + case ::perfetto::protos::pbzero::TrackEvent_Type::TYPE_SLICE_BEGIN: + return "TYPE_SLICE_BEGIN"; + + case ::perfetto::protos::pbzero::TrackEvent_Type::TYPE_SLICE_END: + return "TYPE_SLICE_END"; + + case ::perfetto::protos::pbzero::TrackEvent_Type::TYPE_INSTANT: + return "TYPE_INSTANT"; + + case ::perfetto::protos::pbzero::TrackEvent_Type::TYPE_COUNTER: + return "TYPE_COUNTER"; + } + return "PBZERO_UNKNOWN_ENUM_VALUE"; +} + +namespace perfetto_pbzero_enum_TrackEvent_LegacyEvent { +enum FlowDirection : int32_t { + FLOW_UNSPECIFIED = 0, + FLOW_IN = 1, + FLOW_OUT = 2, + FLOW_INOUT = 3, }; +} // namespace perfetto_pbzero_enum_TrackEvent_LegacyEvent +using TrackEvent_LegacyEvent_FlowDirection = perfetto_pbzero_enum_TrackEvent_LegacyEvent::FlowDirection; -const TrackEvent_LegacyEvent_FlowDirection TrackEvent_LegacyEvent_FlowDirection_MIN = TrackEvent_LegacyEvent_FlowDirection_FLOW_UNSPECIFIED; -const TrackEvent_LegacyEvent_FlowDirection TrackEvent_LegacyEvent_FlowDirection_MAX = TrackEvent_LegacyEvent_FlowDirection_FLOW_INOUT; -enum TrackEvent_LegacyEvent_InstantEventScope : int32_t { - TrackEvent_LegacyEvent_InstantEventScope_SCOPE_UNSPECIFIED = 0, - TrackEvent_LegacyEvent_InstantEventScope_SCOPE_GLOBAL = 1, - TrackEvent_LegacyEvent_InstantEventScope_SCOPE_PROCESS = 2, - TrackEvent_LegacyEvent_InstantEventScope_SCOPE_THREAD = 3, +constexpr TrackEvent_LegacyEvent_FlowDirection TrackEvent_LegacyEvent_FlowDirection_MIN = TrackEvent_LegacyEvent_FlowDirection::FLOW_UNSPECIFIED; +constexpr TrackEvent_LegacyEvent_FlowDirection TrackEvent_LegacyEvent_FlowDirection_MAX = TrackEvent_LegacyEvent_FlowDirection::FLOW_INOUT; + + +PERFETTO_PROTOZERO_CONSTEXPR14_OR_INLINE +const char* TrackEvent_LegacyEvent_FlowDirection_Name(::perfetto::protos::pbzero::TrackEvent_LegacyEvent_FlowDirection value) { + switch (value) { + case ::perfetto::protos::pbzero::TrackEvent_LegacyEvent_FlowDirection::FLOW_UNSPECIFIED: + return "FLOW_UNSPECIFIED"; + + case ::perfetto::protos::pbzero::TrackEvent_LegacyEvent_FlowDirection::FLOW_IN: + return "FLOW_IN"; + + case ::perfetto::protos::pbzero::TrackEvent_LegacyEvent_FlowDirection::FLOW_OUT: + return "FLOW_OUT"; + + case ::perfetto::protos::pbzero::TrackEvent_LegacyEvent_FlowDirection::FLOW_INOUT: + return "FLOW_INOUT"; + } + return "PBZERO_UNKNOWN_ENUM_VALUE"; +} + +namespace perfetto_pbzero_enum_TrackEvent_LegacyEvent { +enum InstantEventScope : int32_t { + SCOPE_UNSPECIFIED = 0, + SCOPE_GLOBAL = 1, + SCOPE_PROCESS = 2, + SCOPE_THREAD = 3, }; +} // namespace perfetto_pbzero_enum_TrackEvent_LegacyEvent +using TrackEvent_LegacyEvent_InstantEventScope = perfetto_pbzero_enum_TrackEvent_LegacyEvent::InstantEventScope; -const TrackEvent_LegacyEvent_InstantEventScope TrackEvent_LegacyEvent_InstantEventScope_MIN = TrackEvent_LegacyEvent_InstantEventScope_SCOPE_UNSPECIFIED; -const TrackEvent_LegacyEvent_InstantEventScope TrackEvent_LegacyEvent_InstantEventScope_MAX = TrackEvent_LegacyEvent_InstantEventScope_SCOPE_THREAD; + +constexpr TrackEvent_LegacyEvent_InstantEventScope TrackEvent_LegacyEvent_InstantEventScope_MIN = TrackEvent_LegacyEvent_InstantEventScope::SCOPE_UNSPECIFIED; +constexpr TrackEvent_LegacyEvent_InstantEventScope TrackEvent_LegacyEvent_InstantEventScope_MAX = TrackEvent_LegacyEvent_InstantEventScope::SCOPE_THREAD; + + +PERFETTO_PROTOZERO_CONSTEXPR14_OR_INLINE +const char* TrackEvent_LegacyEvent_InstantEventScope_Name(::perfetto::protos::pbzero::TrackEvent_LegacyEvent_InstantEventScope value) { + switch (value) { + case ::perfetto::protos::pbzero::TrackEvent_LegacyEvent_InstantEventScope::SCOPE_UNSPECIFIED: + return "SCOPE_UNSPECIFIED"; + + case ::perfetto::protos::pbzero::TrackEvent_LegacyEvent_InstantEventScope::SCOPE_GLOBAL: + return "SCOPE_GLOBAL"; + + case ::perfetto::protos::pbzero::TrackEvent_LegacyEvent_InstantEventScope::SCOPE_PROCESS: + return "SCOPE_PROCESS"; + + case ::perfetto::protos::pbzero::TrackEvent_LegacyEvent_InstantEventScope::SCOPE_THREAD: + return "SCOPE_THREAD"; + } + return "PBZERO_UNKNOWN_ENUM_VALUE"; +} class EventName_Decoder : public ::protozero::TypedProtoDecoder { public: @@ -128373,14 +126153,7 @@ class EventName : public ::protozero::Message { uint64_t, EventName>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Iid kIid() { return {}; } + static constexpr FieldMetadata_Iid kIid{}; void set_iid(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Iid::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -128398,17 +126171,13 @@ class EventName : public ::protozero::Message { std::string, EventName>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Name kName() { return {}; } + static constexpr FieldMetadata_Name kName{}; void set_name(const char* data, size_t size) { AppendBytes(FieldMetadata_Name::kFieldId, data, size); } + void set_name(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Name::kFieldId, chars.data, chars.size); + } void set_name(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Name::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -128448,14 +126217,7 @@ class EventCategory : public ::protozero::Message { uint64_t, EventCategory>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Iid kIid() { return {}; } + static constexpr FieldMetadata_Iid kIid{}; void set_iid(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Iid::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -128473,17 +126235,13 @@ class EventCategory : public ::protozero::Message { std::string, EventCategory>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Name kName() { return {}; } + static constexpr FieldMetadata_Name kName{}; void set_name(const char* data, size_t size) { AppendBytes(FieldMetadata_Name::kFieldId, data, size); } + void set_name(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Name::kFieldId, chars.data, chars.size); + } void set_name(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Name::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -128526,14 +126284,7 @@ class TrackEventDefaults : public ::protozero::Message { uint64_t, TrackEventDefaults>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_TrackUuid kTrackUuid() { return {}; } + static constexpr FieldMetadata_TrackUuid kTrackUuid{}; void set_track_uuid(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_TrackUuid::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -128551,14 +126302,7 @@ class TrackEventDefaults : public ::protozero::Message { uint64_t, TrackEventDefaults>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ExtraCounterTrackUuids kExtraCounterTrackUuids() { return {}; } + static constexpr FieldMetadata_ExtraCounterTrackUuids kExtraCounterTrackUuids{}; void add_extra_counter_track_uuids(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_ExtraCounterTrackUuids::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -128576,14 +126320,7 @@ class TrackEventDefaults : public ::protozero::Message { uint64_t, TrackEventDefaults>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ExtraDoubleCounterTrackUuids kExtraDoubleCounterTrackUuids() { return {}; } + static constexpr FieldMetadata_ExtraDoubleCounterTrackUuids kExtraDoubleCounterTrackUuids{}; void add_extra_double_counter_track_uuids(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_ExtraDoubleCounterTrackUuids::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -128594,7 +126331,7 @@ class TrackEventDefaults : public ::protozero::Message { } }; -class TrackEvent_Decoder : public ::protozero::TypedProtoDecoder { +class TrackEvent_Decoder : public ::protozero::TypedProtoDecoder { public: TrackEvent_Decoder(const uint8_t* data, size_t len) : TypedProtoDecoder(data, len) {} explicit TrackEvent_Decoder(const std::string& raw) : TypedProtoDecoder(reinterpret_cast(raw.data()), raw.size()) {} @@ -128623,10 +126360,14 @@ class TrackEvent_Decoder : public ::protozero::TypedProtoDecoder extra_double_counter_track_uuids() const { return GetRepeated(45); } bool has_extra_double_counter_values() const { return at<46>().valid(); } ::protozero::RepeatedFieldIterator extra_double_counter_values() const { return GetRepeated(46); } - bool has_flow_ids() const { return at<36>().valid(); } - ::protozero::RepeatedFieldIterator flow_ids() const { return GetRepeated(36); } - bool has_terminating_flow_ids() const { return at<42>().valid(); } - ::protozero::RepeatedFieldIterator terminating_flow_ids() const { return GetRepeated(42); } + bool has_flow_ids_old() const { return at<36>().valid(); } + ::protozero::RepeatedFieldIterator flow_ids_old() const { return GetRepeated(36); } + bool has_flow_ids() const { return at<47>().valid(); } + ::protozero::RepeatedFieldIterator flow_ids() const { return GetRepeated(47); } + bool has_terminating_flow_ids_old() const { return at<42>().valid(); } + ::protozero::RepeatedFieldIterator terminating_flow_ids_old() const { return GetRepeated(42); } + bool has_terminating_flow_ids() const { return at<48>().valid(); } + ::protozero::RepeatedFieldIterator terminating_flow_ids() const { return GetRepeated(48); } bool has_debug_annotations() const { return at<4>().valid(); } ::protozero::RepeatedFieldIterator<::protozero::ConstBytes> debug_annotations() const { return GetRepeated<::protozero::ConstBytes>(4); } bool has_task_execution() const { return at<5>().valid(); } @@ -128655,6 +126396,8 @@ class TrackEvent_Decoder : public ::protozero::TypedProtoDecoder().as_bytes(); } bool has_chrome_content_settings_event_info() const { return at<43>().valid(); } ::protozero::ConstBytes chrome_content_settings_event_info() const { return at<43>().as_bytes(); } + bool has_chrome_active_processes() const { return at<49>().valid(); } + ::protozero::ConstBytes chrome_active_processes() const { return at<49>().as_bytes(); } bool has_source_location() const { return at<33>().valid(); } ::protozero::ConstBytes source_location() const { return at<33>().as_bytes(); } bool has_source_location_iid() const { return at<34>().valid(); } @@ -128695,8 +126438,10 @@ class TrackEvent : public ::protozero::Message { kExtraCounterValuesFieldNumber = 12, kExtraDoubleCounterTrackUuidsFieldNumber = 45, kExtraDoubleCounterValuesFieldNumber = 46, - kFlowIdsFieldNumber = 36, - kTerminatingFlowIdsFieldNumber = 42, + kFlowIdsOldFieldNumber = 36, + kFlowIdsFieldNumber = 47, + kTerminatingFlowIdsOldFieldNumber = 42, + kTerminatingFlowIdsFieldNumber = 48, kDebugAnnotationsFieldNumber = 4, kTaskExecutionFieldNumber = 5, kLogMessageFieldNumber = 21, @@ -128711,6 +126456,7 @@ class TrackEvent : public ::protozero::Message { kChromeRendererSchedulerStateFieldNumber = 40, kChromeWindowHandleEventInfoFieldNumber = 41, kChromeContentSettingsEventInfoFieldNumber = 43, + kChromeActiveProcessesFieldNumber = 49, kSourceLocationFieldNumber = 33, kSourceLocationIidFieldNumber = 34, kChromeMessagePumpFieldNumber = 35, @@ -128726,12 +126472,16 @@ class TrackEvent : public ::protozero::Message { static constexpr const char* GetName() { return ".perfetto.protos.TrackEvent"; } using LegacyEvent = ::perfetto::protos::pbzero::TrackEvent_LegacyEvent; + using Type = ::perfetto::protos::pbzero::TrackEvent_Type; - static const Type TYPE_UNSPECIFIED = TrackEvent_Type_TYPE_UNSPECIFIED; - static const Type TYPE_SLICE_BEGIN = TrackEvent_Type_TYPE_SLICE_BEGIN; - static const Type TYPE_SLICE_END = TrackEvent_Type_TYPE_SLICE_END; - static const Type TYPE_INSTANT = TrackEvent_Type_TYPE_INSTANT; - static const Type TYPE_COUNTER = TrackEvent_Type_TYPE_COUNTER; + static inline const char* Type_Name(Type value) { + return ::perfetto::protos::pbzero::TrackEvent_Type_Name(value); + } + static const Type TYPE_UNSPECIFIED = Type::TYPE_UNSPECIFIED; + static const Type TYPE_SLICE_BEGIN = Type::TYPE_SLICE_BEGIN; + static const Type TYPE_SLICE_END = Type::TYPE_SLICE_END; + static const Type TYPE_INSTANT = Type::TYPE_INSTANT; + static const Type TYPE_COUNTER = Type::TYPE_COUNTER; using FieldMetadata_CategoryIids = ::protozero::proto_utils::FieldMetadata< @@ -128741,14 +126491,7 @@ class TrackEvent : public ::protozero::Message { uint64_t, TrackEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_CategoryIids kCategoryIids() { return {}; } + static constexpr FieldMetadata_CategoryIids kCategoryIids{}; void add_category_iids(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_CategoryIids::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -128766,17 +126509,13 @@ class TrackEvent : public ::protozero::Message { std::string, TrackEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Categories kCategories() { return {}; } + static constexpr FieldMetadata_Categories kCategories{}; void add_categories(const char* data, size_t size) { AppendBytes(FieldMetadata_Categories::kFieldId, data, size); } + void add_categories(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Categories::kFieldId, chars.data, chars.size); + } void add_categories(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Categories::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -128794,14 +126533,7 @@ class TrackEvent : public ::protozero::Message { uint64_t, TrackEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_NameIid kNameIid() { return {}; } + static constexpr FieldMetadata_NameIid kNameIid{}; void set_name_iid(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_NameIid::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -128819,17 +126551,13 @@ class TrackEvent : public ::protozero::Message { std::string, TrackEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Name kName() { return {}; } + static constexpr FieldMetadata_Name kName{}; void set_name(const char* data, size_t size) { AppendBytes(FieldMetadata_Name::kFieldId, data, size); } + void set_name(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Name::kFieldId, chars.data, chars.size); + } void set_name(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Name::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -128847,14 +126575,7 @@ class TrackEvent : public ::protozero::Message { ::perfetto::protos::pbzero::TrackEvent_Type, TrackEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Type kType() { return {}; } + static constexpr FieldMetadata_Type kType{}; void set_type(::perfetto::protos::pbzero::TrackEvent_Type value) { static constexpr uint32_t field_id = FieldMetadata_Type::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -128872,14 +126593,7 @@ class TrackEvent : public ::protozero::Message { uint64_t, TrackEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_TrackUuid kTrackUuid() { return {}; } + static constexpr FieldMetadata_TrackUuid kTrackUuid{}; void set_track_uuid(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_TrackUuid::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -128897,14 +126611,7 @@ class TrackEvent : public ::protozero::Message { int64_t, TrackEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_CounterValue kCounterValue() { return {}; } + static constexpr FieldMetadata_CounterValue kCounterValue{}; void set_counter_value(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_CounterValue::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -128922,14 +126629,7 @@ class TrackEvent : public ::protozero::Message { double, TrackEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_DoubleCounterValue kDoubleCounterValue() { return {}; } + static constexpr FieldMetadata_DoubleCounterValue kDoubleCounterValue{}; void set_double_counter_value(double value) { static constexpr uint32_t field_id = FieldMetadata_DoubleCounterValue::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -128947,14 +126647,7 @@ class TrackEvent : public ::protozero::Message { uint64_t, TrackEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ExtraCounterTrackUuids kExtraCounterTrackUuids() { return {}; } + static constexpr FieldMetadata_ExtraCounterTrackUuids kExtraCounterTrackUuids{}; void add_extra_counter_track_uuids(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_ExtraCounterTrackUuids::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -128972,14 +126665,7 @@ class TrackEvent : public ::protozero::Message { int64_t, TrackEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ExtraCounterValues kExtraCounterValues() { return {}; } + static constexpr FieldMetadata_ExtraCounterValues kExtraCounterValues{}; void add_extra_counter_values(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_ExtraCounterValues::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -128997,14 +126683,7 @@ class TrackEvent : public ::protozero::Message { uint64_t, TrackEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ExtraDoubleCounterTrackUuids kExtraDoubleCounterTrackUuids() { return {}; } + static constexpr FieldMetadata_ExtraDoubleCounterTrackUuids kExtraDoubleCounterTrackUuids{}; void add_extra_double_counter_track_uuids(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_ExtraDoubleCounterTrackUuids::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -129022,14 +126701,7 @@ class TrackEvent : public ::protozero::Message { double, TrackEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ExtraDoubleCounterValues kExtraDoubleCounterValues() { return {}; } + static constexpr FieldMetadata_ExtraDoubleCounterValues kExtraDoubleCounterValues{}; void add_extra_double_counter_values(double value) { static constexpr uint32_t field_id = FieldMetadata_ExtraDoubleCounterValues::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -129039,7 +126711,7 @@ class TrackEvent : public ::protozero::Message { ::Append(*this, field_id, value); } - using FieldMetadata_FlowIds = + using FieldMetadata_FlowIdsOld = ::protozero::proto_utils::FieldMetadata< 36, ::protozero::proto_utils::RepetitionType::kRepeatedNotPacked, @@ -129047,18 +126719,47 @@ class TrackEvent : public ::protozero::Message { uint64_t, TrackEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_FlowIds kFlowIds() { return {}; } + static constexpr FieldMetadata_FlowIdsOld kFlowIdsOld{}; + void add_flow_ids_old(uint64_t value) { + static constexpr uint32_t field_id = FieldMetadata_FlowIdsOld::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint64> + ::Append(*this, field_id, value); + } + + using FieldMetadata_FlowIds = + ::protozero::proto_utils::FieldMetadata< + 47, + ::protozero::proto_utils::RepetitionType::kRepeatedNotPacked, + ::protozero::proto_utils::ProtoSchemaType::kFixed64, + uint64_t, + TrackEvent>; + + static constexpr FieldMetadata_FlowIds kFlowIds{}; void add_flow_ids(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_FlowIds::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kFixed64> + ::Append(*this, field_id, value); + } + + using FieldMetadata_TerminatingFlowIdsOld = + ::protozero::proto_utils::FieldMetadata< + 42, + ::protozero::proto_utils::RepetitionType::kRepeatedNotPacked, + ::protozero::proto_utils::ProtoSchemaType::kUint64, + uint64_t, + TrackEvent>; + + static constexpr FieldMetadata_TerminatingFlowIdsOld kTerminatingFlowIdsOld{}; + void add_terminating_flow_ids_old(uint64_t value) { + static constexpr uint32_t field_id = FieldMetadata_TerminatingFlowIdsOld::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. ::protozero::internal::FieldWriter< ::protozero::proto_utils::ProtoSchemaType::kUint64> ::Append(*this, field_id, value); @@ -129066,26 +126767,19 @@ class TrackEvent : public ::protozero::Message { using FieldMetadata_TerminatingFlowIds = ::protozero::proto_utils::FieldMetadata< - 42, + 48, ::protozero::proto_utils::RepetitionType::kRepeatedNotPacked, - ::protozero::proto_utils::ProtoSchemaType::kUint64, + ::protozero::proto_utils::ProtoSchemaType::kFixed64, uint64_t, TrackEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_TerminatingFlowIds kTerminatingFlowIds() { return {}; } + static constexpr FieldMetadata_TerminatingFlowIds kTerminatingFlowIds{}; void add_terminating_flow_ids(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_TerminatingFlowIds::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) // method based on the type of the field. ::protozero::internal::FieldWriter< - ::protozero::proto_utils::ProtoSchemaType::kUint64> + ::protozero::proto_utils::ProtoSchemaType::kFixed64> ::Append(*this, field_id, value); } @@ -129097,14 +126791,7 @@ class TrackEvent : public ::protozero::Message { DebugAnnotation, TrackEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_DebugAnnotations kDebugAnnotations() { return {}; } + static constexpr FieldMetadata_DebugAnnotations kDebugAnnotations{}; template T* add_debug_annotations() { return BeginNestedMessage(4); } @@ -129118,14 +126805,7 @@ class TrackEvent : public ::protozero::Message { TaskExecution, TrackEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_TaskExecution kTaskExecution() { return {}; } + static constexpr FieldMetadata_TaskExecution kTaskExecution{}; template T* set_task_execution() { return BeginNestedMessage(5); } @@ -129139,14 +126819,7 @@ class TrackEvent : public ::protozero::Message { LogMessage, TrackEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_LogMessage kLogMessage() { return {}; } + static constexpr FieldMetadata_LogMessage kLogMessage{}; template T* set_log_message() { return BeginNestedMessage(21); } @@ -129160,14 +126833,7 @@ class TrackEvent : public ::protozero::Message { ChromeCompositorSchedulerState, TrackEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_CcSchedulerState kCcSchedulerState() { return {}; } + static constexpr FieldMetadata_CcSchedulerState kCcSchedulerState{}; template T* set_cc_scheduler_state() { return BeginNestedMessage(24); } @@ -129181,14 +126847,7 @@ class TrackEvent : public ::protozero::Message { ChromeUserEvent, TrackEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ChromeUserEvent kChromeUserEvent() { return {}; } + static constexpr FieldMetadata_ChromeUserEvent kChromeUserEvent{}; template T* set_chrome_user_event() { return BeginNestedMessage(25); } @@ -129202,14 +126861,7 @@ class TrackEvent : public ::protozero::Message { ChromeKeyedService, TrackEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ChromeKeyedService kChromeKeyedService() { return {}; } + static constexpr FieldMetadata_ChromeKeyedService kChromeKeyedService{}; template T* set_chrome_keyed_service() { return BeginNestedMessage(26); } @@ -129223,14 +126875,7 @@ class TrackEvent : public ::protozero::Message { ChromeLegacyIpc, TrackEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ChromeLegacyIpc kChromeLegacyIpc() { return {}; } + static constexpr FieldMetadata_ChromeLegacyIpc kChromeLegacyIpc{}; template T* set_chrome_legacy_ipc() { return BeginNestedMessage(27); } @@ -129244,14 +126889,7 @@ class TrackEvent : public ::protozero::Message { ChromeHistogramSample, TrackEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ChromeHistogramSample kChromeHistogramSample() { return {}; } + static constexpr FieldMetadata_ChromeHistogramSample kChromeHistogramSample{}; template T* set_chrome_histogram_sample() { return BeginNestedMessage(28); } @@ -129265,14 +126903,7 @@ class TrackEvent : public ::protozero::Message { ChromeLatencyInfo, TrackEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ChromeLatencyInfo kChromeLatencyInfo() { return {}; } + static constexpr FieldMetadata_ChromeLatencyInfo kChromeLatencyInfo{}; template T* set_chrome_latency_info() { return BeginNestedMessage(29); } @@ -129286,14 +126917,7 @@ class TrackEvent : public ::protozero::Message { ChromeFrameReporter, TrackEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ChromeFrameReporter kChromeFrameReporter() { return {}; } + static constexpr FieldMetadata_ChromeFrameReporter kChromeFrameReporter{}; template T* set_chrome_frame_reporter() { return BeginNestedMessage(32); } @@ -129307,14 +126931,7 @@ class TrackEvent : public ::protozero::Message { ChromeApplicationStateInfo, TrackEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ChromeApplicationStateInfo kChromeApplicationStateInfo() { return {}; } + static constexpr FieldMetadata_ChromeApplicationStateInfo kChromeApplicationStateInfo{}; template T* set_chrome_application_state_info() { return BeginNestedMessage(39); } @@ -129328,14 +126945,7 @@ class TrackEvent : public ::protozero::Message { ChromeRendererSchedulerState, TrackEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ChromeRendererSchedulerState kChromeRendererSchedulerState() { return {}; } + static constexpr FieldMetadata_ChromeRendererSchedulerState kChromeRendererSchedulerState{}; template T* set_chrome_renderer_scheduler_state() { return BeginNestedMessage(40); } @@ -129349,14 +126959,7 @@ class TrackEvent : public ::protozero::Message { ChromeWindowHandleEventInfo, TrackEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ChromeWindowHandleEventInfo kChromeWindowHandleEventInfo() { return {}; } + static constexpr FieldMetadata_ChromeWindowHandleEventInfo kChromeWindowHandleEventInfo{}; template T* set_chrome_window_handle_event_info() { return BeginNestedMessage(41); } @@ -129370,19 +126973,26 @@ class TrackEvent : public ::protozero::Message { ChromeContentSettingsEventInfo, TrackEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ChromeContentSettingsEventInfo kChromeContentSettingsEventInfo() { return {}; } + static constexpr FieldMetadata_ChromeContentSettingsEventInfo kChromeContentSettingsEventInfo{}; template T* set_chrome_content_settings_event_info() { return BeginNestedMessage(43); } + using FieldMetadata_ChromeActiveProcesses = + ::protozero::proto_utils::FieldMetadata< + 49, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kMessage, + ChromeActiveProcesses, + TrackEvent>; + + static constexpr FieldMetadata_ChromeActiveProcesses kChromeActiveProcesses{}; + template T* set_chrome_active_processes() { + return BeginNestedMessage(49); + } + + using FieldMetadata_SourceLocation = ::protozero::proto_utils::FieldMetadata< 33, @@ -129391,14 +127001,7 @@ class TrackEvent : public ::protozero::Message { SourceLocation, TrackEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_SourceLocation kSourceLocation() { return {}; } + static constexpr FieldMetadata_SourceLocation kSourceLocation{}; template T* set_source_location() { return BeginNestedMessage(33); } @@ -129412,14 +127015,7 @@ class TrackEvent : public ::protozero::Message { uint64_t, TrackEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_SourceLocationIid kSourceLocationIid() { return {}; } + static constexpr FieldMetadata_SourceLocationIid kSourceLocationIid{}; void set_source_location_iid(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_SourceLocationIid::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -129437,14 +127033,7 @@ class TrackEvent : public ::protozero::Message { ChromeMessagePump, TrackEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ChromeMessagePump kChromeMessagePump() { return {}; } + static constexpr FieldMetadata_ChromeMessagePump kChromeMessagePump{}; template T* set_chrome_message_pump() { return BeginNestedMessage(35); } @@ -129458,14 +127047,7 @@ class TrackEvent : public ::protozero::Message { ChromeMojoEventInfo, TrackEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ChromeMojoEventInfo kChromeMojoEventInfo() { return {}; } + static constexpr FieldMetadata_ChromeMojoEventInfo kChromeMojoEventInfo{}; template T* set_chrome_mojo_event_info() { return BeginNestedMessage(38); } @@ -129479,14 +127061,7 @@ class TrackEvent : public ::protozero::Message { int64_t, TrackEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_TimestampDeltaUs kTimestampDeltaUs() { return {}; } + static constexpr FieldMetadata_TimestampDeltaUs kTimestampDeltaUs{}; void set_timestamp_delta_us(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_TimestampDeltaUs::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -129504,14 +127079,7 @@ class TrackEvent : public ::protozero::Message { int64_t, TrackEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_TimestampAbsoluteUs kTimestampAbsoluteUs() { return {}; } + static constexpr FieldMetadata_TimestampAbsoluteUs kTimestampAbsoluteUs{}; void set_timestamp_absolute_us(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_TimestampAbsoluteUs::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -129529,14 +127097,7 @@ class TrackEvent : public ::protozero::Message { int64_t, TrackEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ThreadTimeDeltaUs kThreadTimeDeltaUs() { return {}; } + static constexpr FieldMetadata_ThreadTimeDeltaUs kThreadTimeDeltaUs{}; void set_thread_time_delta_us(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_ThreadTimeDeltaUs::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -129554,14 +127115,7 @@ class TrackEvent : public ::protozero::Message { int64_t, TrackEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ThreadTimeAbsoluteUs kThreadTimeAbsoluteUs() { return {}; } + static constexpr FieldMetadata_ThreadTimeAbsoluteUs kThreadTimeAbsoluteUs{}; void set_thread_time_absolute_us(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_ThreadTimeAbsoluteUs::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -129579,14 +127133,7 @@ class TrackEvent : public ::protozero::Message { int64_t, TrackEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ThreadInstructionCountDelta kThreadInstructionCountDelta() { return {}; } + static constexpr FieldMetadata_ThreadInstructionCountDelta kThreadInstructionCountDelta{}; void set_thread_instruction_count_delta(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_ThreadInstructionCountDelta::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -129604,14 +127151,7 @@ class TrackEvent : public ::protozero::Message { int64_t, TrackEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ThreadInstructionCountAbsolute kThreadInstructionCountAbsolute() { return {}; } + static constexpr FieldMetadata_ThreadInstructionCountAbsolute kThreadInstructionCountAbsolute{}; void set_thread_instruction_count_absolute(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_ThreadInstructionCountAbsolute::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -129629,14 +127169,7 @@ class TrackEvent : public ::protozero::Message { TrackEvent_LegacyEvent, TrackEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_LegacyEvent kLegacyEvent() { return {}; } + static constexpr FieldMetadata_LegacyEvent kLegacyEvent{}; template T* set_legacy_event() { return BeginNestedMessage(6); } @@ -129705,16 +127238,24 @@ class TrackEvent_LegacyEvent : public ::protozero::Message { }; static constexpr const char* GetName() { return ".perfetto.protos.TrackEvent.LegacyEvent"; } + using FlowDirection = ::perfetto::protos::pbzero::TrackEvent_LegacyEvent_FlowDirection; + static inline const char* FlowDirection_Name(FlowDirection value) { + return ::perfetto::protos::pbzero::TrackEvent_LegacyEvent_FlowDirection_Name(value); + } + using InstantEventScope = ::perfetto::protos::pbzero::TrackEvent_LegacyEvent_InstantEventScope; - static const FlowDirection FLOW_UNSPECIFIED = TrackEvent_LegacyEvent_FlowDirection_FLOW_UNSPECIFIED; - static const FlowDirection FLOW_IN = TrackEvent_LegacyEvent_FlowDirection_FLOW_IN; - static const FlowDirection FLOW_OUT = TrackEvent_LegacyEvent_FlowDirection_FLOW_OUT; - static const FlowDirection FLOW_INOUT = TrackEvent_LegacyEvent_FlowDirection_FLOW_INOUT; - static const InstantEventScope SCOPE_UNSPECIFIED = TrackEvent_LegacyEvent_InstantEventScope_SCOPE_UNSPECIFIED; - static const InstantEventScope SCOPE_GLOBAL = TrackEvent_LegacyEvent_InstantEventScope_SCOPE_GLOBAL; - static const InstantEventScope SCOPE_PROCESS = TrackEvent_LegacyEvent_InstantEventScope_SCOPE_PROCESS; - static const InstantEventScope SCOPE_THREAD = TrackEvent_LegacyEvent_InstantEventScope_SCOPE_THREAD; + static inline const char* InstantEventScope_Name(InstantEventScope value) { + return ::perfetto::protos::pbzero::TrackEvent_LegacyEvent_InstantEventScope_Name(value); + } + static const FlowDirection FLOW_UNSPECIFIED = FlowDirection::FLOW_UNSPECIFIED; + static const FlowDirection FLOW_IN = FlowDirection::FLOW_IN; + static const FlowDirection FLOW_OUT = FlowDirection::FLOW_OUT; + static const FlowDirection FLOW_INOUT = FlowDirection::FLOW_INOUT; + static const InstantEventScope SCOPE_UNSPECIFIED = InstantEventScope::SCOPE_UNSPECIFIED; + static const InstantEventScope SCOPE_GLOBAL = InstantEventScope::SCOPE_GLOBAL; + static const InstantEventScope SCOPE_PROCESS = InstantEventScope::SCOPE_PROCESS; + static const InstantEventScope SCOPE_THREAD = InstantEventScope::SCOPE_THREAD; using FieldMetadata_NameIid = ::protozero::proto_utils::FieldMetadata< @@ -129724,14 +127265,7 @@ class TrackEvent_LegacyEvent : public ::protozero::Message { uint64_t, TrackEvent_LegacyEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_NameIid kNameIid() { return {}; } + static constexpr FieldMetadata_NameIid kNameIid{}; void set_name_iid(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_NameIid::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -129749,14 +127283,7 @@ class TrackEvent_LegacyEvent : public ::protozero::Message { int32_t, TrackEvent_LegacyEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Phase kPhase() { return {}; } + static constexpr FieldMetadata_Phase kPhase{}; void set_phase(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Phase::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -129774,14 +127301,7 @@ class TrackEvent_LegacyEvent : public ::protozero::Message { int64_t, TrackEvent_LegacyEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_DurationUs kDurationUs() { return {}; } + static constexpr FieldMetadata_DurationUs kDurationUs{}; void set_duration_us(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_DurationUs::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -129799,14 +127319,7 @@ class TrackEvent_LegacyEvent : public ::protozero::Message { int64_t, TrackEvent_LegacyEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ThreadDurationUs kThreadDurationUs() { return {}; } + static constexpr FieldMetadata_ThreadDurationUs kThreadDurationUs{}; void set_thread_duration_us(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_ThreadDurationUs::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -129824,14 +127337,7 @@ class TrackEvent_LegacyEvent : public ::protozero::Message { int64_t, TrackEvent_LegacyEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ThreadInstructionDelta kThreadInstructionDelta() { return {}; } + static constexpr FieldMetadata_ThreadInstructionDelta kThreadInstructionDelta{}; void set_thread_instruction_delta(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_ThreadInstructionDelta::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -129849,14 +127355,7 @@ class TrackEvent_LegacyEvent : public ::protozero::Message { uint64_t, TrackEvent_LegacyEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_UnscopedId kUnscopedId() { return {}; } + static constexpr FieldMetadata_UnscopedId kUnscopedId{}; void set_unscoped_id(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_UnscopedId::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -129874,14 +127373,7 @@ class TrackEvent_LegacyEvent : public ::protozero::Message { uint64_t, TrackEvent_LegacyEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_LocalId kLocalId() { return {}; } + static constexpr FieldMetadata_LocalId kLocalId{}; void set_local_id(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_LocalId::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -129899,14 +127391,7 @@ class TrackEvent_LegacyEvent : public ::protozero::Message { uint64_t, TrackEvent_LegacyEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_GlobalId kGlobalId() { return {}; } + static constexpr FieldMetadata_GlobalId kGlobalId{}; void set_global_id(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_GlobalId::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -129924,17 +127409,13 @@ class TrackEvent_LegacyEvent : public ::protozero::Message { std::string, TrackEvent_LegacyEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_IdScope kIdScope() { return {}; } + static constexpr FieldMetadata_IdScope kIdScope{}; void set_id_scope(const char* data, size_t size) { AppendBytes(FieldMetadata_IdScope::kFieldId, data, size); } + void set_id_scope(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_IdScope::kFieldId, chars.data, chars.size); + } void set_id_scope(std::string value) { static constexpr uint32_t field_id = FieldMetadata_IdScope::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -129952,14 +127433,7 @@ class TrackEvent_LegacyEvent : public ::protozero::Message { bool, TrackEvent_LegacyEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_UseAsyncTts kUseAsyncTts() { return {}; } + static constexpr FieldMetadata_UseAsyncTts kUseAsyncTts{}; void set_use_async_tts(bool value) { static constexpr uint32_t field_id = FieldMetadata_UseAsyncTts::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -129977,14 +127451,7 @@ class TrackEvent_LegacyEvent : public ::protozero::Message { uint64_t, TrackEvent_LegacyEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_BindId kBindId() { return {}; } + static constexpr FieldMetadata_BindId kBindId{}; void set_bind_id(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_BindId::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -130002,14 +127469,7 @@ class TrackEvent_LegacyEvent : public ::protozero::Message { bool, TrackEvent_LegacyEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_BindToEnclosing kBindToEnclosing() { return {}; } + static constexpr FieldMetadata_BindToEnclosing kBindToEnclosing{}; void set_bind_to_enclosing(bool value) { static constexpr uint32_t field_id = FieldMetadata_BindToEnclosing::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -130027,14 +127487,7 @@ class TrackEvent_LegacyEvent : public ::protozero::Message { ::perfetto::protos::pbzero::TrackEvent_LegacyEvent_FlowDirection, TrackEvent_LegacyEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_FlowDirection kFlowDirection() { return {}; } + static constexpr FieldMetadata_FlowDirection kFlowDirection{}; void set_flow_direction(::perfetto::protos::pbzero::TrackEvent_LegacyEvent_FlowDirection value) { static constexpr uint32_t field_id = FieldMetadata_FlowDirection::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -130052,14 +127505,7 @@ class TrackEvent_LegacyEvent : public ::protozero::Message { ::perfetto::protos::pbzero::TrackEvent_LegacyEvent_InstantEventScope, TrackEvent_LegacyEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_InstantEventScope kInstantEventScope() { return {}; } + static constexpr FieldMetadata_InstantEventScope kInstantEventScope{}; void set_instant_event_scope(::perfetto::protos::pbzero::TrackEvent_LegacyEvent_InstantEventScope value) { static constexpr uint32_t field_id = FieldMetadata_InstantEventScope::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -130077,14 +127523,7 @@ class TrackEvent_LegacyEvent : public ::protozero::Message { int32_t, TrackEvent_LegacyEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_PidOverride kPidOverride() { return {}; } + static constexpr FieldMetadata_PidOverride kPidOverride{}; void set_pid_override(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_PidOverride::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -130102,14 +127541,7 @@ class TrackEvent_LegacyEvent : public ::protozero::Message { int32_t, TrackEvent_LegacyEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_TidOverride kTidOverride() { return {}; } + static constexpr FieldMetadata_TidOverride kTidOverride{}; void set_tid_override(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_TidOverride::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -130155,11 +127587,12 @@ class InternedGraphicsContext; class InternedString; class LogMessageBody; class Mapping; +class NetworkPacketContext; class ProfiledFrameSymbols; class SourceLocation; class UnsymbolizedSourceLocation; -class InternedData_Decoder : public ::protozero::TypedProtoDecoder { +class InternedData_Decoder : public ::protozero::TypedProtoDecoder { public: InternedData_Decoder(const uint8_t* data, size_t len) : TypedProtoDecoder(data, len) {} explicit InternedData_Decoder(const std::string& raw) : TypedProtoDecoder(reinterpret_cast(raw.data()), raw.size()) {} @@ -130204,6 +127637,10 @@ class InternedData_Decoder : public ::protozero::TypedProtoDecoder gpu_specifications() const { return GetRepeated<::protozero::ConstBytes>(24); } bool has_kernel_symbols() const { return at<26>().valid(); } ::protozero::RepeatedFieldIterator<::protozero::ConstBytes> kernel_symbols() const { return GetRepeated<::protozero::ConstBytes>(26); } + bool has_debug_annotation_string_values() const { return at<29>().valid(); } + ::protozero::RepeatedFieldIterator<::protozero::ConstBytes> debug_annotation_string_values() const { return GetRepeated<::protozero::ConstBytes>(29); } + bool has_packet_context() const { return at<30>().valid(); } + ::protozero::RepeatedFieldIterator<::protozero::ConstBytes> packet_context() const { return GetRepeated<::protozero::ConstBytes>(30); } }; class InternedData : public ::protozero::Message { @@ -130230,6 +127667,8 @@ class InternedData : public ::protozero::Message { kGraphicsContextsFieldNumber = 23, kGpuSpecificationsFieldNumber = 24, kKernelSymbolsFieldNumber = 26, + kDebugAnnotationStringValuesFieldNumber = 29, + kPacketContextFieldNumber = 30, }; static constexpr const char* GetName() { return ".perfetto.protos.InternedData"; } @@ -130242,14 +127681,7 @@ class InternedData : public ::protozero::Message { EventCategory, InternedData>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_EventCategories kEventCategories() { return {}; } + static constexpr FieldMetadata_EventCategories kEventCategories{}; template T* add_event_categories() { return BeginNestedMessage(1); } @@ -130263,14 +127695,7 @@ class InternedData : public ::protozero::Message { EventName, InternedData>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_EventNames kEventNames() { return {}; } + static constexpr FieldMetadata_EventNames kEventNames{}; template T* add_event_names() { return BeginNestedMessage(2); } @@ -130284,14 +127709,7 @@ class InternedData : public ::protozero::Message { DebugAnnotationName, InternedData>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_DebugAnnotationNames kDebugAnnotationNames() { return {}; } + static constexpr FieldMetadata_DebugAnnotationNames kDebugAnnotationNames{}; template T* add_debug_annotation_names() { return BeginNestedMessage(3); } @@ -130305,14 +127723,7 @@ class InternedData : public ::protozero::Message { DebugAnnotationValueTypeName, InternedData>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_DebugAnnotationValueTypeNames kDebugAnnotationValueTypeNames() { return {}; } + static constexpr FieldMetadata_DebugAnnotationValueTypeNames kDebugAnnotationValueTypeNames{}; template T* add_debug_annotation_value_type_names() { return BeginNestedMessage(27); } @@ -130326,14 +127737,7 @@ class InternedData : public ::protozero::Message { SourceLocation, InternedData>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_SourceLocations kSourceLocations() { return {}; } + static constexpr FieldMetadata_SourceLocations kSourceLocations{}; template T* add_source_locations() { return BeginNestedMessage(4); } @@ -130347,14 +127751,7 @@ class InternedData : public ::protozero::Message { UnsymbolizedSourceLocation, InternedData>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_UnsymbolizedSourceLocations kUnsymbolizedSourceLocations() { return {}; } + static constexpr FieldMetadata_UnsymbolizedSourceLocations kUnsymbolizedSourceLocations{}; template T* add_unsymbolized_source_locations() { return BeginNestedMessage(28); } @@ -130368,14 +127765,7 @@ class InternedData : public ::protozero::Message { LogMessageBody, InternedData>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_LogMessageBody kLogMessageBody() { return {}; } + static constexpr FieldMetadata_LogMessageBody kLogMessageBody{}; template T* add_log_message_body() { return BeginNestedMessage(20); } @@ -130389,14 +127779,7 @@ class InternedData : public ::protozero::Message { HistogramName, InternedData>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_HistogramNames kHistogramNames() { return {}; } + static constexpr FieldMetadata_HistogramNames kHistogramNames{}; template T* add_histogram_names() { return BeginNestedMessage(25); } @@ -130410,14 +127793,7 @@ class InternedData : public ::protozero::Message { InternedString, InternedData>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_BuildIds kBuildIds() { return {}; } + static constexpr FieldMetadata_BuildIds kBuildIds{}; template T* add_build_ids() { return BeginNestedMessage(16); } @@ -130431,14 +127807,7 @@ class InternedData : public ::protozero::Message { InternedString, InternedData>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_MappingPaths kMappingPaths() { return {}; } + static constexpr FieldMetadata_MappingPaths kMappingPaths{}; template T* add_mapping_paths() { return BeginNestedMessage(17); } @@ -130452,14 +127821,7 @@ class InternedData : public ::protozero::Message { InternedString, InternedData>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_SourcePaths kSourcePaths() { return {}; } + static constexpr FieldMetadata_SourcePaths kSourcePaths{}; template T* add_source_paths() { return BeginNestedMessage(18); } @@ -130473,14 +127835,7 @@ class InternedData : public ::protozero::Message { InternedString, InternedData>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_FunctionNames kFunctionNames() { return {}; } + static constexpr FieldMetadata_FunctionNames kFunctionNames{}; template T* add_function_names() { return BeginNestedMessage(5); } @@ -130494,14 +127849,7 @@ class InternedData : public ::protozero::Message { ProfiledFrameSymbols, InternedData>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ProfiledFrameSymbols kProfiledFrameSymbols() { return {}; } + static constexpr FieldMetadata_ProfiledFrameSymbols kProfiledFrameSymbols{}; template T* add_profiled_frame_symbols() { return BeginNestedMessage(21); } @@ -130515,14 +127863,7 @@ class InternedData : public ::protozero::Message { Mapping, InternedData>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Mappings kMappings() { return {}; } + static constexpr FieldMetadata_Mappings kMappings{}; template T* add_mappings() { return BeginNestedMessage(19); } @@ -130536,14 +127877,7 @@ class InternedData : public ::protozero::Message { Frame, InternedData>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Frames kFrames() { return {}; } + static constexpr FieldMetadata_Frames kFrames{}; template T* add_frames() { return BeginNestedMessage(6); } @@ -130557,14 +127891,7 @@ class InternedData : public ::protozero::Message { Callstack, InternedData>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Callstacks kCallstacks() { return {}; } + static constexpr FieldMetadata_Callstacks kCallstacks{}; template T* add_callstacks() { return BeginNestedMessage(7); } @@ -130578,14 +127905,7 @@ class InternedData : public ::protozero::Message { InternedString, InternedData>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_VulkanMemoryKeys kVulkanMemoryKeys() { return {}; } + static constexpr FieldMetadata_VulkanMemoryKeys kVulkanMemoryKeys{}; template T* add_vulkan_memory_keys() { return BeginNestedMessage(22); } @@ -130599,14 +127919,7 @@ class InternedData : public ::protozero::Message { InternedGraphicsContext, InternedData>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_GraphicsContexts kGraphicsContexts() { return {}; } + static constexpr FieldMetadata_GraphicsContexts kGraphicsContexts{}; template T* add_graphics_contexts() { return BeginNestedMessage(23); } @@ -130620,14 +127933,7 @@ class InternedData : public ::protozero::Message { InternedGpuRenderStageSpecification, InternedData>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_GpuSpecifications kGpuSpecifications() { return {}; } + static constexpr FieldMetadata_GpuSpecifications kGpuSpecifications{}; template T* add_gpu_specifications() { return BeginNestedMessage(24); } @@ -130641,18 +127947,39 @@ class InternedData : public ::protozero::Message { InternedString, InternedData>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_KernelSymbols kKernelSymbols() { return {}; } + static constexpr FieldMetadata_KernelSymbols kKernelSymbols{}; template T* add_kernel_symbols() { return BeginNestedMessage(26); } + + using FieldMetadata_DebugAnnotationStringValues = + ::protozero::proto_utils::FieldMetadata< + 29, + ::protozero::proto_utils::RepetitionType::kRepeatedNotPacked, + ::protozero::proto_utils::ProtoSchemaType::kMessage, + InternedString, + InternedData>; + + static constexpr FieldMetadata_DebugAnnotationStringValues kDebugAnnotationStringValues{}; + template T* add_debug_annotation_string_values() { + return BeginNestedMessage(29); + } + + + using FieldMetadata_PacketContext = + ::protozero::proto_utils::FieldMetadata< + 30, + ::protozero::proto_utils::RepetitionType::kRepeatedNotPacked, + ::protozero::proto_utils::ProtoSchemaType::kMessage, + NetworkPacketContext, + InternedData>; + + static constexpr FieldMetadata_PacketContext kPacketContext{}; + template T* add_packet_context() { + return BeginNestedMessage(30); + } + }; } // Namespace. @@ -130679,8 +128006,9 @@ namespace protos { namespace pbzero { class PerfettoMetatrace_Arg; +class PerfettoMetatrace_InternedString; -class PerfettoMetatrace_Decoder : public ::protozero::TypedProtoDecoder { +class PerfettoMetatrace_Decoder : public ::protozero::TypedProtoDecoder { public: PerfettoMetatrace_Decoder(const uint8_t* data, size_t len) : TypedProtoDecoder(data, len) {} explicit PerfettoMetatrace_Decoder(const std::string& raw) : TypedProtoDecoder(reinterpret_cast(raw.data()), raw.size()) {} @@ -130691,6 +128019,8 @@ class PerfettoMetatrace_Decoder : public ::protozero::TypedProtoDecoder().as_uint32(); } bool has_event_name() const { return at<8>().valid(); } ::protozero::ConstChars event_name() const { return at<8>().as_string(); } + bool has_event_name_iid() const { return at<11>().valid(); } + uint64_t event_name_iid() const { return at<11>().as_uint64(); } bool has_counter_name() const { return at<9>().valid(); } ::protozero::ConstChars counter_name() const { return at<9>().as_string(); } bool has_event_duration_ns() const { return at<3>().valid(); } @@ -130703,6 +128033,8 @@ class PerfettoMetatrace_Decoder : public ::protozero::TypedProtoDecoder().as_bool(); } bool has_args() const { return at<7>().valid(); } ::protozero::RepeatedFieldIterator<::protozero::ConstBytes> args() const { return GetRepeated<::protozero::ConstBytes>(7); } + bool has_interned_strings() const { return at<10>().valid(); } + ::protozero::RepeatedFieldIterator<::protozero::ConstBytes> interned_strings() const { return GetRepeated<::protozero::ConstBytes>(10); } }; class PerfettoMetatrace : public ::protozero::Message { @@ -130712,16 +128044,19 @@ class PerfettoMetatrace : public ::protozero::Message { kEventIdFieldNumber = 1, kCounterIdFieldNumber = 2, kEventNameFieldNumber = 8, + kEventNameIidFieldNumber = 11, kCounterNameFieldNumber = 9, kEventDurationNsFieldNumber = 3, kCounterValueFieldNumber = 4, kThreadIdFieldNumber = 5, kHasOverrunsFieldNumber = 6, kArgsFieldNumber = 7, + kInternedStringsFieldNumber = 10, }; static constexpr const char* GetName() { return ".perfetto.protos.PerfettoMetatrace"; } using Arg = ::perfetto::protos::pbzero::PerfettoMetatrace_Arg; + using InternedString = ::perfetto::protos::pbzero::PerfettoMetatrace_InternedString; using FieldMetadata_EventId = ::protozero::proto_utils::FieldMetadata< @@ -130731,14 +128066,7 @@ class PerfettoMetatrace : public ::protozero::Message { uint32_t, PerfettoMetatrace>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_EventId kEventId() { return {}; } + static constexpr FieldMetadata_EventId kEventId{}; void set_event_id(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_EventId::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -130756,14 +128084,7 @@ class PerfettoMetatrace : public ::protozero::Message { uint32_t, PerfettoMetatrace>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_CounterId kCounterId() { return {}; } + static constexpr FieldMetadata_CounterId kCounterId{}; void set_counter_id(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_CounterId::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -130781,17 +128102,13 @@ class PerfettoMetatrace : public ::protozero::Message { std::string, PerfettoMetatrace>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_EventName kEventName() { return {}; } + static constexpr FieldMetadata_EventName kEventName{}; void set_event_name(const char* data, size_t size) { AppendBytes(FieldMetadata_EventName::kFieldId, data, size); } + void set_event_name(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_EventName::kFieldId, chars.data, chars.size); + } void set_event_name(std::string value) { static constexpr uint32_t field_id = FieldMetadata_EventName::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -130801,6 +128118,24 @@ class PerfettoMetatrace : public ::protozero::Message { ::Append(*this, field_id, value); } + using FieldMetadata_EventNameIid = + ::protozero::proto_utils::FieldMetadata< + 11, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint64, + uint64_t, + PerfettoMetatrace>; + + static constexpr FieldMetadata_EventNameIid kEventNameIid{}; + void set_event_name_iid(uint64_t value) { + static constexpr uint32_t field_id = FieldMetadata_EventNameIid::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint64> + ::Append(*this, field_id, value); + } + using FieldMetadata_CounterName = ::protozero::proto_utils::FieldMetadata< 9, @@ -130809,17 +128144,13 @@ class PerfettoMetatrace : public ::protozero::Message { std::string, PerfettoMetatrace>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_CounterName kCounterName() { return {}; } + static constexpr FieldMetadata_CounterName kCounterName{}; void set_counter_name(const char* data, size_t size) { AppendBytes(FieldMetadata_CounterName::kFieldId, data, size); } + void set_counter_name(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_CounterName::kFieldId, chars.data, chars.size); + } void set_counter_name(std::string value) { static constexpr uint32_t field_id = FieldMetadata_CounterName::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -130837,14 +128168,7 @@ class PerfettoMetatrace : public ::protozero::Message { uint64_t, PerfettoMetatrace>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_EventDurationNs kEventDurationNs() { return {}; } + static constexpr FieldMetadata_EventDurationNs kEventDurationNs{}; void set_event_duration_ns(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_EventDurationNs::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -130862,14 +128186,7 @@ class PerfettoMetatrace : public ::protozero::Message { int32_t, PerfettoMetatrace>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_CounterValue kCounterValue() { return {}; } + static constexpr FieldMetadata_CounterValue kCounterValue{}; void set_counter_value(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_CounterValue::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -130887,14 +128204,7 @@ class PerfettoMetatrace : public ::protozero::Message { uint32_t, PerfettoMetatrace>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ThreadId kThreadId() { return {}; } + static constexpr FieldMetadata_ThreadId kThreadId{}; void set_thread_id(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_ThreadId::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -130912,14 +128222,7 @@ class PerfettoMetatrace : public ::protozero::Message { bool, PerfettoMetatrace>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_HasOverruns kHasOverruns() { return {}; } + static constexpr FieldMetadata_HasOverruns kHasOverruns{}; void set_has_overruns(bool value) { static constexpr uint32_t field_id = FieldMetadata_HasOverruns::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -130937,29 +128240,104 @@ class PerfettoMetatrace : public ::protozero::Message { PerfettoMetatrace_Arg, PerfettoMetatrace>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Args kArgs() { return {}; } + static constexpr FieldMetadata_Args kArgs{}; template T* add_args() { return BeginNestedMessage(7); } + + using FieldMetadata_InternedStrings = + ::protozero::proto_utils::FieldMetadata< + 10, + ::protozero::proto_utils::RepetitionType::kRepeatedNotPacked, + ::protozero::proto_utils::ProtoSchemaType::kMessage, + PerfettoMetatrace_InternedString, + PerfettoMetatrace>; + + static constexpr FieldMetadata_InternedStrings kInternedStrings{}; + template T* add_interned_strings() { + return BeginNestedMessage(10); + } + }; -class PerfettoMetatrace_Arg_Decoder : public ::protozero::TypedProtoDecoder { +class PerfettoMetatrace_InternedString_Decoder : public ::protozero::TypedProtoDecoder { + public: + PerfettoMetatrace_InternedString_Decoder(const uint8_t* data, size_t len) : TypedProtoDecoder(data, len) {} + explicit PerfettoMetatrace_InternedString_Decoder(const std::string& raw) : TypedProtoDecoder(reinterpret_cast(raw.data()), raw.size()) {} + explicit PerfettoMetatrace_InternedString_Decoder(const ::protozero::ConstBytes& raw) : TypedProtoDecoder(raw.data, raw.size) {} + bool has_iid() const { return at<1>().valid(); } + uint64_t iid() const { return at<1>().as_uint64(); } + bool has_value() const { return at<2>().valid(); } + ::protozero::ConstChars value() const { return at<2>().as_string(); } +}; + +class PerfettoMetatrace_InternedString : public ::protozero::Message { + public: + using Decoder = PerfettoMetatrace_InternedString_Decoder; + enum : int32_t { + kIidFieldNumber = 1, + kValueFieldNumber = 2, + }; + static constexpr const char* GetName() { return ".perfetto.protos.PerfettoMetatrace.InternedString"; } + + + using FieldMetadata_Iid = + ::protozero::proto_utils::FieldMetadata< + 1, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint64, + uint64_t, + PerfettoMetatrace_InternedString>; + + static constexpr FieldMetadata_Iid kIid{}; + void set_iid(uint64_t value) { + static constexpr uint32_t field_id = FieldMetadata_Iid::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint64> + ::Append(*this, field_id, value); + } + + using FieldMetadata_Value = + ::protozero::proto_utils::FieldMetadata< + 2, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kString, + std::string, + PerfettoMetatrace_InternedString>; + + static constexpr FieldMetadata_Value kValue{}; + void set_value(const char* data, size_t size) { + AppendBytes(FieldMetadata_Value::kFieldId, data, size); + } + void set_value(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Value::kFieldId, chars.data, chars.size); + } + void set_value(std::string value) { + static constexpr uint32_t field_id = FieldMetadata_Value::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kString> + ::Append(*this, field_id, value); + } +}; + +class PerfettoMetatrace_Arg_Decoder : public ::protozero::TypedProtoDecoder { public: PerfettoMetatrace_Arg_Decoder(const uint8_t* data, size_t len) : TypedProtoDecoder(data, len) {} explicit PerfettoMetatrace_Arg_Decoder(const std::string& raw) : TypedProtoDecoder(reinterpret_cast(raw.data()), raw.size()) {} explicit PerfettoMetatrace_Arg_Decoder(const ::protozero::ConstBytes& raw) : TypedProtoDecoder(raw.data, raw.size) {} bool has_key() const { return at<1>().valid(); } ::protozero::ConstChars key() const { return at<1>().as_string(); } + bool has_key_iid() const { return at<3>().valid(); } + uint64_t key_iid() const { return at<3>().as_uint64(); } bool has_value() const { return at<2>().valid(); } ::protozero::ConstChars value() const { return at<2>().as_string(); } + bool has_value_iid() const { return at<4>().valid(); } + uint64_t value_iid() const { return at<4>().as_uint64(); } }; class PerfettoMetatrace_Arg : public ::protozero::Message { @@ -130967,7 +128345,9 @@ class PerfettoMetatrace_Arg : public ::protozero::Message { using Decoder = PerfettoMetatrace_Arg_Decoder; enum : int32_t { kKeyFieldNumber = 1, + kKeyIidFieldNumber = 3, kValueFieldNumber = 2, + kValueIidFieldNumber = 4, }; static constexpr const char* GetName() { return ".perfetto.protos.PerfettoMetatrace.Arg"; } @@ -130980,17 +128360,13 @@ class PerfettoMetatrace_Arg : public ::protozero::Message { std::string, PerfettoMetatrace_Arg>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Key kKey() { return {}; } + static constexpr FieldMetadata_Key kKey{}; void set_key(const char* data, size_t size) { AppendBytes(FieldMetadata_Key::kFieldId, data, size); } + void set_key(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Key::kFieldId, chars.data, chars.size); + } void set_key(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Key::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -131000,6 +128376,24 @@ class PerfettoMetatrace_Arg : public ::protozero::Message { ::Append(*this, field_id, value); } + using FieldMetadata_KeyIid = + ::protozero::proto_utils::FieldMetadata< + 3, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint64, + uint64_t, + PerfettoMetatrace_Arg>; + + static constexpr FieldMetadata_KeyIid kKeyIid{}; + void set_key_iid(uint64_t value) { + static constexpr uint32_t field_id = FieldMetadata_KeyIid::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint64> + ::Append(*this, field_id, value); + } + using FieldMetadata_Value = ::protozero::proto_utils::FieldMetadata< 2, @@ -131008,17 +128402,13 @@ class PerfettoMetatrace_Arg : public ::protozero::Message { std::string, PerfettoMetatrace_Arg>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Value kValue() { return {}; } + static constexpr FieldMetadata_Value kValue{}; void set_value(const char* data, size_t size) { AppendBytes(FieldMetadata_Value::kFieldId, data, size); } + void set_value(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Value::kFieldId, chars.data, chars.size); + } void set_value(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Value::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -131027,6 +128417,24 @@ class PerfettoMetatrace_Arg : public ::protozero::Message { ::protozero::proto_utils::ProtoSchemaType::kString> ::Append(*this, field_id, value); } + + using FieldMetadata_ValueIid = + ::protozero::proto_utils::FieldMetadata< + 4, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint64, + uint64_t, + PerfettoMetatrace_Arg>; + + static constexpr FieldMetadata_ValueIid kValueIid{}; + void set_value_iid(uint64_t value) { + static constexpr uint32_t field_id = FieldMetadata_ValueIid::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint64> + ::Append(*this, field_id, value); + } }; } // Namespace. @@ -131094,14 +128502,7 @@ class TracingServiceEvent : public ::protozero::Message { bool, TracingServiceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_TracingStarted kTracingStarted() { return {}; } + static constexpr FieldMetadata_TracingStarted kTracingStarted{}; void set_tracing_started(bool value) { static constexpr uint32_t field_id = FieldMetadata_TracingStarted::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -131119,14 +128520,7 @@ class TracingServiceEvent : public ::protozero::Message { bool, TracingServiceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_AllDataSourcesStarted kAllDataSourcesStarted() { return {}; } + static constexpr FieldMetadata_AllDataSourcesStarted kAllDataSourcesStarted{}; void set_all_data_sources_started(bool value) { static constexpr uint32_t field_id = FieldMetadata_AllDataSourcesStarted::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -131144,14 +128538,7 @@ class TracingServiceEvent : public ::protozero::Message { bool, TracingServiceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_AllDataSourcesFlushed kAllDataSourcesFlushed() { return {}; } + static constexpr FieldMetadata_AllDataSourcesFlushed kAllDataSourcesFlushed{}; void set_all_data_sources_flushed(bool value) { static constexpr uint32_t field_id = FieldMetadata_AllDataSourcesFlushed::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -131169,14 +128556,7 @@ class TracingServiceEvent : public ::protozero::Message { bool, TracingServiceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ReadTracingBuffersCompleted kReadTracingBuffersCompleted() { return {}; } + static constexpr FieldMetadata_ReadTracingBuffersCompleted kReadTracingBuffersCompleted{}; void set_read_tracing_buffers_completed(bool value) { static constexpr uint32_t field_id = FieldMetadata_ReadTracingBuffersCompleted::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -131194,14 +128574,7 @@ class TracingServiceEvent : public ::protozero::Message { bool, TracingServiceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_TracingDisabled kTracingDisabled() { return {}; } + static constexpr FieldMetadata_TracingDisabled kTracingDisabled{}; void set_tracing_disabled(bool value) { static constexpr uint32_t field_id = FieldMetadata_TracingDisabled::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -131219,14 +128592,7 @@ class TracingServiceEvent : public ::protozero::Message { bool, TracingServiceEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_SeizedForBugreport kSeizedForBugreport() { return {}; } + static constexpr FieldMetadata_SeizedForBugreport kSeizedForBugreport{}; void set_seized_for_bugreport(bool value) { static constexpr uint32_t field_id = FieldMetadata_SeizedForBugreport::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -131299,14 +128665,7 @@ class AndroidEnergyEstimationBreakdown : public ::protozero::Message { AndroidEnergyConsumerDescriptor, AndroidEnergyEstimationBreakdown>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_EnergyConsumerDescriptor kEnergyConsumerDescriptor() { return {}; } + static constexpr FieldMetadata_EnergyConsumerDescriptor kEnergyConsumerDescriptor{}; template T* set_energy_consumer_descriptor() { return BeginNestedMessage(1); } @@ -131320,14 +128679,7 @@ class AndroidEnergyEstimationBreakdown : public ::protozero::Message { int32_t, AndroidEnergyEstimationBreakdown>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_EnergyConsumerId kEnergyConsumerId() { return {}; } + static constexpr FieldMetadata_EnergyConsumerId kEnergyConsumerId{}; void set_energy_consumer_id(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_EnergyConsumerId::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -131345,14 +128697,7 @@ class AndroidEnergyEstimationBreakdown : public ::protozero::Message { int64_t, AndroidEnergyEstimationBreakdown>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_EnergyUws kEnergyUws() { return {}; } + static constexpr FieldMetadata_EnergyUws kEnergyUws{}; void set_energy_uws(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_EnergyUws::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -131370,14 +128715,7 @@ class AndroidEnergyEstimationBreakdown : public ::protozero::Message { AndroidEnergyEstimationBreakdown_EnergyUidBreakdown, AndroidEnergyEstimationBreakdown>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_PerUidBreakdown kPerUidBreakdown() { return {}; } + static constexpr FieldMetadata_PerUidBreakdown kPerUidBreakdown{}; template T* add_per_uid_breakdown() { return BeginNestedMessage(4); } @@ -131413,14 +128751,7 @@ class AndroidEnergyEstimationBreakdown_EnergyUidBreakdown : public ::protozero:: int32_t, AndroidEnergyEstimationBreakdown_EnergyUidBreakdown>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Uid kUid() { return {}; } + static constexpr FieldMetadata_Uid kUid{}; void set_uid(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Uid::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -131438,14 +128769,7 @@ class AndroidEnergyEstimationBreakdown_EnergyUidBreakdown : public ::protozero:: int64_t, AndroidEnergyEstimationBreakdown_EnergyUidBreakdown>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_EnergyUws kEnergyUws() { return {}; } + static constexpr FieldMetadata_EnergyUws kEnergyUws{}; void set_energy_uws(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_EnergyUws::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -131456,6 +128780,317 @@ class AndroidEnergyEstimationBreakdown_EnergyUidBreakdown : public ::protozero:: } }; +} // Namespace. +} // Namespace. +} // Namespace. +#endif // Include guard. +// gen_amalgamated begin header: gen/protos/perfetto/trace/power/android_entity_state_residency.pbzero.h +// Autogenerated by the ProtoZero compiler plugin. DO NOT EDIT. + +#ifndef PERFETTO_PROTOS_PROTOS_PERFETTO_TRACE_POWER_ANDROID_ENTITY_STATE_RESIDENCY_PROTO_H_ +#define PERFETTO_PROTOS_PROTOS_PERFETTO_TRACE_POWER_ANDROID_ENTITY_STATE_RESIDENCY_PROTO_H_ + +#include +#include + +// gen_amalgamated expanded: #include "perfetto/protozero/field_writer.h" +// gen_amalgamated expanded: #include "perfetto/protozero/message.h" +// gen_amalgamated expanded: #include "perfetto/protozero/packed_repeated_fields.h" +// gen_amalgamated expanded: #include "perfetto/protozero/proto_decoder.h" +// gen_amalgamated expanded: #include "perfetto/protozero/proto_utils.h" + +namespace perfetto { +namespace protos { +namespace pbzero { + +class EntityStateResidency_PowerEntityState; +class EntityStateResidency_StateResidency; + +class EntityStateResidency_Decoder : public ::protozero::TypedProtoDecoder { + public: + EntityStateResidency_Decoder(const uint8_t* data, size_t len) : TypedProtoDecoder(data, len) {} + explicit EntityStateResidency_Decoder(const std::string& raw) : TypedProtoDecoder(reinterpret_cast(raw.data()), raw.size()) {} + explicit EntityStateResidency_Decoder(const ::protozero::ConstBytes& raw) : TypedProtoDecoder(raw.data, raw.size) {} + bool has_power_entity_state() const { return at<1>().valid(); } + ::protozero::RepeatedFieldIterator<::protozero::ConstBytes> power_entity_state() const { return GetRepeated<::protozero::ConstBytes>(1); } + bool has_residency() const { return at<2>().valid(); } + ::protozero::RepeatedFieldIterator<::protozero::ConstBytes> residency() const { return GetRepeated<::protozero::ConstBytes>(2); } +}; + +class EntityStateResidency : public ::protozero::Message { + public: + using Decoder = EntityStateResidency_Decoder; + enum : int32_t { + kPowerEntityStateFieldNumber = 1, + kResidencyFieldNumber = 2, + }; + static constexpr const char* GetName() { return ".perfetto.protos.EntityStateResidency"; } + + using PowerEntityState = ::perfetto::protos::pbzero::EntityStateResidency_PowerEntityState; + using StateResidency = ::perfetto::protos::pbzero::EntityStateResidency_StateResidency; + + using FieldMetadata_PowerEntityState = + ::protozero::proto_utils::FieldMetadata< + 1, + ::protozero::proto_utils::RepetitionType::kRepeatedNotPacked, + ::protozero::proto_utils::ProtoSchemaType::kMessage, + EntityStateResidency_PowerEntityState, + EntityStateResidency>; + + static constexpr FieldMetadata_PowerEntityState kPowerEntityState{}; + template T* add_power_entity_state() { + return BeginNestedMessage(1); + } + + + using FieldMetadata_Residency = + ::protozero::proto_utils::FieldMetadata< + 2, + ::protozero::proto_utils::RepetitionType::kRepeatedNotPacked, + ::protozero::proto_utils::ProtoSchemaType::kMessage, + EntityStateResidency_StateResidency, + EntityStateResidency>; + + static constexpr FieldMetadata_Residency kResidency{}; + template T* add_residency() { + return BeginNestedMessage(2); + } + +}; + +class EntityStateResidency_StateResidency_Decoder : public ::protozero::TypedProtoDecoder { + public: + EntityStateResidency_StateResidency_Decoder(const uint8_t* data, size_t len) : TypedProtoDecoder(data, len) {} + explicit EntityStateResidency_StateResidency_Decoder(const std::string& raw) : TypedProtoDecoder(reinterpret_cast(raw.data()), raw.size()) {} + explicit EntityStateResidency_StateResidency_Decoder(const ::protozero::ConstBytes& raw) : TypedProtoDecoder(raw.data, raw.size) {} + bool has_entity_index() const { return at<1>().valid(); } + int32_t entity_index() const { return at<1>().as_int32(); } + bool has_state_index() const { return at<2>().valid(); } + int32_t state_index() const { return at<2>().as_int32(); } + bool has_total_time_in_state_ms() const { return at<3>().valid(); } + uint64_t total_time_in_state_ms() const { return at<3>().as_uint64(); } + bool has_total_state_entry_count() const { return at<4>().valid(); } + uint64_t total_state_entry_count() const { return at<4>().as_uint64(); } + bool has_last_entry_timestamp_ms() const { return at<5>().valid(); } + uint64_t last_entry_timestamp_ms() const { return at<5>().as_uint64(); } +}; + +class EntityStateResidency_StateResidency : public ::protozero::Message { + public: + using Decoder = EntityStateResidency_StateResidency_Decoder; + enum : int32_t { + kEntityIndexFieldNumber = 1, + kStateIndexFieldNumber = 2, + kTotalTimeInStateMsFieldNumber = 3, + kTotalStateEntryCountFieldNumber = 4, + kLastEntryTimestampMsFieldNumber = 5, + }; + static constexpr const char* GetName() { return ".perfetto.protos.EntityStateResidency.StateResidency"; } + + + using FieldMetadata_EntityIndex = + ::protozero::proto_utils::FieldMetadata< + 1, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kInt32, + int32_t, + EntityStateResidency_StateResidency>; + + static constexpr FieldMetadata_EntityIndex kEntityIndex{}; + void set_entity_index(int32_t value) { + static constexpr uint32_t field_id = FieldMetadata_EntityIndex::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kInt32> + ::Append(*this, field_id, value); + } + + using FieldMetadata_StateIndex = + ::protozero::proto_utils::FieldMetadata< + 2, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kInt32, + int32_t, + EntityStateResidency_StateResidency>; + + static constexpr FieldMetadata_StateIndex kStateIndex{}; + void set_state_index(int32_t value) { + static constexpr uint32_t field_id = FieldMetadata_StateIndex::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kInt32> + ::Append(*this, field_id, value); + } + + using FieldMetadata_TotalTimeInStateMs = + ::protozero::proto_utils::FieldMetadata< + 3, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint64, + uint64_t, + EntityStateResidency_StateResidency>; + + static constexpr FieldMetadata_TotalTimeInStateMs kTotalTimeInStateMs{}; + void set_total_time_in_state_ms(uint64_t value) { + static constexpr uint32_t field_id = FieldMetadata_TotalTimeInStateMs::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint64> + ::Append(*this, field_id, value); + } + + using FieldMetadata_TotalStateEntryCount = + ::protozero::proto_utils::FieldMetadata< + 4, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint64, + uint64_t, + EntityStateResidency_StateResidency>; + + static constexpr FieldMetadata_TotalStateEntryCount kTotalStateEntryCount{}; + void set_total_state_entry_count(uint64_t value) { + static constexpr uint32_t field_id = FieldMetadata_TotalStateEntryCount::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint64> + ::Append(*this, field_id, value); + } + + using FieldMetadata_LastEntryTimestampMs = + ::protozero::proto_utils::FieldMetadata< + 5, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint64, + uint64_t, + EntityStateResidency_StateResidency>; + + static constexpr FieldMetadata_LastEntryTimestampMs kLastEntryTimestampMs{}; + void set_last_entry_timestamp_ms(uint64_t value) { + static constexpr uint32_t field_id = FieldMetadata_LastEntryTimestampMs::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint64> + ::Append(*this, field_id, value); + } +}; + +class EntityStateResidency_PowerEntityState_Decoder : public ::protozero::TypedProtoDecoder { + public: + EntityStateResidency_PowerEntityState_Decoder(const uint8_t* data, size_t len) : TypedProtoDecoder(data, len) {} + explicit EntityStateResidency_PowerEntityState_Decoder(const std::string& raw) : TypedProtoDecoder(reinterpret_cast(raw.data()), raw.size()) {} + explicit EntityStateResidency_PowerEntityState_Decoder(const ::protozero::ConstBytes& raw) : TypedProtoDecoder(raw.data, raw.size) {} + bool has_entity_index() const { return at<1>().valid(); } + int32_t entity_index() const { return at<1>().as_int32(); } + bool has_state_index() const { return at<2>().valid(); } + int32_t state_index() const { return at<2>().as_int32(); } + bool has_entity_name() const { return at<3>().valid(); } + ::protozero::ConstChars entity_name() const { return at<3>().as_string(); } + bool has_state_name() const { return at<4>().valid(); } + ::protozero::ConstChars state_name() const { return at<4>().as_string(); } +}; + +class EntityStateResidency_PowerEntityState : public ::protozero::Message { + public: + using Decoder = EntityStateResidency_PowerEntityState_Decoder; + enum : int32_t { + kEntityIndexFieldNumber = 1, + kStateIndexFieldNumber = 2, + kEntityNameFieldNumber = 3, + kStateNameFieldNumber = 4, + }; + static constexpr const char* GetName() { return ".perfetto.protos.EntityStateResidency.PowerEntityState"; } + + + using FieldMetadata_EntityIndex = + ::protozero::proto_utils::FieldMetadata< + 1, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kInt32, + int32_t, + EntityStateResidency_PowerEntityState>; + + static constexpr FieldMetadata_EntityIndex kEntityIndex{}; + void set_entity_index(int32_t value) { + static constexpr uint32_t field_id = FieldMetadata_EntityIndex::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kInt32> + ::Append(*this, field_id, value); + } + + using FieldMetadata_StateIndex = + ::protozero::proto_utils::FieldMetadata< + 2, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kInt32, + int32_t, + EntityStateResidency_PowerEntityState>; + + static constexpr FieldMetadata_StateIndex kStateIndex{}; + void set_state_index(int32_t value) { + static constexpr uint32_t field_id = FieldMetadata_StateIndex::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kInt32> + ::Append(*this, field_id, value); + } + + using FieldMetadata_EntityName = + ::protozero::proto_utils::FieldMetadata< + 3, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kString, + std::string, + EntityStateResidency_PowerEntityState>; + + static constexpr FieldMetadata_EntityName kEntityName{}; + void set_entity_name(const char* data, size_t size) { + AppendBytes(FieldMetadata_EntityName::kFieldId, data, size); + } + void set_entity_name(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_EntityName::kFieldId, chars.data, chars.size); + } + void set_entity_name(std::string value) { + static constexpr uint32_t field_id = FieldMetadata_EntityName::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kString> + ::Append(*this, field_id, value); + } + + using FieldMetadata_StateName = + ::protozero::proto_utils::FieldMetadata< + 4, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kString, + std::string, + EntityStateResidency_PowerEntityState>; + + static constexpr FieldMetadata_StateName kStateName{}; + void set_state_name(const char* data, size_t size) { + AppendBytes(FieldMetadata_StateName::kFieldId, data, size); + } + void set_state_name(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_StateName::kFieldId, chars.data, chars.size); + } + void set_state_name(std::string value) { + static constexpr uint32_t field_id = FieldMetadata_StateName::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kString> + ::Append(*this, field_id, value); + } +}; + } // Namespace. } // Namespace. } // Namespace. @@ -131480,7 +129115,7 @@ namespace protos { namespace pbzero { -class BatteryCounters_Decoder : public ::protozero::TypedProtoDecoder { +class BatteryCounters_Decoder : public ::protozero::TypedProtoDecoder { public: BatteryCounters_Decoder(const uint8_t* data, size_t len) : TypedProtoDecoder(data, len) {} explicit BatteryCounters_Decoder(const std::string& raw) : TypedProtoDecoder(reinterpret_cast(raw.data()), raw.size()) {} @@ -131493,6 +129128,12 @@ class BatteryCounters_Decoder : public ::protozero::TypedProtoDecoder().as_int64(); } bool has_current_avg_ua() const { return at<4>().valid(); } int64_t current_avg_ua() const { return at<4>().as_int64(); } + bool has_name() const { return at<5>().valid(); } + ::protozero::ConstChars name() const { return at<5>().as_string(); } + bool has_energy_counter_uwh() const { return at<6>().valid(); } + int64_t energy_counter_uwh() const { return at<6>().as_int64(); } + bool has_voltage_uv() const { return at<7>().valid(); } + int64_t voltage_uv() const { return at<7>().as_int64(); } }; class BatteryCounters : public ::protozero::Message { @@ -131503,6 +129144,9 @@ class BatteryCounters : public ::protozero::Message { kCapacityPercentFieldNumber = 2, kCurrentUaFieldNumber = 3, kCurrentAvgUaFieldNumber = 4, + kNameFieldNumber = 5, + kEnergyCounterUwhFieldNumber = 6, + kVoltageUvFieldNumber = 7, }; static constexpr const char* GetName() { return ".perfetto.protos.BatteryCounters"; } @@ -131515,14 +129159,7 @@ class BatteryCounters : public ::protozero::Message { int64_t, BatteryCounters>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ChargeCounterUah kChargeCounterUah() { return {}; } + static constexpr FieldMetadata_ChargeCounterUah kChargeCounterUah{}; void set_charge_counter_uah(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_ChargeCounterUah::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -131540,14 +129177,7 @@ class BatteryCounters : public ::protozero::Message { float, BatteryCounters>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_CapacityPercent kCapacityPercent() { return {}; } + static constexpr FieldMetadata_CapacityPercent kCapacityPercent{}; void set_capacity_percent(float value) { static constexpr uint32_t field_id = FieldMetadata_CapacityPercent::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -131565,14 +129195,7 @@ class BatteryCounters : public ::protozero::Message { int64_t, BatteryCounters>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_CurrentUa kCurrentUa() { return {}; } + static constexpr FieldMetadata_CurrentUa kCurrentUa{}; void set_current_ua(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_CurrentUa::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -131590,14 +129213,7 @@ class BatteryCounters : public ::protozero::Message { int64_t, BatteryCounters>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_CurrentAvgUa kCurrentAvgUa() { return {}; } + static constexpr FieldMetadata_CurrentAvgUa kCurrentAvgUa{}; void set_current_avg_ua(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_CurrentAvgUa::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -131606,6 +129222,66 @@ class BatteryCounters : public ::protozero::Message { ::protozero::proto_utils::ProtoSchemaType::kInt64> ::Append(*this, field_id, value); } + + using FieldMetadata_Name = + ::protozero::proto_utils::FieldMetadata< + 5, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kString, + std::string, + BatteryCounters>; + + static constexpr FieldMetadata_Name kName{}; + void set_name(const char* data, size_t size) { + AppendBytes(FieldMetadata_Name::kFieldId, data, size); + } + void set_name(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Name::kFieldId, chars.data, chars.size); + } + void set_name(std::string value) { + static constexpr uint32_t field_id = FieldMetadata_Name::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kString> + ::Append(*this, field_id, value); + } + + using FieldMetadata_EnergyCounterUwh = + ::protozero::proto_utils::FieldMetadata< + 6, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kInt64, + int64_t, + BatteryCounters>; + + static constexpr FieldMetadata_EnergyCounterUwh kEnergyCounterUwh{}; + void set_energy_counter_uwh(int64_t value) { + static constexpr uint32_t field_id = FieldMetadata_EnergyCounterUwh::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kInt64> + ::Append(*this, field_id, value); + } + + using FieldMetadata_VoltageUv = + ::protozero::proto_utils::FieldMetadata< + 7, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kInt64, + int64_t, + BatteryCounters>; + + static constexpr FieldMetadata_VoltageUv kVoltageUv{}; + void set_voltage_uv(int64_t value) { + static constexpr uint32_t field_id = FieldMetadata_VoltageUv::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kInt64> + ::Append(*this, field_id, value); + } }; } // Namespace. @@ -131665,14 +129341,7 @@ class PowerRails : public ::protozero::Message { PowerRails_RailDescriptor, PowerRails>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_RailDescriptor kRailDescriptor() { return {}; } + static constexpr FieldMetadata_RailDescriptor kRailDescriptor{}; template T* add_rail_descriptor() { return BeginNestedMessage(1); } @@ -131686,14 +129355,7 @@ class PowerRails : public ::protozero::Message { PowerRails_EnergyData, PowerRails>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_EnergyData kEnergyData() { return {}; } + static constexpr FieldMetadata_EnergyData kEnergyData{}; template T* add_energy_data() { return BeginNestedMessage(2); } @@ -131732,14 +129394,7 @@ class PowerRails_EnergyData : public ::protozero::Message { uint32_t, PowerRails_EnergyData>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Index kIndex() { return {}; } + static constexpr FieldMetadata_Index kIndex{}; void set_index(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Index::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -131757,14 +129412,7 @@ class PowerRails_EnergyData : public ::protozero::Message { uint64_t, PowerRails_EnergyData>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_TimestampMs kTimestampMs() { return {}; } + static constexpr FieldMetadata_TimestampMs kTimestampMs{}; void set_timestamp_ms(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_TimestampMs::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -131782,14 +129430,7 @@ class PowerRails_EnergyData : public ::protozero::Message { uint64_t, PowerRails_EnergyData>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Energy kEnergy() { return {}; } + static constexpr FieldMetadata_Energy kEnergy{}; void set_energy(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Energy::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -131835,14 +129476,7 @@ class PowerRails_RailDescriptor : public ::protozero::Message { uint32_t, PowerRails_RailDescriptor>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Index kIndex() { return {}; } + static constexpr FieldMetadata_Index kIndex{}; void set_index(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Index::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -131860,17 +129494,13 @@ class PowerRails_RailDescriptor : public ::protozero::Message { std::string, PowerRails_RailDescriptor>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_RailName kRailName() { return {}; } + static constexpr FieldMetadata_RailName kRailName{}; void set_rail_name(const char* data, size_t size) { AppendBytes(FieldMetadata_RailName::kFieldId, data, size); } + void set_rail_name(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_RailName::kFieldId, chars.data, chars.size); + } void set_rail_name(std::string value) { static constexpr uint32_t field_id = FieldMetadata_RailName::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -131888,17 +129518,13 @@ class PowerRails_RailDescriptor : public ::protozero::Message { std::string, PowerRails_RailDescriptor>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_SubsysName kSubsysName() { return {}; } + static constexpr FieldMetadata_SubsysName kSubsysName{}; void set_subsys_name(const char* data, size_t size) { AppendBytes(FieldMetadata_SubsysName::kFieldId, data, size); } + void set_subsys_name(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_SubsysName::kFieldId, chars.data, chars.size); + } void set_subsys_name(std::string value) { static constexpr uint32_t field_id = FieldMetadata_SubsysName::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -131916,14 +129542,7 @@ class PowerRails_RailDescriptor : public ::protozero::Message { uint32_t, PowerRails_RailDescriptor>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_SamplingRate kSamplingRate() { return {}; } + static constexpr FieldMetadata_SamplingRate kSamplingRate{}; void set_sampling_rate(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_SamplingRate::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -131957,6 +129576,7 @@ namespace perfetto { namespace protos { namespace pbzero { +class ProcessStats_FDInfo; class ProcessStats_Process; class ProcessStats_Thread; @@ -131981,6 +129601,7 @@ class ProcessStats : public ::protozero::Message { static constexpr const char* GetName() { return ".perfetto.protos.ProcessStats"; } using Thread = ::perfetto::protos::pbzero::ProcessStats_Thread; + using FDInfo = ::perfetto::protos::pbzero::ProcessStats_FDInfo; using Process = ::perfetto::protos::pbzero::ProcessStats_Process; using FieldMetadata_Processes = @@ -131991,14 +129612,7 @@ class ProcessStats : public ::protozero::Message { ProcessStats_Process, ProcessStats>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Processes kProcesses() { return {}; } + static constexpr FieldMetadata_Processes kProcesses{}; template T* add_processes() { return BeginNestedMessage(1); } @@ -132012,14 +129626,7 @@ class ProcessStats : public ::protozero::Message { uint64_t, ProcessStats>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_CollectionEndTimestamp kCollectionEndTimestamp() { return {}; } + static constexpr FieldMetadata_CollectionEndTimestamp kCollectionEndTimestamp{}; void set_collection_end_timestamp(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_CollectionEndTimestamp::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -132030,7 +129637,7 @@ class ProcessStats : public ::protozero::Message { } }; -class ProcessStats_Process_Decoder : public ::protozero::TypedProtoDecoder { +class ProcessStats_Process_Decoder : public ::protozero::TypedProtoDecoder { public: ProcessStats_Process_Decoder(const uint8_t* data, size_t len) : TypedProtoDecoder(data, len) {} explicit ProcessStats_Process_Decoder(const std::string& raw) : TypedProtoDecoder(reinterpret_cast(raw.data()), raw.size()) {} @@ -132063,6 +129670,8 @@ class ProcessStats_Process_Decoder : public ::protozero::TypedProtoDecoder().as_uint32(); } bool has_chrome_peak_resident_set_kb() const { return at<14>().valid(); } uint32_t chrome_peak_resident_set_kb() const { return at<14>().as_uint32(); } + bool has_fds() const { return at<15>().valid(); } + ::protozero::RepeatedFieldIterator<::protozero::ConstBytes> fds() const { return GetRepeated<::protozero::ConstBytes>(15); } }; class ProcessStats_Process : public ::protozero::Message { @@ -132083,6 +129692,7 @@ class ProcessStats_Process : public ::protozero::Message { kIsPeakRssResettableFieldNumber = 12, kChromePrivateFootprintKbFieldNumber = 13, kChromePeakResidentSetKbFieldNumber = 14, + kFdsFieldNumber = 15, }; static constexpr const char* GetName() { return ".perfetto.protos.ProcessStats.Process"; } @@ -132095,14 +129705,7 @@ class ProcessStats_Process : public ::protozero::Message { int32_t, ProcessStats_Process>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Pid kPid() { return {}; } + static constexpr FieldMetadata_Pid kPid{}; void set_pid(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Pid::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -132120,14 +129723,7 @@ class ProcessStats_Process : public ::protozero::Message { uint64_t, ProcessStats_Process>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_VmSizeKb kVmSizeKb() { return {}; } + static constexpr FieldMetadata_VmSizeKb kVmSizeKb{}; void set_vm_size_kb(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_VmSizeKb::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -132145,14 +129741,7 @@ class ProcessStats_Process : public ::protozero::Message { uint64_t, ProcessStats_Process>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_VmRssKb kVmRssKb() { return {}; } + static constexpr FieldMetadata_VmRssKb kVmRssKb{}; void set_vm_rss_kb(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_VmRssKb::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -132170,14 +129759,7 @@ class ProcessStats_Process : public ::protozero::Message { uint64_t, ProcessStats_Process>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_RssAnonKb kRssAnonKb() { return {}; } + static constexpr FieldMetadata_RssAnonKb kRssAnonKb{}; void set_rss_anon_kb(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_RssAnonKb::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -132195,14 +129777,7 @@ class ProcessStats_Process : public ::protozero::Message { uint64_t, ProcessStats_Process>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_RssFileKb kRssFileKb() { return {}; } + static constexpr FieldMetadata_RssFileKb kRssFileKb{}; void set_rss_file_kb(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_RssFileKb::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -132220,14 +129795,7 @@ class ProcessStats_Process : public ::protozero::Message { uint64_t, ProcessStats_Process>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_RssShmemKb kRssShmemKb() { return {}; } + static constexpr FieldMetadata_RssShmemKb kRssShmemKb{}; void set_rss_shmem_kb(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_RssShmemKb::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -132245,14 +129813,7 @@ class ProcessStats_Process : public ::protozero::Message { uint64_t, ProcessStats_Process>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_VmSwapKb kVmSwapKb() { return {}; } + static constexpr FieldMetadata_VmSwapKb kVmSwapKb{}; void set_vm_swap_kb(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_VmSwapKb::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -132270,14 +129831,7 @@ class ProcessStats_Process : public ::protozero::Message { uint64_t, ProcessStats_Process>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_VmLockedKb kVmLockedKb() { return {}; } + static constexpr FieldMetadata_VmLockedKb kVmLockedKb{}; void set_vm_locked_kb(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_VmLockedKb::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -132295,14 +129849,7 @@ class ProcessStats_Process : public ::protozero::Message { uint64_t, ProcessStats_Process>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_VmHwmKb kVmHwmKb() { return {}; } + static constexpr FieldMetadata_VmHwmKb kVmHwmKb{}; void set_vm_hwm_kb(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_VmHwmKb::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -132320,14 +129867,7 @@ class ProcessStats_Process : public ::protozero::Message { int64_t, ProcessStats_Process>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_OomScoreAdj kOomScoreAdj() { return {}; } + static constexpr FieldMetadata_OomScoreAdj kOomScoreAdj{}; void set_oom_score_adj(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_OomScoreAdj::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -132345,14 +129885,7 @@ class ProcessStats_Process : public ::protozero::Message { ProcessStats_Thread, ProcessStats_Process>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Threads kThreads() { return {}; } + static constexpr FieldMetadata_Threads kThreads{}; template T* add_threads() { return BeginNestedMessage(11); } @@ -132366,14 +129899,7 @@ class ProcessStats_Process : public ::protozero::Message { bool, ProcessStats_Process>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_IsPeakRssResettable kIsPeakRssResettable() { return {}; } + static constexpr FieldMetadata_IsPeakRssResettable kIsPeakRssResettable{}; void set_is_peak_rss_resettable(bool value) { static constexpr uint32_t field_id = FieldMetadata_IsPeakRssResettable::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -132391,14 +129917,7 @@ class ProcessStats_Process : public ::protozero::Message { uint32_t, ProcessStats_Process>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ChromePrivateFootprintKb kChromePrivateFootprintKb() { return {}; } + static constexpr FieldMetadata_ChromePrivateFootprintKb kChromePrivateFootprintKb{}; void set_chrome_private_footprint_kb(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_ChromePrivateFootprintKb::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -132416,14 +129935,7 @@ class ProcessStats_Process : public ::protozero::Message { uint32_t, ProcessStats_Process>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ChromePeakResidentSetKb kChromePeakResidentSetKb() { return {}; } + static constexpr FieldMetadata_ChromePeakResidentSetKb kChromePeakResidentSetKb{}; void set_chrome_peak_resident_set_kb(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_ChromePeakResidentSetKb::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -132432,6 +129944,84 @@ class ProcessStats_Process : public ::protozero::Message { ::protozero::proto_utils::ProtoSchemaType::kUint32> ::Append(*this, field_id, value); } + + using FieldMetadata_Fds = + ::protozero::proto_utils::FieldMetadata< + 15, + ::protozero::proto_utils::RepetitionType::kRepeatedNotPacked, + ::protozero::proto_utils::ProtoSchemaType::kMessage, + ProcessStats_FDInfo, + ProcessStats_Process>; + + static constexpr FieldMetadata_Fds kFds{}; + template T* add_fds() { + return BeginNestedMessage(15); + } + +}; + +class ProcessStats_FDInfo_Decoder : public ::protozero::TypedProtoDecoder { + public: + ProcessStats_FDInfo_Decoder(const uint8_t* data, size_t len) : TypedProtoDecoder(data, len) {} + explicit ProcessStats_FDInfo_Decoder(const std::string& raw) : TypedProtoDecoder(reinterpret_cast(raw.data()), raw.size()) {} + explicit ProcessStats_FDInfo_Decoder(const ::protozero::ConstBytes& raw) : TypedProtoDecoder(raw.data, raw.size) {} + bool has_fd() const { return at<1>().valid(); } + uint64_t fd() const { return at<1>().as_uint64(); } + bool has_path() const { return at<2>().valid(); } + ::protozero::ConstChars path() const { return at<2>().as_string(); } +}; + +class ProcessStats_FDInfo : public ::protozero::Message { + public: + using Decoder = ProcessStats_FDInfo_Decoder; + enum : int32_t { + kFdFieldNumber = 1, + kPathFieldNumber = 2, + }; + static constexpr const char* GetName() { return ".perfetto.protos.ProcessStats.FDInfo"; } + + + using FieldMetadata_Fd = + ::protozero::proto_utils::FieldMetadata< + 1, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint64, + uint64_t, + ProcessStats_FDInfo>; + + static constexpr FieldMetadata_Fd kFd{}; + void set_fd(uint64_t value) { + static constexpr uint32_t field_id = FieldMetadata_Fd::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint64> + ::Append(*this, field_id, value); + } + + using FieldMetadata_Path = + ::protozero::proto_utils::FieldMetadata< + 2, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kString, + std::string, + ProcessStats_FDInfo>; + + static constexpr FieldMetadata_Path kPath{}; + void set_path(const char* data, size_t size) { + AppendBytes(FieldMetadata_Path::kFieldId, data, size); + } + void set_path(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Path::kFieldId, chars.data, chars.size); + } + void set_path(std::string value) { + static constexpr uint32_t field_id = FieldMetadata_Path::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kString> + ::Append(*this, field_id, value); + } }; class ProcessStats_Thread_Decoder : public ::protozero::TypedProtoDecoder { @@ -132460,14 +130050,7 @@ class ProcessStats_Thread : public ::protozero::Message { int32_t, ProcessStats_Thread>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Tid kTid() { return {}; } + static constexpr FieldMetadata_Tid kTid{}; void set_tid(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Tid::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -132538,14 +130121,7 @@ class ProcessTree : public ::protozero::Message { ProcessTree_Process, ProcessTree>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Processes kProcesses() { return {}; } + static constexpr FieldMetadata_Processes kProcesses{}; template T* add_processes() { return BeginNestedMessage(1); } @@ -132559,14 +130135,7 @@ class ProcessTree : public ::protozero::Message { ProcessTree_Thread, ProcessTree>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Threads kThreads() { return {}; } + static constexpr FieldMetadata_Threads kThreads{}; template T* add_threads() { return BeginNestedMessage(2); } @@ -132580,14 +130149,7 @@ class ProcessTree : public ::protozero::Message { uint64_t, ProcessTree>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_CollectionEndTimestamp kCollectionEndTimestamp() { return {}; } + static constexpr FieldMetadata_CollectionEndTimestamp kCollectionEndTimestamp{}; void set_collection_end_timestamp(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_CollectionEndTimestamp::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -132639,14 +130201,7 @@ class ProcessTree_Process : public ::protozero::Message { int32_t, ProcessTree_Process>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Pid kPid() { return {}; } + static constexpr FieldMetadata_Pid kPid{}; void set_pid(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Pid::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -132664,14 +130219,7 @@ class ProcessTree_Process : public ::protozero::Message { int32_t, ProcessTree_Process>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Ppid kPpid() { return {}; } + static constexpr FieldMetadata_Ppid kPpid{}; void set_ppid(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Ppid::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -132689,17 +130237,13 @@ class ProcessTree_Process : public ::protozero::Message { std::string, ProcessTree_Process>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Cmdline kCmdline() { return {}; } + static constexpr FieldMetadata_Cmdline kCmdline{}; void add_cmdline(const char* data, size_t size) { AppendBytes(FieldMetadata_Cmdline::kFieldId, data, size); } + void add_cmdline(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Cmdline::kFieldId, chars.data, chars.size); + } void add_cmdline(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Cmdline::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -132717,14 +130261,7 @@ class ProcessTree_Process : public ::protozero::Message { ProcessTree_Thread, ProcessTree_Process>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ThreadsDeprecated kThreadsDeprecated() { return {}; } + static constexpr FieldMetadata_ThreadsDeprecated kThreadsDeprecated{}; template T* add_threads_deprecated() { return BeginNestedMessage(4); } @@ -132738,14 +130275,7 @@ class ProcessTree_Process : public ::protozero::Message { int32_t, ProcessTree_Process>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Uid kUid() { return {}; } + static constexpr FieldMetadata_Uid kUid{}; void set_uid(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Uid::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -132763,14 +130293,7 @@ class ProcessTree_Process : public ::protozero::Message { int32_t, ProcessTree_Process>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Nspid kNspid() { return {}; } + static constexpr FieldMetadata_Nspid kNspid{}; void add_nspid(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Nspid::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -132816,14 +130339,7 @@ class ProcessTree_Thread : public ::protozero::Message { int32_t, ProcessTree_Thread>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Tid kTid() { return {}; } + static constexpr FieldMetadata_Tid kTid{}; void set_tid(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Tid::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -132841,14 +130357,7 @@ class ProcessTree_Thread : public ::protozero::Message { int32_t, ProcessTree_Thread>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Tgid kTgid() { return {}; } + static constexpr FieldMetadata_Tgid kTgid{}; void set_tgid(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Tgid::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -132866,17 +130375,13 @@ class ProcessTree_Thread : public ::protozero::Message { std::string, ProcessTree_Thread>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Name kName() { return {}; } + static constexpr FieldMetadata_Name kName{}; void set_name(const char* data, size_t size) { AppendBytes(FieldMetadata_Name::kFieldId, data, size); } + void set_name(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Name::kFieldId, chars.data, chars.size); + } void set_name(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Name::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -132894,14 +130399,7 @@ class ProcessTree_Thread : public ::protozero::Message { int32_t, ProcessTree_Thread>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Nstid kNstid() { return {}; } + static constexpr FieldMetadata_Nstid kNstid{}; void add_nstid(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Nstid::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -132912,6 +130410,99 @@ class ProcessTree_Thread : public ::protozero::Message { } }; +} // Namespace. +} // Namespace. +} // Namespace. +#endif // Include guard. +// gen_amalgamated begin header: gen/protos/perfetto/trace/statsd/statsd_atom.pbzero.h +// Autogenerated by the ProtoZero compiler plugin. DO NOT EDIT. + +#ifndef PERFETTO_PROTOS_PROTOS_PERFETTO_TRACE_STATSD_STATSD_ATOM_PROTO_H_ +#define PERFETTO_PROTOS_PROTOS_PERFETTO_TRACE_STATSD_STATSD_ATOM_PROTO_H_ + +#include +#include + +// gen_amalgamated expanded: #include "perfetto/protozero/field_writer.h" +// gen_amalgamated expanded: #include "perfetto/protozero/message.h" +// gen_amalgamated expanded: #include "perfetto/protozero/packed_repeated_fields.h" +// gen_amalgamated expanded: #include "perfetto/protozero/proto_decoder.h" +// gen_amalgamated expanded: #include "perfetto/protozero/proto_utils.h" + +namespace perfetto { +namespace protos { +namespace pbzero { + +class Atom; + +class StatsdAtom_Decoder : public ::protozero::TypedProtoDecoder { + public: + StatsdAtom_Decoder(const uint8_t* data, size_t len) : TypedProtoDecoder(data, len) {} + explicit StatsdAtom_Decoder(const std::string& raw) : TypedProtoDecoder(reinterpret_cast(raw.data()), raw.size()) {} + explicit StatsdAtom_Decoder(const ::protozero::ConstBytes& raw) : TypedProtoDecoder(raw.data, raw.size) {} + bool has_atom() const { return at<1>().valid(); } + ::protozero::RepeatedFieldIterator<::protozero::ConstBytes> atom() const { return GetRepeated<::protozero::ConstBytes>(1); } + bool has_timestamp_nanos() const { return at<2>().valid(); } + ::protozero::RepeatedFieldIterator timestamp_nanos() const { return GetRepeated(2); } +}; + +class StatsdAtom : public ::protozero::Message { + public: + using Decoder = StatsdAtom_Decoder; + enum : int32_t { + kAtomFieldNumber = 1, + kTimestampNanosFieldNumber = 2, + }; + static constexpr const char* GetName() { return ".perfetto.protos.StatsdAtom"; } + + + using FieldMetadata_Atom = + ::protozero::proto_utils::FieldMetadata< + 1, + ::protozero::proto_utils::RepetitionType::kRepeatedNotPacked, + ::protozero::proto_utils::ProtoSchemaType::kMessage, + Atom, + StatsdAtom>; + + static constexpr FieldMetadata_Atom kAtom{}; + template T* add_atom() { + return BeginNestedMessage(1); + } + + + using FieldMetadata_TimestampNanos = + ::protozero::proto_utils::FieldMetadata< + 2, + ::protozero::proto_utils::RepetitionType::kRepeatedNotPacked, + ::protozero::proto_utils::ProtoSchemaType::kInt64, + int64_t, + StatsdAtom>; + + static constexpr FieldMetadata_TimestampNanos kTimestampNanos{}; + void add_timestamp_nanos(int64_t value) { + static constexpr uint32_t field_id = FieldMetadata_TimestampNanos::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kInt64> + ::Append(*this, field_id, value); + } +}; + +class Atom_Decoder : public ::protozero::TypedProtoDecoder { + public: + Atom_Decoder(const uint8_t* data, size_t len) : TypedProtoDecoder(data, len) {} + explicit Atom_Decoder(const std::string& raw) : TypedProtoDecoder(reinterpret_cast(raw.data()), raw.size()) {} + explicit Atom_Decoder(const ::protozero::ConstBytes& raw) : TypedProtoDecoder(raw.data, raw.size) {} +}; + +class Atom : public ::protozero::Message { + public: + using Decoder = Atom_Decoder; + static constexpr const char* GetName() { return ".perfetto.protos.Atom"; } + +}; + } // Namespace. } // Namespace. } // Namespace. @@ -132935,15 +130526,17 @@ namespace perfetto { namespace protos { namespace pbzero { +class SysStats_BuddyInfo; class SysStats_CpuTimes; class SysStats_DevfreqValue; +class SysStats_DiskStat; class SysStats_InterruptCount; class SysStats_MeminfoValue; class SysStats_VmstatValue; enum MeminfoCounters : int32_t; enum VmstatCounters : int32_t; -class SysStats_Decoder : public ::protozero::TypedProtoDecoder { +class SysStats_Decoder : public ::protozero::TypedProtoDecoder { public: SysStats_Decoder(const uint8_t* data, size_t len) : TypedProtoDecoder(data, len) {} explicit SysStats_Decoder(const std::string& raw) : TypedProtoDecoder(reinterpret_cast(raw.data()), raw.size()) {} @@ -132970,6 +130563,10 @@ class SysStats_Decoder : public ::protozero::TypedProtoDecoder devfreq() const { return GetRepeated<::protozero::ConstBytes>(10); } bool has_cpufreq_khz() const { return at<11>().valid(); } ::protozero::RepeatedFieldIterator cpufreq_khz() const { return GetRepeated(11); } + bool has_buddy_info() const { return at<12>().valid(); } + ::protozero::RepeatedFieldIterator<::protozero::ConstBytes> buddy_info() const { return GetRepeated<::protozero::ConstBytes>(12); } + bool has_disk_stat() const { return at<13>().valid(); } + ::protozero::RepeatedFieldIterator<::protozero::ConstBytes> disk_stat() const { return GetRepeated<::protozero::ConstBytes>(13); } }; class SysStats : public ::protozero::Message { @@ -132987,6 +130584,8 @@ class SysStats : public ::protozero::Message { kCollectionEndTimestampFieldNumber = 9, kDevfreqFieldNumber = 10, kCpufreqKhzFieldNumber = 11, + kBuddyInfoFieldNumber = 12, + kDiskStatFieldNumber = 13, }; static constexpr const char* GetName() { return ".perfetto.protos.SysStats"; } @@ -132995,6 +130594,8 @@ class SysStats : public ::protozero::Message { using CpuTimes = ::perfetto::protos::pbzero::SysStats_CpuTimes; using InterruptCount = ::perfetto::protos::pbzero::SysStats_InterruptCount; using DevfreqValue = ::perfetto::protos::pbzero::SysStats_DevfreqValue; + using BuddyInfo = ::perfetto::protos::pbzero::SysStats_BuddyInfo; + using DiskStat = ::perfetto::protos::pbzero::SysStats_DiskStat; using FieldMetadata_Meminfo = ::protozero::proto_utils::FieldMetadata< @@ -133004,14 +130605,7 @@ class SysStats : public ::protozero::Message { SysStats_MeminfoValue, SysStats>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Meminfo kMeminfo() { return {}; } + static constexpr FieldMetadata_Meminfo kMeminfo{}; template T* add_meminfo() { return BeginNestedMessage(1); } @@ -133025,14 +130619,7 @@ class SysStats : public ::protozero::Message { SysStats_VmstatValue, SysStats>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Vmstat kVmstat() { return {}; } + static constexpr FieldMetadata_Vmstat kVmstat{}; template T* add_vmstat() { return BeginNestedMessage(2); } @@ -133046,14 +130633,7 @@ class SysStats : public ::protozero::Message { SysStats_CpuTimes, SysStats>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_CpuStat kCpuStat() { return {}; } + static constexpr FieldMetadata_CpuStat kCpuStat{}; template T* add_cpu_stat() { return BeginNestedMessage(3); } @@ -133067,14 +130647,7 @@ class SysStats : public ::protozero::Message { uint64_t, SysStats>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_NumForks kNumForks() { return {}; } + static constexpr FieldMetadata_NumForks kNumForks{}; void set_num_forks(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_NumForks::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -133092,14 +130665,7 @@ class SysStats : public ::protozero::Message { uint64_t, SysStats>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_NumIrqTotal kNumIrqTotal() { return {}; } + static constexpr FieldMetadata_NumIrqTotal kNumIrqTotal{}; void set_num_irq_total(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_NumIrqTotal::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -133117,14 +130683,7 @@ class SysStats : public ::protozero::Message { SysStats_InterruptCount, SysStats>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_NumIrq kNumIrq() { return {}; } + static constexpr FieldMetadata_NumIrq kNumIrq{}; template T* add_num_irq() { return BeginNestedMessage(6); } @@ -133138,14 +130697,7 @@ class SysStats : public ::protozero::Message { uint64_t, SysStats>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_NumSoftirqTotal kNumSoftirqTotal() { return {}; } + static constexpr FieldMetadata_NumSoftirqTotal kNumSoftirqTotal{}; void set_num_softirq_total(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_NumSoftirqTotal::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -133163,14 +130715,7 @@ class SysStats : public ::protozero::Message { SysStats_InterruptCount, SysStats>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_NumSoftirq kNumSoftirq() { return {}; } + static constexpr FieldMetadata_NumSoftirq kNumSoftirq{}; template T* add_num_softirq() { return BeginNestedMessage(8); } @@ -133184,14 +130729,7 @@ class SysStats : public ::protozero::Message { uint64_t, SysStats>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_CollectionEndTimestamp kCollectionEndTimestamp() { return {}; } + static constexpr FieldMetadata_CollectionEndTimestamp kCollectionEndTimestamp{}; void set_collection_end_timestamp(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_CollectionEndTimestamp::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -133209,14 +130747,7 @@ class SysStats : public ::protozero::Message { SysStats_DevfreqValue, SysStats>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Devfreq kDevfreq() { return {}; } + static constexpr FieldMetadata_Devfreq kDevfreq{}; template T* add_devfreq() { return BeginNestedMessage(10); } @@ -133230,14 +130761,7 @@ class SysStats : public ::protozero::Message { uint32_t, SysStats>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_CpufreqKhz kCpufreqKhz() { return {}; } + static constexpr FieldMetadata_CpufreqKhz kCpufreqKhz{}; void add_cpufreq_khz(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_CpufreqKhz::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -133246,6 +130770,336 @@ class SysStats : public ::protozero::Message { ::protozero::proto_utils::ProtoSchemaType::kUint32> ::Append(*this, field_id, value); } + + using FieldMetadata_BuddyInfo = + ::protozero::proto_utils::FieldMetadata< + 12, + ::protozero::proto_utils::RepetitionType::kRepeatedNotPacked, + ::protozero::proto_utils::ProtoSchemaType::kMessage, + SysStats_BuddyInfo, + SysStats>; + + static constexpr FieldMetadata_BuddyInfo kBuddyInfo{}; + template T* add_buddy_info() { + return BeginNestedMessage(12); + } + + + using FieldMetadata_DiskStat = + ::protozero::proto_utils::FieldMetadata< + 13, + ::protozero::proto_utils::RepetitionType::kRepeatedNotPacked, + ::protozero::proto_utils::ProtoSchemaType::kMessage, + SysStats_DiskStat, + SysStats>; + + static constexpr FieldMetadata_DiskStat kDiskStat{}; + template T* add_disk_stat() { + return BeginNestedMessage(13); + } + +}; + +class SysStats_DiskStat_Decoder : public ::protozero::TypedProtoDecoder { + public: + SysStats_DiskStat_Decoder(const uint8_t* data, size_t len) : TypedProtoDecoder(data, len) {} + explicit SysStats_DiskStat_Decoder(const std::string& raw) : TypedProtoDecoder(reinterpret_cast(raw.data()), raw.size()) {} + explicit SysStats_DiskStat_Decoder(const ::protozero::ConstBytes& raw) : TypedProtoDecoder(raw.data, raw.size) {} + bool has_device_name() const { return at<1>().valid(); } + ::protozero::ConstChars device_name() const { return at<1>().as_string(); } + bool has_read_sectors() const { return at<2>().valid(); } + uint64_t read_sectors() const { return at<2>().as_uint64(); } + bool has_read_time_ms() const { return at<3>().valid(); } + uint64_t read_time_ms() const { return at<3>().as_uint64(); } + bool has_write_sectors() const { return at<4>().valid(); } + uint64_t write_sectors() const { return at<4>().as_uint64(); } + bool has_write_time_ms() const { return at<5>().valid(); } + uint64_t write_time_ms() const { return at<5>().as_uint64(); } + bool has_discard_sectors() const { return at<6>().valid(); } + uint64_t discard_sectors() const { return at<6>().as_uint64(); } + bool has_discard_time_ms() const { return at<7>().valid(); } + uint64_t discard_time_ms() const { return at<7>().as_uint64(); } + bool has_flush_count() const { return at<8>().valid(); } + uint64_t flush_count() const { return at<8>().as_uint64(); } + bool has_flush_time_ms() const { return at<9>().valid(); } + uint64_t flush_time_ms() const { return at<9>().as_uint64(); } +}; + +class SysStats_DiskStat : public ::protozero::Message { + public: + using Decoder = SysStats_DiskStat_Decoder; + enum : int32_t { + kDeviceNameFieldNumber = 1, + kReadSectorsFieldNumber = 2, + kReadTimeMsFieldNumber = 3, + kWriteSectorsFieldNumber = 4, + kWriteTimeMsFieldNumber = 5, + kDiscardSectorsFieldNumber = 6, + kDiscardTimeMsFieldNumber = 7, + kFlushCountFieldNumber = 8, + kFlushTimeMsFieldNumber = 9, + }; + static constexpr const char* GetName() { return ".perfetto.protos.SysStats.DiskStat"; } + + + using FieldMetadata_DeviceName = + ::protozero::proto_utils::FieldMetadata< + 1, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kString, + std::string, + SysStats_DiskStat>; + + static constexpr FieldMetadata_DeviceName kDeviceName{}; + void set_device_name(const char* data, size_t size) { + AppendBytes(FieldMetadata_DeviceName::kFieldId, data, size); + } + void set_device_name(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_DeviceName::kFieldId, chars.data, chars.size); + } + void set_device_name(std::string value) { + static constexpr uint32_t field_id = FieldMetadata_DeviceName::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kString> + ::Append(*this, field_id, value); + } + + using FieldMetadata_ReadSectors = + ::protozero::proto_utils::FieldMetadata< + 2, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint64, + uint64_t, + SysStats_DiskStat>; + + static constexpr FieldMetadata_ReadSectors kReadSectors{}; + void set_read_sectors(uint64_t value) { + static constexpr uint32_t field_id = FieldMetadata_ReadSectors::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint64> + ::Append(*this, field_id, value); + } + + using FieldMetadata_ReadTimeMs = + ::protozero::proto_utils::FieldMetadata< + 3, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint64, + uint64_t, + SysStats_DiskStat>; + + static constexpr FieldMetadata_ReadTimeMs kReadTimeMs{}; + void set_read_time_ms(uint64_t value) { + static constexpr uint32_t field_id = FieldMetadata_ReadTimeMs::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint64> + ::Append(*this, field_id, value); + } + + using FieldMetadata_WriteSectors = + ::protozero::proto_utils::FieldMetadata< + 4, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint64, + uint64_t, + SysStats_DiskStat>; + + static constexpr FieldMetadata_WriteSectors kWriteSectors{}; + void set_write_sectors(uint64_t value) { + static constexpr uint32_t field_id = FieldMetadata_WriteSectors::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint64> + ::Append(*this, field_id, value); + } + + using FieldMetadata_WriteTimeMs = + ::protozero::proto_utils::FieldMetadata< + 5, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint64, + uint64_t, + SysStats_DiskStat>; + + static constexpr FieldMetadata_WriteTimeMs kWriteTimeMs{}; + void set_write_time_ms(uint64_t value) { + static constexpr uint32_t field_id = FieldMetadata_WriteTimeMs::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint64> + ::Append(*this, field_id, value); + } + + using FieldMetadata_DiscardSectors = + ::protozero::proto_utils::FieldMetadata< + 6, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint64, + uint64_t, + SysStats_DiskStat>; + + static constexpr FieldMetadata_DiscardSectors kDiscardSectors{}; + void set_discard_sectors(uint64_t value) { + static constexpr uint32_t field_id = FieldMetadata_DiscardSectors::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint64> + ::Append(*this, field_id, value); + } + + using FieldMetadata_DiscardTimeMs = + ::protozero::proto_utils::FieldMetadata< + 7, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint64, + uint64_t, + SysStats_DiskStat>; + + static constexpr FieldMetadata_DiscardTimeMs kDiscardTimeMs{}; + void set_discard_time_ms(uint64_t value) { + static constexpr uint32_t field_id = FieldMetadata_DiscardTimeMs::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint64> + ::Append(*this, field_id, value); + } + + using FieldMetadata_FlushCount = + ::protozero::proto_utils::FieldMetadata< + 8, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint64, + uint64_t, + SysStats_DiskStat>; + + static constexpr FieldMetadata_FlushCount kFlushCount{}; + void set_flush_count(uint64_t value) { + static constexpr uint32_t field_id = FieldMetadata_FlushCount::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint64> + ::Append(*this, field_id, value); + } + + using FieldMetadata_FlushTimeMs = + ::protozero::proto_utils::FieldMetadata< + 9, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kUint64, + uint64_t, + SysStats_DiskStat>; + + static constexpr FieldMetadata_FlushTimeMs kFlushTimeMs{}; + void set_flush_time_ms(uint64_t value) { + static constexpr uint32_t field_id = FieldMetadata_FlushTimeMs::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint64> + ::Append(*this, field_id, value); + } +}; + +class SysStats_BuddyInfo_Decoder : public ::protozero::TypedProtoDecoder { + public: + SysStats_BuddyInfo_Decoder(const uint8_t* data, size_t len) : TypedProtoDecoder(data, len) {} + explicit SysStats_BuddyInfo_Decoder(const std::string& raw) : TypedProtoDecoder(reinterpret_cast(raw.data()), raw.size()) {} + explicit SysStats_BuddyInfo_Decoder(const ::protozero::ConstBytes& raw) : TypedProtoDecoder(raw.data, raw.size) {} + bool has_node() const { return at<1>().valid(); } + ::protozero::ConstChars node() const { return at<1>().as_string(); } + bool has_zone() const { return at<2>().valid(); } + ::protozero::ConstChars zone() const { return at<2>().as_string(); } + bool has_order_pages() const { return at<3>().valid(); } + ::protozero::RepeatedFieldIterator order_pages() const { return GetRepeated(3); } +}; + +class SysStats_BuddyInfo : public ::protozero::Message { + public: + using Decoder = SysStats_BuddyInfo_Decoder; + enum : int32_t { + kNodeFieldNumber = 1, + kZoneFieldNumber = 2, + kOrderPagesFieldNumber = 3, + }; + static constexpr const char* GetName() { return ".perfetto.protos.SysStats.BuddyInfo"; } + + + using FieldMetadata_Node = + ::protozero::proto_utils::FieldMetadata< + 1, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kString, + std::string, + SysStats_BuddyInfo>; + + static constexpr FieldMetadata_Node kNode{}; + void set_node(const char* data, size_t size) { + AppendBytes(FieldMetadata_Node::kFieldId, data, size); + } + void set_node(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Node::kFieldId, chars.data, chars.size); + } + void set_node(std::string value) { + static constexpr uint32_t field_id = FieldMetadata_Node::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kString> + ::Append(*this, field_id, value); + } + + using FieldMetadata_Zone = + ::protozero::proto_utils::FieldMetadata< + 2, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kString, + std::string, + SysStats_BuddyInfo>; + + static constexpr FieldMetadata_Zone kZone{}; + void set_zone(const char* data, size_t size) { + AppendBytes(FieldMetadata_Zone::kFieldId, data, size); + } + void set_zone(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Zone::kFieldId, chars.data, chars.size); + } + void set_zone(std::string value) { + static constexpr uint32_t field_id = FieldMetadata_Zone::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kString> + ::Append(*this, field_id, value); + } + + using FieldMetadata_OrderPages = + ::protozero::proto_utils::FieldMetadata< + 3, + ::protozero::proto_utils::RepetitionType::kRepeatedNotPacked, + ::protozero::proto_utils::ProtoSchemaType::kUint32, + uint32_t, + SysStats_BuddyInfo>; + + static constexpr FieldMetadata_OrderPages kOrderPages{}; + void add_order_pages(uint32_t value) { + static constexpr uint32_t field_id = FieldMetadata_OrderPages::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kUint32> + ::Append(*this, field_id, value); + } }; class SysStats_DevfreqValue_Decoder : public ::protozero::TypedProtoDecoder { @@ -133277,17 +131131,13 @@ class SysStats_DevfreqValue : public ::protozero::Message { std::string, SysStats_DevfreqValue>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Key kKey() { return {}; } + static constexpr FieldMetadata_Key kKey{}; void set_key(const char* data, size_t size) { AppendBytes(FieldMetadata_Key::kFieldId, data, size); } + void set_key(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Key::kFieldId, chars.data, chars.size); + } void set_key(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Key::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -133305,14 +131155,7 @@ class SysStats_DevfreqValue : public ::protozero::Message { uint64_t, SysStats_DevfreqValue>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Value kValue() { return {}; } + static constexpr FieldMetadata_Value kValue{}; void set_value(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Value::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -133352,14 +131195,7 @@ class SysStats_InterruptCount : public ::protozero::Message { int32_t, SysStats_InterruptCount>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Irq kIrq() { return {}; } + static constexpr FieldMetadata_Irq kIrq{}; void set_irq(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Irq::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -133377,14 +131213,7 @@ class SysStats_InterruptCount : public ::protozero::Message { uint64_t, SysStats_InterruptCount>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Count kCount() { return {}; } + static constexpr FieldMetadata_Count kCount{}; void set_count(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Count::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -133442,14 +131271,7 @@ class SysStats_CpuTimes : public ::protozero::Message { uint32_t, SysStats_CpuTimes>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_CpuId kCpuId() { return {}; } + static constexpr FieldMetadata_CpuId kCpuId{}; void set_cpu_id(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_CpuId::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -133467,14 +131289,7 @@ class SysStats_CpuTimes : public ::protozero::Message { uint64_t, SysStats_CpuTimes>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_UserNs kUserNs() { return {}; } + static constexpr FieldMetadata_UserNs kUserNs{}; void set_user_ns(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_UserNs::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -133492,14 +131307,7 @@ class SysStats_CpuTimes : public ::protozero::Message { uint64_t, SysStats_CpuTimes>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_UserIceNs kUserIceNs() { return {}; } + static constexpr FieldMetadata_UserIceNs kUserIceNs{}; void set_user_ice_ns(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_UserIceNs::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -133517,14 +131325,7 @@ class SysStats_CpuTimes : public ::protozero::Message { uint64_t, SysStats_CpuTimes>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_SystemModeNs kSystemModeNs() { return {}; } + static constexpr FieldMetadata_SystemModeNs kSystemModeNs{}; void set_system_mode_ns(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_SystemModeNs::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -133542,14 +131343,7 @@ class SysStats_CpuTimes : public ::protozero::Message { uint64_t, SysStats_CpuTimes>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_IdleNs kIdleNs() { return {}; } + static constexpr FieldMetadata_IdleNs kIdleNs{}; void set_idle_ns(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_IdleNs::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -133567,14 +131361,7 @@ class SysStats_CpuTimes : public ::protozero::Message { uint64_t, SysStats_CpuTimes>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_IoWaitNs kIoWaitNs() { return {}; } + static constexpr FieldMetadata_IoWaitNs kIoWaitNs{}; void set_io_wait_ns(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_IoWaitNs::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -133592,14 +131379,7 @@ class SysStats_CpuTimes : public ::protozero::Message { uint64_t, SysStats_CpuTimes>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_IrqNs kIrqNs() { return {}; } + static constexpr FieldMetadata_IrqNs kIrqNs{}; void set_irq_ns(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_IrqNs::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -133617,14 +131397,7 @@ class SysStats_CpuTimes : public ::protozero::Message { uint64_t, SysStats_CpuTimes>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_SoftirqNs kSoftirqNs() { return {}; } + static constexpr FieldMetadata_SoftirqNs kSoftirqNs{}; void set_softirq_ns(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_SoftirqNs::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -133664,14 +131437,7 @@ class SysStats_VmstatValue : public ::protozero::Message { ::perfetto::protos::pbzero::VmstatCounters, SysStats_VmstatValue>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Key kKey() { return {}; } + static constexpr FieldMetadata_Key kKey{}; void set_key(::perfetto::protos::pbzero::VmstatCounters value) { static constexpr uint32_t field_id = FieldMetadata_Key::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -133689,14 +131455,7 @@ class SysStats_VmstatValue : public ::protozero::Message { uint64_t, SysStats_VmstatValue>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Value kValue() { return {}; } + static constexpr FieldMetadata_Value kValue{}; void set_value(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Value::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -133736,14 +131495,7 @@ class SysStats_MeminfoValue : public ::protozero::Message { ::perfetto::protos::pbzero::MeminfoCounters, SysStats_MeminfoValue>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Key kKey() { return {}; } + static constexpr FieldMetadata_Key kKey{}; void set_key(::perfetto::protos::pbzero::MeminfoCounters value) { static constexpr uint32_t field_id = FieldMetadata_Key::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -133761,14 +131513,7 @@ class SysStats_MeminfoValue : public ::protozero::Message { uint64_t, SysStats_MeminfoValue>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Value kValue() { return {}; } + static constexpr FieldMetadata_Value kValue{}; void set_value(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Value::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -133831,14 +131576,7 @@ class CpuInfo : public ::protozero::Message { CpuInfo_Cpu, CpuInfo>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Cpus kCpus() { return {}; } + static constexpr FieldMetadata_Cpus kCpus{}; template T* add_cpus() { return BeginNestedMessage(1); } @@ -133874,17 +131612,13 @@ class CpuInfo_Cpu : public ::protozero::Message { std::string, CpuInfo_Cpu>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Processor kProcessor() { return {}; } + static constexpr FieldMetadata_Processor kProcessor{}; void set_processor(const char* data, size_t size) { AppendBytes(FieldMetadata_Processor::kFieldId, data, size); } + void set_processor(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Processor::kFieldId, chars.data, chars.size); + } void set_processor(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Processor::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -133902,14 +131636,7 @@ class CpuInfo_Cpu : public ::protozero::Message { uint32_t, CpuInfo_Cpu>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Frequencies kFrequencies() { return {}; } + static constexpr FieldMetadata_Frequencies kFrequencies{}; void add_frequencies(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Frequencies::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -133980,14 +131707,7 @@ class SliceNameTranslationTable : public ::protozero::Message { SliceNameTranslationTable_RawToDeobfuscatedNameEntry, SliceNameTranslationTable>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_RawToDeobfuscatedName kRawToDeobfuscatedName() { return {}; } + static constexpr FieldMetadata_RawToDeobfuscatedName kRawToDeobfuscatedName{}; template T* add_raw_to_deobfuscated_name() { return BeginNestedMessage(1); } @@ -134023,17 +131743,13 @@ class SliceNameTranslationTable_RawToDeobfuscatedNameEntry : public ::protozero: std::string, SliceNameTranslationTable_RawToDeobfuscatedNameEntry>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Key kKey() { return {}; } + static constexpr FieldMetadata_Key kKey{}; void set_key(const char* data, size_t size) { AppendBytes(FieldMetadata_Key::kFieldId, data, size); } + void set_key(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Key::kFieldId, chars.data, chars.size); + } void set_key(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Key::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -134051,17 +131767,13 @@ class SliceNameTranslationTable_RawToDeobfuscatedNameEntry : public ::protozero: std::string, SliceNameTranslationTable_RawToDeobfuscatedNameEntry>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Value kValue() { return {}; } + static constexpr FieldMetadata_Value kValue{}; void set_value(const char* data, size_t size) { AppendBytes(FieldMetadata_Value::kFieldId, data, size); } + void set_value(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Value::kFieldId, chars.data, chars.size); + } void set_value(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Value::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -134103,14 +131815,7 @@ class ChromePerformanceMarkTranslationTable : public ::protozero::Message { ChromePerformanceMarkTranslationTable_SiteHashToNameEntry, ChromePerformanceMarkTranslationTable>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_SiteHashToName kSiteHashToName() { return {}; } + static constexpr FieldMetadata_SiteHashToName kSiteHashToName{}; template T* add_site_hash_to_name() { return BeginNestedMessage(1); } @@ -134124,14 +131829,7 @@ class ChromePerformanceMarkTranslationTable : public ::protozero::Message { ChromePerformanceMarkTranslationTable_MarkHashToNameEntry, ChromePerformanceMarkTranslationTable>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_MarkHashToName kMarkHashToName() { return {}; } + static constexpr FieldMetadata_MarkHashToName kMarkHashToName{}; template T* add_mark_hash_to_name() { return BeginNestedMessage(2); } @@ -134167,14 +131865,7 @@ class ChromePerformanceMarkTranslationTable_MarkHashToNameEntry : public ::proto uint32_t, ChromePerformanceMarkTranslationTable_MarkHashToNameEntry>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Key kKey() { return {}; } + static constexpr FieldMetadata_Key kKey{}; void set_key(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Key::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -134192,17 +131883,13 @@ class ChromePerformanceMarkTranslationTable_MarkHashToNameEntry : public ::proto std::string, ChromePerformanceMarkTranslationTable_MarkHashToNameEntry>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Value kValue() { return {}; } + static constexpr FieldMetadata_Value kValue{}; void set_value(const char* data, size_t size) { AppendBytes(FieldMetadata_Value::kFieldId, data, size); } + void set_value(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Value::kFieldId, chars.data, chars.size); + } void set_value(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Value::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -134242,14 +131929,7 @@ class ChromePerformanceMarkTranslationTable_SiteHashToNameEntry : public ::proto uint32_t, ChromePerformanceMarkTranslationTable_SiteHashToNameEntry>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Key kKey() { return {}; } + static constexpr FieldMetadata_Key kKey{}; void set_key(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Key::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -134267,17 +131947,13 @@ class ChromePerformanceMarkTranslationTable_SiteHashToNameEntry : public ::proto std::string, ChromePerformanceMarkTranslationTable_SiteHashToNameEntry>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Value kValue() { return {}; } + static constexpr FieldMetadata_Value kValue{}; void set_value(const char* data, size_t size) { AppendBytes(FieldMetadata_Value::kFieldId, data, size); } + void set_value(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Value::kFieldId, chars.data, chars.size); + } void set_value(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Value::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -134315,14 +131991,7 @@ class ChromeUserEventTranslationTable : public ::protozero::Message { ChromeUserEventTranslationTable_ActionHashToNameEntry, ChromeUserEventTranslationTable>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ActionHashToName kActionHashToName() { return {}; } + static constexpr FieldMetadata_ActionHashToName kActionHashToName{}; template T* add_action_hash_to_name() { return BeginNestedMessage(1); } @@ -134358,14 +132027,7 @@ class ChromeUserEventTranslationTable_ActionHashToNameEntry : public ::protozero uint64_t, ChromeUserEventTranslationTable_ActionHashToNameEntry>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Key kKey() { return {}; } + static constexpr FieldMetadata_Key kKey{}; void set_key(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Key::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -134383,17 +132045,13 @@ class ChromeUserEventTranslationTable_ActionHashToNameEntry : public ::protozero std::string, ChromeUserEventTranslationTable_ActionHashToNameEntry>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Value kValue() { return {}; } + static constexpr FieldMetadata_Value kValue{}; void set_value(const char* data, size_t size) { AppendBytes(FieldMetadata_Value::kFieldId, data, size); } + void set_value(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Value::kFieldId, chars.data, chars.size); + } void set_value(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Value::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -134431,14 +132089,7 @@ class ChromeHistorgramTranslationTable : public ::protozero::Message { ChromeHistorgramTranslationTable_HashToNameEntry, ChromeHistorgramTranslationTable>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_HashToName kHashToName() { return {}; } + static constexpr FieldMetadata_HashToName kHashToName{}; template T* add_hash_to_name() { return BeginNestedMessage(1); } @@ -134474,14 +132125,7 @@ class ChromeHistorgramTranslationTable_HashToNameEntry : public ::protozero::Mes uint64_t, ChromeHistorgramTranslationTable_HashToNameEntry>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Key kKey() { return {}; } + static constexpr FieldMetadata_Key kKey{}; void set_key(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Key::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -134499,17 +132143,13 @@ class ChromeHistorgramTranslationTable_HashToNameEntry : public ::protozero::Mes std::string, ChromeHistorgramTranslationTable_HashToNameEntry>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Value kValue() { return {}; } + static constexpr FieldMetadata_Value kValue{}; void set_value(const char* data, size_t size) { AppendBytes(FieldMetadata_Value::kFieldId, data, size); } + void set_value(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Value::kFieldId, chars.data, chars.size); + } void set_value(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Value::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -134555,14 +132195,7 @@ class TranslationTable : public ::protozero::Message { ChromeHistorgramTranslationTable, TranslationTable>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ChromeHistogram kChromeHistogram() { return {}; } + static constexpr FieldMetadata_ChromeHistogram kChromeHistogram{}; template T* set_chrome_histogram() { return BeginNestedMessage(1); } @@ -134576,14 +132209,7 @@ class TranslationTable : public ::protozero::Message { ChromeUserEventTranslationTable, TranslationTable>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ChromeUserEvent kChromeUserEvent() { return {}; } + static constexpr FieldMetadata_ChromeUserEvent kChromeUserEvent{}; template T* set_chrome_user_event() { return BeginNestedMessage(2); } @@ -134597,14 +132223,7 @@ class TranslationTable : public ::protozero::Message { ChromePerformanceMarkTranslationTable, TranslationTable>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ChromePerformanceMark kChromePerformanceMark() { return {}; } + static constexpr FieldMetadata_ChromePerformanceMark kChromePerformanceMark{}; template T* set_chrome_performance_mark() { return BeginNestedMessage(3); } @@ -134618,14 +132237,7 @@ class TranslationTable : public ::protozero::Message { SliceNameTranslationTable, TranslationTable>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_SliceName kSliceName() { return {}; } + static constexpr FieldMetadata_SliceName kSliceName{}; template T* set_slice_name() { return BeginNestedMessage(4); } @@ -134690,14 +132302,7 @@ class TracePacketDefaults : public ::protozero::Message { uint32_t, TracePacketDefaults>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_TimestampClockId kTimestampClockId() { return {}; } + static constexpr FieldMetadata_TimestampClockId kTimestampClockId{}; void set_timestamp_clock_id(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_TimestampClockId::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -134715,14 +132320,7 @@ class TracePacketDefaults : public ::protozero::Message { TrackEventDefaults, TracePacketDefaults>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_TrackEventDefaults kTrackEventDefaults() { return {}; } + static constexpr FieldMetadata_TrackEventDefaults kTrackEventDefaults{}; template T* set_track_event_defaults() { return BeginNestedMessage(11); } @@ -134736,14 +132334,7 @@ class TracePacketDefaults : public ::protozero::Message { PerfSampleDefaults, TracePacketDefaults>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_PerfSampleDefaults kPerfSampleDefaults() { return {}; } + static constexpr FieldMetadata_PerfSampleDefaults kPerfSampleDefaults{}; template T* set_perf_sample_defaults() { return BeginNestedMessage(12); } @@ -134815,17 +132406,13 @@ class TestEvent : public ::protozero::Message { std::string, TestEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Str kStr() { return {}; } + static constexpr FieldMetadata_Str kStr{}; void set_str(const char* data, size_t size) { AppendBytes(FieldMetadata_Str::kFieldId, data, size); } + void set_str(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Str::kFieldId, chars.data, chars.size); + } void set_str(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Str::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -134843,14 +132430,7 @@ class TestEvent : public ::protozero::Message { uint32_t, TestEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_SeqValue kSeqValue() { return {}; } + static constexpr FieldMetadata_SeqValue kSeqValue{}; void set_seq_value(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_SeqValue::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -134868,14 +132448,7 @@ class TestEvent : public ::protozero::Message { uint64_t, TestEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Counter kCounter() { return {}; } + static constexpr FieldMetadata_Counter kCounter{}; void set_counter(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Counter::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -134893,14 +132466,7 @@ class TestEvent : public ::protozero::Message { bool, TestEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_IsLast kIsLast() { return {}; } + static constexpr FieldMetadata_IsLast kIsLast{}; void set_is_last(bool value) { static constexpr uint32_t field_id = FieldMetadata_IsLast::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -134918,14 +132484,7 @@ class TestEvent : public ::protozero::Message { TestEvent_TestPayload, TestEvent>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Payload kPayload() { return {}; } + static constexpr FieldMetadata_Payload kPayload{}; template T* set_payload() { return BeginNestedMessage(5); } @@ -134976,17 +132535,13 @@ class TestEvent_TestPayload : public ::protozero::Message { std::string, TestEvent_TestPayload>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Str kStr() { return {}; } + static constexpr FieldMetadata_Str kStr{}; void add_str(const char* data, size_t size) { AppendBytes(FieldMetadata_Str::kFieldId, data, size); } + void add_str(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Str::kFieldId, chars.data, chars.size); + } void add_str(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Str::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -135004,14 +132559,7 @@ class TestEvent_TestPayload : public ::protozero::Message { TestEvent_TestPayload, TestEvent_TestPayload>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Nested kNested() { return {}; } + static constexpr FieldMetadata_Nested kNested{}; template T* add_nested() { return BeginNestedMessage(2); } @@ -135025,17 +132573,13 @@ class TestEvent_TestPayload : public ::protozero::Message { std::string, TestEvent_TestPayload>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_SingleString kSingleString() { return {}; } + static constexpr FieldMetadata_SingleString kSingleString{}; void set_single_string(const char* data, size_t size) { AppendBytes(FieldMetadata_SingleString::kFieldId, data, size); } + void set_single_string(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_SingleString::kFieldId, chars.data, chars.size); + } void set_single_string(std::string value) { static constexpr uint32_t field_id = FieldMetadata_SingleString::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -135053,14 +132597,7 @@ class TestEvent_TestPayload : public ::protozero::Message { int32_t, TestEvent_TestPayload>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_SingleInt kSingleInt() { return {}; } + static constexpr FieldMetadata_SingleInt kSingleInt{}; void set_single_int(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_SingleInt::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -135078,14 +132615,7 @@ class TestEvent_TestPayload : public ::protozero::Message { int32_t, TestEvent_TestPayload>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_RepeatedInts kRepeatedInts() { return {}; } + static constexpr FieldMetadata_RepeatedInts kRepeatedInts{}; void add_repeated_ints(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_RepeatedInts::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -135103,14 +132633,7 @@ class TestEvent_TestPayload : public ::protozero::Message { uint32_t, TestEvent_TestPayload>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_RemainingNestingDepth kRemainingNestingDepth() { return {}; } + static constexpr FieldMetadata_RemainingNestingDepth kRemainingNestingDepth{}; void set_remaining_nesting_depth(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_RemainingNestingDepth::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -135128,14 +132651,7 @@ class TestEvent_TestPayload : public ::protozero::Message { DebugAnnotation, TestEvent_TestPayload>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_DebugAnnotations kDebugAnnotations() { return {}; } + static constexpr FieldMetadata_DebugAnnotations kDebugAnnotations{}; template T* add_debug_annotations() { return BeginNestedMessage(7); } @@ -135197,17 +132713,13 @@ class TestExtensionChild : public ::protozero::Message { std::string, TestExtensionChild>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ChildFieldForTesting kChildFieldForTesting() { return {}; } + static constexpr FieldMetadata_ChildFieldForTesting kChildFieldForTesting{}; void set_child_field_for_testing(const char* data, size_t size) { AppendBytes(FieldMetadata_ChildFieldForTesting::kFieldId, data, size); } + void set_child_field_for_testing(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_ChildFieldForTesting::kFieldId, chars.data, chars.size); + } void set_child_field_for_testing(std::string value) { static constexpr uint32_t field_id = FieldMetadata_ChildFieldForTesting::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -135225,14 +132737,7 @@ class TestExtensionChild : public ::protozero::Message { DebugAnnotation, TestExtensionChild>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_DebugAnnotations kDebugAnnotations() { return {}; } + static constexpr FieldMetadata_DebugAnnotations kDebugAnnotations{}; template T* add_debug_annotations() { return BeginNestedMessage(99); } @@ -135250,17 +132755,13 @@ class TestExtension : public ::perfetto::protos::pbzero::TrackEvent { std::string, TestExtension>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_StringExtensionForTesting kStringExtensionForTesting() { return {}; } + static constexpr FieldMetadata_StringExtensionForTesting kStringExtensionForTesting{}; void set_string_extension_for_testing(const char* data, size_t size) { AppendBytes(FieldMetadata_StringExtensionForTesting::kFieldId, data, size); } + void set_string_extension_for_testing(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_StringExtensionForTesting::kFieldId, chars.data, chars.size); + } void set_string_extension_for_testing(std::string value) { static constexpr uint32_t field_id = FieldMetadata_StringExtensionForTesting::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -135278,14 +132779,7 @@ class TestExtension : public ::perfetto::protos::pbzero::TrackEvent { int32_t, TestExtension>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_IntExtensionForTesting kIntExtensionForTesting() { return {}; } + static constexpr FieldMetadata_IntExtensionForTesting kIntExtensionForTesting{}; void add_int_extension_for_testing(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_IntExtensionForTesting::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -135303,17 +132797,13 @@ class TestExtension : public ::perfetto::protos::pbzero::TrackEvent { std::string, TestExtension>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_OmittedExtensionForTesting kOmittedExtensionForTesting() { return {}; } + static constexpr FieldMetadata_OmittedExtensionForTesting kOmittedExtensionForTesting{}; void set_omitted_extension_for_testing(const char* data, size_t size) { AppendBytes(FieldMetadata_OmittedExtensionForTesting::kFieldId, data, size); } + void set_omitted_extension_for_testing(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_OmittedExtensionForTesting::kFieldId, chars.data, chars.size); + } void set_omitted_extension_for_testing(std::string value) { static constexpr uint32_t field_id = FieldMetadata_OmittedExtensionForTesting::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -135331,14 +132821,7 @@ class TestExtension : public ::perfetto::protos::pbzero::TrackEvent { TestExtensionChild, TestExtension>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_NestedMessageExtensionForTesting kNestedMessageExtensionForTesting() { return {}; } + static constexpr FieldMetadata_NestedMessageExtensionForTesting kNestedMessageExtensionForTesting{}; template T* set_nested_message_extension_for_testing() { return BeginNestedMessage(9903); } @@ -135372,6 +132855,7 @@ class AndroidCameraSessionStats; class AndroidEnergyEstimationBreakdown; class AndroidGameInterventionList; class AndroidLogPacket; +class AndroidSystemProperty; class BatteryCounters; class ChromeBenchmarkMetadata; class ChromeEventBundle; @@ -135379,6 +132863,7 @@ class ChromeMetadataPacket; class ClockSnapshot; class CpuInfo; class DeobfuscationMapping; +class EntityStateResidency; class ExtensionDescriptor; class FrameTimelineEvent; class FtraceEventBundle; @@ -135394,6 +132879,8 @@ class InodeFileMap; class InternedData; class MemoryTrackerSnapshot; class ModuleSymbols; +class NetworkPacketBundle; +class NetworkPacketEvent; class PackagesList; class PerfSample; class PerfettoMetatrace; @@ -135404,6 +132891,7 @@ class ProcessTree; class ProfilePacket; class ProfiledFrameSymbols; class SmapsPacket; +class StatsdAtom; class StreamingAllocation; class StreamingFree; class StreamingProfilePacket; @@ -135414,23 +132902,45 @@ class ThreadDescriptor; class TraceConfig; class TracePacketDefaults; class TraceStats; +class TraceUuid; class TracingServiceEvent; class TrackDescriptor; class TrackEvent; +class TrackEventRangeOfInterest; class TranslationTable; class Trigger; class UiState; class VulkanApiEvent; class VulkanMemoryEvent; -enum TracePacket_SequenceFlags : int32_t { - TracePacket_SequenceFlags_SEQ_UNSPECIFIED = 0, - TracePacket_SequenceFlags_SEQ_INCREMENTAL_STATE_CLEARED = 1, - TracePacket_SequenceFlags_SEQ_NEEDS_INCREMENTAL_STATE = 2, +namespace perfetto_pbzero_enum_TracePacket { +enum SequenceFlags : int32_t { + SEQ_UNSPECIFIED = 0, + SEQ_INCREMENTAL_STATE_CLEARED = 1, + SEQ_NEEDS_INCREMENTAL_STATE = 2, }; +} // namespace perfetto_pbzero_enum_TracePacket +using TracePacket_SequenceFlags = perfetto_pbzero_enum_TracePacket::SequenceFlags; -const TracePacket_SequenceFlags TracePacket_SequenceFlags_MIN = TracePacket_SequenceFlags_SEQ_UNSPECIFIED; -const TracePacket_SequenceFlags TracePacket_SequenceFlags_MAX = TracePacket_SequenceFlags_SEQ_NEEDS_INCREMENTAL_STATE; + +constexpr TracePacket_SequenceFlags TracePacket_SequenceFlags_MIN = TracePacket_SequenceFlags::SEQ_UNSPECIFIED; +constexpr TracePacket_SequenceFlags TracePacket_SequenceFlags_MAX = TracePacket_SequenceFlags::SEQ_NEEDS_INCREMENTAL_STATE; + + +PERFETTO_PROTOZERO_CONSTEXPR14_OR_INLINE +const char* TracePacket_SequenceFlags_Name(::perfetto::protos::pbzero::TracePacket_SequenceFlags value) { + switch (value) { + case ::perfetto::protos::pbzero::TracePacket_SequenceFlags::SEQ_UNSPECIFIED: + return "SEQ_UNSPECIFIED"; + + case ::perfetto::protos::pbzero::TracePacket_SequenceFlags::SEQ_INCREMENTAL_STATE_CLEARED: + return "SEQ_INCREMENTAL_STATE_CLEARED"; + + case ::perfetto::protos::pbzero::TracePacket_SequenceFlags::SEQ_NEEDS_INCREMENTAL_STATE: + return "SEQ_NEEDS_INCREMENTAL_STATE"; + } + return "PBZERO_UNKNOWN_ENUM_VALUE"; +} class TracePacket_Decoder : public ::protozero::TypedProtoDecoder { public: @@ -135455,6 +132965,8 @@ class TracePacket_Decoder : public ::protozero::TypedProtoDecoder().as_bytes(); } bool has_track_event() const { return at<11>().valid(); } ::protozero::ConstBytes track_event() const { return at<11>().as_bytes(); } + bool has_trace_uuid() const { return at<89>().valid(); } + ::protozero::ConstBytes trace_uuid() const { return at<89>().as_bytes(); } bool has_trace_config() const { return at<33>().valid(); } ::protozero::ConstBytes trace_config() const { return at<33>().as_bytes(); } bool has_ftrace_stats() const { return at<34>().valid(); } @@ -135529,6 +133041,12 @@ class TracePacket_Decoder : public ::protozero::TypedProtoDecoder().as_bytes(); } bool has_android_game_intervention_list() const { return at<83>().valid(); } ::protozero::ConstBytes android_game_intervention_list() const { return at<83>().as_bytes(); } + bool has_statsd_atom() const { return at<84>().valid(); } + ::protozero::ConstBytes statsd_atom() const { return at<84>().as_bytes(); } + bool has_android_system_property() const { return at<86>().valid(); } + ::protozero::ConstBytes android_system_property() const { return at<86>().as_bytes(); } + bool has_entity_state_residency() const { return at<91>().valid(); } + ::protozero::ConstBytes entity_state_residency() const { return at<91>().as_bytes(); } bool has_profiled_frame_symbols() const { return at<55>().valid(); } ::protozero::ConstBytes profiled_frame_symbols() const { return at<55>().as_bytes(); } bool has_module_symbols() const { return at<61>().valid(); } @@ -135549,6 +133067,12 @@ class TracePacket_Decoder : public ::protozero::TypedProtoDecoder().as_bytes(); } bool has_extension_descriptor() const { return at<72>().valid(); } ::protozero::ConstBytes extension_descriptor() const { return at<72>().as_bytes(); } + bool has_network_packet() const { return at<88>().valid(); } + ::protozero::ConstBytes network_packet() const { return at<88>().as_bytes(); } + bool has_network_packet_bundle() const { return at<92>().valid(); } + ::protozero::ConstBytes network_packet_bundle() const { return at<92>().as_bytes(); } + bool has_track_event_range_of_interest() const { return at<90>().valid(); } + ::protozero::ConstBytes track_event_range_of_interest() const { return at<90>().as_bytes(); } bool has_for_testing() const { return at<900>().valid(); } ::protozero::ConstBytes for_testing() const { return at<900>().as_bytes(); } bool has_trusted_uid() const { return at<3>().valid(); } @@ -135567,6 +133091,8 @@ class TracePacket_Decoder : public ::protozero::TypedProtoDecoder().as_bytes(); } bool has_previous_packet_dropped() const { return at<42>().valid(); } bool previous_packet_dropped() const { return at<42>().as_bool(); } + bool has_first_packet_on_sequence() const { return at<87>().valid(); } + bool first_packet_on_sequence() const { return at<87>().as_bool(); } }; class TracePacket : public ::protozero::Message { @@ -135582,6 +133108,7 @@ class TracePacket : public ::protozero::Message { kClockSnapshotFieldNumber = 6, kSysStatsFieldNumber = 7, kTrackEventFieldNumber = 11, + kTraceUuidFieldNumber = 89, kTraceConfigFieldNumber = 33, kFtraceStatsFieldNumber = 34, kTraceStatsFieldNumber = 35, @@ -135619,6 +133146,9 @@ class TracePacket : public ::protozero::Message { kAndroidCameraSessionStatsFieldNumber = 81, kTranslationTableFieldNumber = 82, kAndroidGameInterventionListFieldNumber = 83, + kStatsdAtomFieldNumber = 84, + kAndroidSystemPropertyFieldNumber = 86, + kEntityStateResidencyFieldNumber = 91, kProfiledFrameSymbolsFieldNumber = 55, kModuleSymbolsFieldNumber = 61, kDeobfuscationMappingFieldNumber = 64, @@ -135629,6 +133159,9 @@ class TracePacket : public ::protozero::Message { kSynchronizationMarkerFieldNumber = 36, kCompressedPacketsFieldNumber = 50, kExtensionDescriptorFieldNumber = 72, + kNetworkPacketFieldNumber = 88, + kNetworkPacketBundleFieldNumber = 92, + kTrackEventRangeOfInterestFieldNumber = 90, kForTestingFieldNumber = 900, kTrustedUidFieldNumber = 3, kTrustedPacketSequenceIdFieldNumber = 10, @@ -135638,13 +133171,18 @@ class TracePacket : public ::protozero::Message { kIncrementalStateClearedFieldNumber = 41, kTracePacketDefaultsFieldNumber = 59, kPreviousPacketDroppedFieldNumber = 42, + kFirstPacketOnSequenceFieldNumber = 87, }; static constexpr const char* GetName() { return ".perfetto.protos.TracePacket"; } + using SequenceFlags = ::perfetto::protos::pbzero::TracePacket_SequenceFlags; - static const SequenceFlags SEQ_UNSPECIFIED = TracePacket_SequenceFlags_SEQ_UNSPECIFIED; - static const SequenceFlags SEQ_INCREMENTAL_STATE_CLEARED = TracePacket_SequenceFlags_SEQ_INCREMENTAL_STATE_CLEARED; - static const SequenceFlags SEQ_NEEDS_INCREMENTAL_STATE = TracePacket_SequenceFlags_SEQ_NEEDS_INCREMENTAL_STATE; + static inline const char* SequenceFlags_Name(SequenceFlags value) { + return ::perfetto::protos::pbzero::TracePacket_SequenceFlags_Name(value); + } + static const SequenceFlags SEQ_UNSPECIFIED = SequenceFlags::SEQ_UNSPECIFIED; + static const SequenceFlags SEQ_INCREMENTAL_STATE_CLEARED = SequenceFlags::SEQ_INCREMENTAL_STATE_CLEARED; + static const SequenceFlags SEQ_NEEDS_INCREMENTAL_STATE = SequenceFlags::SEQ_NEEDS_INCREMENTAL_STATE; using FieldMetadata_Timestamp = ::protozero::proto_utils::FieldMetadata< @@ -135654,14 +133192,7 @@ class TracePacket : public ::protozero::Message { uint64_t, TracePacket>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Timestamp kTimestamp() { return {}; } + static constexpr FieldMetadata_Timestamp kTimestamp{}; void set_timestamp(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Timestamp::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -135679,14 +133210,7 @@ class TracePacket : public ::protozero::Message { uint32_t, TracePacket>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_TimestampClockId kTimestampClockId() { return {}; } + static constexpr FieldMetadata_TimestampClockId kTimestampClockId{}; void set_timestamp_clock_id(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_TimestampClockId::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -135704,14 +133228,7 @@ class TracePacket : public ::protozero::Message { ProcessTree, TracePacket>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ProcessTree kProcessTree() { return {}; } + static constexpr FieldMetadata_ProcessTree kProcessTree{}; template T* set_process_tree() { return BeginNestedMessage(2); } @@ -135725,14 +133242,7 @@ class TracePacket : public ::protozero::Message { ProcessStats, TracePacket>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ProcessStats kProcessStats() { return {}; } + static constexpr FieldMetadata_ProcessStats kProcessStats{}; template T* set_process_stats() { return BeginNestedMessage(9); } @@ -135746,14 +133256,7 @@ class TracePacket : public ::protozero::Message { InodeFileMap, TracePacket>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_InodeFileMap kInodeFileMap() { return {}; } + static constexpr FieldMetadata_InodeFileMap kInodeFileMap{}; template T* set_inode_file_map() { return BeginNestedMessage(4); } @@ -135767,14 +133270,7 @@ class TracePacket : public ::protozero::Message { ChromeEventBundle, TracePacket>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ChromeEvents kChromeEvents() { return {}; } + static constexpr FieldMetadata_ChromeEvents kChromeEvents{}; template T* set_chrome_events() { return BeginNestedMessage(5); } @@ -135788,14 +133284,7 @@ class TracePacket : public ::protozero::Message { ClockSnapshot, TracePacket>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ClockSnapshot kClockSnapshot() { return {}; } + static constexpr FieldMetadata_ClockSnapshot kClockSnapshot{}; template T* set_clock_snapshot() { return BeginNestedMessage(6); } @@ -135809,14 +133298,7 @@ class TracePacket : public ::protozero::Message { SysStats, TracePacket>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_SysStats kSysStats() { return {}; } + static constexpr FieldMetadata_SysStats kSysStats{}; template T* set_sys_stats() { return BeginNestedMessage(7); } @@ -135830,19 +133312,26 @@ class TracePacket : public ::protozero::Message { TrackEvent, TracePacket>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_TrackEvent kTrackEvent() { return {}; } + static constexpr FieldMetadata_TrackEvent kTrackEvent{}; template T* set_track_event() { return BeginNestedMessage(11); } + using FieldMetadata_TraceUuid = + ::protozero::proto_utils::FieldMetadata< + 89, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kMessage, + TraceUuid, + TracePacket>; + + static constexpr FieldMetadata_TraceUuid kTraceUuid{}; + template T* set_trace_uuid() { + return BeginNestedMessage(89); + } + + using FieldMetadata_TraceConfig = ::protozero::proto_utils::FieldMetadata< 33, @@ -135851,14 +133340,7 @@ class TracePacket : public ::protozero::Message { TraceConfig, TracePacket>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_TraceConfig kTraceConfig() { return {}; } + static constexpr FieldMetadata_TraceConfig kTraceConfig{}; template T* set_trace_config() { return BeginNestedMessage(33); } @@ -135872,14 +133354,7 @@ class TracePacket : public ::protozero::Message { FtraceStats, TracePacket>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_FtraceStats kFtraceStats() { return {}; } + static constexpr FieldMetadata_FtraceStats kFtraceStats{}; template T* set_ftrace_stats() { return BeginNestedMessage(34); } @@ -135893,14 +133368,7 @@ class TracePacket : public ::protozero::Message { TraceStats, TracePacket>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_TraceStats kTraceStats() { return {}; } + static constexpr FieldMetadata_TraceStats kTraceStats{}; template T* set_trace_stats() { return BeginNestedMessage(35); } @@ -135914,14 +133382,7 @@ class TracePacket : public ::protozero::Message { ProfilePacket, TracePacket>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ProfilePacket kProfilePacket() { return {}; } + static constexpr FieldMetadata_ProfilePacket kProfilePacket{}; template T* set_profile_packet() { return BeginNestedMessage(37); } @@ -135935,14 +133396,7 @@ class TracePacket : public ::protozero::Message { StreamingAllocation, TracePacket>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_StreamingAllocation kStreamingAllocation() { return {}; } + static constexpr FieldMetadata_StreamingAllocation kStreamingAllocation{}; template T* set_streaming_allocation() { return BeginNestedMessage(74); } @@ -135956,14 +133410,7 @@ class TracePacket : public ::protozero::Message { StreamingFree, TracePacket>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_StreamingFree kStreamingFree() { return {}; } + static constexpr FieldMetadata_StreamingFree kStreamingFree{}; template T* set_streaming_free() { return BeginNestedMessage(75); } @@ -135977,14 +133424,7 @@ class TracePacket : public ::protozero::Message { BatteryCounters, TracePacket>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Battery kBattery() { return {}; } + static constexpr FieldMetadata_Battery kBattery{}; template T* set_battery() { return BeginNestedMessage(38); } @@ -135998,14 +133438,7 @@ class TracePacket : public ::protozero::Message { PowerRails, TracePacket>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_PowerRails kPowerRails() { return {}; } + static constexpr FieldMetadata_PowerRails kPowerRails{}; template T* set_power_rails() { return BeginNestedMessage(40); } @@ -136019,14 +133452,7 @@ class TracePacket : public ::protozero::Message { AndroidLogPacket, TracePacket>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_AndroidLog kAndroidLog() { return {}; } + static constexpr FieldMetadata_AndroidLog kAndroidLog{}; template T* set_android_log() { return BeginNestedMessage(39); } @@ -136040,14 +133466,7 @@ class TracePacket : public ::protozero::Message { SystemInfo, TracePacket>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_SystemInfo kSystemInfo() { return {}; } + static constexpr FieldMetadata_SystemInfo kSystemInfo{}; template T* set_system_info() { return BeginNestedMessage(45); } @@ -136061,14 +133480,7 @@ class TracePacket : public ::protozero::Message { Trigger, TracePacket>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Trigger kTrigger() { return {}; } + static constexpr FieldMetadata_Trigger kTrigger{}; template T* set_trigger() { return BeginNestedMessage(46); } @@ -136082,14 +133494,7 @@ class TracePacket : public ::protozero::Message { PackagesList, TracePacket>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_PackagesList kPackagesList() { return {}; } + static constexpr FieldMetadata_PackagesList kPackagesList{}; template T* set_packages_list() { return BeginNestedMessage(47); } @@ -136103,14 +133508,7 @@ class TracePacket : public ::protozero::Message { ChromeBenchmarkMetadata, TracePacket>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ChromeBenchmarkMetadata kChromeBenchmarkMetadata() { return {}; } + static constexpr FieldMetadata_ChromeBenchmarkMetadata kChromeBenchmarkMetadata{}; template T* set_chrome_benchmark_metadata() { return BeginNestedMessage(48); } @@ -136124,14 +133522,7 @@ class TracePacket : public ::protozero::Message { PerfettoMetatrace, TracePacket>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_PerfettoMetatrace kPerfettoMetatrace() { return {}; } + static constexpr FieldMetadata_PerfettoMetatrace kPerfettoMetatrace{}; template T* set_perfetto_metatrace() { return BeginNestedMessage(49); } @@ -136145,14 +133536,7 @@ class TracePacket : public ::protozero::Message { ChromeMetadataPacket, TracePacket>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ChromeMetadata kChromeMetadata() { return {}; } + static constexpr FieldMetadata_ChromeMetadata kChromeMetadata{}; template T* set_chrome_metadata() { return BeginNestedMessage(51); } @@ -136166,14 +133550,7 @@ class TracePacket : public ::protozero::Message { GpuCounterEvent, TracePacket>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_GpuCounterEvent kGpuCounterEvent() { return {}; } + static constexpr FieldMetadata_GpuCounterEvent kGpuCounterEvent{}; template T* set_gpu_counter_event() { return BeginNestedMessage(52); } @@ -136187,14 +133564,7 @@ class TracePacket : public ::protozero::Message { GpuRenderStageEvent, TracePacket>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_GpuRenderStageEvent kGpuRenderStageEvent() { return {}; } + static constexpr FieldMetadata_GpuRenderStageEvent kGpuRenderStageEvent{}; template T* set_gpu_render_stage_event() { return BeginNestedMessage(53); } @@ -136208,14 +133578,7 @@ class TracePacket : public ::protozero::Message { StreamingProfilePacket, TracePacket>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_StreamingProfilePacket kStreamingProfilePacket() { return {}; } + static constexpr FieldMetadata_StreamingProfilePacket kStreamingProfilePacket{}; template T* set_streaming_profile_packet() { return BeginNestedMessage(54); } @@ -136229,14 +133592,7 @@ class TracePacket : public ::protozero::Message { HeapGraph, TracePacket>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_HeapGraph kHeapGraph() { return {}; } + static constexpr FieldMetadata_HeapGraph kHeapGraph{}; template T* set_heap_graph() { return BeginNestedMessage(56); } @@ -136250,14 +133606,7 @@ class TracePacket : public ::protozero::Message { GraphicsFrameEvent, TracePacket>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_GraphicsFrameEvent kGraphicsFrameEvent() { return {}; } + static constexpr FieldMetadata_GraphicsFrameEvent kGraphicsFrameEvent{}; template T* set_graphics_frame_event() { return BeginNestedMessage(57); } @@ -136271,14 +133620,7 @@ class TracePacket : public ::protozero::Message { VulkanMemoryEvent, TracePacket>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_VulkanMemoryEvent kVulkanMemoryEvent() { return {}; } + static constexpr FieldMetadata_VulkanMemoryEvent kVulkanMemoryEvent{}; template T* set_vulkan_memory_event() { return BeginNestedMessage(62); } @@ -136292,14 +133634,7 @@ class TracePacket : public ::protozero::Message { GpuLog, TracePacket>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_GpuLog kGpuLog() { return {}; } + static constexpr FieldMetadata_GpuLog kGpuLog{}; template T* set_gpu_log() { return BeginNestedMessage(63); } @@ -136313,14 +133648,7 @@ class TracePacket : public ::protozero::Message { VulkanApiEvent, TracePacket>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_VulkanApiEvent kVulkanApiEvent() { return {}; } + static constexpr FieldMetadata_VulkanApiEvent kVulkanApiEvent{}; template T* set_vulkan_api_event() { return BeginNestedMessage(65); } @@ -136334,14 +133662,7 @@ class TracePacket : public ::protozero::Message { PerfSample, TracePacket>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_PerfSample kPerfSample() { return {}; } + static constexpr FieldMetadata_PerfSample kPerfSample{}; template T* set_perf_sample() { return BeginNestedMessage(66); } @@ -136355,14 +133676,7 @@ class TracePacket : public ::protozero::Message { CpuInfo, TracePacket>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_CpuInfo kCpuInfo() { return {}; } + static constexpr FieldMetadata_CpuInfo kCpuInfo{}; template T* set_cpu_info() { return BeginNestedMessage(67); } @@ -136376,14 +133690,7 @@ class TracePacket : public ::protozero::Message { SmapsPacket, TracePacket>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_SmapsPacket kSmapsPacket() { return {}; } + static constexpr FieldMetadata_SmapsPacket kSmapsPacket{}; template T* set_smaps_packet() { return BeginNestedMessage(68); } @@ -136397,14 +133704,7 @@ class TracePacket : public ::protozero::Message { TracingServiceEvent, TracePacket>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ServiceEvent kServiceEvent() { return {}; } + static constexpr FieldMetadata_ServiceEvent kServiceEvent{}; template T* set_service_event() { return BeginNestedMessage(69); } @@ -136418,14 +133718,7 @@ class TracePacket : public ::protozero::Message { InitialDisplayState, TracePacket>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_InitialDisplayState kInitialDisplayState() { return {}; } + static constexpr FieldMetadata_InitialDisplayState kInitialDisplayState{}; template T* set_initial_display_state() { return BeginNestedMessage(70); } @@ -136439,14 +133732,7 @@ class TracePacket : public ::protozero::Message { GpuMemTotalEvent, TracePacket>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_GpuMemTotalEvent kGpuMemTotalEvent() { return {}; } + static constexpr FieldMetadata_GpuMemTotalEvent kGpuMemTotalEvent{}; template T* set_gpu_mem_total_event() { return BeginNestedMessage(71); } @@ -136460,14 +133746,7 @@ class TracePacket : public ::protozero::Message { MemoryTrackerSnapshot, TracePacket>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_MemoryTrackerSnapshot kMemoryTrackerSnapshot() { return {}; } + static constexpr FieldMetadata_MemoryTrackerSnapshot kMemoryTrackerSnapshot{}; template T* set_memory_tracker_snapshot() { return BeginNestedMessage(73); } @@ -136481,14 +133760,7 @@ class TracePacket : public ::protozero::Message { FrameTimelineEvent, TracePacket>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_FrameTimelineEvent kFrameTimelineEvent() { return {}; } + static constexpr FieldMetadata_FrameTimelineEvent kFrameTimelineEvent{}; template T* set_frame_timeline_event() { return BeginNestedMessage(76); } @@ -136502,14 +133774,7 @@ class TracePacket : public ::protozero::Message { AndroidEnergyEstimationBreakdown, TracePacket>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_AndroidEnergyEstimationBreakdown kAndroidEnergyEstimationBreakdown() { return {}; } + static constexpr FieldMetadata_AndroidEnergyEstimationBreakdown kAndroidEnergyEstimationBreakdown{}; template T* set_android_energy_estimation_breakdown() { return BeginNestedMessage(77); } @@ -136523,14 +133788,7 @@ class TracePacket : public ::protozero::Message { UiState, TracePacket>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_UiState kUiState() { return {}; } + static constexpr FieldMetadata_UiState kUiState{}; template T* set_ui_state() { return BeginNestedMessage(78); } @@ -136544,14 +133802,7 @@ class TracePacket : public ::protozero::Message { AndroidCameraFrameEvent, TracePacket>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_AndroidCameraFrameEvent kAndroidCameraFrameEvent() { return {}; } + static constexpr FieldMetadata_AndroidCameraFrameEvent kAndroidCameraFrameEvent{}; template T* set_android_camera_frame_event() { return BeginNestedMessage(80); } @@ -136565,14 +133816,7 @@ class TracePacket : public ::protozero::Message { AndroidCameraSessionStats, TracePacket>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_AndroidCameraSessionStats kAndroidCameraSessionStats() { return {}; } + static constexpr FieldMetadata_AndroidCameraSessionStats kAndroidCameraSessionStats{}; template T* set_android_camera_session_stats() { return BeginNestedMessage(81); } @@ -136586,14 +133830,7 @@ class TracePacket : public ::protozero::Message { TranslationTable, TracePacket>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_TranslationTable kTranslationTable() { return {}; } + static constexpr FieldMetadata_TranslationTable kTranslationTable{}; template T* set_translation_table() { return BeginNestedMessage(82); } @@ -136607,19 +133844,54 @@ class TracePacket : public ::protozero::Message { AndroidGameInterventionList, TracePacket>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_AndroidGameInterventionList kAndroidGameInterventionList() { return {}; } + static constexpr FieldMetadata_AndroidGameInterventionList kAndroidGameInterventionList{}; template T* set_android_game_intervention_list() { return BeginNestedMessage(83); } + using FieldMetadata_StatsdAtom = + ::protozero::proto_utils::FieldMetadata< + 84, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kMessage, + StatsdAtom, + TracePacket>; + + static constexpr FieldMetadata_StatsdAtom kStatsdAtom{}; + template T* set_statsd_atom() { + return BeginNestedMessage(84); + } + + + using FieldMetadata_AndroidSystemProperty = + ::protozero::proto_utils::FieldMetadata< + 86, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kMessage, + AndroidSystemProperty, + TracePacket>; + + static constexpr FieldMetadata_AndroidSystemProperty kAndroidSystemProperty{}; + template T* set_android_system_property() { + return BeginNestedMessage(86); + } + + + using FieldMetadata_EntityStateResidency = + ::protozero::proto_utils::FieldMetadata< + 91, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kMessage, + EntityStateResidency, + TracePacket>; + + static constexpr FieldMetadata_EntityStateResidency kEntityStateResidency{}; + template T* set_entity_state_residency() { + return BeginNestedMessage(91); + } + + using FieldMetadata_ProfiledFrameSymbols = ::protozero::proto_utils::FieldMetadata< 55, @@ -136628,14 +133900,7 @@ class TracePacket : public ::protozero::Message { ProfiledFrameSymbols, TracePacket>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ProfiledFrameSymbols kProfiledFrameSymbols() { return {}; } + static constexpr FieldMetadata_ProfiledFrameSymbols kProfiledFrameSymbols{}; template T* set_profiled_frame_symbols() { return BeginNestedMessage(55); } @@ -136649,14 +133914,7 @@ class TracePacket : public ::protozero::Message { ModuleSymbols, TracePacket>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ModuleSymbols kModuleSymbols() { return {}; } + static constexpr FieldMetadata_ModuleSymbols kModuleSymbols{}; template T* set_module_symbols() { return BeginNestedMessage(61); } @@ -136670,14 +133928,7 @@ class TracePacket : public ::protozero::Message { DeobfuscationMapping, TracePacket>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_DeobfuscationMapping kDeobfuscationMapping() { return {}; } + static constexpr FieldMetadata_DeobfuscationMapping kDeobfuscationMapping{}; template T* set_deobfuscation_mapping() { return BeginNestedMessage(64); } @@ -136691,14 +133942,7 @@ class TracePacket : public ::protozero::Message { TrackDescriptor, TracePacket>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_TrackDescriptor kTrackDescriptor() { return {}; } + static constexpr FieldMetadata_TrackDescriptor kTrackDescriptor{}; template T* set_track_descriptor() { return BeginNestedMessage(60); } @@ -136712,14 +133956,7 @@ class TracePacket : public ::protozero::Message { ProcessDescriptor, TracePacket>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ProcessDescriptor kProcessDescriptor() { return {}; } + static constexpr FieldMetadata_ProcessDescriptor kProcessDescriptor{}; template T* set_process_descriptor() { return BeginNestedMessage(43); } @@ -136733,14 +133970,7 @@ class TracePacket : public ::protozero::Message { ThreadDescriptor, TracePacket>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ThreadDescriptor kThreadDescriptor() { return {}; } + static constexpr FieldMetadata_ThreadDescriptor kThreadDescriptor{}; template T* set_thread_descriptor() { return BeginNestedMessage(44); } @@ -136754,14 +133984,7 @@ class TracePacket : public ::protozero::Message { FtraceEventBundle, TracePacket>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_FtraceEvents kFtraceEvents() { return {}; } + static constexpr FieldMetadata_FtraceEvents kFtraceEvents{}; template T* set_ftrace_events() { return BeginNestedMessage(1); } @@ -136775,17 +133998,13 @@ class TracePacket : public ::protozero::Message { std::string, TracePacket>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_SynchronizationMarker kSynchronizationMarker() { return {}; } + static constexpr FieldMetadata_SynchronizationMarker kSynchronizationMarker{}; void set_synchronization_marker(const uint8_t* data, size_t size) { AppendBytes(FieldMetadata_SynchronizationMarker::kFieldId, data, size); } + void set_synchronization_marker(::protozero::ConstBytes bytes) { + AppendBytes(FieldMetadata_SynchronizationMarker::kFieldId, bytes.data, bytes.size); + } void set_synchronization_marker(std::string value) { static constexpr uint32_t field_id = FieldMetadata_SynchronizationMarker::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -136803,17 +134022,13 @@ class TracePacket : public ::protozero::Message { std::string, TracePacket>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_CompressedPackets kCompressedPackets() { return {}; } + static constexpr FieldMetadata_CompressedPackets kCompressedPackets{}; void set_compressed_packets(const uint8_t* data, size_t size) { AppendBytes(FieldMetadata_CompressedPackets::kFieldId, data, size); } + void set_compressed_packets(::protozero::ConstBytes bytes) { + AppendBytes(FieldMetadata_CompressedPackets::kFieldId, bytes.data, bytes.size); + } void set_compressed_packets(std::string value) { static constexpr uint32_t field_id = FieldMetadata_CompressedPackets::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -136831,19 +134046,54 @@ class TracePacket : public ::protozero::Message { ExtensionDescriptor, TracePacket>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ExtensionDescriptor kExtensionDescriptor() { return {}; } + static constexpr FieldMetadata_ExtensionDescriptor kExtensionDescriptor{}; template T* set_extension_descriptor() { return BeginNestedMessage(72); } + using FieldMetadata_NetworkPacket = + ::protozero::proto_utils::FieldMetadata< + 88, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kMessage, + NetworkPacketEvent, + TracePacket>; + + static constexpr FieldMetadata_NetworkPacket kNetworkPacket{}; + template T* set_network_packet() { + return BeginNestedMessage(88); + } + + + using FieldMetadata_NetworkPacketBundle = + ::protozero::proto_utils::FieldMetadata< + 92, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kMessage, + NetworkPacketBundle, + TracePacket>; + + static constexpr FieldMetadata_NetworkPacketBundle kNetworkPacketBundle{}; + template T* set_network_packet_bundle() { + return BeginNestedMessage(92); + } + + + using FieldMetadata_TrackEventRangeOfInterest = + ::protozero::proto_utils::FieldMetadata< + 90, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kMessage, + TrackEventRangeOfInterest, + TracePacket>; + + static constexpr FieldMetadata_TrackEventRangeOfInterest kTrackEventRangeOfInterest{}; + template T* set_track_event_range_of_interest() { + return BeginNestedMessage(90); + } + + using FieldMetadata_ForTesting = ::protozero::proto_utils::FieldMetadata< 900, @@ -136852,14 +134102,7 @@ class TracePacket : public ::protozero::Message { TestEvent, TracePacket>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ForTesting kForTesting() { return {}; } + static constexpr FieldMetadata_ForTesting kForTesting{}; template T* set_for_testing() { return BeginNestedMessage(900); } @@ -136873,14 +134116,7 @@ class TracePacket : public ::protozero::Message { int32_t, TracePacket>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_TrustedUid kTrustedUid() { return {}; } + static constexpr FieldMetadata_TrustedUid kTrustedUid{}; void set_trusted_uid(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_TrustedUid::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -136898,14 +134134,7 @@ class TracePacket : public ::protozero::Message { uint32_t, TracePacket>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_TrustedPacketSequenceId kTrustedPacketSequenceId() { return {}; } + static constexpr FieldMetadata_TrustedPacketSequenceId kTrustedPacketSequenceId{}; void set_trusted_packet_sequence_id(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_TrustedPacketSequenceId::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -136923,14 +134152,7 @@ class TracePacket : public ::protozero::Message { int32_t, TracePacket>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_TrustedPid kTrustedPid() { return {}; } + static constexpr FieldMetadata_TrustedPid kTrustedPid{}; void set_trusted_pid(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_TrustedPid::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -136948,14 +134170,7 @@ class TracePacket : public ::protozero::Message { InternedData, TracePacket>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_InternedData kInternedData() { return {}; } + static constexpr FieldMetadata_InternedData kInternedData{}; template T* set_interned_data() { return BeginNestedMessage(12); } @@ -136969,14 +134184,7 @@ class TracePacket : public ::protozero::Message { uint32_t, TracePacket>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_SequenceFlags kSequenceFlags() { return {}; } + static constexpr FieldMetadata_SequenceFlags kSequenceFlags{}; void set_sequence_flags(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_SequenceFlags::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -136994,14 +134202,7 @@ class TracePacket : public ::protozero::Message { bool, TracePacket>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_IncrementalStateCleared kIncrementalStateCleared() { return {}; } + static constexpr FieldMetadata_IncrementalStateCleared kIncrementalStateCleared{}; void set_incremental_state_cleared(bool value) { static constexpr uint32_t field_id = FieldMetadata_IncrementalStateCleared::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -137019,14 +134220,7 @@ class TracePacket : public ::protozero::Message { TracePacketDefaults, TracePacket>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_TracePacketDefaults kTracePacketDefaults() { return {}; } + static constexpr FieldMetadata_TracePacketDefaults kTracePacketDefaults{}; template T* set_trace_packet_defaults() { return BeginNestedMessage(59); } @@ -137040,14 +134234,7 @@ class TracePacket : public ::protozero::Message { bool, TracePacket>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_PreviousPacketDropped kPreviousPacketDropped() { return {}; } + static constexpr FieldMetadata_PreviousPacketDropped kPreviousPacketDropped{}; void set_previous_packet_dropped(bool value) { static constexpr uint32_t field_id = FieldMetadata_PreviousPacketDropped::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -137056,6 +134243,24 @@ class TracePacket : public ::protozero::Message { ::protozero::proto_utils::ProtoSchemaType::kBool> ::Append(*this, field_id, value); } + + using FieldMetadata_FirstPacketOnSequence = + ::protozero::proto_utils::FieldMetadata< + 87, + ::protozero::proto_utils::RepetitionType::kNotRepeated, + ::protozero::proto_utils::ProtoSchemaType::kBool, + bool, + TracePacket>; + + static constexpr FieldMetadata_FirstPacketOnSequence kFirstPacketOnSequence{}; + void set_first_packet_on_sequence(bool value) { + static constexpr uint32_t field_id = FieldMetadata_FirstPacketOnSequence::kFieldId; + // Call the appropriate protozero::Message::Append(field_id, ...) + // method based on the type of the field. + ::protozero::internal::FieldWriter< + ::protozero::proto_utils::ProtoSchemaType::kBool> + ::Append(*this, field_id, value); + } }; } // Namespace. @@ -137109,14 +134314,7 @@ class Trace : public ::protozero::Message { TracePacket, Trace>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Packet kPacket() { return {}; } + static constexpr FieldMetadata_Packet kPacket{}; template T* add_packet() { return BeginNestedMessage(1); } @@ -137174,14 +134372,7 @@ class ExtensionDescriptor : public ::protozero::Message { FileDescriptorSet, ExtensionDescriptor>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ExtensionSet kExtensionSet() { return {}; } + static constexpr FieldMetadata_ExtensionSet kExtensionSet{}; template T* set_extension_set() { return BeginNestedMessage(1); } @@ -137215,26 +134406,72 @@ class MemoryTrackerSnapshot_ProcessSnapshot; class MemoryTrackerSnapshot_ProcessSnapshot_MemoryEdge; class MemoryTrackerSnapshot_ProcessSnapshot_MemoryNode; class MemoryTrackerSnapshot_ProcessSnapshot_MemoryNode_MemoryNodeEntry; -enum MemoryTrackerSnapshot_LevelOfDetail : int32_t; -enum MemoryTrackerSnapshot_ProcessSnapshot_MemoryNode_MemoryNodeEntry_Units : int32_t; +namespace perfetto_pbzero_enum_MemoryTrackerSnapshot { +enum LevelOfDetail : int32_t; +} // namespace perfetto_pbzero_enum_MemoryTrackerSnapshot +using MemoryTrackerSnapshot_LevelOfDetail = perfetto_pbzero_enum_MemoryTrackerSnapshot::LevelOfDetail; +namespace perfetto_pbzero_enum_MemoryTrackerSnapshot_ProcessSnapshot_MemoryNode_MemoryNodeEntry { +enum Units : int32_t; +} // namespace perfetto_pbzero_enum_MemoryTrackerSnapshot_ProcessSnapshot_MemoryNode_MemoryNodeEntry +using MemoryTrackerSnapshot_ProcessSnapshot_MemoryNode_MemoryNodeEntry_Units = perfetto_pbzero_enum_MemoryTrackerSnapshot_ProcessSnapshot_MemoryNode_MemoryNodeEntry::Units; -enum MemoryTrackerSnapshot_LevelOfDetail : int32_t { - MemoryTrackerSnapshot_LevelOfDetail_DETAIL_FULL = 0, - MemoryTrackerSnapshot_LevelOfDetail_DETAIL_LIGHT = 1, - MemoryTrackerSnapshot_LevelOfDetail_DETAIL_BACKGROUND = 2, +namespace perfetto_pbzero_enum_MemoryTrackerSnapshot { +enum LevelOfDetail : int32_t { + DETAIL_FULL = 0, + DETAIL_LIGHT = 1, + DETAIL_BACKGROUND = 2, }; +} // namespace perfetto_pbzero_enum_MemoryTrackerSnapshot +using MemoryTrackerSnapshot_LevelOfDetail = perfetto_pbzero_enum_MemoryTrackerSnapshot::LevelOfDetail; -const MemoryTrackerSnapshot_LevelOfDetail MemoryTrackerSnapshot_LevelOfDetail_MIN = MemoryTrackerSnapshot_LevelOfDetail_DETAIL_FULL; -const MemoryTrackerSnapshot_LevelOfDetail MemoryTrackerSnapshot_LevelOfDetail_MAX = MemoryTrackerSnapshot_LevelOfDetail_DETAIL_BACKGROUND; -enum MemoryTrackerSnapshot_ProcessSnapshot_MemoryNode_MemoryNodeEntry_Units : int32_t { - MemoryTrackerSnapshot_ProcessSnapshot_MemoryNode_MemoryNodeEntry_Units_UNSPECIFIED = 0, - MemoryTrackerSnapshot_ProcessSnapshot_MemoryNode_MemoryNodeEntry_Units_BYTES = 1, - MemoryTrackerSnapshot_ProcessSnapshot_MemoryNode_MemoryNodeEntry_Units_COUNT = 2, +constexpr MemoryTrackerSnapshot_LevelOfDetail MemoryTrackerSnapshot_LevelOfDetail_MIN = MemoryTrackerSnapshot_LevelOfDetail::DETAIL_FULL; +constexpr MemoryTrackerSnapshot_LevelOfDetail MemoryTrackerSnapshot_LevelOfDetail_MAX = MemoryTrackerSnapshot_LevelOfDetail::DETAIL_BACKGROUND; + + +PERFETTO_PROTOZERO_CONSTEXPR14_OR_INLINE +const char* MemoryTrackerSnapshot_LevelOfDetail_Name(::perfetto::protos::pbzero::MemoryTrackerSnapshot_LevelOfDetail value) { + switch (value) { + case ::perfetto::protos::pbzero::MemoryTrackerSnapshot_LevelOfDetail::DETAIL_FULL: + return "DETAIL_FULL"; + + case ::perfetto::protos::pbzero::MemoryTrackerSnapshot_LevelOfDetail::DETAIL_LIGHT: + return "DETAIL_LIGHT"; + + case ::perfetto::protos::pbzero::MemoryTrackerSnapshot_LevelOfDetail::DETAIL_BACKGROUND: + return "DETAIL_BACKGROUND"; + } + return "PBZERO_UNKNOWN_ENUM_VALUE"; +} + +namespace perfetto_pbzero_enum_MemoryTrackerSnapshot_ProcessSnapshot_MemoryNode_MemoryNodeEntry { +enum Units : int32_t { + UNSPECIFIED = 0, + BYTES = 1, + COUNT = 2, }; +} // namespace perfetto_pbzero_enum_MemoryTrackerSnapshot_ProcessSnapshot_MemoryNode_MemoryNodeEntry +using MemoryTrackerSnapshot_ProcessSnapshot_MemoryNode_MemoryNodeEntry_Units = perfetto_pbzero_enum_MemoryTrackerSnapshot_ProcessSnapshot_MemoryNode_MemoryNodeEntry::Units; -const MemoryTrackerSnapshot_ProcessSnapshot_MemoryNode_MemoryNodeEntry_Units MemoryTrackerSnapshot_ProcessSnapshot_MemoryNode_MemoryNodeEntry_Units_MIN = MemoryTrackerSnapshot_ProcessSnapshot_MemoryNode_MemoryNodeEntry_Units_UNSPECIFIED; -const MemoryTrackerSnapshot_ProcessSnapshot_MemoryNode_MemoryNodeEntry_Units MemoryTrackerSnapshot_ProcessSnapshot_MemoryNode_MemoryNodeEntry_Units_MAX = MemoryTrackerSnapshot_ProcessSnapshot_MemoryNode_MemoryNodeEntry_Units_COUNT; + +constexpr MemoryTrackerSnapshot_ProcessSnapshot_MemoryNode_MemoryNodeEntry_Units MemoryTrackerSnapshot_ProcessSnapshot_MemoryNode_MemoryNodeEntry_Units_MIN = MemoryTrackerSnapshot_ProcessSnapshot_MemoryNode_MemoryNodeEntry_Units::UNSPECIFIED; +constexpr MemoryTrackerSnapshot_ProcessSnapshot_MemoryNode_MemoryNodeEntry_Units MemoryTrackerSnapshot_ProcessSnapshot_MemoryNode_MemoryNodeEntry_Units_MAX = MemoryTrackerSnapshot_ProcessSnapshot_MemoryNode_MemoryNodeEntry_Units::COUNT; + + +PERFETTO_PROTOZERO_CONSTEXPR14_OR_INLINE +const char* MemoryTrackerSnapshot_ProcessSnapshot_MemoryNode_MemoryNodeEntry_Units_Name(::perfetto::protos::pbzero::MemoryTrackerSnapshot_ProcessSnapshot_MemoryNode_MemoryNodeEntry_Units value) { + switch (value) { + case ::perfetto::protos::pbzero::MemoryTrackerSnapshot_ProcessSnapshot_MemoryNode_MemoryNodeEntry_Units::UNSPECIFIED: + return "UNSPECIFIED"; + + case ::perfetto::protos::pbzero::MemoryTrackerSnapshot_ProcessSnapshot_MemoryNode_MemoryNodeEntry_Units::BYTES: + return "BYTES"; + + case ::perfetto::protos::pbzero::MemoryTrackerSnapshot_ProcessSnapshot_MemoryNode_MemoryNodeEntry_Units::COUNT: + return "COUNT"; + } + return "PBZERO_UNKNOWN_ENUM_VALUE"; +} class MemoryTrackerSnapshot_Decoder : public ::protozero::TypedProtoDecoder { public: @@ -137260,10 +134497,14 @@ class MemoryTrackerSnapshot : public ::protozero::Message { static constexpr const char* GetName() { return ".perfetto.protos.MemoryTrackerSnapshot"; } using ProcessSnapshot = ::perfetto::protos::pbzero::MemoryTrackerSnapshot_ProcessSnapshot; + using LevelOfDetail = ::perfetto::protos::pbzero::MemoryTrackerSnapshot_LevelOfDetail; - static const LevelOfDetail DETAIL_FULL = MemoryTrackerSnapshot_LevelOfDetail_DETAIL_FULL; - static const LevelOfDetail DETAIL_LIGHT = MemoryTrackerSnapshot_LevelOfDetail_DETAIL_LIGHT; - static const LevelOfDetail DETAIL_BACKGROUND = MemoryTrackerSnapshot_LevelOfDetail_DETAIL_BACKGROUND; + static inline const char* LevelOfDetail_Name(LevelOfDetail value) { + return ::perfetto::protos::pbzero::MemoryTrackerSnapshot_LevelOfDetail_Name(value); + } + static const LevelOfDetail DETAIL_FULL = LevelOfDetail::DETAIL_FULL; + static const LevelOfDetail DETAIL_LIGHT = LevelOfDetail::DETAIL_LIGHT; + static const LevelOfDetail DETAIL_BACKGROUND = LevelOfDetail::DETAIL_BACKGROUND; using FieldMetadata_GlobalDumpId = ::protozero::proto_utils::FieldMetadata< @@ -137273,14 +134514,7 @@ class MemoryTrackerSnapshot : public ::protozero::Message { uint64_t, MemoryTrackerSnapshot>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_GlobalDumpId kGlobalDumpId() { return {}; } + static constexpr FieldMetadata_GlobalDumpId kGlobalDumpId{}; void set_global_dump_id(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_GlobalDumpId::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -137298,14 +134532,7 @@ class MemoryTrackerSnapshot : public ::protozero::Message { ::perfetto::protos::pbzero::MemoryTrackerSnapshot_LevelOfDetail, MemoryTrackerSnapshot>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_LevelOfDetail kLevelOfDetail() { return {}; } + static constexpr FieldMetadata_LevelOfDetail kLevelOfDetail{}; void set_level_of_detail(::perfetto::protos::pbzero::MemoryTrackerSnapshot_LevelOfDetail value) { static constexpr uint32_t field_id = FieldMetadata_LevelOfDetail::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -137323,14 +134550,7 @@ class MemoryTrackerSnapshot : public ::protozero::Message { MemoryTrackerSnapshot_ProcessSnapshot, MemoryTrackerSnapshot>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ProcessMemoryDumps kProcessMemoryDumps() { return {}; } + static constexpr FieldMetadata_ProcessMemoryDumps kProcessMemoryDumps{}; template T* add_process_memory_dumps() { return BeginNestedMessage(3); } @@ -137371,14 +134591,7 @@ class MemoryTrackerSnapshot_ProcessSnapshot : public ::protozero::Message { int32_t, MemoryTrackerSnapshot_ProcessSnapshot>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Pid kPid() { return {}; } + static constexpr FieldMetadata_Pid kPid{}; void set_pid(int32_t value) { static constexpr uint32_t field_id = FieldMetadata_Pid::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -137396,14 +134609,7 @@ class MemoryTrackerSnapshot_ProcessSnapshot : public ::protozero::Message { MemoryTrackerSnapshot_ProcessSnapshot_MemoryNode, MemoryTrackerSnapshot_ProcessSnapshot>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_AllocatorDumps kAllocatorDumps() { return {}; } + static constexpr FieldMetadata_AllocatorDumps kAllocatorDumps{}; template T* add_allocator_dumps() { return BeginNestedMessage(2); } @@ -137417,14 +134623,7 @@ class MemoryTrackerSnapshot_ProcessSnapshot : public ::protozero::Message { MemoryTrackerSnapshot_ProcessSnapshot_MemoryEdge, MemoryTrackerSnapshot_ProcessSnapshot>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_MemoryEdges kMemoryEdges() { return {}; } + static constexpr FieldMetadata_MemoryEdges kMemoryEdges{}; template T* add_memory_edges() { return BeginNestedMessage(3); } @@ -137466,14 +134665,7 @@ class MemoryTrackerSnapshot_ProcessSnapshot_MemoryEdge : public ::protozero::Mes uint64_t, MemoryTrackerSnapshot_ProcessSnapshot_MemoryEdge>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_SourceId kSourceId() { return {}; } + static constexpr FieldMetadata_SourceId kSourceId{}; void set_source_id(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_SourceId::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -137491,14 +134683,7 @@ class MemoryTrackerSnapshot_ProcessSnapshot_MemoryEdge : public ::protozero::Mes uint64_t, MemoryTrackerSnapshot_ProcessSnapshot_MemoryEdge>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_TargetId kTargetId() { return {}; } + static constexpr FieldMetadata_TargetId kTargetId{}; void set_target_id(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_TargetId::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -137516,14 +134701,7 @@ class MemoryTrackerSnapshot_ProcessSnapshot_MemoryEdge : public ::protozero::Mes uint32_t, MemoryTrackerSnapshot_ProcessSnapshot_MemoryEdge>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Importance kImportance() { return {}; } + static constexpr FieldMetadata_Importance kImportance{}; void set_importance(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Importance::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -137541,14 +134719,7 @@ class MemoryTrackerSnapshot_ProcessSnapshot_MemoryEdge : public ::protozero::Mes bool, MemoryTrackerSnapshot_ProcessSnapshot_MemoryEdge>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Overridable kOverridable() { return {}; } + static constexpr FieldMetadata_Overridable kOverridable{}; void set_overridable(bool value) { static constexpr uint32_t field_id = FieldMetadata_Overridable::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -137598,14 +134769,7 @@ class MemoryTrackerSnapshot_ProcessSnapshot_MemoryNode : public ::protozero::Mes uint64_t, MemoryTrackerSnapshot_ProcessSnapshot_MemoryNode>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Id kId() { return {}; } + static constexpr FieldMetadata_Id kId{}; void set_id(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_Id::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -137623,17 +134787,13 @@ class MemoryTrackerSnapshot_ProcessSnapshot_MemoryNode : public ::protozero::Mes std::string, MemoryTrackerSnapshot_ProcessSnapshot_MemoryNode>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_AbsoluteName kAbsoluteName() { return {}; } + static constexpr FieldMetadata_AbsoluteName kAbsoluteName{}; void set_absolute_name(const char* data, size_t size) { AppendBytes(FieldMetadata_AbsoluteName::kFieldId, data, size); } + void set_absolute_name(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_AbsoluteName::kFieldId, chars.data, chars.size); + } void set_absolute_name(std::string value) { static constexpr uint32_t field_id = FieldMetadata_AbsoluteName::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -137651,14 +134811,7 @@ class MemoryTrackerSnapshot_ProcessSnapshot_MemoryNode : public ::protozero::Mes bool, MemoryTrackerSnapshot_ProcessSnapshot_MemoryNode>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Weak kWeak() { return {}; } + static constexpr FieldMetadata_Weak kWeak{}; void set_weak(bool value) { static constexpr uint32_t field_id = FieldMetadata_Weak::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -137676,14 +134829,7 @@ class MemoryTrackerSnapshot_ProcessSnapshot_MemoryNode : public ::protozero::Mes uint64_t, MemoryTrackerSnapshot_ProcessSnapshot_MemoryNode>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_SizeBytes kSizeBytes() { return {}; } + static constexpr FieldMetadata_SizeBytes kSizeBytes{}; void set_size_bytes(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_SizeBytes::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -137701,14 +134847,7 @@ class MemoryTrackerSnapshot_ProcessSnapshot_MemoryNode : public ::protozero::Mes MemoryTrackerSnapshot_ProcessSnapshot_MemoryNode_MemoryNodeEntry, MemoryTrackerSnapshot_ProcessSnapshot_MemoryNode>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Entries kEntries() { return {}; } + static constexpr FieldMetadata_Entries kEntries{}; template T* add_entries() { return BeginNestedMessage(5); } @@ -137741,10 +134880,14 @@ class MemoryTrackerSnapshot_ProcessSnapshot_MemoryNode_MemoryNodeEntry : public }; static constexpr const char* GetName() { return ".perfetto.protos.MemoryTrackerSnapshot.ProcessSnapshot.MemoryNode.MemoryNodeEntry"; } + using Units = ::perfetto::protos::pbzero::MemoryTrackerSnapshot_ProcessSnapshot_MemoryNode_MemoryNodeEntry_Units; - static const Units UNSPECIFIED = MemoryTrackerSnapshot_ProcessSnapshot_MemoryNode_MemoryNodeEntry_Units_UNSPECIFIED; - static const Units BYTES = MemoryTrackerSnapshot_ProcessSnapshot_MemoryNode_MemoryNodeEntry_Units_BYTES; - static const Units COUNT = MemoryTrackerSnapshot_ProcessSnapshot_MemoryNode_MemoryNodeEntry_Units_COUNT; + static inline const char* Units_Name(Units value) { + return ::perfetto::protos::pbzero::MemoryTrackerSnapshot_ProcessSnapshot_MemoryNode_MemoryNodeEntry_Units_Name(value); + } + static const Units UNSPECIFIED = Units::UNSPECIFIED; + static const Units BYTES = Units::BYTES; + static const Units COUNT = Units::COUNT; using FieldMetadata_Name = ::protozero::proto_utils::FieldMetadata< @@ -137754,17 +134897,13 @@ class MemoryTrackerSnapshot_ProcessSnapshot_MemoryNode_MemoryNodeEntry : public std::string, MemoryTrackerSnapshot_ProcessSnapshot_MemoryNode_MemoryNodeEntry>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Name kName() { return {}; } + static constexpr FieldMetadata_Name kName{}; void set_name(const char* data, size_t size) { AppendBytes(FieldMetadata_Name::kFieldId, data, size); } + void set_name(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Name::kFieldId, chars.data, chars.size); + } void set_name(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Name::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -137782,14 +134921,7 @@ class MemoryTrackerSnapshot_ProcessSnapshot_MemoryNode_MemoryNodeEntry : public ::perfetto::protos::pbzero::MemoryTrackerSnapshot_ProcessSnapshot_MemoryNode_MemoryNodeEntry_Units, MemoryTrackerSnapshot_ProcessSnapshot_MemoryNode_MemoryNodeEntry>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Units kUnits() { return {}; } + static constexpr FieldMetadata_Units kUnits{}; void set_units(::perfetto::protos::pbzero::MemoryTrackerSnapshot_ProcessSnapshot_MemoryNode_MemoryNodeEntry_Units value) { static constexpr uint32_t field_id = FieldMetadata_Units::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -137807,14 +134939,7 @@ class MemoryTrackerSnapshot_ProcessSnapshot_MemoryNode_MemoryNodeEntry : public uint64_t, MemoryTrackerSnapshot_ProcessSnapshot_MemoryNode_MemoryNodeEntry>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ValueUint64 kValueUint64() { return {}; } + static constexpr FieldMetadata_ValueUint64 kValueUint64{}; void set_value_uint64(uint64_t value) { static constexpr uint32_t field_id = FieldMetadata_ValueUint64::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -137832,17 +134957,13 @@ class MemoryTrackerSnapshot_ProcessSnapshot_MemoryNode_MemoryNodeEntry : public std::string, MemoryTrackerSnapshot_ProcessSnapshot_MemoryNode_MemoryNodeEntry>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_ValueString kValueString() { return {}; } + static constexpr FieldMetadata_ValueString kValueString{}; void set_value_string(const char* data, size_t size) { AppendBytes(FieldMetadata_ValueString::kFieldId, data, size); } + void set_value_string(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_ValueString::kFieldId, chars.data, chars.size); + } void set_value_string(std::string value) { static constexpr uint32_t field_id = FieldMetadata_ValueString::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -137911,14 +135032,7 @@ class UiState : public ::protozero::Message { int64_t, UiState>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_TimelineStartTs kTimelineStartTs() { return {}; } + static constexpr FieldMetadata_TimelineStartTs kTimelineStartTs{}; void set_timeline_start_ts(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_TimelineStartTs::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -137936,14 +135050,7 @@ class UiState : public ::protozero::Message { int64_t, UiState>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_TimelineEndTs kTimelineEndTs() { return {}; } + static constexpr FieldMetadata_TimelineEndTs kTimelineEndTs{}; void set_timeline_end_ts(int64_t value) { static constexpr uint32_t field_id = FieldMetadata_TimelineEndTs::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -137961,14 +135068,7 @@ class UiState : public ::protozero::Message { UiState_HighlightProcess, UiState>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_HighlightProcess kHighlightProcess() { return {}; } + static constexpr FieldMetadata_HighlightProcess kHighlightProcess{}; template T* set_highlight_process() { return BeginNestedMessage(3); } @@ -138004,14 +135104,7 @@ class UiState_HighlightProcess : public ::protozero::Message { uint32_t, UiState_HighlightProcess>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Pid kPid() { return {}; } + static constexpr FieldMetadata_Pid kPid{}; void set_pid(uint32_t value) { static constexpr uint32_t field_id = FieldMetadata_Pid::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -138029,17 +135122,13 @@ class UiState_HighlightProcess : public ::protozero::Message { std::string, UiState_HighlightProcess>; - // Ceci n'est pas une pipe. - // This is actually a variable of FieldMetadataHelper> - // type (and users are expected to use it as such, hence kCamelCase name). - // It is declared as a function to keep protozero bindings header-only as - // inline constexpr variables are not available until C++17 (while inline - // functions are). - // TODO(altimin): Use inline variable instead after adopting C++17. - static constexpr FieldMetadata_Cmdline kCmdline() { return {}; } + static constexpr FieldMetadata_Cmdline kCmdline{}; void set_cmdline(const char* data, size_t size) { AppendBytes(FieldMetadata_Cmdline::kFieldId, data, size); } + void set_cmdline(::protozero::ConstChars chars) { + AppendBytes(FieldMetadata_Cmdline::kFieldId, chars.data, chars.size); + } void set_cmdline(std::string value) { static constexpr uint32_t field_id = FieldMetadata_Cmdline::kFieldId; // Call the appropriate protozero::Message::Append(field_id, ...) @@ -138054,6 +135143,79 @@ class UiState_HighlightProcess : public ::protozero::Message { } // Namespace. } // Namespace. #endif // Include guard. +// gen_amalgamated begin header: gen/protos/perfetto/trace/track_event/chrome_active_processes.gen.h +// DO NOT EDIT. Autogenerated by Perfetto cppgen_plugin +#ifndef PERFETTO_PROTOS_PROTOS_PERFETTO_TRACE_TRACK_EVENT_CHROME_ACTIVE_PROCESSES_PROTO_CPP_H_ +#define PERFETTO_PROTOS_PROTOS_PERFETTO_TRACE_TRACK_EVENT_CHROME_ACTIVE_PROCESSES_PROTO_CPP_H_ + +#include +#include +#include +#include +#include + +// gen_amalgamated expanded: #include "perfetto/protozero/cpp_message_obj.h" +// gen_amalgamated expanded: #include "perfetto/protozero/copyable_ptr.h" +// gen_amalgamated expanded: #include "perfetto/base/export.h" + +namespace perfetto { +namespace protos { +namespace gen { +class ChromeActiveProcesses; +} // namespace perfetto +} // namespace protos +} // namespace gen + +namespace protozero { +class Message; +} // namespace protozero + +namespace perfetto { +namespace protos { +namespace gen { + +class PERFETTO_EXPORT_COMPONENT ChromeActiveProcesses : public ::protozero::CppMessageObj { + public: + enum FieldNumbers { + kPidFieldNumber = 1, + }; + + ChromeActiveProcesses(); + ~ChromeActiveProcesses() override; + ChromeActiveProcesses(ChromeActiveProcesses&&) noexcept; + ChromeActiveProcesses& operator=(ChromeActiveProcesses&&); + ChromeActiveProcesses(const ChromeActiveProcesses&); + ChromeActiveProcesses& operator=(const ChromeActiveProcesses&); + bool operator==(const ChromeActiveProcesses&) const; + bool operator!=(const ChromeActiveProcesses& other) const { return !(*this == other); } + + bool ParseFromArray(const void*, size_t) override; + std::string SerializeAsString() const override; + std::vector SerializeAsArray() const override; + void Serialize(::protozero::Message*) const; + + const std::vector& pid() const { return pid_; } + std::vector* mutable_pid() { return &pid_; } + int pid_size() const { return static_cast(pid_.size()); } + void clear_pid() { pid_.clear(); } + void add_pid(int32_t value) { pid_.emplace_back(value); } + int32_t* add_pid() { pid_.emplace_back(); return &pid_.back(); } + + private: + std::vector pid_; + + // Allows to preserve unknown protobuf fields for compatibility + // with future versions of .proto files. + std::string unknown_fields_; + + std::bitset<2> _has_field_{}; +}; + +} // namespace perfetto +} // namespace protos +} // namespace gen + +#endif // PERFETTO_PROTOS_PROTOS_PERFETTO_TRACE_TRACK_EVENT_CHROME_ACTIVE_PROCESSES_PROTO_CPP_H_ // gen_amalgamated begin header: gen/protos/perfetto/trace/track_event/chrome_application_state_info.gen.h // DO NOT EDIT. Autogenerated by Perfetto cppgen_plugin #ifndef PERFETTO_PROTOS_PROTOS_PERFETTO_TRACE_TRACK_EVENT_CHROME_APPLICATION_STATE_INFO_PROTO_CPP_H_ @@ -139347,6 +136509,7 @@ class ChromeFrameReporter; enum ChromeFrameReporter_State : int; enum ChromeFrameReporter_FrameDropReason : int; enum ChromeFrameReporter_ScrollState : int; +enum ChromeFrameReporter_FrameType : int; } // namespace perfetto } // namespace protos } // namespace gen @@ -139376,6 +136539,10 @@ enum ChromeFrameReporter_ScrollState : int { ChromeFrameReporter_ScrollState_SCROLL_COMPOSITOR_THREAD = 2, ChromeFrameReporter_ScrollState_SCROLL_UNKNOWN = 3, }; +enum ChromeFrameReporter_FrameType : int { + ChromeFrameReporter_FrameType_FORKED = 0, + ChromeFrameReporter_FrameType_BACKFILL = 1, +}; class PERFETTO_EXPORT_COMPONENT ChromeFrameReporter : public ::protozero::CppMessageObj { public: @@ -139400,6 +136567,11 @@ class PERFETTO_EXPORT_COMPONENT ChromeFrameReporter : public ::protozero::CppMes static constexpr auto SCROLL_UNKNOWN = ChromeFrameReporter_ScrollState_SCROLL_UNKNOWN; static constexpr auto ScrollState_MIN = ChromeFrameReporter_ScrollState_SCROLL_NONE; static constexpr auto ScrollState_MAX = ChromeFrameReporter_ScrollState_SCROLL_UNKNOWN; + using FrameType = ChromeFrameReporter_FrameType; + static constexpr auto FORKED = ChromeFrameReporter_FrameType_FORKED; + static constexpr auto BACKFILL = ChromeFrameReporter_FrameType_BACKFILL; + static constexpr auto FrameType_MIN = ChromeFrameReporter_FrameType_FORKED; + static constexpr auto FrameType_MAX = ChromeFrameReporter_FrameType_BACKFILL; enum FieldNumbers { kStateFieldNumber = 1, kReasonFieldNumber = 2, @@ -139413,6 +136585,8 @@ class PERFETTO_EXPORT_COMPONENT ChromeFrameReporter : public ::protozero::CppMes kHasMissingContentFieldNumber = 10, kLayerTreeHostIdFieldNumber = 11, kHasHighLatencyFieldNumber = 12, + kFrameTypeFieldNumber = 13, + kHighLatencyContributionStageFieldNumber = 14, }; ChromeFrameReporter(); @@ -139477,6 +136651,17 @@ class PERFETTO_EXPORT_COMPONENT ChromeFrameReporter : public ::protozero::CppMes bool has_high_latency() const { return has_high_latency_; } void set_has_high_latency(bool value) { has_high_latency_ = value; _has_field_.set(12); } + bool has_frame_type() const { return _has_field_[13]; } + ChromeFrameReporter_FrameType frame_type() const { return frame_type_; } + void set_frame_type(ChromeFrameReporter_FrameType value) { frame_type_ = value; _has_field_.set(13); } + + const std::vector& high_latency_contribution_stage() const { return high_latency_contribution_stage_; } + std::vector* mutable_high_latency_contribution_stage() { return &high_latency_contribution_stage_; } + int high_latency_contribution_stage_size() const { return static_cast(high_latency_contribution_stage_.size()); } + void clear_high_latency_contribution_stage() { high_latency_contribution_stage_.clear(); } + void add_high_latency_contribution_stage(std::string value) { high_latency_contribution_stage_.emplace_back(value); } + std::string* add_high_latency_contribution_stage() { high_latency_contribution_stage_.emplace_back(); return &high_latency_contribution_stage_.back(); } + private: ChromeFrameReporter_State state_{}; ChromeFrameReporter_FrameDropReason reason_{}; @@ -139490,12 +136675,14 @@ class PERFETTO_EXPORT_COMPONENT ChromeFrameReporter : public ::protozero::CppMes bool has_missing_content_{}; uint64_t layer_tree_host_id_{}; bool has_high_latency_{}; + ChromeFrameReporter_FrameType frame_type_{}; + std::vector high_latency_contribution_stage_; // Allows to preserve unknown protobuf fields for compatibility // with future versions of .proto files. std::string unknown_fields_; - std::bitset<13> _has_field_{}; + std::bitset<15> _has_field_{}; }; } // namespace perfetto @@ -140192,6 +137379,9 @@ class PERFETTO_EXPORT_COMPONENT ChromeMojoEventInfo : public ::protozero::CppMes kIpcHashFieldNumber = 2, kMojoInterfaceTagFieldNumber = 3, kMojoInterfaceMethodIidFieldNumber = 4, + kIsReplyFieldNumber = 5, + kPayloadSizeFieldNumber = 6, + kDataNumBytesFieldNumber = 7, }; ChromeMojoEventInfo(); @@ -140224,17 +137414,32 @@ class PERFETTO_EXPORT_COMPONENT ChromeMojoEventInfo : public ::protozero::CppMes uint64_t mojo_interface_method_iid() const { return mojo_interface_method_iid_; } void set_mojo_interface_method_iid(uint64_t value) { mojo_interface_method_iid_ = value; _has_field_.set(4); } + bool has_is_reply() const { return _has_field_[5]; } + bool is_reply() const { return is_reply_; } + void set_is_reply(bool value) { is_reply_ = value; _has_field_.set(5); } + + bool has_payload_size() const { return _has_field_[6]; } + uint64_t payload_size() const { return payload_size_; } + void set_payload_size(uint64_t value) { payload_size_ = value; _has_field_.set(6); } + + bool has_data_num_bytes() const { return _has_field_[7]; } + uint64_t data_num_bytes() const { return data_num_bytes_; } + void set_data_num_bytes(uint64_t value) { data_num_bytes_ = value; _has_field_.set(7); } + private: std::string watcher_notify_interface_tag_{}; uint32_t ipc_hash_{}; std::string mojo_interface_tag_{}; uint64_t mojo_interface_method_iid_{}; + bool is_reply_{}; + uint64_t payload_size_{}; + uint64_t data_num_bytes_{}; // Allows to preserve unknown protobuf fields for compatibility // with future versions of .proto files. std::string unknown_fields_; - std::bitset<5> _has_field_{}; + std::bitset<8> _has_field_{}; }; } // namespace perfetto @@ -141103,10 +138308,11 @@ class PERFETTO_EXPORT_COMPONENT DebugAnnotation : public ::protozero::CppMessage kUintValueFieldNumber = 3, kIntValueFieldNumber = 4, kDoubleValueFieldNumber = 5, - kStringValueFieldNumber = 6, kPointerValueFieldNumber = 7, kNestedValueFieldNumber = 8, kLegacyJsonValueFieldNumber = 9, + kStringValueFieldNumber = 6, + kStringValueIidFieldNumber = 17, kProtoTypeNameFieldNumber = 16, kProtoTypeNameIidFieldNumber = 13, kProtoValueFieldNumber = 14, @@ -141152,10 +138358,6 @@ class PERFETTO_EXPORT_COMPONENT DebugAnnotation : public ::protozero::CppMessage double double_value() const { return double_value_; } void set_double_value(double value) { double_value_ = value; _has_field_.set(5); } - bool has_string_value() const { return _has_field_[6]; } - const std::string& string_value() const { return string_value_; } - void set_string_value(const std::string& value) { string_value_ = value; _has_field_.set(6); } - bool has_pointer_value() const { return _has_field_[7]; } uint64_t pointer_value() const { return pointer_value_; } void set_pointer_value(uint64_t value) { pointer_value_ = value; _has_field_.set(7); } @@ -141168,6 +138370,14 @@ class PERFETTO_EXPORT_COMPONENT DebugAnnotation : public ::protozero::CppMessage const std::string& legacy_json_value() const { return legacy_json_value_; } void set_legacy_json_value(const std::string& value) { legacy_json_value_ = value; _has_field_.set(9); } + bool has_string_value() const { return _has_field_[6]; } + const std::string& string_value() const { return string_value_; } + void set_string_value(const std::string& value) { string_value_ = value; _has_field_.set(6); } + + bool has_string_value_iid() const { return _has_field_[17]; } + uint64_t string_value_iid() const { return string_value_iid_; } + void set_string_value_iid(uint64_t value) { string_value_iid_ = value; _has_field_.set(17); } + bool has_proto_type_name() const { return _has_field_[16]; } const std::string& proto_type_name() const { return proto_type_name_; } void set_proto_type_name(const std::string& value) { proto_type_name_ = value; _has_field_.set(16); } @@ -141200,10 +138410,11 @@ class PERFETTO_EXPORT_COMPONENT DebugAnnotation : public ::protozero::CppMessage uint64_t uint_value_{}; int64_t int_value_{}; double double_value_{}; - std::string string_value_{}; uint64_t pointer_value_{}; ::protozero::CopyablePtr nested_value_; std::string legacy_json_value_{}; + std::string string_value_{}; + uint64_t string_value_iid_{}; std::string proto_type_name_{}; uint64_t proto_type_name_iid_{}; std::string proto_value_{}; @@ -141214,7 +138425,7 @@ class PERFETTO_EXPORT_COMPONENT DebugAnnotation : public ::protozero::CppMessage // with future versions of .proto files. std::string unknown_fields_; - std::bitset<17> _has_field_{}; + std::bitset<18> _has_field_{}; }; @@ -141572,6 +138783,76 @@ class PERFETTO_EXPORT_COMPONENT ProcessDescriptor : public ::protozero::CppMessa } // namespace gen #endif // PERFETTO_PROTOS_PROTOS_PERFETTO_TRACE_TRACK_EVENT_PROCESS_DESCRIPTOR_PROTO_CPP_H_ +// gen_amalgamated begin header: gen/protos/perfetto/trace/track_event/range_of_interest.gen.h +// DO NOT EDIT. Autogenerated by Perfetto cppgen_plugin +#ifndef PERFETTO_PROTOS_PROTOS_PERFETTO_TRACE_TRACK_EVENT_RANGE_OF_INTEREST_PROTO_CPP_H_ +#define PERFETTO_PROTOS_PROTOS_PERFETTO_TRACE_TRACK_EVENT_RANGE_OF_INTEREST_PROTO_CPP_H_ + +#include +#include +#include +#include +#include + +// gen_amalgamated expanded: #include "perfetto/protozero/cpp_message_obj.h" +// gen_amalgamated expanded: #include "perfetto/protozero/copyable_ptr.h" +// gen_amalgamated expanded: #include "perfetto/base/export.h" + +namespace perfetto { +namespace protos { +namespace gen { +class TrackEventRangeOfInterest; +} // namespace perfetto +} // namespace protos +} // namespace gen + +namespace protozero { +class Message; +} // namespace protozero + +namespace perfetto { +namespace protos { +namespace gen { + +class PERFETTO_EXPORT_COMPONENT TrackEventRangeOfInterest : public ::protozero::CppMessageObj { + public: + enum FieldNumbers { + kStartUsFieldNumber = 1, + }; + + TrackEventRangeOfInterest(); + ~TrackEventRangeOfInterest() override; + TrackEventRangeOfInterest(TrackEventRangeOfInterest&&) noexcept; + TrackEventRangeOfInterest& operator=(TrackEventRangeOfInterest&&); + TrackEventRangeOfInterest(const TrackEventRangeOfInterest&); + TrackEventRangeOfInterest& operator=(const TrackEventRangeOfInterest&); + bool operator==(const TrackEventRangeOfInterest&) const; + bool operator!=(const TrackEventRangeOfInterest& other) const { return !(*this == other); } + + bool ParseFromArray(const void*, size_t) override; + std::string SerializeAsString() const override; + std::vector SerializeAsArray() const override; + void Serialize(::protozero::Message*) const; + + bool has_start_us() const { return _has_field_[1]; } + int64_t start_us() const { return start_us_; } + void set_start_us(int64_t value) { start_us_ = value; _has_field_.set(1); } + + private: + int64_t start_us_{}; + + // Allows to preserve unknown protobuf fields for compatibility + // with future versions of .proto files. + std::string unknown_fields_; + + std::bitset<2> _has_field_{}; +}; + +} // namespace perfetto +} // namespace protos +} // namespace gen + +#endif // PERFETTO_PROTOS_PROTOS_PERFETTO_TRACE_TRACK_EVENT_RANGE_OF_INTEREST_PROTO_CPP_H_ // gen_amalgamated begin header: gen/protos/perfetto/trace/track_event/source_location.gen.h // DO NOT EDIT. Autogenerated by Perfetto cppgen_plugin #ifndef PERFETTO_PROTOS_PROTOS_PERFETTO_TRACE_TRACK_EVENT_SOURCE_LOCATION_PROTO_CPP_H_ @@ -141977,6 +139258,7 @@ class PERFETTO_EXPORT_COMPONENT TrackDescriptor : public ::protozero::CppMessage kThreadFieldNumber = 4, kChromeThreadFieldNumber = 7, kCounterFieldNumber = 8, + kDisallowMergingWithSystemTracksFieldNumber = 9, }; TrackDescriptor(); @@ -142025,6 +139307,10 @@ class PERFETTO_EXPORT_COMPONENT TrackDescriptor : public ::protozero::CppMessage const CounterDescriptor& counter() const { return *counter_; } CounterDescriptor* mutable_counter() { _has_field_.set(8); return counter_.get(); } + bool has_disallow_merging_with_system_tracks() const { return _has_field_[9]; } + bool disallow_merging_with_system_tracks() const { return disallow_merging_with_system_tracks_; } + void set_disallow_merging_with_system_tracks(bool value) { disallow_merging_with_system_tracks_ = value; _has_field_.set(9); } + private: uint64_t uuid_{}; uint64_t parent_uuid_{}; @@ -142034,12 +139320,13 @@ class PERFETTO_EXPORT_COMPONENT TrackDescriptor : public ::protozero::CppMessage ::protozero::CopyablePtr thread_; ::protozero::CopyablePtr chrome_thread_; ::protozero::CopyablePtr counter_; + bool disallow_merging_with_system_tracks_{}; // Allows to preserve unknown protobuf fields for compatibility // with future versions of .proto files. std::string unknown_fields_; - std::bitset<9> _has_field_{}; + std::bitset<10> _has_field_{}; }; } // namespace perfetto @@ -142073,6 +139360,7 @@ class TrackEvent_LegacyEvent; class ChromeMojoEventInfo; class ChromeMessagePump; class SourceLocation; +class ChromeActiveProcesses; class ChromeContentSettingsEventInfo; class ChromeWindowHandleEventInfo; class ChromeRendererSchedulerState; @@ -142106,6 +139394,7 @@ enum ChromeApplicationStateInfo_ChromeApplicationState : int; enum ChromeFrameReporter_State : int; enum ChromeFrameReporter_FrameDropReason : int; enum ChromeFrameReporter_ScrollState : int; +enum ChromeFrameReporter_FrameType : int; enum ChromeLatencyInfo_Step : int; enum ChromeLatencyInfo_LatencyComponentType : int; enum ChromeLegacyIpc_MessageClass : int; @@ -142310,8 +139599,10 @@ class PERFETTO_EXPORT_COMPONENT TrackEvent : public ::protozero::CppMessageObj { kExtraCounterValuesFieldNumber = 12, kExtraDoubleCounterTrackUuidsFieldNumber = 45, kExtraDoubleCounterValuesFieldNumber = 46, - kFlowIdsFieldNumber = 36, - kTerminatingFlowIdsFieldNumber = 42, + kFlowIdsOldFieldNumber = 36, + kFlowIdsFieldNumber = 47, + kTerminatingFlowIdsOldFieldNumber = 42, + kTerminatingFlowIdsFieldNumber = 48, kDebugAnnotationsFieldNumber = 4, kTaskExecutionFieldNumber = 5, kLogMessageFieldNumber = 21, @@ -142326,6 +139617,7 @@ class PERFETTO_EXPORT_COMPONENT TrackEvent : public ::protozero::CppMessageObj { kChromeRendererSchedulerStateFieldNumber = 40, kChromeWindowHandleEventInfoFieldNumber = 41, kChromeContentSettingsEventInfoFieldNumber = 43, + kChromeActiveProcessesFieldNumber = 49, kSourceLocationFieldNumber = 33, kSourceLocationIidFieldNumber = 34, kChromeMessagePumpFieldNumber = 35, @@ -142419,6 +139711,13 @@ class PERFETTO_EXPORT_COMPONENT TrackEvent : public ::protozero::CppMessageObj { void add_extra_double_counter_values(double value) { extra_double_counter_values_.emplace_back(value); } double* add_extra_double_counter_values() { extra_double_counter_values_.emplace_back(); return &extra_double_counter_values_.back(); } + const std::vector& flow_ids_old() const { return flow_ids_old_; } + std::vector* mutable_flow_ids_old() { return &flow_ids_old_; } + int flow_ids_old_size() const { return static_cast(flow_ids_old_.size()); } + void clear_flow_ids_old() { flow_ids_old_.clear(); } + void add_flow_ids_old(uint64_t value) { flow_ids_old_.emplace_back(value); } + uint64_t* add_flow_ids_old() { flow_ids_old_.emplace_back(); return &flow_ids_old_.back(); } + const std::vector& flow_ids() const { return flow_ids_; } std::vector* mutable_flow_ids() { return &flow_ids_; } int flow_ids_size() const { return static_cast(flow_ids_.size()); } @@ -142426,6 +139725,13 @@ class PERFETTO_EXPORT_COMPONENT TrackEvent : public ::protozero::CppMessageObj { void add_flow_ids(uint64_t value) { flow_ids_.emplace_back(value); } uint64_t* add_flow_ids() { flow_ids_.emplace_back(); return &flow_ids_.back(); } + const std::vector& terminating_flow_ids_old() const { return terminating_flow_ids_old_; } + std::vector* mutable_terminating_flow_ids_old() { return &terminating_flow_ids_old_; } + int terminating_flow_ids_old_size() const { return static_cast(terminating_flow_ids_old_.size()); } + void clear_terminating_flow_ids_old() { terminating_flow_ids_old_.clear(); } + void add_terminating_flow_ids_old(uint64_t value) { terminating_flow_ids_old_.emplace_back(value); } + uint64_t* add_terminating_flow_ids_old() { terminating_flow_ids_old_.emplace_back(); return &terminating_flow_ids_old_.back(); } + const std::vector& terminating_flow_ids() const { return terminating_flow_ids_; } std::vector* mutable_terminating_flow_ids() { return &terminating_flow_ids_; } int terminating_flow_ids_size() const { return static_cast(terminating_flow_ids_.size()); } @@ -142491,6 +139797,10 @@ class PERFETTO_EXPORT_COMPONENT TrackEvent : public ::protozero::CppMessageObj { const ChromeContentSettingsEventInfo& chrome_content_settings_event_info() const { return *chrome_content_settings_event_info_; } ChromeContentSettingsEventInfo* mutable_chrome_content_settings_event_info() { _has_field_.set(43); return chrome_content_settings_event_info_.get(); } + bool has_chrome_active_processes() const { return _has_field_[49]; } + const ChromeActiveProcesses& chrome_active_processes() const { return *chrome_active_processes_; } + ChromeActiveProcesses* mutable_chrome_active_processes() { _has_field_.set(49); return chrome_active_processes_.get(); } + bool has_source_location() const { return _has_field_[33]; } const SourceLocation& source_location() const { return *source_location_; } SourceLocation* mutable_source_location() { _has_field_.set(33); return source_location_.get(); } @@ -142548,7 +139858,9 @@ class PERFETTO_EXPORT_COMPONENT TrackEvent : public ::protozero::CppMessageObj { std::vector extra_counter_values_; std::vector extra_double_counter_track_uuids_; std::vector extra_double_counter_values_; + std::vector flow_ids_old_; std::vector flow_ids_; + std::vector terminating_flow_ids_old_; std::vector terminating_flow_ids_; std::vector debug_annotations_; ::protozero::CopyablePtr task_execution_; @@ -142564,6 +139876,7 @@ class PERFETTO_EXPORT_COMPONENT TrackEvent : public ::protozero::CppMessageObj { ::protozero::CopyablePtr chrome_renderer_scheduler_state_; ::protozero::CopyablePtr chrome_window_handle_event_info_; ::protozero::CopyablePtr chrome_content_settings_event_info_; + ::protozero::CopyablePtr chrome_active_processes_; ::protozero::CopyablePtr source_location_; uint64_t source_location_iid_{}; ::protozero::CopyablePtr chrome_message_pump_; @@ -142580,7 +139893,7 @@ class PERFETTO_EXPORT_COMPONENT TrackEvent : public ::protozero::CppMessageObj { // with future versions of .proto files. std::string unknown_fields_; - std::bitset<47> _has_field_{}; + std::bitset<50> _has_field_{}; }; @@ -142960,6 +140273,185 @@ class PERFETTO_EXPORT_COMPONENT AndroidPolledStateConfig : public ::protozero::C } // namespace gen #endif // PERFETTO_PROTOS_PROTOS_PERFETTO_CONFIG_ANDROID_ANDROID_POLLED_STATE_CONFIG_PROTO_CPP_H_ +// gen_amalgamated begin header: gen/protos/perfetto/config/android/android_system_property_config.gen.h +// DO NOT EDIT. Autogenerated by Perfetto cppgen_plugin +#ifndef PERFETTO_PROTOS_PROTOS_PERFETTO_CONFIG_ANDROID_ANDROID_SYSTEM_PROPERTY_CONFIG_PROTO_CPP_H_ +#define PERFETTO_PROTOS_PROTOS_PERFETTO_CONFIG_ANDROID_ANDROID_SYSTEM_PROPERTY_CONFIG_PROTO_CPP_H_ + +#include +#include +#include +#include +#include + +// gen_amalgamated expanded: #include "perfetto/protozero/cpp_message_obj.h" +// gen_amalgamated expanded: #include "perfetto/protozero/copyable_ptr.h" +// gen_amalgamated expanded: #include "perfetto/base/export.h" + +namespace perfetto { +namespace protos { +namespace gen { +class AndroidSystemPropertyConfig; +} // namespace perfetto +} // namespace protos +} // namespace gen + +namespace protozero { +class Message; +} // namespace protozero + +namespace perfetto { +namespace protos { +namespace gen { + +class PERFETTO_EXPORT_COMPONENT AndroidSystemPropertyConfig : public ::protozero::CppMessageObj { + public: + enum FieldNumbers { + kPollMsFieldNumber = 1, + kPropertyNameFieldNumber = 2, + }; + + AndroidSystemPropertyConfig(); + ~AndroidSystemPropertyConfig() override; + AndroidSystemPropertyConfig(AndroidSystemPropertyConfig&&) noexcept; + AndroidSystemPropertyConfig& operator=(AndroidSystemPropertyConfig&&); + AndroidSystemPropertyConfig(const AndroidSystemPropertyConfig&); + AndroidSystemPropertyConfig& operator=(const AndroidSystemPropertyConfig&); + bool operator==(const AndroidSystemPropertyConfig&) const; + bool operator!=(const AndroidSystemPropertyConfig& other) const { return !(*this == other); } + + bool ParseFromArray(const void*, size_t) override; + std::string SerializeAsString() const override; + std::vector SerializeAsArray() const override; + void Serialize(::protozero::Message*) const; + + bool has_poll_ms() const { return _has_field_[1]; } + uint32_t poll_ms() const { return poll_ms_; } + void set_poll_ms(uint32_t value) { poll_ms_ = value; _has_field_.set(1); } + + const std::vector& property_name() const { return property_name_; } + std::vector* mutable_property_name() { return &property_name_; } + int property_name_size() const { return static_cast(property_name_.size()); } + void clear_property_name() { property_name_.clear(); } + void add_property_name(std::string value) { property_name_.emplace_back(value); } + std::string* add_property_name() { property_name_.emplace_back(); return &property_name_.back(); } + + private: + uint32_t poll_ms_{}; + std::vector property_name_; + + // Allows to preserve unknown protobuf fields for compatibility + // with future versions of .proto files. + std::string unknown_fields_; + + std::bitset<3> _has_field_{}; +}; + +} // namespace perfetto +} // namespace protos +} // namespace gen + +#endif // PERFETTO_PROTOS_PROTOS_PERFETTO_CONFIG_ANDROID_ANDROID_SYSTEM_PROPERTY_CONFIG_PROTO_CPP_H_ +// gen_amalgamated begin header: gen/protos/perfetto/config/android/network_trace_config.gen.h +// DO NOT EDIT. Autogenerated by Perfetto cppgen_plugin +#ifndef PERFETTO_PROTOS_PROTOS_PERFETTO_CONFIG_ANDROID_NETWORK_TRACE_CONFIG_PROTO_CPP_H_ +#define PERFETTO_PROTOS_PROTOS_PERFETTO_CONFIG_ANDROID_NETWORK_TRACE_CONFIG_PROTO_CPP_H_ + +#include +#include +#include +#include +#include + +// gen_amalgamated expanded: #include "perfetto/protozero/cpp_message_obj.h" +// gen_amalgamated expanded: #include "perfetto/protozero/copyable_ptr.h" +// gen_amalgamated expanded: #include "perfetto/base/export.h" + +namespace perfetto { +namespace protos { +namespace gen { +class NetworkPacketTraceConfig; +} // namespace perfetto +} // namespace protos +} // namespace gen + +namespace protozero { +class Message; +} // namespace protozero + +namespace perfetto { +namespace protos { +namespace gen { + +class PERFETTO_EXPORT_COMPONENT NetworkPacketTraceConfig : public ::protozero::CppMessageObj { + public: + enum FieldNumbers { + kPollMsFieldNumber = 1, + kAggregationThresholdFieldNumber = 2, + kInternLimitFieldNumber = 3, + kDropLocalPortFieldNumber = 4, + kDropRemotePortFieldNumber = 5, + kDropTcpFlagsFieldNumber = 6, + }; + + NetworkPacketTraceConfig(); + ~NetworkPacketTraceConfig() override; + NetworkPacketTraceConfig(NetworkPacketTraceConfig&&) noexcept; + NetworkPacketTraceConfig& operator=(NetworkPacketTraceConfig&&); + NetworkPacketTraceConfig(const NetworkPacketTraceConfig&); + NetworkPacketTraceConfig& operator=(const NetworkPacketTraceConfig&); + bool operator==(const NetworkPacketTraceConfig&) const; + bool operator!=(const NetworkPacketTraceConfig& other) const { return !(*this == other); } + + bool ParseFromArray(const void*, size_t) override; + std::string SerializeAsString() const override; + std::vector SerializeAsArray() const override; + void Serialize(::protozero::Message*) const; + + bool has_poll_ms() const { return _has_field_[1]; } + uint32_t poll_ms() const { return poll_ms_; } + void set_poll_ms(uint32_t value) { poll_ms_ = value; _has_field_.set(1); } + + bool has_aggregation_threshold() const { return _has_field_[2]; } + uint32_t aggregation_threshold() const { return aggregation_threshold_; } + void set_aggregation_threshold(uint32_t value) { aggregation_threshold_ = value; _has_field_.set(2); } + + bool has_intern_limit() const { return _has_field_[3]; } + uint32_t intern_limit() const { return intern_limit_; } + void set_intern_limit(uint32_t value) { intern_limit_ = value; _has_field_.set(3); } + + bool has_drop_local_port() const { return _has_field_[4]; } + bool drop_local_port() const { return drop_local_port_; } + void set_drop_local_port(bool value) { drop_local_port_ = value; _has_field_.set(4); } + + bool has_drop_remote_port() const { return _has_field_[5]; } + bool drop_remote_port() const { return drop_remote_port_; } + void set_drop_remote_port(bool value) { drop_remote_port_ = value; _has_field_.set(5); } + + bool has_drop_tcp_flags() const { return _has_field_[6]; } + bool drop_tcp_flags() const { return drop_tcp_flags_; } + void set_drop_tcp_flags(bool value) { drop_tcp_flags_ = value; _has_field_.set(6); } + + private: + uint32_t poll_ms_{}; + uint32_t aggregation_threshold_{}; + uint32_t intern_limit_{}; + bool drop_local_port_{}; + bool drop_remote_port_{}; + bool drop_tcp_flags_{}; + + // Allows to preserve unknown protobuf fields for compatibility + // with future versions of .proto files. + std::string unknown_fields_; + + std::bitset<7> _has_field_{}; +}; + +} // namespace perfetto +} // namespace protos +} // namespace gen + +#endif // PERFETTO_PROTOS_PROTOS_PERFETTO_CONFIG_ANDROID_NETWORK_TRACE_CONFIG_PROTO_CPP_H_ // gen_amalgamated begin header: gen/protos/perfetto/config/android/packages_list_config.gen.h // DO NOT EDIT. Autogenerated by Perfetto cppgen_plugin #ifndef PERFETTO_PROTOS_PROTOS_PERFETTO_CONFIG_ANDROID_PACKAGES_LIST_CONFIG_PROTO_CPP_H_ @@ -143052,7 +140544,11 @@ namespace perfetto { namespace protos { namespace gen { class FtraceConfig; +class FtraceConfig_PrintFilter; +class FtraceConfig_PrintFilter_Rule; +class FtraceConfig_PrintFilter_Rule_AtraceMessage; class FtraceConfig_CompactSchedConfig; +enum FtraceConfig_KsymsMemPolicy : int; } // namespace perfetto } // namespace protos } // namespace gen @@ -143064,10 +140560,22 @@ class Message; namespace perfetto { namespace protos { namespace gen { +enum FtraceConfig_KsymsMemPolicy : int { + FtraceConfig_KsymsMemPolicy_KSYMS_UNSPECIFIED = 0, + FtraceConfig_KsymsMemPolicy_KSYMS_CLEANUP_ON_STOP = 1, + FtraceConfig_KsymsMemPolicy_KSYMS_RETAIN = 2, +}; class PERFETTO_EXPORT_COMPONENT FtraceConfig : public ::protozero::CppMessageObj { public: using CompactSchedConfig = FtraceConfig_CompactSchedConfig; + using PrintFilter = FtraceConfig_PrintFilter; + using KsymsMemPolicy = FtraceConfig_KsymsMemPolicy; + static constexpr auto KSYMS_UNSPECIFIED = FtraceConfig_KsymsMemPolicy_KSYMS_UNSPECIFIED; + static constexpr auto KSYMS_CLEANUP_ON_STOP = FtraceConfig_KsymsMemPolicy_KSYMS_CLEANUP_ON_STOP; + static constexpr auto KSYMS_RETAIN = FtraceConfig_KsymsMemPolicy_KSYMS_RETAIN; + static constexpr auto KsymsMemPolicy_MIN = FtraceConfig_KsymsMemPolicy_KSYMS_UNSPECIFIED; + static constexpr auto KsymsMemPolicy_MAX = FtraceConfig_KsymsMemPolicy_KSYMS_RETAIN; enum FieldNumbers { kFtraceEventsFieldNumber = 1, kAtraceCategoriesFieldNumber = 2, @@ -143075,10 +140583,19 @@ class PERFETTO_EXPORT_COMPONENT FtraceConfig : public ::protozero::CppMessageObj kBufferSizeKbFieldNumber = 10, kDrainPeriodMsFieldNumber = 11, kCompactSchedFieldNumber = 12, + kPrintFilterFieldNumber = 22, kSymbolizeKsymsFieldNumber = 13, + kKsymsMemPolicyFieldNumber = 17, kInitializeKsymsSynchronouslyForTestingFieldNumber = 14, kThrottleRssStatFieldNumber = 15, kDisableGenericEventsFieldNumber = 16, + kSyscallEventsFieldNumber = 18, + kEnableFunctionGraphFieldNumber = 19, + kFunctionFiltersFieldNumber = 20, + kFunctionGraphRootsFieldNumber = 21, + kPreserveFtraceBufferFieldNumber = 23, + kUseMonotonicRawClockFieldNumber = 24, + kInstanceNameFieldNumber = 25, }; FtraceConfig(); @@ -143128,10 +140645,18 @@ class PERFETTO_EXPORT_COMPONENT FtraceConfig : public ::protozero::CppMessageObj const FtraceConfig_CompactSchedConfig& compact_sched() const { return *compact_sched_; } FtraceConfig_CompactSchedConfig* mutable_compact_sched() { _has_field_.set(12); return compact_sched_.get(); } + bool has_print_filter() const { return _has_field_[22]; } + const FtraceConfig_PrintFilter& print_filter() const { return *print_filter_; } + FtraceConfig_PrintFilter* mutable_print_filter() { _has_field_.set(22); return print_filter_.get(); } + bool has_symbolize_ksyms() const { return _has_field_[13]; } bool symbolize_ksyms() const { return symbolize_ksyms_; } void set_symbolize_ksyms(bool value) { symbolize_ksyms_ = value; _has_field_.set(13); } + bool has_ksyms_mem_policy() const { return _has_field_[17]; } + FtraceConfig_KsymsMemPolicy ksyms_mem_policy() const { return ksyms_mem_policy_; } + void set_ksyms_mem_policy(FtraceConfig_KsymsMemPolicy value) { ksyms_mem_policy_ = value; _has_field_.set(17); } + bool has_initialize_ksyms_synchronously_for_testing() const { return _has_field_[14]; } bool initialize_ksyms_synchronously_for_testing() const { return initialize_ksyms_synchronously_for_testing_; } void set_initialize_ksyms_synchronously_for_testing(bool value) { initialize_ksyms_synchronously_for_testing_ = value; _has_field_.set(14); } @@ -143144,6 +140669,43 @@ class PERFETTO_EXPORT_COMPONENT FtraceConfig : public ::protozero::CppMessageObj bool disable_generic_events() const { return disable_generic_events_; } void set_disable_generic_events(bool value) { disable_generic_events_ = value; _has_field_.set(16); } + const std::vector& syscall_events() const { return syscall_events_; } + std::vector* mutable_syscall_events() { return &syscall_events_; } + int syscall_events_size() const { return static_cast(syscall_events_.size()); } + void clear_syscall_events() { syscall_events_.clear(); } + void add_syscall_events(std::string value) { syscall_events_.emplace_back(value); } + std::string* add_syscall_events() { syscall_events_.emplace_back(); return &syscall_events_.back(); } + + bool has_enable_function_graph() const { return _has_field_[19]; } + bool enable_function_graph() const { return enable_function_graph_; } + void set_enable_function_graph(bool value) { enable_function_graph_ = value; _has_field_.set(19); } + + const std::vector& function_filters() const { return function_filters_; } + std::vector* mutable_function_filters() { return &function_filters_; } + int function_filters_size() const { return static_cast(function_filters_.size()); } + void clear_function_filters() { function_filters_.clear(); } + void add_function_filters(std::string value) { function_filters_.emplace_back(value); } + std::string* add_function_filters() { function_filters_.emplace_back(); return &function_filters_.back(); } + + const std::vector& function_graph_roots() const { return function_graph_roots_; } + std::vector* mutable_function_graph_roots() { return &function_graph_roots_; } + int function_graph_roots_size() const { return static_cast(function_graph_roots_.size()); } + void clear_function_graph_roots() { function_graph_roots_.clear(); } + void add_function_graph_roots(std::string value) { function_graph_roots_.emplace_back(value); } + std::string* add_function_graph_roots() { function_graph_roots_.emplace_back(); return &function_graph_roots_.back(); } + + bool has_preserve_ftrace_buffer() const { return _has_field_[23]; } + bool preserve_ftrace_buffer() const { return preserve_ftrace_buffer_; } + void set_preserve_ftrace_buffer(bool value) { preserve_ftrace_buffer_ = value; _has_field_.set(23); } + + bool has_use_monotonic_raw_clock() const { return _has_field_[24]; } + bool use_monotonic_raw_clock() const { return use_monotonic_raw_clock_; } + void set_use_monotonic_raw_clock(bool value) { use_monotonic_raw_clock_ = value; _has_field_.set(24); } + + bool has_instance_name() const { return _has_field_[25]; } + const std::string& instance_name() const { return instance_name_; } + void set_instance_name(const std::string& value) { instance_name_ = value; _has_field_.set(25); } + private: std::vector ftrace_events_; std::vector atrace_categories_; @@ -143151,16 +140713,152 @@ class PERFETTO_EXPORT_COMPONENT FtraceConfig : public ::protozero::CppMessageObj uint32_t buffer_size_kb_{}; uint32_t drain_period_ms_{}; ::protozero::CopyablePtr compact_sched_; + ::protozero::CopyablePtr print_filter_; bool symbolize_ksyms_{}; + FtraceConfig_KsymsMemPolicy ksyms_mem_policy_{}; bool initialize_ksyms_synchronously_for_testing_{}; bool throttle_rss_stat_{}; bool disable_generic_events_{}; + std::vector syscall_events_; + bool enable_function_graph_{}; + std::vector function_filters_; + std::vector function_graph_roots_; + bool preserve_ftrace_buffer_{}; + bool use_monotonic_raw_clock_{}; + std::string instance_name_{}; // Allows to preserve unknown protobuf fields for compatibility // with future versions of .proto files. std::string unknown_fields_; - std::bitset<17> _has_field_{}; + std::bitset<26> _has_field_{}; +}; + + +class PERFETTO_EXPORT_COMPONENT FtraceConfig_PrintFilter : public ::protozero::CppMessageObj { + public: + using Rule = FtraceConfig_PrintFilter_Rule; + enum FieldNumbers { + kRulesFieldNumber = 1, + }; + + FtraceConfig_PrintFilter(); + ~FtraceConfig_PrintFilter() override; + FtraceConfig_PrintFilter(FtraceConfig_PrintFilter&&) noexcept; + FtraceConfig_PrintFilter& operator=(FtraceConfig_PrintFilter&&); + FtraceConfig_PrintFilter(const FtraceConfig_PrintFilter&); + FtraceConfig_PrintFilter& operator=(const FtraceConfig_PrintFilter&); + bool operator==(const FtraceConfig_PrintFilter&) const; + bool operator!=(const FtraceConfig_PrintFilter& other) const { return !(*this == other); } + + bool ParseFromArray(const void*, size_t) override; + std::string SerializeAsString() const override; + std::vector SerializeAsArray() const override; + void Serialize(::protozero::Message*) const; + + const std::vector& rules() const { return rules_; } + std::vector* mutable_rules() { return &rules_; } + int rules_size() const; + void clear_rules(); + FtraceConfig_PrintFilter_Rule* add_rules(); + + private: + std::vector rules_; + + // Allows to preserve unknown protobuf fields for compatibility + // with future versions of .proto files. + std::string unknown_fields_; + + std::bitset<2> _has_field_{}; +}; + + +class PERFETTO_EXPORT_COMPONENT FtraceConfig_PrintFilter_Rule : public ::protozero::CppMessageObj { + public: + using AtraceMessage = FtraceConfig_PrintFilter_Rule_AtraceMessage; + enum FieldNumbers { + kPrefixFieldNumber = 1, + kAtraceMsgFieldNumber = 3, + kAllowFieldNumber = 2, + }; + + FtraceConfig_PrintFilter_Rule(); + ~FtraceConfig_PrintFilter_Rule() override; + FtraceConfig_PrintFilter_Rule(FtraceConfig_PrintFilter_Rule&&) noexcept; + FtraceConfig_PrintFilter_Rule& operator=(FtraceConfig_PrintFilter_Rule&&); + FtraceConfig_PrintFilter_Rule(const FtraceConfig_PrintFilter_Rule&); + FtraceConfig_PrintFilter_Rule& operator=(const FtraceConfig_PrintFilter_Rule&); + bool operator==(const FtraceConfig_PrintFilter_Rule&) const; + bool operator!=(const FtraceConfig_PrintFilter_Rule& other) const { return !(*this == other); } + + bool ParseFromArray(const void*, size_t) override; + std::string SerializeAsString() const override; + std::vector SerializeAsArray() const override; + void Serialize(::protozero::Message*) const; + + bool has_prefix() const { return _has_field_[1]; } + const std::string& prefix() const { return prefix_; } + void set_prefix(const std::string& value) { prefix_ = value; _has_field_.set(1); } + + bool has_atrace_msg() const { return _has_field_[3]; } + const FtraceConfig_PrintFilter_Rule_AtraceMessage& atrace_msg() const { return *atrace_msg_; } + FtraceConfig_PrintFilter_Rule_AtraceMessage* mutable_atrace_msg() { _has_field_.set(3); return atrace_msg_.get(); } + + bool has_allow() const { return _has_field_[2]; } + bool allow() const { return allow_; } + void set_allow(bool value) { allow_ = value; _has_field_.set(2); } + + private: + std::string prefix_{}; + ::protozero::CopyablePtr atrace_msg_; + bool allow_{}; + + // Allows to preserve unknown protobuf fields for compatibility + // with future versions of .proto files. + std::string unknown_fields_; + + std::bitset<4> _has_field_{}; +}; + + +class PERFETTO_EXPORT_COMPONENT FtraceConfig_PrintFilter_Rule_AtraceMessage : public ::protozero::CppMessageObj { + public: + enum FieldNumbers { + kTypeFieldNumber = 1, + kPrefixFieldNumber = 2, + }; + + FtraceConfig_PrintFilter_Rule_AtraceMessage(); + ~FtraceConfig_PrintFilter_Rule_AtraceMessage() override; + FtraceConfig_PrintFilter_Rule_AtraceMessage(FtraceConfig_PrintFilter_Rule_AtraceMessage&&) noexcept; + FtraceConfig_PrintFilter_Rule_AtraceMessage& operator=(FtraceConfig_PrintFilter_Rule_AtraceMessage&&); + FtraceConfig_PrintFilter_Rule_AtraceMessage(const FtraceConfig_PrintFilter_Rule_AtraceMessage&); + FtraceConfig_PrintFilter_Rule_AtraceMessage& operator=(const FtraceConfig_PrintFilter_Rule_AtraceMessage&); + bool operator==(const FtraceConfig_PrintFilter_Rule_AtraceMessage&) const; + bool operator!=(const FtraceConfig_PrintFilter_Rule_AtraceMessage& other) const { return !(*this == other); } + + bool ParseFromArray(const void*, size_t) override; + std::string SerializeAsString() const override; + std::vector SerializeAsArray() const override; + void Serialize(::protozero::Message*) const; + + bool has_type() const { return _has_field_[1]; } + const std::string& type() const { return type_; } + void set_type(const std::string& value) { type_ = value; _has_field_.set(1); } + + bool has_prefix() const { return _has_field_[2]; } + const std::string& prefix() const { return prefix_; } + void set_prefix(const std::string& value) { prefix_ = value; _has_field_.set(2); } + + private: + std::string type_{}; + std::string prefix_{}; + + // Allows to preserve unknown protobuf fields for compatibility + // with future versions of .proto files. + std::string unknown_fields_; + + std::bitset<3> _has_field_{}; }; @@ -143663,6 +141361,7 @@ class PERFETTO_EXPORT_COMPONENT AndroidPowerConfig : public ::protozero::CppMess kBatteryCountersFieldNumber = 2, kCollectPowerRailsFieldNumber = 3, kCollectEnergyEstimationBreakdownFieldNumber = 4, + kCollectEntityStateResidencyFieldNumber = 5, }; AndroidPowerConfig(); @@ -143698,17 +141397,22 @@ class PERFETTO_EXPORT_COMPONENT AndroidPowerConfig : public ::protozero::CppMess bool collect_energy_estimation_breakdown() const { return collect_energy_estimation_breakdown_; } void set_collect_energy_estimation_breakdown(bool value) { collect_energy_estimation_breakdown_ = value; _has_field_.set(4); } + bool has_collect_entity_state_residency() const { return _has_field_[5]; } + bool collect_entity_state_residency() const { return collect_entity_state_residency_; } + void set_collect_entity_state_residency(bool value) { collect_entity_state_residency_ = value; _has_field_.set(5); } + private: uint32_t battery_poll_ms_{}; std::vector battery_counters_; bool collect_power_rails_{}; bool collect_energy_estimation_breakdown_{}; + bool collect_entity_state_residency_{}; // Allows to preserve unknown protobuf fields for compatibility // with future versions of .proto files. std::string unknown_fields_; - std::bitset<5> _has_field_{}; + std::bitset<6> _has_field_{}; }; } // namespace perfetto @@ -143767,6 +141471,7 @@ class PERFETTO_EXPORT_COMPONENT ProcessStatsConfig : public ::protozero::CppMess kRecordThreadNamesFieldNumber = 3, kProcStatsPollMsFieldNumber = 4, kProcStatsCacheTtlMsFieldNumber = 6, + kResolveProcessFdsFieldNumber = 9, }; ProcessStatsConfig(); @@ -143806,18 +141511,23 @@ class PERFETTO_EXPORT_COMPONENT ProcessStatsConfig : public ::protozero::CppMess uint32_t proc_stats_cache_ttl_ms() const { return proc_stats_cache_ttl_ms_; } void set_proc_stats_cache_ttl_ms(uint32_t value) { proc_stats_cache_ttl_ms_ = value; _has_field_.set(6); } + bool has_resolve_process_fds() const { return _has_field_[9]; } + bool resolve_process_fds() const { return resolve_process_fds_; } + void set_resolve_process_fds(bool value) { resolve_process_fds_ = value; _has_field_.set(9); } + private: std::vector quirks_; bool scan_all_processes_on_start_{}; bool record_thread_names_{}; uint32_t proc_stats_poll_ms_{}; uint32_t proc_stats_cache_ttl_ms_{}; + bool resolve_process_fds_{}; // Allows to preserve unknown protobuf fields for compatibility // with future versions of .proto files. std::string unknown_fields_; - std::bitset<7> _has_field_{}; + std::bitset<10> _has_field_{}; }; } // namespace perfetto @@ -144523,6 +142233,7 @@ class PERFETTO_EXPORT_COMPONENT PerfEventConfig_Scope : public ::protozero::CppM kExcludePidFieldNumber = 3, kExcludeCmdlineFieldNumber = 4, kAdditionalCmdlineCountFieldNumber = 5, + kProcessShardCountFieldNumber = 6, }; PerfEventConfig_Scope(); @@ -144571,18 +142282,23 @@ class PERFETTO_EXPORT_COMPONENT PerfEventConfig_Scope : public ::protozero::CppM uint32_t additional_cmdline_count() const { return additional_cmdline_count_; } void set_additional_cmdline_count(uint32_t value) { additional_cmdline_count_ = value; _has_field_.set(5); } + bool has_process_shard_count() const { return _has_field_[6]; } + uint32_t process_shard_count() const { return process_shard_count_; } + void set_process_shard_count(uint32_t value) { process_shard_count_ = value; _has_field_.set(6); } + private: std::vector target_pid_; std::vector target_cmdline_; std::vector exclude_pid_; std::vector exclude_cmdline_; uint32_t additional_cmdline_count_{}; + uint32_t process_shard_count_{}; // Allows to preserve unknown protobuf fields for compatibility // with future versions of .proto files. std::string unknown_fields_; - std::bitset<6> _has_field_{}; + std::bitset<7> _has_field_{}; }; } // namespace perfetto @@ -144590,6 +142306,862 @@ class PERFETTO_EXPORT_COMPONENT PerfEventConfig_Scope : public ::protozero::CppM } // namespace gen #endif // PERFETTO_PROTOS_PROTOS_PERFETTO_CONFIG_PROFILING_PERF_EVENT_CONFIG_PROTO_CPP_H_ +// gen_amalgamated begin header: gen/protos/perfetto/config/statsd/atom_ids.gen.h +// DO NOT EDIT. Autogenerated by Perfetto cppgen_plugin +#ifndef PERFETTO_PROTOS_PROTOS_PERFETTO_CONFIG_STATSD_ATOM_IDS_PROTO_CPP_H_ +#define PERFETTO_PROTOS_PROTOS_PERFETTO_CONFIG_STATSD_ATOM_IDS_PROTO_CPP_H_ + +#include +#include +#include +#include +#include + +// gen_amalgamated expanded: #include "perfetto/protozero/cpp_message_obj.h" +// gen_amalgamated expanded: #include "perfetto/protozero/copyable_ptr.h" +// gen_amalgamated expanded: #include "perfetto/base/export.h" + +namespace perfetto { +namespace protos { +namespace gen { +enum AtomId : int; +} // namespace perfetto +} // namespace protos +} // namespace gen + +namespace protozero { +class Message; +} // namespace protozero + +namespace perfetto { +namespace protos { +namespace gen { +enum AtomId : int { + ATOM_UNSPECIFIED = 0, + ATOM_BLE_SCAN_STATE_CHANGED = 2, + ATOM_PROCESS_STATE_CHANGED = 3, + ATOM_BLE_SCAN_RESULT_RECEIVED = 4, + ATOM_SENSOR_STATE_CHANGED = 5, + ATOM_GPS_SCAN_STATE_CHANGED = 6, + ATOM_SYNC_STATE_CHANGED = 7, + ATOM_SCHEDULED_JOB_STATE_CHANGED = 8, + ATOM_SCREEN_BRIGHTNESS_CHANGED = 9, + ATOM_WAKELOCK_STATE_CHANGED = 10, + ATOM_LONG_PARTIAL_WAKELOCK_STATE_CHANGED = 11, + ATOM_MOBILE_RADIO_POWER_STATE_CHANGED = 12, + ATOM_WIFI_RADIO_POWER_STATE_CHANGED = 13, + ATOM_ACTIVITY_MANAGER_SLEEP_STATE_CHANGED = 14, + ATOM_MEMORY_FACTOR_STATE_CHANGED = 15, + ATOM_EXCESSIVE_CPU_USAGE_REPORTED = 16, + ATOM_CACHED_KILL_REPORTED = 17, + ATOM_PROCESS_MEMORY_STAT_REPORTED = 18, + ATOM_LAUNCHER_EVENT = 19, + ATOM_BATTERY_SAVER_MODE_STATE_CHANGED = 20, + ATOM_DEVICE_IDLE_MODE_STATE_CHANGED = 21, + ATOM_DEVICE_IDLING_MODE_STATE_CHANGED = 22, + ATOM_AUDIO_STATE_CHANGED = 23, + ATOM_MEDIA_CODEC_STATE_CHANGED = 24, + ATOM_CAMERA_STATE_CHANGED = 25, + ATOM_FLASHLIGHT_STATE_CHANGED = 26, + ATOM_UID_PROCESS_STATE_CHANGED = 27, + ATOM_PROCESS_LIFE_CYCLE_STATE_CHANGED = 28, + ATOM_SCREEN_STATE_CHANGED = 29, + ATOM_BATTERY_LEVEL_CHANGED = 30, + ATOM_CHARGING_STATE_CHANGED = 31, + ATOM_PLUGGED_STATE_CHANGED = 32, + ATOM_INTERACTIVE_STATE_CHANGED = 33, + ATOM_TOUCH_EVENT_REPORTED = 34, + ATOM_WAKEUP_ALARM_OCCURRED = 35, + ATOM_KERNEL_WAKEUP_REPORTED = 36, + ATOM_WIFI_LOCK_STATE_CHANGED = 37, + ATOM_WIFI_SIGNAL_STRENGTH_CHANGED = 38, + ATOM_WIFI_SCAN_STATE_CHANGED = 39, + ATOM_PHONE_SIGNAL_STRENGTH_CHANGED = 40, + ATOM_SETTING_CHANGED = 41, + ATOM_ACTIVITY_FOREGROUND_STATE_CHANGED = 42, + ATOM_ISOLATED_UID_CHANGED = 43, + ATOM_PACKET_WAKEUP_OCCURRED = 44, + ATOM_WALL_CLOCK_TIME_SHIFTED = 45, + ATOM_ANOMALY_DETECTED = 46, + ATOM_APP_BREADCRUMB_REPORTED = 47, + ATOM_APP_START_OCCURRED = 48, + ATOM_APP_START_CANCELED = 49, + ATOM_APP_START_FULLY_DRAWN = 50, + ATOM_LMK_KILL_OCCURRED = 51, + ATOM_PICTURE_IN_PICTURE_STATE_CHANGED = 52, + ATOM_WIFI_MULTICAST_LOCK_STATE_CHANGED = 53, + ATOM_LMK_STATE_CHANGED = 54, + ATOM_APP_START_MEMORY_STATE_CAPTURED = 55, + ATOM_SHUTDOWN_SEQUENCE_REPORTED = 56, + ATOM_BOOT_SEQUENCE_REPORTED = 57, + ATOM_DAVEY_OCCURRED = 58, + ATOM_OVERLAY_STATE_CHANGED = 59, + ATOM_FOREGROUND_SERVICE_STATE_CHANGED = 60, + ATOM_CALL_STATE_CHANGED = 61, + ATOM_KEYGUARD_STATE_CHANGED = 62, + ATOM_KEYGUARD_BOUNCER_STATE_CHANGED = 63, + ATOM_KEYGUARD_BOUNCER_PASSWORD_ENTERED = 64, + ATOM_APP_DIED = 65, + ATOM_RESOURCE_CONFIGURATION_CHANGED = 66, + ATOM_BLUETOOTH_ENABLED_STATE_CHANGED = 67, + ATOM_BLUETOOTH_CONNECTION_STATE_CHANGED = 68, + ATOM_GPS_SIGNAL_QUALITY_CHANGED = 69, + ATOM_USB_CONNECTOR_STATE_CHANGED = 70, + ATOM_SPEAKER_IMPEDANCE_REPORTED = 71, + ATOM_HARDWARE_FAILED = 72, + ATOM_PHYSICAL_DROP_DETECTED = 73, + ATOM_CHARGE_CYCLES_REPORTED = 74, + ATOM_MOBILE_CONNECTION_STATE_CHANGED = 75, + ATOM_MOBILE_RADIO_TECHNOLOGY_CHANGED = 76, + ATOM_USB_DEVICE_ATTACHED = 77, + ATOM_APP_CRASH_OCCURRED = 78, + ATOM_ANR_OCCURRED = 79, + ATOM_WTF_OCCURRED = 80, + ATOM_LOW_MEM_REPORTED = 81, + ATOM_GENERIC_ATOM = 82, + ATOM_VIBRATOR_STATE_CHANGED = 84, + ATOM_DEFERRED_JOB_STATS_REPORTED = 85, + ATOM_THERMAL_THROTTLING = 86, + ATOM_BIOMETRIC_ACQUIRED = 87, + ATOM_BIOMETRIC_AUTHENTICATED = 88, + ATOM_BIOMETRIC_ERROR_OCCURRED = 89, + ATOM_UI_EVENT_REPORTED = 90, + ATOM_BATTERY_HEALTH_SNAPSHOT = 91, + ATOM_SLOW_IO = 92, + ATOM_BATTERY_CAUSED_SHUTDOWN = 93, + ATOM_PHONE_SERVICE_STATE_CHANGED = 94, + ATOM_PHONE_STATE_CHANGED = 95, + ATOM_USER_RESTRICTION_CHANGED = 96, + ATOM_SETTINGS_UI_CHANGED = 97, + ATOM_CONNECTIVITY_STATE_CHANGED = 98, + ATOM_SERVICE_STATE_CHANGED = 99, + ATOM_SERVICE_LAUNCH_REPORTED = 100, + ATOM_FLAG_FLIP_UPDATE_OCCURRED = 101, + ATOM_BINARY_PUSH_STATE_CHANGED = 102, + ATOM_DEVICE_POLICY_EVENT = 103, + ATOM_DOCS_UI_FILE_OP_CANCELED = 104, + ATOM_DOCS_UI_FILE_OP_COPY_MOVE_MODE_REPORTED = 105, + ATOM_DOCS_UI_FILE_OP_FAILURE = 106, + ATOM_DOCS_UI_PROVIDER_FILE_OP = 107, + ATOM_DOCS_UI_INVALID_SCOPED_ACCESS_REQUEST = 108, + ATOM_DOCS_UI_LAUNCH_REPORTED = 109, + ATOM_DOCS_UI_ROOT_VISITED = 110, + ATOM_DOCS_UI_STARTUP_MS = 111, + ATOM_DOCS_UI_USER_ACTION_REPORTED = 112, + ATOM_WIFI_ENABLED_STATE_CHANGED = 113, + ATOM_WIFI_RUNNING_STATE_CHANGED = 114, + ATOM_APP_COMPACTED = 115, + ATOM_NETWORK_DNS_EVENT_REPORTED = 116, + ATOM_DOCS_UI_PICKER_LAUNCHED_FROM_REPORTED = 117, + ATOM_DOCS_UI_PICK_RESULT_REPORTED = 118, + ATOM_DOCS_UI_SEARCH_MODE_REPORTED = 119, + ATOM_DOCS_UI_SEARCH_TYPE_REPORTED = 120, + ATOM_DATA_STALL_EVENT = 121, + ATOM_RESCUE_PARTY_RESET_REPORTED = 122, + ATOM_SIGNED_CONFIG_REPORTED = 123, + ATOM_GNSS_NI_EVENT_REPORTED = 124, + ATOM_BLUETOOTH_LINK_LAYER_CONNECTION_EVENT = 125, + ATOM_BLUETOOTH_ACL_CONNECTION_STATE_CHANGED = 126, + ATOM_BLUETOOTH_SCO_CONNECTION_STATE_CHANGED = 127, + ATOM_APP_DOWNGRADED = 128, + ATOM_APP_OPTIMIZED_AFTER_DOWNGRADED = 129, + ATOM_LOW_STORAGE_STATE_CHANGED = 130, + ATOM_GNSS_NFW_NOTIFICATION_REPORTED = 131, + ATOM_GNSS_CONFIGURATION_REPORTED = 132, + ATOM_USB_PORT_OVERHEAT_EVENT_REPORTED = 133, + ATOM_NFC_ERROR_OCCURRED = 134, + ATOM_NFC_STATE_CHANGED = 135, + ATOM_NFC_BEAM_OCCURRED = 136, + ATOM_NFC_CARDEMULATION_OCCURRED = 137, + ATOM_NFC_TAG_OCCURRED = 138, + ATOM_NFC_HCE_TRANSACTION_OCCURRED = 139, + ATOM_SE_STATE_CHANGED = 140, + ATOM_SE_OMAPI_REPORTED = 141, + ATOM_BROADCAST_DISPATCH_LATENCY_REPORTED = 142, + ATOM_ATTENTION_MANAGER_SERVICE_RESULT_REPORTED = 143, + ATOM_ADB_CONNECTION_CHANGED = 144, + ATOM_SPEECH_DSP_STAT_REPORTED = 145, + ATOM_USB_CONTAMINANT_REPORTED = 146, + ATOM_WATCHDOG_ROLLBACK_OCCURRED = 147, + ATOM_BIOMETRIC_SYSTEM_HEALTH_ISSUE_DETECTED = 148, + ATOM_BUBBLE_UI_CHANGED = 149, + ATOM_SCHEDULED_JOB_CONSTRAINT_CHANGED = 150, + ATOM_BLUETOOTH_ACTIVE_DEVICE_CHANGED = 151, + ATOM_BLUETOOTH_A2DP_PLAYBACK_STATE_CHANGED = 152, + ATOM_BLUETOOTH_A2DP_CODEC_CONFIG_CHANGED = 153, + ATOM_BLUETOOTH_A2DP_CODEC_CAPABILITY_CHANGED = 154, + ATOM_BLUETOOTH_A2DP_AUDIO_UNDERRUN_REPORTED = 155, + ATOM_BLUETOOTH_A2DP_AUDIO_OVERRUN_REPORTED = 156, + ATOM_BLUETOOTH_DEVICE_RSSI_REPORTED = 157, + ATOM_BLUETOOTH_DEVICE_FAILED_CONTACT_COUNTER_REPORTED = 158, + ATOM_BLUETOOTH_DEVICE_TX_POWER_LEVEL_REPORTED = 159, + ATOM_BLUETOOTH_HCI_TIMEOUT_REPORTED = 160, + ATOM_BLUETOOTH_QUALITY_REPORT_REPORTED = 161, + ATOM_BLUETOOTH_DEVICE_INFO_REPORTED = 162, + ATOM_BLUETOOTH_REMOTE_VERSION_INFO_REPORTED = 163, + ATOM_BLUETOOTH_SDP_ATTRIBUTE_REPORTED = 164, + ATOM_BLUETOOTH_BOND_STATE_CHANGED = 165, + ATOM_BLUETOOTH_CLASSIC_PAIRING_EVENT_REPORTED = 166, + ATOM_BLUETOOTH_SMP_PAIRING_EVENT_REPORTED = 167, + ATOM_SCREEN_TIMEOUT_EXTENSION_REPORTED = 168, + ATOM_PROCESS_START_TIME = 169, + ATOM_PERMISSION_GRANT_REQUEST_RESULT_REPORTED = 170, + ATOM_BLUETOOTH_SOCKET_CONNECTION_STATE_CHANGED = 171, + ATOM_DEVICE_IDENTIFIER_ACCESS_DENIED = 172, + ATOM_BUBBLE_DEVELOPER_ERROR_REPORTED = 173, + ATOM_ASSIST_GESTURE_STAGE_REPORTED = 174, + ATOM_ASSIST_GESTURE_FEEDBACK_REPORTED = 175, + ATOM_ASSIST_GESTURE_PROGRESS_REPORTED = 176, + ATOM_TOUCH_GESTURE_CLASSIFIED = 177, + ATOM_HIDDEN_API_USED = 178, + ATOM_STYLE_UI_CHANGED = 179, + ATOM_PRIVACY_INDICATORS_INTERACTED = 180, + ATOM_APP_INSTALL_ON_EXTERNAL_STORAGE_REPORTED = 181, + ATOM_NETWORK_STACK_REPORTED = 182, + ATOM_APP_MOVED_STORAGE_REPORTED = 183, + ATOM_BIOMETRIC_ENROLLED = 184, + ATOM_SYSTEM_SERVER_WATCHDOG_OCCURRED = 185, + ATOM_TOMB_STONE_OCCURRED = 186, + ATOM_BLUETOOTH_CLASS_OF_DEVICE_REPORTED = 187, + ATOM_INTELLIGENCE_EVENT_REPORTED = 188, + ATOM_THERMAL_THROTTLING_SEVERITY_STATE_CHANGED = 189, + ATOM_ROLE_REQUEST_RESULT_REPORTED = 190, + ATOM_MEDIAMETRICS_AUDIOPOLICY_REPORTED = 191, + ATOM_MEDIAMETRICS_AUDIORECORD_REPORTED = 192, + ATOM_MEDIAMETRICS_AUDIOTHREAD_REPORTED = 193, + ATOM_MEDIAMETRICS_AUDIOTRACK_REPORTED = 194, + ATOM_MEDIAMETRICS_CODEC_REPORTED = 195, + ATOM_MEDIAMETRICS_DRM_WIDEVINE_REPORTED = 196, + ATOM_MEDIAMETRICS_EXTRACTOR_REPORTED = 197, + ATOM_MEDIAMETRICS_MEDIADRM_REPORTED = 198, + ATOM_MEDIAMETRICS_NUPLAYER_REPORTED = 199, + ATOM_MEDIAMETRICS_RECORDER_REPORTED = 200, + ATOM_MEDIAMETRICS_DRMMANAGER_REPORTED = 201, + ATOM_CAR_POWER_STATE_CHANGED = 203, + ATOM_GARAGE_MODE_INFO = 204, + ATOM_TEST_ATOM_REPORTED = 205, + ATOM_CONTENT_CAPTURE_CALLER_MISMATCH_REPORTED = 206, + ATOM_CONTENT_CAPTURE_SERVICE_EVENTS = 207, + ATOM_CONTENT_CAPTURE_SESSION_EVENTS = 208, + ATOM_CONTENT_CAPTURE_FLUSHED = 209, + ATOM_LOCATION_MANAGER_API_USAGE_REPORTED = 210, + ATOM_REVIEW_PERMISSIONS_FRAGMENT_RESULT_REPORTED = 211, + ATOM_RUNTIME_PERMISSIONS_UPGRADE_RESULT = 212, + ATOM_GRANT_PERMISSIONS_ACTIVITY_BUTTON_ACTIONS = 213, + ATOM_LOCATION_ACCESS_CHECK_NOTIFICATION_ACTION = 214, + ATOM_APP_PERMISSION_FRAGMENT_ACTION_REPORTED = 215, + ATOM_APP_PERMISSION_FRAGMENT_VIEWED = 216, + ATOM_APP_PERMISSIONS_FRAGMENT_VIEWED = 217, + ATOM_PERMISSION_APPS_FRAGMENT_VIEWED = 218, + ATOM_TEXT_SELECTION_EVENT = 219, + ATOM_TEXT_LINKIFY_EVENT = 220, + ATOM_CONVERSATION_ACTIONS_EVENT = 221, + ATOM_LANGUAGE_DETECTION_EVENT = 222, + ATOM_EXCLUSION_RECT_STATE_CHANGED = 223, + ATOM_BACK_GESTURE_REPORTED_REPORTED = 224, + ATOM_UPDATE_ENGINE_UPDATE_ATTEMPT_REPORTED = 225, + ATOM_UPDATE_ENGINE_SUCCESSFUL_UPDATE_REPORTED = 226, + ATOM_CAMERA_ACTION_EVENT = 227, + ATOM_APP_COMPATIBILITY_CHANGE_REPORTED = 228, + ATOM_PERFETTO_UPLOADED = 229, + ATOM_VMS_CLIENT_CONNECTION_STATE_CHANGED = 230, + ATOM_MEDIA_PROVIDER_SCAN_OCCURRED = 233, + ATOM_MEDIA_CONTENT_DELETED = 234, + ATOM_MEDIA_PROVIDER_PERMISSION_REQUESTED = 235, + ATOM_MEDIA_PROVIDER_SCHEMA_CHANGED = 236, + ATOM_MEDIA_PROVIDER_IDLE_MAINTENANCE_FINISHED = 237, + ATOM_REBOOT_ESCROW_RECOVERY_REPORTED = 238, + ATOM_BOOT_TIME_EVENT_DURATION_REPORTED = 239, + ATOM_BOOT_TIME_EVENT_ELAPSED_TIME_REPORTED = 240, + ATOM_BOOT_TIME_EVENT_UTC_TIME_REPORTED = 241, + ATOM_BOOT_TIME_EVENT_ERROR_CODE_REPORTED = 242, + ATOM_USERSPACE_REBOOT_REPORTED = 243, + ATOM_NOTIFICATION_REPORTED = 244, + ATOM_NOTIFICATION_PANEL_REPORTED = 245, + ATOM_NOTIFICATION_CHANNEL_MODIFIED = 246, + ATOM_INTEGRITY_CHECK_RESULT_REPORTED = 247, + ATOM_INTEGRITY_RULES_PUSHED = 248, + ATOM_CB_MESSAGE_REPORTED = 249, + ATOM_CB_MESSAGE_ERROR = 250, + ATOM_WIFI_HEALTH_STAT_REPORTED = 251, + ATOM_WIFI_FAILURE_STAT_REPORTED = 252, + ATOM_WIFI_CONNECTION_RESULT_REPORTED = 253, + ATOM_APP_FREEZE_CHANGED = 254, + ATOM_SNAPSHOT_MERGE_REPORTED = 255, + ATOM_FOREGROUND_SERVICE_APP_OP_SESSION_ENDED = 256, + ATOM_DISPLAY_JANK_REPORTED = 257, + ATOM_APP_STANDBY_BUCKET_CHANGED = 258, + ATOM_SHARESHEET_STARTED = 259, + ATOM_RANKING_SELECTED = 260, + ATOM_TVSETTINGS_UI_INTERACTED = 261, + ATOM_LAUNCHER_SNAPSHOT = 262, + ATOM_PACKAGE_INSTALLER_V2_REPORTED = 263, + ATOM_USER_LIFECYCLE_JOURNEY_REPORTED = 264, + ATOM_USER_LIFECYCLE_EVENT_OCCURRED = 265, + ATOM_ACCESSIBILITY_SHORTCUT_REPORTED = 266, + ATOM_ACCESSIBILITY_SERVICE_REPORTED = 267, + ATOM_DOCS_UI_DRAG_AND_DROP_REPORTED = 268, + ATOM_APP_USAGE_EVENT_OCCURRED = 269, + ATOM_AUTO_REVOKE_NOTIFICATION_CLICKED = 270, + ATOM_AUTO_REVOKE_FRAGMENT_APP_VIEWED = 271, + ATOM_AUTO_REVOKED_APP_INTERACTION = 272, + ATOM_APP_PERMISSION_GROUPS_FRAGMENT_AUTO_REVOKE_ACTION = 273, + ATOM_EVS_USAGE_STATS_REPORTED = 274, + ATOM_AUDIO_POWER_USAGE_DATA_REPORTED = 275, + ATOM_TV_TUNER_STATE_CHANGED = 276, + ATOM_MEDIAOUTPUT_OP_SWITCH_REPORTED = 277, + ATOM_CB_MESSAGE_FILTERED = 278, + ATOM_TV_TUNER_DVR_STATUS = 279, + ATOM_TV_CAS_SESSION_OPEN_STATUS = 280, + ATOM_ASSISTANT_INVOCATION_REPORTED = 281, + ATOM_DISPLAY_WAKE_REPORTED = 282, + ATOM_CAR_USER_HAL_MODIFY_USER_REQUEST_REPORTED = 283, + ATOM_CAR_USER_HAL_MODIFY_USER_RESPONSE_REPORTED = 284, + ATOM_CAR_USER_HAL_POST_SWITCH_RESPONSE_REPORTED = 285, + ATOM_CAR_USER_HAL_INITIAL_USER_INFO_REQUEST_REPORTED = 286, + ATOM_CAR_USER_HAL_INITIAL_USER_INFO_RESPONSE_REPORTED = 287, + ATOM_CAR_USER_HAL_USER_ASSOCIATION_REQUEST_REPORTED = 288, + ATOM_CAR_USER_HAL_SET_USER_ASSOCIATION_RESPONSE_REPORTED = 289, + ATOM_NETWORK_IP_PROVISIONING_REPORTED = 290, + ATOM_NETWORK_DHCP_RENEW_REPORTED = 291, + ATOM_NETWORK_VALIDATION_REPORTED = 292, + ATOM_NETWORK_STACK_QUIRK_REPORTED = 293, + ATOM_MEDIAMETRICS_AUDIORECORDDEVICEUSAGE_REPORTED = 294, + ATOM_MEDIAMETRICS_AUDIOTHREADDEVICEUSAGE_REPORTED = 295, + ATOM_MEDIAMETRICS_AUDIOTRACKDEVICEUSAGE_REPORTED = 296, + ATOM_MEDIAMETRICS_AUDIODEVICECONNECTION_REPORTED = 297, + ATOM_BLOB_COMMITTED = 298, + ATOM_BLOB_LEASED = 299, + ATOM_BLOB_OPENED = 300, + ATOM_CONTACTS_PROVIDER_STATUS_REPORTED = 301, + ATOM_KEYSTORE_KEY_EVENT_REPORTED = 302, + ATOM_NETWORK_TETHERING_REPORTED = 303, + ATOM_IME_TOUCH_REPORTED = 304, + ATOM_UI_INTERACTION_FRAME_INFO_REPORTED = 305, + ATOM_UI_ACTION_LATENCY_REPORTED = 306, + ATOM_WIFI_DISCONNECT_REPORTED = 307, + ATOM_WIFI_CONNECTION_STATE_CHANGED = 308, + ATOM_HDMI_CEC_ACTIVE_SOURCE_CHANGED = 309, + ATOM_HDMI_CEC_MESSAGE_REPORTED = 310, + ATOM_AIRPLANE_MODE = 311, + ATOM_MODEM_RESTART = 312, + ATOM_CARRIER_ID_MISMATCH_REPORTED = 313, + ATOM_CARRIER_ID_TABLE_UPDATED = 314, + ATOM_DATA_STALL_RECOVERY_REPORTED = 315, + ATOM_MEDIAMETRICS_MEDIAPARSER_REPORTED = 316, + ATOM_TLS_HANDSHAKE_REPORTED = 317, + ATOM_TEXT_CLASSIFIER_API_USAGE_REPORTED = 318, + ATOM_CAR_WATCHDOG_KILL_STATS_REPORTED = 319, + ATOM_MEDIAMETRICS_PLAYBACK_REPORTED = 320, + ATOM_MEDIA_NETWORK_INFO_CHANGED = 321, + ATOM_MEDIA_PLAYBACK_STATE_CHANGED = 322, + ATOM_MEDIA_PLAYBACK_ERROR_REPORTED = 323, + ATOM_MEDIA_PLAYBACK_TRACK_CHANGED = 324, + ATOM_WIFI_SCAN_REPORTED = 325, + ATOM_WIFI_PNO_SCAN_REPORTED = 326, + ATOM_TIF_TUNE_CHANGED = 327, + ATOM_AUTO_ROTATE_REPORTED = 328, + ATOM_PERFETTO_TRIGGER = 329, + ATOM_TRANSCODING_DATA = 330, + ATOM_IMS_SERVICE_ENTITLEMENT_UPDATED = 331, + ATOM_ART_DATUM_REPORTED = 332, + ATOM_DEVICE_ROTATED = 333, + ATOM_SIM_SPECIFIC_SETTINGS_RESTORED = 334, + ATOM_TEXT_CLASSIFIER_DOWNLOAD_REPORTED = 335, + ATOM_PIN_STORAGE_EVENT = 336, + ATOM_FACE_DOWN_REPORTED = 337, + ATOM_BLUETOOTH_HAL_CRASH_REASON_REPORTED = 338, + ATOM_REBOOT_ESCROW_PREPARATION_REPORTED = 339, + ATOM_REBOOT_ESCROW_LSKF_CAPTURE_REPORTED = 340, + ATOM_REBOOT_ESCROW_REBOOT_REPORTED = 341, + ATOM_BINDER_LATENCY_REPORTED = 342, + ATOM_MEDIAMETRICS_AAUDIOSTREAM_REPORTED = 343, + ATOM_MEDIA_TRANSCODING_SESSION_ENDED = 344, + ATOM_MAGNIFICATION_USAGE_REPORTED = 345, + ATOM_MAGNIFICATION_MODE_WITH_IME_ON_REPORTED = 346, + ATOM_APP_SEARCH_CALL_STATS_REPORTED = 347, + ATOM_APP_SEARCH_PUT_DOCUMENT_STATS_REPORTED = 348, + ATOM_DEVICE_CONTROL_CHANGED = 349, + ATOM_DEVICE_STATE_CHANGED = 350, + ATOM_INPUTDEVICE_REGISTERED = 351, + ATOM_SMARTSPACE_CARD_REPORTED = 352, + ATOM_AUTH_PROMPT_AUTHENTICATE_INVOKED = 353, + ATOM_AUTH_MANAGER_CAN_AUTHENTICATE_INVOKED = 354, + ATOM_AUTH_ENROLL_ACTION_INVOKED = 355, + ATOM_AUTH_DEPRECATED_API_USED = 356, + ATOM_UNATTENDED_REBOOT_OCCURRED = 357, + ATOM_LONG_REBOOT_BLOCKING_REPORTED = 358, + ATOM_LOCATION_TIME_ZONE_PROVIDER_STATE_CHANGED = 359, + ATOM_FDTRACK_EVENT_OCCURRED = 364, + ATOM_TIMEOUT_AUTO_EXTENDED_REPORTED = 365, + ATOM_ODREFRESH_REPORTED = 366, + ATOM_ALARM_BATCH_DELIVERED = 367, + ATOM_ALARM_SCHEDULED = 368, + ATOM_CAR_WATCHDOG_IO_OVERUSE_STATS_REPORTED = 369, + ATOM_USER_LEVEL_HIBERNATION_STATE_CHANGED = 370, + ATOM_APP_SEARCH_INITIALIZE_STATS_REPORTED = 371, + ATOM_APP_SEARCH_QUERY_STATS_REPORTED = 372, + ATOM_APP_PROCESS_DIED = 373, + ATOM_NETWORK_IP_REACHABILITY_MONITOR_REPORTED = 374, + ATOM_SLOW_INPUT_EVENT_REPORTED = 375, + ATOM_ANR_OCCURRED_PROCESSING_STARTED = 376, + ATOM_APP_SEARCH_REMOVE_STATS_REPORTED = 377, + ATOM_MEDIA_CODEC_REPORTED = 378, + ATOM_PERMISSION_USAGE_FRAGMENT_INTERACTION = 379, + ATOM_PERMISSION_DETAILS_INTERACTION = 380, + ATOM_PRIVACY_SENSOR_TOGGLE_INTERACTION = 381, + ATOM_PRIVACY_TOGGLE_DIALOG_INTERACTION = 382, + ATOM_APP_SEARCH_OPTIMIZE_STATS_REPORTED = 383, + ATOM_NON_A11Y_TOOL_SERVICE_WARNING_REPORT = 384, + ATOM_APP_SEARCH_SET_SCHEMA_STATS_REPORTED = 385, + ATOM_APP_COMPAT_STATE_CHANGED = 386, + ATOM_SIZE_COMPAT_RESTART_BUTTON_EVENT_REPORTED = 387, + ATOM_SPLITSCREEN_UI_CHANGED = 388, + ATOM_NETWORK_DNS_HANDSHAKE_REPORTED = 389, + ATOM_BLUETOOTH_CODE_PATH_COUNTER = 390, + ATOM_BLUETOOTH_LE_BATCH_SCAN_REPORT_DELAY = 392, + ATOM_ACCESSIBILITY_FLOATING_MENU_UI_CHANGED = 393, + ATOM_NEURALNETWORKS_COMPILATION_COMPLETED = 394, + ATOM_NEURALNETWORKS_EXECUTION_COMPLETED = 395, + ATOM_NEURALNETWORKS_COMPILATION_FAILED = 396, + ATOM_NEURALNETWORKS_EXECUTION_FAILED = 397, + ATOM_CONTEXT_HUB_BOOTED = 398, + ATOM_CONTEXT_HUB_RESTARTED = 399, + ATOM_CONTEXT_HUB_LOADED_NANOAPP_SNAPSHOT_REPORTED = 400, + ATOM_CHRE_CODE_DOWNLOAD_TRANSACTED = 401, + ATOM_UWB_SESSION_INITED = 402, + ATOM_UWB_SESSION_CLOSED = 403, + ATOM_UWB_FIRST_RANGING_RECEIVED = 404, + ATOM_UWB_RANGING_MEASUREMENT_RECEIVED = 405, + ATOM_TEXT_CLASSIFIER_DOWNLOAD_WORK_SCHEDULED = 406, + ATOM_TEXT_CLASSIFIER_DOWNLOAD_WORK_COMPLETED = 407, + ATOM_CLIPBOARD_CLEARED = 408, + ATOM_VM_CREATION_REQUESTED = 409, + ATOM_NEARBY_DEVICE_SCAN_STATE_CHANGED = 410, + ATOM_CAMERA_COMPAT_CONTROL_EVENT_REPORTED = 411, + ATOM_APPLICATION_LOCALES_CHANGED = 412, + ATOM_MEDIAMETRICS_AUDIOTRACKSTATUS_REPORTED = 413, + ATOM_FOLD_STATE_DURATION_REPORTED = 414, + ATOM_LOCATION_TIME_ZONE_PROVIDER_CONTROLLER_STATE_CHANGED = 415, + ATOM_DISPLAY_HBM_STATE_CHANGED = 416, + ATOM_DISPLAY_HBM_BRIGHTNESS_CHANGED = 417, + ATOM_PERSISTENT_URI_PERMISSIONS_FLUSHED = 418, + ATOM_EARLY_BOOT_COMP_OS_ARTIFACTS_CHECK_REPORTED = 419, + ATOM_VBMETA_DIGEST_REPORTED = 420, + ATOM_APEX_INFO_GATHERED = 421, + ATOM_PVM_INFO_GATHERED = 422, + ATOM_WEAR_SETTINGS_UI_INTERACTED = 423, + ATOM_TRACING_SERVICE_REPORT_EVENT = 424, + ATOM_MEDIAMETRICS_AUDIORECORDSTATUS_REPORTED = 425, + ATOM_LAUNCHER_LATENCY = 426, + ATOM_DROPBOX_ENTRY_DROPPED = 427, + ATOM_WIFI_P2P_CONNECTION_REPORTED = 428, + ATOM_GAME_STATE_CHANGED = 429, + ATOM_HOTWORD_DETECTOR_CREATE_REQUESTED = 430, + ATOM_HOTWORD_DETECTION_SERVICE_INIT_RESULT_REPORTED = 431, + ATOM_HOTWORD_DETECTION_SERVICE_RESTARTED = 432, + ATOM_HOTWORD_DETECTOR_KEYPHRASE_TRIGGERED = 433, + ATOM_HOTWORD_DETECTOR_EVENTS = 434, + ATOM_BOOT_COMPLETED_BROADCAST_COMPLETION_LATENCY_REPORTED = 437, + ATOM_CONTACTS_INDEXER_UPDATE_STATS_REPORTED = 440, + ATOM_APP_BACKGROUND_RESTRICTIONS_INFO = 441, + ATOM_MMS_SMS_PROVIDER_GET_THREAD_ID_FAILED = 442, + ATOM_MMS_SMS_DATABASE_HELPER_ON_UPGRADE_FAILED = 443, + ATOM_PERMISSION_REMINDER_NOTIFICATION_INTERACTED = 444, + ATOM_RECENT_PERMISSION_DECISIONS_INTERACTED = 445, + ATOM_GNSS_PSDS_DOWNLOAD_REPORTED = 446, + ATOM_LE_AUDIO_CONNECTION_SESSION_REPORTED = 447, + ATOM_LE_AUDIO_BROADCAST_SESSION_REPORTED = 448, + ATOM_DREAM_UI_EVENT_REPORTED = 449, + ATOM_TASK_MANAGER_EVENT_REPORTED = 450, + ATOM_CDM_ASSOCIATION_ACTION = 451, + ATOM_MAGNIFICATION_TRIPLE_TAP_AND_HOLD_ACTIVATED_SESSION_REPORTED = 452, + ATOM_MAGNIFICATION_FOLLOW_TYPING_FOCUS_ACTIVATED_SESSION_REPORTED = 453, + ATOM_ACCESSIBILITY_TEXT_READING_OPTIONS_CHANGED = 454, + ATOM_WIFI_SETUP_FAILURE_CRASH_REPORTED = 455, + ATOM_UWB_DEVICE_ERROR_REPORTED = 456, + ATOM_ISOLATED_COMPILATION_SCHEDULED = 457, + ATOM_ISOLATED_COMPILATION_ENDED = 458, + ATOM_ONS_OPPORTUNISTIC_ESIM_PROVISIONING_COMPLETE = 459, + ATOM_TELEPHONY_ANOMALY_DETECTED = 461, + ATOM_LETTERBOX_POSITION_CHANGED = 462, + ATOM_REMOTE_KEY_PROVISIONING_ATTEMPT = 463, + ATOM_REMOTE_KEY_PROVISIONING_NETWORK_INFO = 464, + ATOM_REMOTE_KEY_PROVISIONING_TIMING = 465, + ATOM_MEDIAOUTPUT_OP_INTERACTION_REPORT = 466, + ATOM_BACKGROUND_DEXOPT_JOB_ENDED = 467, + ATOM_SYNC_EXEMPTION_OCCURRED = 468, + ATOM_AUTOFILL_PRESENTATION_EVENT_REPORTED = 469, + ATOM_DOCK_STATE_CHANGED = 470, + ATOM_BROADCAST_DELIVERY_EVENT_REPORTED = 475, + ATOM_SERVICE_REQUEST_EVENT_REPORTED = 476, + ATOM_PROVIDER_ACQUISITION_EVENT_REPORTED = 477, + ATOM_BLUETOOTH_DEVICE_NAME_REPORTED = 478, + ATOM_VIBRATION_REPORTED = 487, + ATOM_UWB_RANGING_START = 489, + ATOM_DISPLAY_BRIGHTNESS_CHANGED = 494, + ATOM_ACTIVITY_ACTION_BLOCKED = 495, + ATOM_NETWORK_DNS_SERVER_SUPPORT_REPORTED = 504, + ATOM_VM_BOOTED = 505, + ATOM_VM_EXITED = 506, + ATOM_AMBIENT_BRIGHTNESS_STATS_REPORTED = 507, + ATOM_MEDIAMETRICS_SPATIALIZERCAPABILITIES_REPORTED = 508, + ATOM_MEDIAMETRICS_SPATIALIZERDEVICEENABLED_REPORTED = 509, + ATOM_MEDIAMETRICS_HEADTRACKERDEVICEENABLED_REPORTED = 510, + ATOM_MEDIAMETRICS_HEADTRACKERDEVICESUPPORTED_REPORTED = 511, + ATOM_HEARING_AID_INFO_REPORTED = 513, + ATOM_DEVICE_WIDE_JOB_CONSTRAINT_CHANGED = 514, + ATOM_IWLAN_SETUP_DATA_CALL_RESULT_REPORTED = 519, + ATOM_IWLAN_PDN_DISCONNECTED_REASON_REPORTED = 520, + ATOM_AIRPLANE_MODE_SESSION_REPORTED = 521, + ATOM_VM_CPU_STATUS_REPORTED = 522, + ATOM_VM_MEM_STATUS_REPORTED = 523, + ATOM_DEFAULT_NETWORK_REMATCH_INFO = 525, + ATOM_NETWORK_SELECTION_PERFORMANCE = 526, + ATOM_NETWORK_NSD_REPORTED = 527, + ATOM_BLUETOOTH_DISCONNECTION_REASON_REPORTED = 529, + ATOM_BLUETOOTH_LOCAL_VERSIONS_REPORTED = 530, + ATOM_BLUETOOTH_REMOTE_SUPPORTED_FEATURES_REPORTED = 531, + ATOM_BLUETOOTH_LOCAL_SUPPORTED_FEATURES_REPORTED = 532, + ATOM_BLUETOOTH_GATT_APP_INFO = 533, + ATOM_BRIGHTNESS_CONFIGURATION_UPDATED = 534, + ATOM_LAUNCHER_IMPRESSION_EVENT = 547, + ATOM_ODSIGN_REPORTED = 548, + ATOM_ART_DEVICE_DATUM_REPORTED = 550, + ATOM_NETWORK_SLICE_SESSION_ENDED = 558, + ATOM_NETWORK_SLICE_DAILY_DATA_USAGE_REPORTED = 559, + ATOM_NFC_TAG_TYPE_OCCURRED = 560, + ATOM_NFC_AID_CONFLICT_OCCURRED = 561, + ATOM_NFC_READER_CONFLICT_OCCURRED = 562, + ATOM_ART_DATUM_DELTA_REPORTED = 565, + ATOM_MEDIA_DRM_CREATED = 568, + ATOM_MEDIA_DRM_ERRORED = 569, + ATOM_MEDIA_DRM_SESSION_OPENED = 570, + ATOM_MEDIA_DRM_SESSION_CLOSED = 571, + ATOM_PERFORMANCE_HINT_SESSION_REPORTED = 574, + ATOM_HOTWORD_AUDIO_EGRESS_EVENT_REPORTED = 578, + ATOM_NETWORK_VALIDATION_FAILURE_STATS_DAILY_REPORTED = 601, + ATOM_WIFI_BYTES_TRANSFER = 10000, + ATOM_WIFI_BYTES_TRANSFER_BY_FG_BG = 10001, + ATOM_MOBILE_BYTES_TRANSFER = 10002, + ATOM_MOBILE_BYTES_TRANSFER_BY_FG_BG = 10003, + ATOM_BLUETOOTH_BYTES_TRANSFER = 10006, + ATOM_KERNEL_WAKELOCK = 10004, + ATOM_SUBSYSTEM_SLEEP_STATE = 10005, + ATOM_CPU_TIME_PER_UID = 10009, + ATOM_CPU_TIME_PER_UID_FREQ = 10010, + ATOM_WIFI_ACTIVITY_INFO = 10011, + ATOM_MODEM_ACTIVITY_INFO = 10012, + ATOM_BLUETOOTH_ACTIVITY_INFO = 10007, + ATOM_PROCESS_MEMORY_STATE = 10013, + ATOM_SYSTEM_ELAPSED_REALTIME = 10014, + ATOM_SYSTEM_UPTIME = 10015, + ATOM_CPU_ACTIVE_TIME = 10016, + ATOM_CPU_CLUSTER_TIME = 10017, + ATOM_DISK_SPACE = 10018, + ATOM_REMAINING_BATTERY_CAPACITY = 10019, + ATOM_FULL_BATTERY_CAPACITY = 10020, + ATOM_TEMPERATURE = 10021, + ATOM_BINDER_CALLS = 10022, + ATOM_BINDER_CALLS_EXCEPTIONS = 10023, + ATOM_LOOPER_STATS = 10024, + ATOM_DISK_STATS = 10025, + ATOM_DIRECTORY_USAGE = 10026, + ATOM_APP_SIZE = 10027, + ATOM_CATEGORY_SIZE = 10028, + ATOM_PROC_STATS = 10029, + ATOM_BATTERY_VOLTAGE = 10030, + ATOM_NUM_FINGERPRINTS_ENROLLED = 10031, + ATOM_DISK_IO = 10032, + ATOM_POWER_PROFILE = 10033, + ATOM_PROC_STATS_PKG_PROC = 10034, + ATOM_PROCESS_CPU_TIME = 10035, + ATOM_CPU_TIME_PER_THREAD_FREQ = 10037, + ATOM_ON_DEVICE_POWER_MEASUREMENT = 10038, + ATOM_DEVICE_CALCULATED_POWER_USE = 10039, + ATOM_PROCESS_MEMORY_HIGH_WATER_MARK = 10042, + ATOM_BATTERY_LEVEL = 10043, + ATOM_BUILD_INFORMATION = 10044, + ATOM_BATTERY_CYCLE_COUNT = 10045, + ATOM_DEBUG_ELAPSED_CLOCK = 10046, + ATOM_DEBUG_FAILING_ELAPSED_CLOCK = 10047, + ATOM_NUM_FACES_ENROLLED = 10048, + ATOM_ROLE_HOLDER = 10049, + ATOM_DANGEROUS_PERMISSION_STATE = 10050, + ATOM_TRAIN_INFO = 10051, + ATOM_TIME_ZONE_DATA_INFO = 10052, + ATOM_EXTERNAL_STORAGE_INFO = 10053, + ATOM_GPU_STATS_GLOBAL_INFO = 10054, + ATOM_GPU_STATS_APP_INFO = 10055, + ATOM_SYSTEM_ION_HEAP_SIZE = 10056, + ATOM_APPS_ON_EXTERNAL_STORAGE_INFO = 10057, + ATOM_FACE_SETTINGS = 10058, + ATOM_COOLING_DEVICE = 10059, + ATOM_APP_OPS = 10060, + ATOM_PROCESS_SYSTEM_ION_HEAP_SIZE = 10061, + ATOM_SURFACEFLINGER_STATS_GLOBAL_INFO = 10062, + ATOM_SURFACEFLINGER_STATS_LAYER_INFO = 10063, + ATOM_PROCESS_MEMORY_SNAPSHOT = 10064, + ATOM_VMS_CLIENT_STATS = 10065, + ATOM_NOTIFICATION_REMOTE_VIEWS = 10066, + ATOM_DANGEROUS_PERMISSION_STATE_SAMPLED = 10067, + ATOM_GRAPHICS_STATS = 10068, + ATOM_RUNTIME_APP_OP_ACCESS = 10069, + ATOM_ION_HEAP_SIZE = 10070, + ATOM_PACKAGE_NOTIFICATION_PREFERENCES = 10071, + ATOM_PACKAGE_NOTIFICATION_CHANNEL_PREFERENCES = 10072, + ATOM_PACKAGE_NOTIFICATION_CHANNEL_GROUP_PREFERENCES = 10073, + ATOM_GNSS_STATS = 10074, + ATOM_ATTRIBUTED_APP_OPS = 10075, + ATOM_VOICE_CALL_SESSION = 10076, + ATOM_VOICE_CALL_RAT_USAGE = 10077, + ATOM_SIM_SLOT_STATE = 10078, + ATOM_SUPPORTED_RADIO_ACCESS_FAMILY = 10079, + ATOM_SETTING_SNAPSHOT = 10080, + ATOM_BLOB_INFO = 10081, + ATOM_DATA_USAGE_BYTES_TRANSFER = 10082, + ATOM_BYTES_TRANSFER_BY_TAG_AND_METERED = 10083, + ATOM_DND_MODE_RULE = 10084, + ATOM_GENERAL_EXTERNAL_STORAGE_ACCESS_STATS = 10085, + ATOM_INCOMING_SMS = 10086, + ATOM_OUTGOING_SMS = 10087, + ATOM_CARRIER_ID_TABLE_VERSION = 10088, + ATOM_DATA_CALL_SESSION = 10089, + ATOM_CELLULAR_SERVICE_STATE = 10090, + ATOM_CELLULAR_DATA_SERVICE_SWITCH = 10091, + ATOM_SYSTEM_MEMORY = 10092, + ATOM_IMS_REGISTRATION_TERMINATION = 10093, + ATOM_IMS_REGISTRATION_STATS = 10094, + ATOM_CPU_TIME_PER_CLUSTER_FREQ = 10095, + ATOM_CPU_CYCLES_PER_UID_CLUSTER = 10096, + ATOM_DEVICE_ROTATED_DATA = 10097, + ATOM_CPU_CYCLES_PER_THREAD_GROUP_CLUSTER = 10098, + ATOM_MEDIA_DRM_ACTIVITY_INFO = 10099, + ATOM_OEM_MANAGED_BYTES_TRANSFER = 10100, + ATOM_GNSS_POWER_STATS = 10101, + ATOM_TIME_ZONE_DETECTOR_STATE = 10102, + ATOM_KEYSTORE2_STORAGE_STATS = 10103, + ATOM_RKP_POOL_STATS = 10104, + ATOM_PROCESS_DMABUF_MEMORY = 10105, + ATOM_PENDING_ALARM_INFO = 10106, + ATOM_USER_LEVEL_HIBERNATED_APPS = 10107, + ATOM_LAUNCHER_LAYOUT_SNAPSHOT = 10108, + ATOM_GLOBAL_HIBERNATED_APPS = 10109, + ATOM_INPUT_EVENT_LATENCY_SKETCH = 10110, + ATOM_BATTERY_USAGE_STATS_BEFORE_RESET = 10111, + ATOM_BATTERY_USAGE_STATS_SINCE_RESET = 10112, + ATOM_BATTERY_USAGE_STATS_SINCE_RESET_USING_POWER_PROFILE_MODEL = 10113, + ATOM_INSTALLED_INCREMENTAL_PACKAGE = 10114, + ATOM_TELEPHONY_NETWORK_REQUESTS = 10115, + ATOM_APP_SEARCH_STORAGE_INFO = 10116, + ATOM_VMSTAT = 10117, + ATOM_KEYSTORE2_KEY_CREATION_WITH_GENERAL_INFO = 10118, + ATOM_KEYSTORE2_KEY_CREATION_WITH_AUTH_INFO = 10119, + ATOM_KEYSTORE2_KEY_CREATION_WITH_PURPOSE_AND_MODES_INFO = 10120, + ATOM_KEYSTORE2_ATOM_WITH_OVERFLOW = 10121, + ATOM_KEYSTORE2_KEY_OPERATION_WITH_PURPOSE_AND_MODES_INFO = 10122, + ATOM_KEYSTORE2_KEY_OPERATION_WITH_GENERAL_INFO = 10123, + ATOM_RKP_ERROR_STATS = 10124, + ATOM_KEYSTORE2_CRASH_STATS = 10125, + ATOM_VENDOR_APEX_INFO = 10126, + ATOM_ACCESSIBILITY_SHORTCUT_STATS = 10127, + ATOM_ACCESSIBILITY_FLOATING_MENU_STATS = 10128, + ATOM_DATA_USAGE_BYTES_TRANSFER_V2 = 10129, + ATOM_MEDIA_CAPABILITIES = 10130, + ATOM_CAR_WATCHDOG_SYSTEM_IO_USAGE_SUMMARY = 10131, + ATOM_CAR_WATCHDOG_UID_IO_USAGE_SUMMARY = 10132, + ATOM_IMS_REGISTRATION_FEATURE_TAG_STATS = 10133, + ATOM_RCS_CLIENT_PROVISIONING_STATS = 10134, + ATOM_RCS_ACS_PROVISIONING_STATS = 10135, + ATOM_SIP_DELEGATE_STATS = 10136, + ATOM_SIP_TRANSPORT_FEATURE_TAG_STATS = 10137, + ATOM_SIP_MESSAGE_RESPONSE = 10138, + ATOM_SIP_TRANSPORT_SESSION = 10139, + ATOM_IMS_DEDICATED_BEARER_LISTENER_EVENT = 10140, + ATOM_IMS_DEDICATED_BEARER_EVENT = 10141, + ATOM_IMS_REGISTRATION_SERVICE_DESC_STATS = 10142, + ATOM_UCE_EVENT_STATS = 10143, + ATOM_PRESENCE_NOTIFY_EVENT = 10144, + ATOM_GBA_EVENT = 10145, + ATOM_PER_SIM_STATUS = 10146, + ATOM_GPU_WORK_PER_UID = 10147, + ATOM_PERSISTENT_URI_PERMISSIONS_AMOUNT_PER_PACKAGE = 10148, + ATOM_SIGNED_PARTITION_INFO = 10149, + ATOM_PINNED_FILE_SIZES_PER_PACKAGE = 10150, + ATOM_PENDING_INTENTS_PER_PACKAGE = 10151, + ATOM_USER_INFO = 10152, + ATOM_TELEPHONY_NETWORK_REQUESTS_V2 = 10153, + ATOM_DEVICE_TELEPHONY_PROPERTIES = 10154, + ATOM_REMOTE_KEY_PROVISIONING_ERROR_COUNTS = 10155, + ATOM_INCOMING_MMS = 10157, + ATOM_OUTGOING_MMS = 10158, + ATOM_MULTI_USER_INFO = 10160, + ATOM_NETWORK_BPF_MAP_INFO = 10161, + ATOM_CONNECTIVITY_STATE_SAMPLE = 10163, + ATOM_NETWORK_SELECTION_REMATCH_REASONS_INFO = 10164, + ATOM_NETWORK_SLICE_REQUEST_COUNT = 10168, + ATOM_ADPF_SYSTEM_COMPONENT_INFO = 10173, + ATOM_NOTIFICATION_MEMORY_USE = 10174, +}; +} // namespace perfetto +} // namespace protos +} // namespace gen + +#endif // PERFETTO_PROTOS_PROTOS_PERFETTO_CONFIG_STATSD_ATOM_IDS_PROTO_CPP_H_ +// gen_amalgamated begin header: gen/protos/perfetto/config/statsd/statsd_tracing_config.gen.h +// DO NOT EDIT. Autogenerated by Perfetto cppgen_plugin +#ifndef PERFETTO_PROTOS_PROTOS_PERFETTO_CONFIG_STATSD_STATSD_TRACING_CONFIG_PROTO_CPP_H_ +#define PERFETTO_PROTOS_PROTOS_PERFETTO_CONFIG_STATSD_STATSD_TRACING_CONFIG_PROTO_CPP_H_ + +#include +#include +#include +#include +#include + +// gen_amalgamated expanded: #include "perfetto/protozero/cpp_message_obj.h" +// gen_amalgamated expanded: #include "perfetto/protozero/copyable_ptr.h" +// gen_amalgamated expanded: #include "perfetto/base/export.h" + +namespace perfetto { +namespace protos { +namespace gen { +class StatsdPullAtomConfig; +class StatsdTracingConfig; +enum AtomId : int; +} // namespace perfetto +} // namespace protos +} // namespace gen + +namespace protozero { +class Message; +} // namespace protozero + +namespace perfetto { +namespace protos { +namespace gen { + +class PERFETTO_EXPORT_COMPONENT StatsdPullAtomConfig : public ::protozero::CppMessageObj { + public: + enum FieldNumbers { + kPullAtomIdFieldNumber = 1, + kRawPullAtomIdFieldNumber = 2, + kPullFrequencyMsFieldNumber = 3, + kPackagesFieldNumber = 4, + }; + + StatsdPullAtomConfig(); + ~StatsdPullAtomConfig() override; + StatsdPullAtomConfig(StatsdPullAtomConfig&&) noexcept; + StatsdPullAtomConfig& operator=(StatsdPullAtomConfig&&); + StatsdPullAtomConfig(const StatsdPullAtomConfig&); + StatsdPullAtomConfig& operator=(const StatsdPullAtomConfig&); + bool operator==(const StatsdPullAtomConfig&) const; + bool operator!=(const StatsdPullAtomConfig& other) const { return !(*this == other); } + + bool ParseFromArray(const void*, size_t) override; + std::string SerializeAsString() const override; + std::vector SerializeAsArray() const override; + void Serialize(::protozero::Message*) const; + + const std::vector& pull_atom_id() const { return pull_atom_id_; } + std::vector* mutable_pull_atom_id() { return &pull_atom_id_; } + int pull_atom_id_size() const { return static_cast(pull_atom_id_.size()); } + void clear_pull_atom_id() { pull_atom_id_.clear(); } + void add_pull_atom_id(AtomId value) { pull_atom_id_.emplace_back(value); } + AtomId* add_pull_atom_id() { pull_atom_id_.emplace_back(); return &pull_atom_id_.back(); } + + const std::vector& raw_pull_atom_id() const { return raw_pull_atom_id_; } + std::vector* mutable_raw_pull_atom_id() { return &raw_pull_atom_id_; } + int raw_pull_atom_id_size() const { return static_cast(raw_pull_atom_id_.size()); } + void clear_raw_pull_atom_id() { raw_pull_atom_id_.clear(); } + void add_raw_pull_atom_id(int32_t value) { raw_pull_atom_id_.emplace_back(value); } + int32_t* add_raw_pull_atom_id() { raw_pull_atom_id_.emplace_back(); return &raw_pull_atom_id_.back(); } + + bool has_pull_frequency_ms() const { return _has_field_[3]; } + int32_t pull_frequency_ms() const { return pull_frequency_ms_; } + void set_pull_frequency_ms(int32_t value) { pull_frequency_ms_ = value; _has_field_.set(3); } + + const std::vector& packages() const { return packages_; } + std::vector* mutable_packages() { return &packages_; } + int packages_size() const { return static_cast(packages_.size()); } + void clear_packages() { packages_.clear(); } + void add_packages(std::string value) { packages_.emplace_back(value); } + std::string* add_packages() { packages_.emplace_back(); return &packages_.back(); } + + private: + std::vector pull_atom_id_; + std::vector raw_pull_atom_id_; + int32_t pull_frequency_ms_{}; + std::vector packages_; + + // Allows to preserve unknown protobuf fields for compatibility + // with future versions of .proto files. + std::string unknown_fields_; + + std::bitset<5> _has_field_{}; +}; + + +class PERFETTO_EXPORT_COMPONENT StatsdTracingConfig : public ::protozero::CppMessageObj { + public: + enum FieldNumbers { + kPushAtomIdFieldNumber = 1, + kRawPushAtomIdFieldNumber = 2, + kPullConfigFieldNumber = 3, + }; + + StatsdTracingConfig(); + ~StatsdTracingConfig() override; + StatsdTracingConfig(StatsdTracingConfig&&) noexcept; + StatsdTracingConfig& operator=(StatsdTracingConfig&&); + StatsdTracingConfig(const StatsdTracingConfig&); + StatsdTracingConfig& operator=(const StatsdTracingConfig&); + bool operator==(const StatsdTracingConfig&) const; + bool operator!=(const StatsdTracingConfig& other) const { return !(*this == other); } + + bool ParseFromArray(const void*, size_t) override; + std::string SerializeAsString() const override; + std::vector SerializeAsArray() const override; + void Serialize(::protozero::Message*) const; + + const std::vector& push_atom_id() const { return push_atom_id_; } + std::vector* mutable_push_atom_id() { return &push_atom_id_; } + int push_atom_id_size() const { return static_cast(push_atom_id_.size()); } + void clear_push_atom_id() { push_atom_id_.clear(); } + void add_push_atom_id(AtomId value) { push_atom_id_.emplace_back(value); } + AtomId* add_push_atom_id() { push_atom_id_.emplace_back(); return &push_atom_id_.back(); } + + const std::vector& raw_push_atom_id() const { return raw_push_atom_id_; } + std::vector* mutable_raw_push_atom_id() { return &raw_push_atom_id_; } + int raw_push_atom_id_size() const { return static_cast(raw_push_atom_id_.size()); } + void clear_raw_push_atom_id() { raw_push_atom_id_.clear(); } + void add_raw_push_atom_id(int32_t value) { raw_push_atom_id_.emplace_back(value); } + int32_t* add_raw_push_atom_id() { raw_push_atom_id_.emplace_back(); return &raw_push_atom_id_.back(); } + + const std::vector& pull_config() const { return pull_config_; } + std::vector* mutable_pull_config() { return &pull_config_; } + int pull_config_size() const; + void clear_pull_config(); + StatsdPullAtomConfig* add_pull_config(); + + private: + std::vector push_atom_id_; + std::vector raw_push_atom_id_; + std::vector pull_config_; + + // Allows to preserve unknown protobuf fields for compatibility + // with future versions of .proto files. + std::string unknown_fields_; + + std::bitset<4> _has_field_{}; +}; + +} // namespace perfetto +} // namespace protos +} // namespace gen + +#endif // PERFETTO_PROTOS_PROTOS_PERFETTO_CONFIG_STATSD_STATSD_TRACING_CONFIG_PROTO_CPP_H_ // gen_amalgamated begin header: gen/protos/perfetto/config/sys_stats/sys_stats_config.gen.h // DO NOT EDIT. Autogenerated by Perfetto cppgen_plugin #ifndef PERFETTO_PROTOS_PROTOS_PERFETTO_CONFIG_SYS_STATS_SYS_STATS_CONFIG_PROTO_CPP_H_ @@ -144650,6 +143222,8 @@ class PERFETTO_EXPORT_COMPONENT SysStatsConfig : public ::protozero::CppMessageO kStatCountersFieldNumber = 6, kDevfreqPeriodMsFieldNumber = 7, kCpufreqPeriodMsFieldNumber = 8, + kBuddyinfoPeriodMsFieldNumber = 9, + kDiskstatPeriodMsFieldNumber = 10, }; SysStatsConfig(); @@ -144707,6 +143281,14 @@ class PERFETTO_EXPORT_COMPONENT SysStatsConfig : public ::protozero::CppMessageO uint32_t cpufreq_period_ms() const { return cpufreq_period_ms_; } void set_cpufreq_period_ms(uint32_t value) { cpufreq_period_ms_ = value; _has_field_.set(8); } + bool has_buddyinfo_period_ms() const { return _has_field_[9]; } + uint32_t buddyinfo_period_ms() const { return buddyinfo_period_ms_; } + void set_buddyinfo_period_ms(uint32_t value) { buddyinfo_period_ms_ = value; _has_field_.set(9); } + + bool has_diskstat_period_ms() const { return _has_field_[10]; } + uint32_t diskstat_period_ms() const { return diskstat_period_ms_; } + void set_diskstat_period_ms(uint32_t value) { diskstat_period_ms_ = value; _has_field_.set(10); } + private: uint32_t meminfo_period_ms_{}; std::vector meminfo_counters_; @@ -144716,12 +143298,14 @@ class PERFETTO_EXPORT_COMPONENT SysStatsConfig : public ::protozero::CppMessageO std::vector stat_counters_; uint32_t devfreq_period_ms_{}; uint32_t cpufreq_period_ms_{}; + uint32_t buddyinfo_period_ms_{}; + uint32_t diskstat_period_ms_{}; // Allows to preserve unknown protobuf fields for compatibility // with future versions of .proto files. std::string unknown_fields_; - std::bitset<9> _has_field_{}; + std::bitset<11> _has_field_{}; }; } // namespace perfetto @@ -144729,6 +143313,70 @@ class PERFETTO_EXPORT_COMPONENT SysStatsConfig : public ::protozero::CppMessageO } // namespace gen #endif // PERFETTO_PROTOS_PROTOS_PERFETTO_CONFIG_SYS_STATS_SYS_STATS_CONFIG_PROTO_CPP_H_ +// gen_amalgamated begin header: gen/protos/perfetto/config/system_info/system_info.gen.h +// DO NOT EDIT. Autogenerated by Perfetto cppgen_plugin +#ifndef PERFETTO_PROTOS_PROTOS_PERFETTO_CONFIG_SYSTEM_INFO_SYSTEM_INFO_PROTO_CPP_H_ +#define PERFETTO_PROTOS_PROTOS_PERFETTO_CONFIG_SYSTEM_INFO_SYSTEM_INFO_PROTO_CPP_H_ + +#include +#include +#include +#include +#include + +// gen_amalgamated expanded: #include "perfetto/protozero/cpp_message_obj.h" +// gen_amalgamated expanded: #include "perfetto/protozero/copyable_ptr.h" +// gen_amalgamated expanded: #include "perfetto/base/export.h" + +namespace perfetto { +namespace protos { +namespace gen { +class SystemInfoConfig; +} // namespace perfetto +} // namespace protos +} // namespace gen + +namespace protozero { +class Message; +} // namespace protozero + +namespace perfetto { +namespace protos { +namespace gen { + +class PERFETTO_EXPORT_COMPONENT SystemInfoConfig : public ::protozero::CppMessageObj { + public: + enum FieldNumbers { + }; + + SystemInfoConfig(); + ~SystemInfoConfig() override; + SystemInfoConfig(SystemInfoConfig&&) noexcept; + SystemInfoConfig& operator=(SystemInfoConfig&&); + SystemInfoConfig(const SystemInfoConfig&); + SystemInfoConfig& operator=(const SystemInfoConfig&); + bool operator==(const SystemInfoConfig&) const; + bool operator!=(const SystemInfoConfig& other) const { return !(*this == other); } + + bool ParseFromArray(const void*, size_t) override; + std::string SerializeAsString() const override; + std::vector SerializeAsArray() const override; + void Serialize(::protozero::Message*) const; + + private: + + // Allows to preserve unknown protobuf fields for compatibility + // with future versions of .proto files. + std::string unknown_fields_; + + std::bitset<2> _has_field_{}; +}; + +} // namespace perfetto +} // namespace protos +} // namespace gen + +#endif // PERFETTO_PROTOS_PROTOS_PERFETTO_CONFIG_SYSTEM_INFO_SYSTEM_INFO_PROTO_CPP_H_ // gen_amalgamated begin header: gen/protos/perfetto/config/chrome/chrome_config.gen.h // DO NOT EDIT. Autogenerated by Perfetto cppgen_plugin #ifndef PERFETTO_PROTOS_PROTOS_PERFETTO_CONFIG_CHROME_CHROME_CONFIG_PROTO_CPP_H_ @@ -144835,6 +143483,406 @@ class PERFETTO_EXPORT_COMPONENT ChromeConfig : public ::protozero::CppMessageObj } // namespace gen #endif // PERFETTO_PROTOS_PROTOS_PERFETTO_CONFIG_CHROME_CHROME_CONFIG_PROTO_CPP_H_ +// gen_amalgamated begin header: gen/protos/perfetto/config/chrome/scenario_config.gen.h +// DO NOT EDIT. Autogenerated by Perfetto cppgen_plugin +#ifndef PERFETTO_PROTOS_PROTOS_PERFETTO_CONFIG_CHROME_SCENARIO_CONFIG_PROTO_CPP_H_ +#define PERFETTO_PROTOS_PROTOS_PERFETTO_CONFIG_CHROME_SCENARIO_CONFIG_PROTO_CPP_H_ + +#include +#include +#include +#include +#include + +// gen_amalgamated expanded: #include "perfetto/protozero/cpp_message_obj.h" +// gen_amalgamated expanded: #include "perfetto/protozero/copyable_ptr.h" +// gen_amalgamated expanded: #include "perfetto/base/export.h" + +namespace perfetto { +namespace protos { +namespace gen { +class ChromeFieldTracingConfig; +class ScenarioConfig; +class NestedScenarioConfig; +class TriggerRule; +class TriggerRule_RepeatingInterval; +class TriggerRule_HistogramTrigger; +class TraceConfig; +class TraceConfig_CmdTraceStartDelay; +class TraceConfig_AndroidReportConfig; +class TraceConfig_TraceFilter; +class TraceConfig_IncidentReportConfig; +class TraceConfig_IncrementalStateConfig; +class TraceConfig_TriggerConfig; +class TraceConfig_TriggerConfig_Trigger; +class TraceConfig_GuardrailOverrides; +class TraceConfig_StatsdMetadata; +class TraceConfig_ProducerConfig; +class TraceConfig_BuiltinDataSource; +class TraceConfig_DataSource; +class DataSourceConfig; +class TestConfig; +class TestConfig_DummyFields; +class InterceptorConfig; +class ChromeConfig; +class SystemInfoConfig; +class TraceConfig_BufferConfig; +enum TraceConfig_LockdownModeOperation : int; +enum TraceConfig_CompressionType : int; +enum TraceConfig_StatsdLogging : int; +enum TraceConfig_TriggerConfig_TriggerMode : int; +enum BuiltinClock : int; +enum DataSourceConfig_SessionInitiator : int; +enum ChromeConfig_ClientPriority : int; +enum TraceConfig_BufferConfig_FillPolicy : int; +} // namespace perfetto +} // namespace protos +} // namespace gen + +namespace protozero { +class Message; +} // namespace protozero + +namespace perfetto { +namespace protos { +namespace gen { + +class PERFETTO_EXPORT_COMPONENT ChromeFieldTracingConfig : public ::protozero::CppMessageObj { + public: + enum FieldNumbers { + kScenariosFieldNumber = 1, + }; + + ChromeFieldTracingConfig(); + ~ChromeFieldTracingConfig() override; + ChromeFieldTracingConfig(ChromeFieldTracingConfig&&) noexcept; + ChromeFieldTracingConfig& operator=(ChromeFieldTracingConfig&&); + ChromeFieldTracingConfig(const ChromeFieldTracingConfig&); + ChromeFieldTracingConfig& operator=(const ChromeFieldTracingConfig&); + bool operator==(const ChromeFieldTracingConfig&) const; + bool operator!=(const ChromeFieldTracingConfig& other) const { return !(*this == other); } + + bool ParseFromArray(const void*, size_t) override; + std::string SerializeAsString() const override; + std::vector SerializeAsArray() const override; + void Serialize(::protozero::Message*) const; + + const std::vector& scenarios() const { return scenarios_; } + std::vector* mutable_scenarios() { return &scenarios_; } + int scenarios_size() const; + void clear_scenarios(); + ScenarioConfig* add_scenarios(); + + private: + std::vector scenarios_; + + // Allows to preserve unknown protobuf fields for compatibility + // with future versions of .proto files. + std::string unknown_fields_; + + std::bitset<2> _has_field_{}; +}; + + +class PERFETTO_EXPORT_COMPONENT ScenarioConfig : public ::protozero::CppMessageObj { + public: + enum FieldNumbers { + kScenarioNameFieldNumber = 1, + kStartRulesFieldNumber = 2, + kStopRulesFieldNumber = 3, + kUploadRulesFieldNumber = 4, + kSetupRulesFieldNumber = 5, + kTraceConfigFieldNumber = 6, + kNestedScenariosFieldNumber = 7, + }; + + ScenarioConfig(); + ~ScenarioConfig() override; + ScenarioConfig(ScenarioConfig&&) noexcept; + ScenarioConfig& operator=(ScenarioConfig&&); + ScenarioConfig(const ScenarioConfig&); + ScenarioConfig& operator=(const ScenarioConfig&); + bool operator==(const ScenarioConfig&) const; + bool operator!=(const ScenarioConfig& other) const { return !(*this == other); } + + bool ParseFromArray(const void*, size_t) override; + std::string SerializeAsString() const override; + std::vector SerializeAsArray() const override; + void Serialize(::protozero::Message*) const; + + bool has_scenario_name() const { return _has_field_[1]; } + const std::string& scenario_name() const { return scenario_name_; } + void set_scenario_name(const std::string& value) { scenario_name_ = value; _has_field_.set(1); } + + const std::vector& start_rules() const { return start_rules_; } + std::vector* mutable_start_rules() { return &start_rules_; } + int start_rules_size() const; + void clear_start_rules(); + TriggerRule* add_start_rules(); + + const std::vector& stop_rules() const { return stop_rules_; } + std::vector* mutable_stop_rules() { return &stop_rules_; } + int stop_rules_size() const; + void clear_stop_rules(); + TriggerRule* add_stop_rules(); + + const std::vector& upload_rules() const { return upload_rules_; } + std::vector* mutable_upload_rules() { return &upload_rules_; } + int upload_rules_size() const; + void clear_upload_rules(); + TriggerRule* add_upload_rules(); + + const std::vector& setup_rules() const { return setup_rules_; } + std::vector* mutable_setup_rules() { return &setup_rules_; } + int setup_rules_size() const; + void clear_setup_rules(); + TriggerRule* add_setup_rules(); + + bool has_trace_config() const { return _has_field_[6]; } + const TraceConfig& trace_config() const { return *trace_config_; } + TraceConfig* mutable_trace_config() { _has_field_.set(6); return trace_config_.get(); } + + const std::vector& nested_scenarios() const { return nested_scenarios_; } + std::vector* mutable_nested_scenarios() { return &nested_scenarios_; } + int nested_scenarios_size() const; + void clear_nested_scenarios(); + NestedScenarioConfig* add_nested_scenarios(); + + private: + std::string scenario_name_{}; + std::vector start_rules_; + std::vector stop_rules_; + std::vector upload_rules_; + std::vector setup_rules_; + ::protozero::CopyablePtr trace_config_; + std::vector nested_scenarios_; + + // Allows to preserve unknown protobuf fields for compatibility + // with future versions of .proto files. + std::string unknown_fields_; + + std::bitset<8> _has_field_{}; +}; + + +class PERFETTO_EXPORT_COMPONENT NestedScenarioConfig : public ::protozero::CppMessageObj { + public: + enum FieldNumbers { + kScenarioNameFieldNumber = 1, + kStartRulesFieldNumber = 2, + kStopRulesFieldNumber = 3, + kUploadRulesFieldNumber = 4, + }; + + NestedScenarioConfig(); + ~NestedScenarioConfig() override; + NestedScenarioConfig(NestedScenarioConfig&&) noexcept; + NestedScenarioConfig& operator=(NestedScenarioConfig&&); + NestedScenarioConfig(const NestedScenarioConfig&); + NestedScenarioConfig& operator=(const NestedScenarioConfig&); + bool operator==(const NestedScenarioConfig&) const; + bool operator!=(const NestedScenarioConfig& other) const { return !(*this == other); } + + bool ParseFromArray(const void*, size_t) override; + std::string SerializeAsString() const override; + std::vector SerializeAsArray() const override; + void Serialize(::protozero::Message*) const; + + bool has_scenario_name() const { return _has_field_[1]; } + const std::string& scenario_name() const { return scenario_name_; } + void set_scenario_name(const std::string& value) { scenario_name_ = value; _has_field_.set(1); } + + const std::vector& start_rules() const { return start_rules_; } + std::vector* mutable_start_rules() { return &start_rules_; } + int start_rules_size() const; + void clear_start_rules(); + TriggerRule* add_start_rules(); + + const std::vector& stop_rules() const { return stop_rules_; } + std::vector* mutable_stop_rules() { return &stop_rules_; } + int stop_rules_size() const; + void clear_stop_rules(); + TriggerRule* add_stop_rules(); + + const std::vector& upload_rules() const { return upload_rules_; } + std::vector* mutable_upload_rules() { return &upload_rules_; } + int upload_rules_size() const; + void clear_upload_rules(); + TriggerRule* add_upload_rules(); + + private: + std::string scenario_name_{}; + std::vector start_rules_; + std::vector stop_rules_; + std::vector upload_rules_; + + // Allows to preserve unknown protobuf fields for compatibility + // with future versions of .proto files. + std::string unknown_fields_; + + std::bitset<5> _has_field_{}; +}; + + +class PERFETTO_EXPORT_COMPONENT TriggerRule : public ::protozero::CppMessageObj { + public: + using HistogramTrigger = TriggerRule_HistogramTrigger; + using RepeatingInterval = TriggerRule_RepeatingInterval; + enum FieldNumbers { + kNameFieldNumber = 1, + kTriggerChanceFieldNumber = 2, + kDelayMsFieldNumber = 3, + kManualTriggerNameFieldNumber = 4, + kHistogramFieldNumber = 5, + kRepeatingIntervalFieldNumber = 6, + }; + + TriggerRule(); + ~TriggerRule() override; + TriggerRule(TriggerRule&&) noexcept; + TriggerRule& operator=(TriggerRule&&); + TriggerRule(const TriggerRule&); + TriggerRule& operator=(const TriggerRule&); + bool operator==(const TriggerRule&) const; + bool operator!=(const TriggerRule& other) const { return !(*this == other); } + + bool ParseFromArray(const void*, size_t) override; + std::string SerializeAsString() const override; + std::vector SerializeAsArray() const override; + void Serialize(::protozero::Message*) const; + + bool has_name() const { return _has_field_[1]; } + const std::string& name() const { return name_; } + void set_name(const std::string& value) { name_ = value; _has_field_.set(1); } + + bool has_trigger_chance() const { return _has_field_[2]; } + float trigger_chance() const { return trigger_chance_; } + void set_trigger_chance(float value) { trigger_chance_ = value; _has_field_.set(2); } + + bool has_delay_ms() const { return _has_field_[3]; } + uint64_t delay_ms() const { return delay_ms_; } + void set_delay_ms(uint64_t value) { delay_ms_ = value; _has_field_.set(3); } + + bool has_manual_trigger_name() const { return _has_field_[4]; } + const std::string& manual_trigger_name() const { return manual_trigger_name_; } + void set_manual_trigger_name(const std::string& value) { manual_trigger_name_ = value; _has_field_.set(4); } + + bool has_histogram() const { return _has_field_[5]; } + const TriggerRule_HistogramTrigger& histogram() const { return *histogram_; } + TriggerRule_HistogramTrigger* mutable_histogram() { _has_field_.set(5); return histogram_.get(); } + + bool has_repeating_interval() const { return _has_field_[6]; } + const TriggerRule_RepeatingInterval& repeating_interval() const { return *repeating_interval_; } + TriggerRule_RepeatingInterval* mutable_repeating_interval() { _has_field_.set(6); return repeating_interval_.get(); } + + private: + std::string name_{}; + float trigger_chance_{}; + uint64_t delay_ms_{}; + std::string manual_trigger_name_{}; + ::protozero::CopyablePtr histogram_; + ::protozero::CopyablePtr repeating_interval_; + + // Allows to preserve unknown protobuf fields for compatibility + // with future versions of .proto files. + std::string unknown_fields_; + + std::bitset<7> _has_field_{}; +}; + + +class PERFETTO_EXPORT_COMPONENT TriggerRule_RepeatingInterval : public ::protozero::CppMessageObj { + public: + enum FieldNumbers { + kPeriodMsFieldNumber = 1, + kRandomizedFieldNumber = 2, + }; + + TriggerRule_RepeatingInterval(); + ~TriggerRule_RepeatingInterval() override; + TriggerRule_RepeatingInterval(TriggerRule_RepeatingInterval&&) noexcept; + TriggerRule_RepeatingInterval& operator=(TriggerRule_RepeatingInterval&&); + TriggerRule_RepeatingInterval(const TriggerRule_RepeatingInterval&); + TriggerRule_RepeatingInterval& operator=(const TriggerRule_RepeatingInterval&); + bool operator==(const TriggerRule_RepeatingInterval&) const; + bool operator!=(const TriggerRule_RepeatingInterval& other) const { return !(*this == other); } + + bool ParseFromArray(const void*, size_t) override; + std::string SerializeAsString() const override; + std::vector SerializeAsArray() const override; + void Serialize(::protozero::Message*) const; + + bool has_period_ms() const { return _has_field_[1]; } + uint64_t period_ms() const { return period_ms_; } + void set_period_ms(uint64_t value) { period_ms_ = value; _has_field_.set(1); } + + bool has_randomized() const { return _has_field_[2]; } + bool randomized() const { return randomized_; } + void set_randomized(bool value) { randomized_ = value; _has_field_.set(2); } + + private: + uint64_t period_ms_{}; + bool randomized_{}; + + // Allows to preserve unknown protobuf fields for compatibility + // with future versions of .proto files. + std::string unknown_fields_; + + std::bitset<3> _has_field_{}; +}; + + +class PERFETTO_EXPORT_COMPONENT TriggerRule_HistogramTrigger : public ::protozero::CppMessageObj { + public: + enum FieldNumbers { + kHistogramNameFieldNumber = 1, + kMinValueFieldNumber = 2, + kMaxValueFieldNumber = 3, + }; + + TriggerRule_HistogramTrigger(); + ~TriggerRule_HistogramTrigger() override; + TriggerRule_HistogramTrigger(TriggerRule_HistogramTrigger&&) noexcept; + TriggerRule_HistogramTrigger& operator=(TriggerRule_HistogramTrigger&&); + TriggerRule_HistogramTrigger(const TriggerRule_HistogramTrigger&); + TriggerRule_HistogramTrigger& operator=(const TriggerRule_HistogramTrigger&); + bool operator==(const TriggerRule_HistogramTrigger&) const; + bool operator!=(const TriggerRule_HistogramTrigger& other) const { return !(*this == other); } + + bool ParseFromArray(const void*, size_t) override; + std::string SerializeAsString() const override; + std::vector SerializeAsArray() const override; + void Serialize(::protozero::Message*) const; + + bool has_histogram_name() const { return _has_field_[1]; } + const std::string& histogram_name() const { return histogram_name_; } + void set_histogram_name(const std::string& value) { histogram_name_ = value; _has_field_.set(1); } + + bool has_min_value() const { return _has_field_[2]; } + int64_t min_value() const { return min_value_; } + void set_min_value(int64_t value) { min_value_ = value; _has_field_.set(2); } + + bool has_max_value() const { return _has_field_[3]; } + int64_t max_value() const { return max_value_; } + void set_max_value(int64_t value) { max_value_ = value; _has_field_.set(3); } + + private: + std::string histogram_name_{}; + int64_t min_value_{}; + int64_t max_value_{}; + + // Allows to preserve unknown protobuf fields for compatibility + // with future versions of .proto files. + std::string unknown_fields_; + + std::bitset<4> _has_field_{}; +}; + +} // namespace perfetto +} // namespace protos +} // namespace gen + +#endif // PERFETTO_PROTOS_PROTOS_PERFETTO_CONFIG_CHROME_SCENARIO_CONFIG_PROTO_CPP_H_ // gen_amalgamated begin header: gen/protos/perfetto/config/data_source_config.gen.h // DO NOT EDIT. Autogenerated by Perfetto cppgen_plugin #ifndef PERFETTO_PROTOS_PROTOS_PERFETTO_CONFIG_DATA_SOURCE_CONFIG_PROTO_CPP_H_ @@ -144858,6 +143906,7 @@ class TestConfig; class TestConfig_DummyFields; class InterceptorConfig; class ChromeConfig; +class SystemInfoConfig; enum DataSourceConfig_SessionInitiator : int; enum ChromeConfig_ClientPriority : int; } // namespace perfetto @@ -144887,6 +143936,7 @@ class PERFETTO_EXPORT_COMPONENT DataSourceConfig : public ::protozero::CppMessag kNameFieldNumber = 1, kTargetBufferFieldNumber = 2, kTraceDurationMsFieldNumber = 3, + kPreferSuspendClockForDurationFieldNumber = 122, kStopTimeoutMsFieldNumber = 7, kEnableExtraGuardrailsFieldNumber = 6, kSessionInitiatorFieldNumber = 8, @@ -144906,8 +143956,12 @@ class PERFETTO_EXPORT_COMPONENT DataSourceConfig : public ::protozero::CppMessag kVulkanMemoryConfigFieldNumber = 112, kTrackEventConfigFieldNumber = 113, kAndroidPolledStateConfigFieldNumber = 114, + kAndroidSystemPropertyConfigFieldNumber = 118, + kStatsdTracingConfigFieldNumber = 117, + kSystemInfoConfigFieldNumber = 119, kChromeConfigFieldNumber = 101, kInterceptorConfigFieldNumber = 115, + kNetworkPacketTraceConfigFieldNumber = 120, kLegacyConfigFieldNumber = 1000, kForTestingFieldNumber = 1001, }; @@ -144938,6 +143992,10 @@ class PERFETTO_EXPORT_COMPONENT DataSourceConfig : public ::protozero::CppMessag uint32_t trace_duration_ms() const { return trace_duration_ms_; } void set_trace_duration_ms(uint32_t value) { trace_duration_ms_ = value; _has_field_.set(3); } + bool has_prefer_suspend_clock_for_duration() const { return _has_field_[122]; } + bool prefer_suspend_clock_for_duration() const { return prefer_suspend_clock_for_duration_; } + void set_prefer_suspend_clock_for_duration(bool value) { prefer_suspend_clock_for_duration_ = value; _has_field_.set(122); } + bool has_stop_timeout_ms() const { return _has_field_[7]; } uint32_t stop_timeout_ms() const { return stop_timeout_ms_; } void set_stop_timeout_ms(uint32_t value) { stop_timeout_ms_ = value; _has_field_.set(7); } @@ -144999,6 +144057,16 @@ class PERFETTO_EXPORT_COMPONENT DataSourceConfig : public ::protozero::CppMessag const std::string& android_polled_state_config_raw() const { return android_polled_state_config_; } void set_android_polled_state_config_raw(const std::string& raw) { android_polled_state_config_ = raw; _has_field_.set(114); } + const std::string& android_system_property_config_raw() const { return android_system_property_config_; } + void set_android_system_property_config_raw(const std::string& raw) { android_system_property_config_ = raw; _has_field_.set(118); } + + const std::string& statsd_tracing_config_raw() const { return statsd_tracing_config_; } + void set_statsd_tracing_config_raw(const std::string& raw) { statsd_tracing_config_ = raw; _has_field_.set(117); } + + bool has_system_info_config() const { return _has_field_[119]; } + const SystemInfoConfig& system_info_config() const { return *system_info_config_; } + SystemInfoConfig* mutable_system_info_config() { _has_field_.set(119); return system_info_config_.get(); } + bool has_chrome_config() const { return _has_field_[101]; } const ChromeConfig& chrome_config() const { return *chrome_config_; } ChromeConfig* mutable_chrome_config() { _has_field_.set(101); return chrome_config_.get(); } @@ -145007,6 +144075,9 @@ class PERFETTO_EXPORT_COMPONENT DataSourceConfig : public ::protozero::CppMessag const InterceptorConfig& interceptor_config() const { return *interceptor_config_; } InterceptorConfig* mutable_interceptor_config() { _has_field_.set(115); return interceptor_config_.get(); } + const std::string& network_packet_trace_config_raw() const { return network_packet_trace_config_; } + void set_network_packet_trace_config_raw(const std::string& raw) { network_packet_trace_config_ = raw; _has_field_.set(120); } + bool has_legacy_config() const { return _has_field_[1000]; } const std::string& legacy_config() const { return legacy_config_; } void set_legacy_config(const std::string& value) { legacy_config_ = value; _has_field_.set(1000); } @@ -145019,6 +144090,7 @@ class PERFETTO_EXPORT_COMPONENT DataSourceConfig : public ::protozero::CppMessag std::string name_{}; uint32_t target_buffer_{}; uint32_t trace_duration_ms_{}; + bool prefer_suspend_clock_for_duration_{}; uint32_t stop_timeout_ms_{}; bool enable_extra_guardrails_{}; DataSourceConfig_SessionInitiator session_initiator_{}; @@ -145038,8 +144110,12 @@ class PERFETTO_EXPORT_COMPONENT DataSourceConfig : public ::protozero::CppMessag std::string vulkan_memory_config_; // [lazy=true] std::string track_event_config_; // [lazy=true] std::string android_polled_state_config_; // [lazy=true] + std::string android_system_property_config_; // [lazy=true] + std::string statsd_tracing_config_; // [lazy=true] + ::protozero::CopyablePtr system_info_config_; ::protozero::CopyablePtr chrome_config_; ::protozero::CopyablePtr interceptor_config_; + std::string network_packet_trace_config_; // [lazy=true] std::string legacy_config_{}; ::protozero::CopyablePtr for_testing_; @@ -145168,6 +144244,7 @@ class TestConfig; class TestConfig_DummyFields; class InterceptorConfig; class ChromeConfig; +class SystemInfoConfig; class TraceConfig_BufferConfig; enum TraceConfig_LockdownModeOperation : int; enum TraceConfig_CompressionType : int; @@ -145600,6 +144677,7 @@ class TestConfig; class TestConfig_DummyFields; class InterceptorConfig; class ChromeConfig; +class SystemInfoConfig; class TraceConfig_BufferConfig; enum TraceConfig_LockdownModeOperation : int; enum TraceConfig_CompressionType : int; @@ -145681,6 +144759,7 @@ class PERFETTO_EXPORT_COMPONENT TraceConfig : public ::protozero::CppMessageObj kDataSourcesFieldNumber = 2, kBuiltinDataSourcesFieldNumber = 20, kDurationMsFieldNumber = 3, + kPreferSuspendClockForDurationFieldNumber = 36, kEnableExtraGuardrailsFieldNumber = 4, kLockdownModeFieldNumber = 5, kProducersFieldNumber = 6, @@ -145745,6 +144824,10 @@ class PERFETTO_EXPORT_COMPONENT TraceConfig : public ::protozero::CppMessageObj uint32_t duration_ms() const { return duration_ms_; } void set_duration_ms(uint32_t value) { duration_ms_ = value; _has_field_.set(3); } + bool has_prefer_suspend_clock_for_duration() const { return _has_field_[36]; } + bool prefer_suspend_clock_for_duration() const { return prefer_suspend_clock_for_duration_; } + void set_prefer_suspend_clock_for_duration(bool value) { prefer_suspend_clock_for_duration_ = value; _has_field_.set(36); } + bool has_enable_extra_guardrails() const { return _has_field_[4]; } bool enable_extra_guardrails() const { return enable_extra_guardrails_; } void set_enable_extra_guardrails(bool value) { enable_extra_guardrails_ = value; _has_field_.set(4); } @@ -145867,6 +144950,7 @@ class PERFETTO_EXPORT_COMPONENT TraceConfig : public ::protozero::CppMessageObj std::vector data_sources_; ::protozero::CopyablePtr builtin_data_sources_; uint32_t duration_ms_{}; + bool prefer_suspend_clock_for_duration_{}; bool enable_extra_guardrails_{}; TraceConfig_LockdownModeOperation lockdown_mode_{}; std::vector producers_; @@ -145900,7 +144984,7 @@ class PERFETTO_EXPORT_COMPONENT TraceConfig : public ::protozero::CppMessageObj // with future versions of .proto files. std::string unknown_fields_; - std::bitset<36> _has_field_{}; + std::bitset<37> _has_field_{}; }; @@ -146247,6 +145331,7 @@ class PERFETTO_EXPORT_COMPONENT TraceConfig_GuardrailOverrides : public ::protoz public: enum FieldNumbers { kMaxUploadPerDayBytesFieldNumber = 1, + kMaxTracingBufferSizeKbFieldNumber = 2, }; TraceConfig_GuardrailOverrides(); @@ -146267,14 +145352,19 @@ class PERFETTO_EXPORT_COMPONENT TraceConfig_GuardrailOverrides : public ::protoz uint64_t max_upload_per_day_bytes() const { return max_upload_per_day_bytes_; } void set_max_upload_per_day_bytes(uint64_t value) { max_upload_per_day_bytes_ = value; _has_field_.set(1); } + bool has_max_tracing_buffer_size_kb() const { return _has_field_[2]; } + uint32_t max_tracing_buffer_size_kb() const { return max_tracing_buffer_size_kb_; } + void set_max_tracing_buffer_size_kb(uint32_t value) { max_tracing_buffer_size_kb_ = value; _has_field_.set(2); } + private: uint64_t max_upload_per_day_bytes_{}; + uint32_t max_tracing_buffer_size_kb_{}; // Allows to preserve unknown protobuf fields for compatibility // with future versions of .proto files. std::string unknown_fields_; - std::bitset<2> _has_field_{}; + std::bitset<3> _has_field_{}; }; @@ -146388,6 +145478,7 @@ class PERFETTO_EXPORT_COMPONENT TraceConfig_BuiltinDataSource : public ::protoze kPrimaryTraceClockFieldNumber = 5, kSnapshotIntervalMsFieldNumber = 6, kPreferSuspendClockForSnapshotFieldNumber = 7, + kDisableChunkUsageHistogramsFieldNumber = 8, }; TraceConfig_BuiltinDataSource(); @@ -146432,6 +145523,10 @@ class PERFETTO_EXPORT_COMPONENT TraceConfig_BuiltinDataSource : public ::protoze bool prefer_suspend_clock_for_snapshot() const { return prefer_suspend_clock_for_snapshot_; } void set_prefer_suspend_clock_for_snapshot(bool value) { prefer_suspend_clock_for_snapshot_ = value; _has_field_.set(7); } + bool has_disable_chunk_usage_histograms() const { return _has_field_[8]; } + bool disable_chunk_usage_histograms() const { return disable_chunk_usage_histograms_; } + void set_disable_chunk_usage_histograms(bool value) { disable_chunk_usage_histograms_ = value; _has_field_.set(8); } + private: bool disable_clock_snapshotting_{}; bool disable_trace_config_{}; @@ -146440,12 +145535,13 @@ class PERFETTO_EXPORT_COMPONENT TraceConfig_BuiltinDataSource : public ::protoze BuiltinClock primary_trace_clock_{}; uint32_t snapshot_interval_ms_{}; bool prefer_suspend_clock_for_snapshot_{}; + bool disable_chunk_usage_histograms_{}; // Allows to preserve unknown protobuf fields for compatibility // with future versions of .proto files. std::string unknown_fields_; - std::bitset<8> _has_field_{}; + std::bitset<9> _has_field_{}; }; @@ -146571,6 +145667,8 @@ class PERFETTO_EXPORT_COMPONENT TraceConfig_BufferConfig : public ::protozero::C namespace perfetto { namespace protos { namespace gen { +class CloneSessionResponse; +class CloneSessionRequest; class SaveTraceForBugreportResponse; class SaveTraceForBugreportRequest; class QueryCapabilitiesResponse; @@ -146590,6 +145688,7 @@ class ObserveEventsRequest; class GetTraceStatsResponse; class TraceStats; class TraceStats_FilterStats; +class TraceStats_WriterStats; class TraceStats_BufferStats; class GetTraceStatsRequest; class AttachResponse; @@ -146611,6 +145710,7 @@ class TestConfig; class TestConfig_DummyFields; class InterceptorConfig; class ChromeConfig; +class SystemInfoConfig; class TraceConfig_BufferConfig; class AttachRequest; class DetachResponse; @@ -146653,6 +145753,82 @@ namespace perfetto { namespace protos { namespace gen { +class PERFETTO_EXPORT_COMPONENT CloneSessionResponse : public ::protozero::CppMessageObj { + public: + enum FieldNumbers { + kSuccessFieldNumber = 1, + kErrorFieldNumber = 2, + }; + + CloneSessionResponse(); + ~CloneSessionResponse() override; + CloneSessionResponse(CloneSessionResponse&&) noexcept; + CloneSessionResponse& operator=(CloneSessionResponse&&); + CloneSessionResponse(const CloneSessionResponse&); + CloneSessionResponse& operator=(const CloneSessionResponse&); + bool operator==(const CloneSessionResponse&) const; + bool operator!=(const CloneSessionResponse& other) const { return !(*this == other); } + + bool ParseFromArray(const void*, size_t) override; + std::string SerializeAsString() const override; + std::vector SerializeAsArray() const override; + void Serialize(::protozero::Message*) const; + + bool has_success() const { return _has_field_[1]; } + bool success() const { return success_; } + void set_success(bool value) { success_ = value; _has_field_.set(1); } + + bool has_error() const { return _has_field_[2]; } + const std::string& error() const { return error_; } + void set_error(const std::string& value) { error_ = value; _has_field_.set(2); } + + private: + bool success_{}; + std::string error_{}; + + // Allows to preserve unknown protobuf fields for compatibility + // with future versions of .proto files. + std::string unknown_fields_; + + std::bitset<3> _has_field_{}; +}; + + +class PERFETTO_EXPORT_COMPONENT CloneSessionRequest : public ::protozero::CppMessageObj { + public: + enum FieldNumbers { + kSessionIdFieldNumber = 1, + }; + + CloneSessionRequest(); + ~CloneSessionRequest() override; + CloneSessionRequest(CloneSessionRequest&&) noexcept; + CloneSessionRequest& operator=(CloneSessionRequest&&); + CloneSessionRequest(const CloneSessionRequest&); + CloneSessionRequest& operator=(const CloneSessionRequest&); + bool operator==(const CloneSessionRequest&) const; + bool operator!=(const CloneSessionRequest& other) const { return !(*this == other); } + + bool ParseFromArray(const void*, size_t) override; + std::string SerializeAsString() const override; + std::vector SerializeAsArray() const override; + void Serialize(::protozero::Message*) const; + + bool has_session_id() const { return _has_field_[1]; } + uint64_t session_id() const { return session_id_; } + void set_session_id(uint64_t value) { session_id_ = value; _has_field_.set(1); } + + private: + uint64_t session_id_{}; + + // Allows to preserve unknown protobuf fields for compatibility + // with future versions of .proto files. + std::string unknown_fields_; + + std::bitset<2> _has_field_{}; +}; + + class PERFETTO_EXPORT_COMPONENT SaveTraceForBugreportResponse : public ::protozero::CppMessageObj { public: enum FieldNumbers { @@ -147658,6 +146834,7 @@ class TestConfig; class TestConfig_DummyFields; class InterceptorConfig; class ChromeConfig; +class SystemInfoConfig; class GetAsyncCommandResponse_SetupDataSource; class GetAsyncCommandResponse_SetupTracing; class GetAsyncCommandRequest; @@ -149736,6 +148913,159 @@ struct FieldWriter { } // namespace protozero #endif // INCLUDE_PERFETTO_PROTOZERO_FIELD_WRITER_H_ +// gen_amalgamated begin header: include/perfetto/protozero/gen_field_helpers.h +/* + * Copyright (C) 2023 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef INCLUDE_PERFETTO_PROTOZERO_GEN_FIELD_HELPERS_H_ +#define INCLUDE_PERFETTO_PROTOZERO_GEN_FIELD_HELPERS_H_ + +// gen_amalgamated expanded: #include "perfetto/protozero/message.h" +// gen_amalgamated expanded: #include "perfetto/protozero/proto_decoder.h" +// gen_amalgamated expanded: #include "perfetto/protozero/proto_utils.h" +// gen_amalgamated expanded: #include "perfetto/protozero/scattered_heap_buffer.h" + +namespace protozero { +namespace internal { +namespace gen_helpers { + +// This file implements some helpers used by the protobuf generated code in the +// .gen.cc files. +// +// The .gen.cc generated protobuf implementation (as opposed to the .pbzero.h +// implementation) is not zero-copy and is not supposed to be used in fast +// paths, so most of these helpers are designed to reduce binary size. + +void DeserializeString(const protozero::Field& field, std::string* dst); + +// Read packed repeated elements (serialized as `wire_type`) from `field` into +// the `*dst` vector. Returns false if some bytes of `field` could not be +// interpreted correctly as `wire_type`. +template +bool DeserializePackedRepeated(const protozero::Field& field, + std::vector* dst) { + bool parse_error = false; + for (::protozero::PackedRepeatedFieldIterator rep( + field.data(), field.size(), &parse_error); + rep; ++rep) { + dst->emplace_back(*rep); + } + return !parse_error; +} + +extern template bool +DeserializePackedRepeated( + const protozero::Field& field, + std::vector* dst); + +extern template bool +DeserializePackedRepeated( + const protozero::Field& field, + std::vector* dst); + +extern template bool +DeserializePackedRepeated( + const protozero::Field& field, + std::vector* dst); + +extern template bool +DeserializePackedRepeated( + const protozero::Field& field, + std::vector* dst); + +// Serializers for different type of fields + +void SerializeTinyVarInt(uint32_t field_id, bool value, Message* msg); + +template +void SerializeExtendedVarInt(uint32_t field_id, T value, Message* msg) { + msg->AppendVarInt(field_id, value); +} + +extern template void SerializeExtendedVarInt(uint32_t field_id, + uint64_t value, + Message* msg); + +extern template void SerializeExtendedVarInt(uint32_t field_id, + uint32_t value, + Message* msg); + +template +void SerializeVarInt(uint32_t field_id, T value, Message* msg) { + SerializeExtendedVarInt( + field_id, proto_utils::ExtendValueForVarIntSerialization(value), msg); +} + +template +void SerializeSignedVarInt(uint32_t field_id, T value, Message* msg) { + SerializeVarInt(field_id, proto_utils::ZigZagEncode(value), msg); +} + +template +void SerializeFixed(uint32_t field_id, T value, Message* msg) { + msg->AppendFixed(field_id, value); +} + +extern template void SerializeFixed(uint32_t field_id, + double value, + Message* msg); + +extern template void SerializeFixed(uint32_t field_id, + float value, + Message* msg); + +extern template void SerializeFixed(uint32_t field_id, + uint64_t value, + Message* msg); + +extern template void SerializeFixed(uint32_t field_id, + int64_t value, + Message* msg); + +extern template void SerializeFixed(uint32_t field_id, + uint32_t value, + Message* msg); + +extern template void SerializeFixed(uint32_t field_id, + int32_t value, + Message* msg); + +void SerializeString(uint32_t field_id, const std::string& value, Message* msg); + +void SerializeUnknownFields(const std::string& unknown_fields, Message* msg); + +// Wrapper around HeapBuffered that avoids inlining. +class MessageSerializer { + public: + MessageSerializer(); + ~MessageSerializer(); + + Message* get() { return msg_.get(); } + std::vector SerializeAsArray(); + std::string SerializeAsString(); + + private: + HeapBuffered msg_; +}; + +} // namespace gen_helpers +} // namespace internal +} // namespace protozero + +#endif // INCLUDE_PERFETTO_PROTOZERO_GEN_FIELD_HELPERS_H_ // gen_amalgamated begin header: include/perfetto/protozero/message.h /* * Copyright (C) 2017 The Android Open Source Project @@ -150009,7 +149339,7 @@ class PERFETTO_EXPORT_COMPONENT Message { #include -#include +#include #include // gen_amalgamated expanded: #include "perfetto/base/export.h" @@ -150044,8 +149374,8 @@ class PERFETTO_EXPORT_COMPONENT MessageArena { // Deletes the last message allocated. The |msg| argument is used only for // DCHECKs, it MUST be the pointer obtained by the last NewMessage() call. void DeleteLastMessage(Message* msg) { - PERFETTO_DCHECK(!blocks_.empty() && blocks_.back().entries > 0); - PERFETTO_DCHECK(&blocks_.back().storage[blocks_.back().entries - 1] == + PERFETTO_DCHECK(!blocks_.empty() && blocks_.front().entries > 0); + PERFETTO_DCHECK(&blocks_.front().storage[blocks_.front().entries - 1] == static_cast(msg)); DeleteLastMessageInternal(); } @@ -150057,7 +149387,7 @@ class PERFETTO_EXPORT_COMPONENT MessageArena { void Reset() { PERFETTO_DCHECK(!blocks_.empty()); blocks_.resize(1); - auto& block = blocks_.back(); + auto& block = blocks_.front(); block.entries = 0; PERFETTO_ASAN_POISON(block.storage, sizeof(block.storage)); } @@ -150077,7 +149407,7 @@ class PERFETTO_EXPORT_COMPONENT MessageArena { // blocks are used to hand out pointers and must not be moved. Hence why // std::list rather than std::vector. - std::list blocks_; + std::forward_list blocks_; }; } // namespace protozero @@ -150107,6 +149437,7 @@ class PERFETTO_EXPORT_COMPONENT MessageArena { // gen_amalgamated expanded: #include "perfetto/base/export.h" // gen_amalgamated expanded: #include "perfetto/protozero/message.h" +// gen_amalgamated expanded: #include "perfetto/protozero/scattered_stream_writer.h" namespace protozero { @@ -150125,11 +149456,30 @@ class Message; class PERFETTO_EXPORT_COMPONENT MessageHandleBase { public: - ~MessageHandleBase(); + ~MessageHandleBase() { + if (message_) { +#if PERFETTO_DCHECK_IS_ON() + PERFETTO_DCHECK(generation_ == message_->generation_); +#endif + FinalizeMessage(); + } + } // Move-only type. - MessageHandleBase(MessageHandleBase&&) noexcept; - MessageHandleBase& operator=(MessageHandleBase&&); + MessageHandleBase(MessageHandleBase&& other) noexcept { + Move(std::move(other)); + } + + MessageHandleBase& operator=(MessageHandleBase&& other) noexcept { + // If the current handle was pointing to a message and is being reset to a + // new one, finalize the old message. However, if the other message is the + // same as the one we point to, don't finalize. + if (message_ && message_ != other.message_) + FinalizeMessage(); + Move(std::move(other)); + return *this; + } + explicit operator bool() const { #if PERFETTO_DCHECK_IS_ON() PERFETTO_DCHECK(!message_ || generation_ == message_->generation_); @@ -150137,8 +149487,29 @@ class PERFETTO_EXPORT_COMPONENT MessageHandleBase { return !!message_; } + // Returns a (non-owned, it should not be deleted) pointer to the + // ScatteredStreamWriter used to write the message data. The Message becomes + // unusable after this point. + // + // The caller can now write directly, without using protozero::Message. + ScatteredStreamWriter* TakeStreamWriter() { + ScatteredStreamWriter* stream_writer = message_->stream_writer_; +#if PERFETTO_DCHECK_IS_ON() + message_->set_handle(nullptr); +#endif + message_ = nullptr; + return stream_writer; + } + protected: - explicit MessageHandleBase(Message* = nullptr); + explicit MessageHandleBase(Message* message = nullptr) : message_(message) { +#if PERFETTO_DCHECK_IS_ON() + generation_ = message_ ? message->generation_ : 0; + if (message_) + message_->set_handle(this); +#endif + } + Message* operator->() const { #if PERFETTO_DCHECK_IS_ON() PERFETTO_DCHECK(!message_ || generation_ == message_->generation_); @@ -150158,7 +149529,16 @@ class PERFETTO_EXPORT_COMPONENT MessageHandleBase { message_ = nullptr; } - void Move(MessageHandleBase&&); + void Move(MessageHandleBase&& other) { + message_ = other.message_; + other.message_ = nullptr; +#if PERFETTO_DCHECK_IS_ON() + if (message_) { + generation_ = message_->generation_; + message_->set_handle(this); + } +#endif + } void FinalizeMessage() { message_->Finalize(); } @@ -150567,7 +149947,7 @@ class PackedRepeatedFieldIterator { // points at the start of the next element to be decoded. // |read_ptr_| might be null if the backing proto field isn't set. const uint8_t* read_ptr_; - CppType curr_value_ = 0; + CppType curr_value_ = {}; // Set to false once we've exhausted the iterator, or encountered an error. bool curr_value_valid_ = true; @@ -150802,6 +150182,16 @@ class TypedProtoDecoder : public TypedProtoDecoderBase { #include // gen_amalgamated expanded: #include "perfetto/base/logging.h" +// gen_amalgamated expanded: #include "perfetto/public/pb_utils.h" + +// Helper macro for the constexpr functions containing +// the switch statement: if C++14 is supported, this macro +// resolves to `constexpr` and just `inline` otherwise. +#if __cpp_constexpr >= 201304 +#define PERFETTO_PROTOZERO_CONSTEXPR14_OR_INLINE constexpr +#else +#define PERFETTO_PROTOZERO_CONSTEXPR14_OR_INLINE inline +#endif namespace protozero { namespace proto_utils { @@ -150948,7 +150338,9 @@ inline typename std::make_signed::type ZigZagDecode(T value) { } template -inline uint8_t* WriteVarInt(T value, uint8_t* target) { +auto ExtendValueForVarIntSerialization(T value) -> typename std::make_unsigned< + typename std::conditional::value, T, int64_t>::type>:: + type { // If value is <= 0 we must first sign extend to int64_t (see [1]). // Finally we always cast to an unsigned value to to avoid arithmetic // (sign expanding) shifts in the while loop. @@ -150968,6 +150360,13 @@ inline uint8_t* WriteVarInt(T value, uint8_t* target) { MaybeExtendedType extended_value = static_cast(value); UnsignedType unsigned_value = static_cast(extended_value); + return unsigned_value; +} + +template +inline uint8_t* WriteVarInt(T value, uint8_t* target) { + auto unsigned_value = ExtendValueForVarIntSerialization(value); + while (unsigned_value >= 0x80) { *target++ = static_cast(unsigned_value) | 0x80; unsigned_value >>= 7; @@ -151014,21 +150413,7 @@ void StaticAssertSingleBytePreamble() { inline const uint8_t* ParseVarInt(const uint8_t* start, const uint8_t* end, uint64_t* out_value) { - const uint8_t* pos = start; - uint64_t value = 0; - for (uint32_t shift = 0; pos < end && shift < 64u; shift += 7) { - // Cache *pos into |cur_byte| to prevent that the compiler dereferences the - // pointer twice (here and in the if() below) due to char* aliasing rules. - uint8_t cur_byte = *pos++; - value |= static_cast(cur_byte & 0x7f) << shift; - if ((cur_byte & 0x80) == 0) { - // In valid cases we get here. - *out_value = value; - return pos; - } - } - *out_value = 0; - return start; + return PerfettoPbParseVarInt(start, end, out_value); } enum class RepetitionType { @@ -151063,21 +150448,6 @@ struct FieldMetadata : public FieldMetadataBase { using message_type = MessageType; }; -namespace internal { - -// Ideally we would create variables of FieldMetadata<...> type directly, -// but before C++17's support for constexpr inline variables arrive, we have to -// actually use pointers to inline functions instead to avoid having to define -// symbols in *.pbzero.cc files. -// -// Note: protozero bindings will generate Message::kFieldName variable and which -// can then be passed to TRACE_EVENT macro for inline writing of typed messages. -// The fact that the former can be passed to the latter is a part of the stable -// API, while the particular type is not and users should not rely on it. -template -using FieldMetadataHelper = T (*)(void); - -} // namespace internal } // namespace proto_utils } // namespace protozero @@ -151417,8 +150787,23 @@ class PERFETTO_EXPORT_COMPONENT ScatteredStreamWriter { public: class PERFETTO_EXPORT_COMPONENT Delegate { public: + static constexpr size_t kPatchSize = 4; virtual ~Delegate(); + + // Returns a new chunk for writing. virtual ContiguousMemoryRange GetNewBuffer() = 0; + + // Signals the delegate that the location pointed by `to_patch` (which must + // be in the last chunk returned by GetNewBuffer()), kPatchSize long, needs + // to be updated later (after potentially multiple GetNewBuffer calls). + // + // The caller must write to the returned location later. If the returned + // pointer is nullptr, the caller should not write anything. + // + // The implementation considers the patch ready to apply when the caller + // writes the first byte a value that's different than 0 (the + // implementation periodically checks for this). + virtual uint8_t* AnnotatePatch(uint8_t* patch_addr); }; explicit ScatteredStreamWriter(Delegate* delegate); @@ -151442,7 +150827,12 @@ class PERFETTO_EXPORT_COMPONENT ScatteredStreamWriter { write_ptr_ = end; } - inline void WriteBytes(const uint8_t* src, size_t size) { + inline void WriteBytes(const uint8_t* src, + size_t size) PERFETTO_NO_SANITIZE_UNDEFINED { + // If the stream writer hasn't been initialized, constructing the end + // pointer below invokes undefined behavior because `write_ptr_` is null. + // Since this function is on the hot path, we suppress the warning instead + // of adding a conditional branch. uint8_t* const end = write_ptr_ + size; if (PERFETTO_LIKELY(end <= cur_range_.end)) return WriteBytesUnsafe(src, size); @@ -151470,25 +150860,39 @@ class PERFETTO_EXPORT_COMPONENT ScatteredStreamWriter { // Subsequent WriteByte(s) will write into |range|. void Reset(ContiguousMemoryRange range); + // Commits the current chunk and gets a new chunk from the delegate. + void Extend(); + // Number of contiguous free bytes in |cur_range_| that can be written without // requesting a new buffer. size_t bytes_available() const { return static_cast(cur_range_.end - write_ptr_); } + ContiguousMemoryRange cur_range() const { return cur_range_; } + uint8_t* write_ptr() const { return write_ptr_; } + void set_write_ptr(uint8_t* write_ptr) { + assert(cur_range_.begin <= write_ptr && write_ptr <= cur_range_.end); + write_ptr_ = write_ptr; + } + uint64_t written() const { return written_previously_ + static_cast(write_ptr_ - cur_range_.begin); } + uint64_t written_previously() const { return written_previously_; } + + uint8_t* AnnotatePatch(uint8_t* patch_addr) { + return delegate_->AnnotatePatch(patch_addr); + } + private: ScatteredStreamWriter(const ScatteredStreamWriter&) = delete; ScatteredStreamWriter& operator=(const ScatteredStreamWriter&) = delete; - void Extend(); - Delegate* const delegate_; ContiguousMemoryRange cur_range_; uint8_t* write_ptr_; diff --git a/projects/rocprofiler/src/core/hsa/hsa_support.cpp b/projects/rocprofiler/src/core/hsa/hsa_support.cpp index 8a18ffbf6e..73515be7ac 100644 --- a/projects/rocprofiler/src/core/hsa/hsa_support.cpp +++ b/projects/rocprofiler/src/core/hsa/hsa_support.cpp @@ -42,6 +42,7 @@ #include #include "core/hardware/hsa_info.h" +#include "core/hsa/hsa_common.h" #include "src/core/session/tracer/src/correlation_id.h" #include "src/core/session/tracer/src/exception.h" #include "src/core/session/tracer/src/roctracer.h" @@ -145,6 +146,7 @@ class Tracker { void (*handler)(const entry_t*); union { struct { + hsa_agent_t dst_agent; } copy; struct { const char* name; @@ -168,7 +170,7 @@ class Tracker { // Creating a proxy signal status = rocprofiler::hsa_support::GetCoreApiTable().hsa_signal_create_fn(1, 0, NULL, - &(entry->signal)); + &(entry->signal)); if (status != HSA_STATUS_SUCCESS) rocprofiler::fatal("hsa_signal_create failed"); status = rocprofiler::hsa_support::GetAmdExtTable().hsa_amd_signal_async_handler_fn( entry->signal, HSA_SIGNAL_CONDITION_LT, 1, Handler, entry); @@ -332,7 +334,8 @@ hsa_status_t MemoryPoolAllocateIntercept(hsa_amd_memory_pool_t pool, size_t size return HSA_STATUS_SUCCESS; auto it = agent_info_map.find(agent.handle); - if (it == agent_info_map.end()) rocprofiler::fatal("agent was not found in the agent_info map"); + if (it == agent_info_map.end()) + rocprofiler::fatal("agent was not found in the agent_info map"); hsa_evt_data_t data{}; data.device.type = it->second.type; @@ -343,7 +346,8 @@ hsa_status_t MemoryPoolAllocateIntercept(hsa_amd_memory_pool_t pool, size_t size ReportActivity(ACTIVITY_DOMAIN_HSA_EVT, HSA_EVT_ID_DEVICE, &data); return HSA_STATUS_SUCCESS; }; - rocprofiler::hsa_support::GetCoreApiTable().hsa_iterate_agents_fn(agent_callback, &callback_data); + rocprofiler::hsa_support::GetCoreApiTable().hsa_iterate_agents_fn(agent_callback, + &callback_data); } return HSA_STATUS_SUCCESS; @@ -374,7 +378,8 @@ hsa_status_t AgentsAllowAccessIntercept(uint32_t num_agents, const hsa_agent_t* while (num_agents--) { hsa_agent_t agent = *agents++; auto it = agent_info_map.find(agent.handle); - if (it == agent_info_map.end()) rocprofiler::fatal("agent was not found in the agent_info map"); + if (it == agent_info_map.end()) + rocprofiler::fatal("agent was not found in the agent_info map"); hsa_evt_data_t data{}; data.device.type = it->second.type; @@ -508,7 +513,11 @@ void MemoryASyncCopyHandler(const Tracker::entry_t* entry) { record.op = HSA_OP_ID_COPY; record.begin_ns = entry->begin; record.end_ns = entry->end; - record.device_id = 0; + record.device_id = (entry->agent.handle > 0) + ? rocprofiler::hsa_support::GetAgentInfo(entry->agent.handle).getIndex() + : (entry->copy.dst_agent.handle > 0) + ? rocprofiler::hsa_support::GetAgentInfo(entry->copy.dst_agent.handle).getIndex() + : 0; record.correlation_id = entry->correlation_id; ReportActivity(ACTIVITY_DOMAIN_HSA_OPS, HSA_OP_ID_COPY, &record); } @@ -533,6 +542,8 @@ hsa_status_t MemoryASyncCopyIntercept(void* dst, hsa_agent_t dst_agent, const vo Tracker::entry_t* entry = new Tracker::entry_t(); entry->handler = MemoryASyncCopyHandler; entry->correlation_id = CorrelationId(); + entry->agent = src_agent; + entry->copy.dst_agent = dst_agent; Tracker::Enable(Tracker::COPY_ENTRY_TYPE, hsa_agent_t{}, completion_signal, entry); status = rocprofiler::hsa_support::GetAmdExtTable().hsa_amd_memory_async_copy_fn( @@ -566,6 +577,7 @@ hsa_status_t MemoryASyncCopyRectIntercept(const hsa_pitched_ptr_t* dst, Tracker::entry_t* entry = new Tracker::entry_t(); entry->handler = MemoryASyncCopyHandler; entry->correlation_id = CorrelationId(); + entry->agent = copy_agent; Tracker::Enable(Tracker::COPY_ENTRY_TYPE, hsa_agent_t{}, completion_signal, entry); status = rocprofiler::hsa_support::GetAmdExtTable().hsa_amd_memory_async_copy_rect_fn( @@ -596,6 +608,8 @@ hsa_status_t MemoryASyncCopyOnEngineIntercept( Tracker::entry_t* entry = new Tracker::entry_t(); entry->handler = MemoryASyncCopyHandler; entry->correlation_id = CorrelationId(); + entry->agent = src_agent; + entry->copy.dst_agent = dst_agent; Tracker::Enable(Tracker::COPY_ENTRY_TYPE, hsa_agent_t{}, completion_signal, entry); status = saved_amd_ext_api.hsa_amd_memory_async_copy_on_engine_fn( @@ -846,6 +860,7 @@ void Initialize(HsaApiTable* table) { cpu_agent = agent; rocprofiler::queue::InitializePools(cpu_agent, &agent_info); uint32_t cpu_numa_node_id; + // Change into KFD GPU ID if (GetCoreApiTable().hsa_agent_get_info_fn( agent, HSA_AGENT_INFO_NODE, &cpu_numa_node_id) != HSA_STATUS_SUCCESS) rocprofiler::fatal("hsa_agent_get_info(HSA_AGENT_INFO_NODE) failed");