Skip to content

Commit 7619a9b

Browse files
coadometa-codesync[bot]
authored andcommitted
Make select jsinspector tracing implementation headers private (#58796)
Summary: Pull Request resolved: #58796 Mark the following tracing headers as private instead of for-frameworks. All of them are implementation details of React Native's tracing infrastructure, and no for-frameworks header includes them: - `EventLoopReporter` is an RAII helper the runtime scheduler uses to report event loop task and microtask phases to the performance tracer. It is only used by `EventLoopReporter.cpp` and `RuntimeScheduler_Modern.cpp`. - `RuntimeSamplingProfileTraceEventSerializer` turns a runtime sampling profile into trace events. It is only used by tracing sources, `TracingAgent.cpp` and its own unit test. - `TraceEventSerializer` serializes trace events to `folly::dynamic`. It is only used by tracing sources and `TracingAgent.cpp`. - `TraceEventGenerator` builds trace events for the performance tracer and the host profile serializer. It is only used by tracing sources and was already not exported in Buck. - `ProfileTreeNode` is an auxiliary tree used to build the profile and deduplicate identical frames. It is only used by `RuntimeSamplingProfileTraceEventSerializer.cpp` and its own unit test. - `Timing.h` defines the tracing clock origin and the conversions from `HighResTimeStamp` and `HighResDuration` to trace event microseconds. It is only used by tracing sources and a tracing unit test. `TracingAgent.h` included `Timing.h` without using it; that include is removed. React Native's own targets define `RN_BUILDING`, so the private guard does not affect them. Changelog: [Internal] Differential Revision: D122780825
1 parent 44ffdba commit 7619a9b

7 files changed

Lines changed: 6 additions & 7 deletions

File tree

‎packages/react-native/ReactCommon/jsinspector-modern/TracingAgent.h‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
#include <React/Timing.h>
1616
#include <jsinspector-modern/cdp/CdpJson.h>
1717
#include <jsinspector-modern/tracing/HostTracingProfile.h>
18-
#include <jsinspector-modern/tracing/Timing.h>
1918

2019
namespace facebook::react::jsinspector_modern {
2120

‎packages/react-native/ReactCommon/jsinspector-modern/tracing/EventLoopReporter.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
#pragma once
99

10-
#include <react/cxxstableapi/FrameworksGuard.h>
10+
#include <react/cxxstableapi/PrivateGuard.h>
1111

1212
#if defined(REACT_NATIVE_DEBUGGER_ENABLED)
1313
#include <React/Timing.h>

‎packages/react-native/ReactCommon/jsinspector-modern/tracing/ProfileTreeNode.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
#pragma once
99

10-
#include <react/cxxstableapi/FrameworksGuard.h>
10+
#include <react/cxxstableapi/PrivateGuard.h>
1111

1212
#include <utility>
1313

‎packages/react-native/ReactCommon/jsinspector-modern/tracing/RuntimeSamplingProfileTraceEventSerializer.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
#pragma once
99

10-
#include <react/cxxstableapi/FrameworksGuard.h>
10+
#include <react/cxxstableapi/PrivateGuard.h>
1111

1212
#include "RuntimeSamplingProfile.h"
1313

‎packages/react-native/ReactCommon/jsinspector-modern/tracing/Timing.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
#pragma once
99

10-
#include <react/cxxstableapi/FrameworksGuard.h>
10+
#include <react/cxxstableapi/PrivateGuard.h>
1111

1212
#include <cassert>
1313

‎packages/react-native/ReactCommon/jsinspector-modern/tracing/TraceEventGenerator.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
#pragma once
99

10-
#include <react/cxxstableapi/FrameworksGuard.h>
10+
#include <react/cxxstableapi/PrivateGuard.h>
1111

1212
#include "TraceEvent.h"
1313

‎packages/react-native/ReactCommon/jsinspector-modern/tracing/TraceEventSerializer.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
#pragma once
99

10-
#include <react/cxxstableapi/FrameworksGuard.h>
10+
#include <react/cxxstableapi/PrivateGuard.h>
1111

1212
#include "TraceEvent.h"
1313
#include "TraceEventProfile.h"

0 commit comments

Comments
 (0)