| From 90912f0e119f7b067e0e4a3d1d540225df8936e6 Mon Sep 17 00:00:00 2001 |
| From: Chia-I Wu <olvaffe@gmail.com> |
| Date: Fri, 12 Aug 2022 22:02:34 -0700 |
| Subject: [PATCH] fix build issues with v28.0 sdk |
| |
| --- |
| src/percetto.cc | 9 ++++----- |
| 1 file changed, 4 insertions(+), 5 deletions(-) |
| |
| diff --git a/src/percetto.cc b/src/percetto.cc |
| index 39237b0..063329a 100644 |
| --- a/src/percetto.cc |
| +++ b/src/percetto.cc |
| @@ -56,7 +56,6 @@ namespace { |
| using perfetto::protos::gen::TrackDescriptor; |
| using perfetto::protos::gen::TrackEventConfig; |
| using perfetto::protos::pbzero::BuiltinClock; |
| -using perfetto::protos::pbzero::CounterDescriptor_Unit_UNIT_COUNT; |
| using perfetto::protos::pbzero::DataSourceDescriptor; |
| using perfetto::protos::pbzero::TracePacket; |
| using perfetto::protos::pbzero::TrackEvent; |
| @@ -399,10 +398,10 @@ class PercettoDataSource |
| AddCategoryGroup(event, category); |
| } |
| |
| - if (type == TrackEvent::Type::TrackEvent_Type_TYPE_COUNTER) { |
| + if (type == TrackEvent::TYPE_COUNTER) { |
| event->set_counter_value(extra); |
| } else { |
| - if (type != TrackEvent::Type::TrackEvent_Type_TYPE_SLICE_END) |
| + if (type != TrackEvent::TYPE_SLICE_END) |
| event->set_name(name, strlen(name)); |
| if (extra != 0) |
| event->add_flow_ids(static_cast<uint64_t>(extra)); |
| @@ -724,7 +723,7 @@ void percetto_event_begin(struct percetto_category* category, |
| uint32_t sessions, |
| const char* name) { |
| PercettoDataSource::TraceTrackEvent( |
| - category, sessions, TrackEvent::Type::TrackEvent_Type_TYPE_SLICE_BEGIN, |
| + category, sessions, TrackEvent::TYPE_SLICE_BEGIN, |
| name, GetTimestampNs(), NULL, 0, NULL); |
| } |
| |
| @@ -732,7 +731,7 @@ extern "C" |
| void percetto_event_end(struct percetto_category* category, |
| uint32_t sessions) { |
| PercettoDataSource::TraceTrackEvent( |
| - category, sessions, TrackEvent::Type::TrackEvent_Type_TYPE_SLICE_END, |
| + category, sessions, TrackEvent::TYPE_SLICE_END, |
| NULL, GetTimestampNs(), NULL, 0, NULL); |
| } |
| |
| -- |
| 2.37.1.595.g718a3a8f04-goog |
| |