Stop generating data-source specific C++ classes in tracing/core

We generate C++ classes from proto for a bunch of core classes
like DataSourceConfig, DataSourceDescriptor etc. This is to
prevent spreading protobuf dependencies all over the places.
However, at some point in the past we started adding data-source
specific sub-messages to DataSourceConfig and doing to required
to generate C++ classes for things that don't really belong to
tracing/core (e.g. FtraceConfig, SysStatsConfig, etc).

This CL introduces a decoupling using a proto annotation [lazy=true].
When fields are annotated as such, the generated C++ stub exposes
the field as a raw byte array. This allows to break the dependency
between tracing/core and those configs and pushes the decoding
responsibility to the actual data sources.

This is a step towards getting rid of libprotobuf dependencies
in tracing/core for the client library.
Note that at the moment the generated classes still depend on
libprotobuf for the FromProto / ToProto conversions.

Bug: 132880619
Change-Id: I29751565277e7cb60928571e3eaf513477cf9968
diff --git a/src/traced/probes/probes_producer.cc b/src/traced/probes/probes_producer.cc
index 202fadc..8bb7f7b 100644
--- a/src/traced/probes/probes_producer.cc
+++ b/src/traced/probes/probes_producer.cc
@@ -29,12 +29,12 @@
 #include "perfetto/traced/traced.h"
 #include "perfetto/tracing/core/data_source_config.h"
 #include "perfetto/tracing/core/data_source_descriptor.h"
-#include "perfetto/tracing/core/ftrace_config.h"
 #include "perfetto/tracing/core/trace_config.h"
 #include "perfetto/tracing/core/trace_packet.h"
 #include "perfetto/tracing/ipc/producer_ipc_client.h"
 #include "src/traced/probes/android_log/android_log_data_source.h"
 #include "src/traced/probes/filesystem/inode_file_data_source.h"
+#include "src/traced/probes/ftrace/ftrace_config.h"
 #include "src/traced/probes/ftrace/ftrace_data_source.h"
 #include "src/traced/probes/packages_list/packages_list_data_source.h"
 #include "src/traced/probes/power/android_power_data_source.h"
@@ -241,8 +241,10 @@
 
   PERFETTO_LOG("Ftrace setup (target_buf=%" PRIu32 ")", config.target_buffer());
   const BufferID buffer_id = static_cast<BufferID>(config.target_buffer());
+  FtraceConfig ftrace_config;
+  ftrace_config.ParseRawProto(config.ftrace_config_raw());
   std::unique_ptr<FtraceDataSource> data_source(new FtraceDataSource(
-      ftrace_->GetWeakPtr(), session_id, config.ftrace_config(),
+      ftrace_->GetWeakPtr(), session_id, std::move(ftrace_config),
       endpoint_->CreateTraceWriter(buffer_id)));
   if (!ftrace_->AddDataSource(data_source.get())) {
     PERFETTO_ELOG(