From 470f378d3cdcbadfd749bc2ebda2d339d23eb9a4 Mon Sep 17 00:00:00 2001 From: Vivek Kale Date: Thu, 5 Sep 2024 08:31:53 -0700 Subject: [PATCH 1/2] perfetto.cc: fix chunk in perfetto.cc --- profiling/perfetto-connector/perfetto/perfetto.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/profiling/perfetto-connector/perfetto/perfetto.cc b/profiling/perfetto-connector/perfetto/perfetto.cc index 335771271..bb779faeb 100644 --- a/profiling/perfetto-connector/perfetto/perfetto.cc +++ b/profiling/perfetto-connector/perfetto/perfetto.cc @@ -49830,7 +49830,7 @@ constexpr uint8_t 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, From b9004c0f6f8e1b6cd79805a75922f1f634a4e691 Mon Sep 17 00:00:00 2001 From: Vivek Kale Date: Thu, 5 Sep 2024 12:06:01 -0700 Subject: [PATCH 2/2] perfetto.h: put in BuiltinClock --- .../perfetto-connector/perfetto/perfetto.h | 34 ++++++------------- 1 file changed, 10 insertions(+), 24 deletions(-) diff --git a/profiling/perfetto-connector/perfetto/perfetto.h b/profiling/perfetto-connector/perfetto/perfetto.h index 689177f9b..41a528675 100644 --- a/profiling/perfetto-connector/perfetto/perfetto.h +++ b/profiling/perfetto-connector/perfetto/perfetto.h @@ -6318,7 +6318,16 @@ enum TraceConfig_LockdownModeOperation : int; enum TraceConfig_CompressionType : int; enum TraceConfig_StatsdLogging : int; enum TraceConfig_TriggerConfig_TriggerMode : int; -enum BuiltinClock : int; +enum BuiltinClock : int { + BUILTIN_CLOCK_UNKNOWN = 0, + BUILTIN_CLOCK_REALTIME = 1, + BUILTIN_CLOCK_REALTIME_COARSE = 2, + BUILTIN_CLOCK_MONOTONIC = 3, + BUILTIN_CLOCK_MONOTONIC_COARSE = 4, + BUILTIN_CLOCK_MONOTONIC_RAW = 5, + BUILTIN_CLOCK_BOOTTIME = 6, + BUILTIN_CLOCK_MAX_ID = 63, +}; enum DataSourceConfig_SessionInitiator : int; enum ChromeConfig_ClientPriority : int; enum TraceConfig_BufferConfig_FillPolicy : int; @@ -19744,34 +19753,11 @@ enum AndroidLogPriority : int { // gen_amalgamated expanded: #include "perfetto/protozero/copyable_ptr.h" // gen_amalgamated expanded: #include "perfetto/base/export.h" -namespace perfetto { -namespace protos { -namespace gen { -enum BuiltinClock : int; -} // namespace perfetto -} // namespace protos -} // namespace gen namespace protozero { class Message; } // namespace protozero -namespace perfetto { -namespace protos { -namespace gen { -enum BuiltinClock : int { - BUILTIN_CLOCK_UNKNOWN = 0, - BUILTIN_CLOCK_REALTIME = 1, - BUILTIN_CLOCK_REALTIME_COARSE = 2, - BUILTIN_CLOCK_MONOTONIC = 3, - BUILTIN_CLOCK_MONOTONIC_COARSE = 4, - BUILTIN_CLOCK_MONOTONIC_RAW = 5, - BUILTIN_CLOCK_BOOTTIME = 6, - BUILTIN_CLOCK_MAX_ID = 63, -}; -} // namespace perfetto -} // namespace protos -} // namespace gen #endif // PERFETTO_PROTOS_PROTOS_PERFETTO_COMMON_BUILTIN_CLOCK_PROTO_CPP_H_ // gen_amalgamated begin header: gen/protos/perfetto/common/commit_data_request.gen.h