Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@
#include <perfetto.h>
#include <unordered_map>

#ifdef __APPLE__
#include <TargetConditionals.h>
#endif

#include "FuseboxPerfettoDataSource.h"
#include "HermesPerfettoDataSource.h"
#include "ReactPerfettoCategories.h"
Expand All @@ -26,7 +30,13 @@ void initializePerfetto() {
// is only used in tracing build, large buffers are okay
// for now.
args.shmem_size_hint_kb = 20 * 1024;
#if defined(__APPLE__) && TARGET_OS_IPHONE
// iOS and the other Apple device platforms have no system tracing
// service.
args.backends |= perfetto::kInProcessBackend;
#else
args.backends |= perfetto::kSystemBackend;
#endif
args.use_monotonic_clock = true;
perfetto::Tracing::Initialize(args);
TrackEvent::Register();
Expand Down
Loading