File tree Expand file tree Collapse file tree 7 files changed +10
-11
lines changed
ReactCommon/reactperflogger/reactperflogger
ReactCxxPlatform/react/profiling Expand file tree Collapse file tree 7 files changed +10
-11
lines changed Original file line number Diff line number Diff line change @@ -27,8 +27,6 @@ const std::string JS_SAMPLING_TRACK = "JS Sampling";
2727
2828const int SAMPLING_HZ = 1000 ;
2929
30- using perfetto::TrackEvent;
31-
3230#if defined(__ANDROID__)
3331std::string getApplicationId () {
3432 pid_t pid = getpid ();
Original file line number Diff line number Diff line change @@ -23,8 +23,6 @@ const int SAMPLING_HZ = 100;
2323
2424int64_t hermesDeltaTime = 0 ;
2525
26- using perfetto::TrackEvent;
27-
2826uint64_t hermesToPerfettoTime (int64_t hermesTs) {
2927 if (hermesDeltaTime == 0 ) {
3028 hermesDeltaTime = TrackEvent::GetTraceTimeNs () -
@@ -113,7 +111,7 @@ void HermesPerfettoDataSource::OnStart(const StartArgs&) {
113111 " react-native" ,
114112 perfetto::DynamicString{" Profiling Started" },
115113 getPerfettoWebPerfTrackSync (" JS Sampling" ),
116- perfetto:: TrackEvent::GetTraceTimeNs ());
114+ TrackEvent::GetTraceTimeNs ());
117115}
118116
119117void HermesPerfettoDataSource::OnFlush (const FlushArgs&) {
Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ void initializePerfetto() {
2929 args.backends |= perfetto::kSystemBackend ;
3030 args.use_monotonic_clock = true ;
3131 perfetto::Tracing::Initialize (args);
32- perfetto:: TrackEvent::Register ();
32+ TrackEvent::Register ();
3333 });
3434
3535 HermesPerfettoDataSource::RegisterDataSource ();
@@ -42,7 +42,7 @@ static perfetto::Track createTrack(const std::string& trackName) {
4242 auto track = perfetto::Track (trackId++);
4343 auto desc = track.Serialize ();
4444 desc.set_name (trackName);
45- perfetto:: TrackEvent::SetTrackDescriptor (track, desc);
45+ TrackEvent::SetTrackDescriptor (track, desc);
4646 return track;
4747}
4848
Original file line number Diff line number Diff line change 99
1010#include " ReactPerfettoCategories.h"
1111
12- PERFETTO_TRACK_EVENT_STATIC_STORAGE ();
12+ PERFETTO_TRACK_EVENT_STATIC_STORAGE_IN_NAMESPACE (facebook::react);
13+ PERFETTO_USE_CATEGORIES_FROM_NAMESPACE (facebook::react);
1314
1415#endif
Original file line number Diff line number Diff line change 1111
1212#include <perfetto.h>
1313
14- PERFETTO_DEFINE_CATEGORIES (
14+ PERFETTO_DEFINE_CATEGORIES_IN_NAMESPACE (
15+ facebook ::react ,
1516 perfetto ::Category ("react-native" )
1617 .SetDescription ("User timing events from React Native" ));
1718
Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ void initializePerfetto() {
2323#endif
2424 args.use_monotonic_clock = true ;
2525 perfetto::Tracing::Initialize (args);
26- perfetto ::TrackEvent::Register ();
26+ facebook::react ::TrackEvent::Register ();
2727 });
2828}
2929
Original file line number Diff line number Diff line change 1818#if WITH_PERFETTO
1919#include < perfetto.h>
2020
21- PERFETTO_DEFINE_CATEGORIES (
21+ PERFETTO_DEFINE_CATEGORIES_IN_NAMESPACE (
22+ facebook::react,
2223 perfetto::Category (" rncxx" ).SetDescription(" Events from RN/Granite" ));
2324
2425void initializePerfetto ();
You can’t perform that action at this time.
0 commit comments