Skip to content

Commit 1db5baf

Browse files
j-piaseckifacebook-github-bot
authored andcommitted
Make internal reactperflogger headers private (#58840)
Summary: Switch `BridgeNativeModulePerfLogger.h`, `FuseboxTracer.h`, `FuseboxPerfettoDataSource.h`, `HermesPerfettoDataSource.h`, `ReactPerfetto.h` and `ReactPerfettoLogger.h` to `PrivateGuard.h`. `NativeModulePerfLogger.h` and `ReactPerfettoCategories.h` stay for frameworks. Changelog: [Internal] Reviewed By: cortinico Differential Revision: D123379537
1 parent 302113f commit 1db5baf

9 files changed

Lines changed: 6 additions & 204 deletions

File tree

‎packages/react-native/ReactCommon/reactperflogger/fusebox/FuseboxTracer.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 "folly/json/dynamic.h"
1313

‎packages/react-native/ReactCommon/reactperflogger/reactperflogger/BridgeNativeModulePerfLogger.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 <memory>
1313
#include "NativeModulePerfLogger.h"

‎packages/react-native/ReactCommon/reactperflogger/reactperflogger/FuseboxPerfettoDataSource.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
#ifdef WITH_PERFETTO
1313

‎packages/react-native/ReactCommon/reactperflogger/reactperflogger/HermesPerfettoDataSource.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
#ifdef WITH_PERFETTO
1313

‎packages/react-native/ReactCommon/reactperflogger/reactperflogger/ReactPerfetto.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
#ifdef WITH_PERFETTO
1313

‎packages/react-native/ReactCommon/reactperflogger/reactperflogger/ReactPerfettoLogger.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 <React/Timing.h>
1313
#include <reactperflogger/ReactPerfettoCategories.h>

‎scripts/cxx-api/api-snapshots/ReactAndroidFrameworksCxx.api‎

Lines changed: 0 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -1987,16 +1987,6 @@ class facebook::react::FocusOrderingHelper {
19871987
public static void traverseAndUpdateNextFocusableElement(const std::shared_ptr<const facebook::react::ShadowNode>& parentShadowNode, const std::shared_ptr<const facebook::react::ShadowNode>& focusedShadowNode, const std::shared_ptr<const facebook::react::ShadowNode>& currNode, facebook::react::FocusDirection focusDirection, const facebook::react::UIManager& uimanager, facebook::react::Rect sourceRect, std::optional<facebook::react::Rect>& nextRect, std::shared_ptr<const facebook::react::ShadowNode>& nextNode);
19881988
}
19891989

1990-
class facebook::react::FuseboxTracer {
1991-
public FuseboxTracer(const facebook::react::FuseboxTracer&) = delete;
1992-
public bool isTracing();
1993-
public bool startTracing();
1994-
public bool stopTracing(const std::function<void(const folly::dynamic& eventsChunk)>& resultCallback);
1995-
public bool stopTracingAndWriteToFile(const std::string& path);
1996-
public static facebook::react::FuseboxTracer& getFuseboxTracer();
1997-
public void addEvent(const std::string_view& name, uint64_t start, uint64_t end, const std::optional<std::string_view>& track);
1998-
}
1999-
20001990
class facebook::react::HermesInstance {
20011991
public static std::unique_ptr<JSRuntime> createJSRuntime(std::shared_ptr<hermes::vm::CrashManager> crashManager, std::shared_ptr<facebook::react::MessageQueueThread> msgQueueThread, bool allocInOldGenBeforeTTI) noexcept;
20021992
}
@@ -3392,12 +3382,6 @@ struct facebook::react::ReactInstance::JSRuntimeFlags {
33923382
public const std::string runtimeDiagnosticFlags;
33933383
}
33943384

3395-
class facebook::react::ReactPerfettoLogger {
3396-
public static bool isTracing();
3397-
public static void mark(const std::string_view& eventName, facebook::react::HighResTimeStamp startTime, const std::optional<std::string_view>& trackName = std::nullopt, const std::optional<std::string_view>& trackGroup = std::nullopt);
3398-
public static void measure(const std::string_view& eventName, facebook::react::HighResTimeStamp startTime, facebook::react::HighResTimeStamp endTime, const std::optional<std::string_view>& trackName = std::nullopt, const std::optional<std::string_view>& trackGroup = std::nullopt);
3399-
}
3400-
34013385
class facebook::react::ReadableNativeArray : public jni::HybridClass<facebook::react::ReadableNativeArray, facebook::react::NativeArray> {
34023386
protected friend HybridBase;
34033387
public bool equals(jni::alias_ref<ReadableNativeArray::javaobject> other);
@@ -5755,13 +5739,6 @@ struct facebook::react::Bridging<void> {
57555739
public static void fromJs(facebook::jsi::Runtime&, const facebook::jsi::Value&);
57565740
}
57575741

5758-
struct facebook::react::BufferEvent {
5759-
public std::string name;
5760-
public std::string track;
5761-
public uint64_t end;
5762-
public uint64_t start;
5763-
}
5764-
57655742
struct facebook::react::BundleHeader {
57665743
public BundleHeader();
57675744
public facebook::react::Magic32 magic32;
@@ -10049,49 +10026,6 @@ struct facebook::react::ReactMarker::ReactMarkerEvent {
1004910026
}
1005010027

1005110028

10052-
void facebook::react::BridgeNativeModulePerfLogger::asyncMethodCallArgConversionEnd(const char* moduleName, const char* methodName);
10053-
void facebook::react::BridgeNativeModulePerfLogger::asyncMethodCallArgConversionStart(const char* moduleName, const char* methodName);
10054-
void facebook::react::BridgeNativeModulePerfLogger::asyncMethodCallBatchPreprocessEnd(int batchSize);
10055-
void facebook::react::BridgeNativeModulePerfLogger::asyncMethodCallBatchPreprocessStart();
10056-
void facebook::react::BridgeNativeModulePerfLogger::asyncMethodCallDispatch(const char* moduleName, const char* methodName);
10057-
void facebook::react::BridgeNativeModulePerfLogger::asyncMethodCallEnd(const char* moduleName, const char* methodName);
10058-
void facebook::react::BridgeNativeModulePerfLogger::asyncMethodCallExecutionArgConversionEnd(const char* moduleName, const char* methodName, int32_t id);
10059-
void facebook::react::BridgeNativeModulePerfLogger::asyncMethodCallExecutionArgConversionStart(const char* moduleName, const char* methodName, int32_t id);
10060-
void facebook::react::BridgeNativeModulePerfLogger::asyncMethodCallExecutionEnd(const char* moduleName, const char* methodName, int32_t id);
10061-
void facebook::react::BridgeNativeModulePerfLogger::asyncMethodCallExecutionFail(const char* moduleName, const char* methodName, int32_t id);
10062-
void facebook::react::BridgeNativeModulePerfLogger::asyncMethodCallExecutionStart(const char* moduleName, const char* methodName, int32_t id);
10063-
void facebook::react::BridgeNativeModulePerfLogger::asyncMethodCallFail(const char* moduleName, const char* methodName);
10064-
void facebook::react::BridgeNativeModulePerfLogger::asyncMethodCallStart(const char* moduleName, const char* methodName);
10065-
void facebook::react::BridgeNativeModulePerfLogger::disableLogging();
10066-
void facebook::react::BridgeNativeModulePerfLogger::enableLogging(std::unique_ptr<facebook::react::NativeModulePerfLogger>&& logger);
10067-
void facebook::react::BridgeNativeModulePerfLogger::moduleCreateCacheHit(const char* moduleName, int32_t id);
10068-
void facebook::react::BridgeNativeModulePerfLogger::moduleCreateConstructEnd(const char* moduleName, int32_t id);
10069-
void facebook::react::BridgeNativeModulePerfLogger::moduleCreateConstructStart(const char* moduleName, int32_t id);
10070-
void facebook::react::BridgeNativeModulePerfLogger::moduleCreateEnd(const char* moduleName, int32_t id);
10071-
void facebook::react::BridgeNativeModulePerfLogger::moduleCreateFail(const char* moduleName, int32_t id);
10072-
void facebook::react::BridgeNativeModulePerfLogger::moduleCreateSetUpEnd(const char* moduleName, int32_t id);
10073-
void facebook::react::BridgeNativeModulePerfLogger::moduleCreateSetUpStart(const char* moduleName, int32_t id);
10074-
void facebook::react::BridgeNativeModulePerfLogger::moduleCreateStart(const char* moduleName, int32_t id);
10075-
void facebook::react::BridgeNativeModulePerfLogger::moduleDataCreateEnd(const char* moduleName, int32_t id);
10076-
void facebook::react::BridgeNativeModulePerfLogger::moduleDataCreateStart(const char* moduleName, int32_t id);
10077-
void facebook::react::BridgeNativeModulePerfLogger::moduleJSRequireBeginningCacheHit(const char* moduleName);
10078-
void facebook::react::BridgeNativeModulePerfLogger::moduleJSRequireBeginningEnd(const char* moduleName);
10079-
void facebook::react::BridgeNativeModulePerfLogger::moduleJSRequireBeginningFail(const char* moduleName);
10080-
void facebook::react::BridgeNativeModulePerfLogger::moduleJSRequireBeginningStart(const char* moduleName);
10081-
void facebook::react::BridgeNativeModulePerfLogger::moduleJSRequireEndingEnd(const char* moduleName);
10082-
void facebook::react::BridgeNativeModulePerfLogger::moduleJSRequireEndingFail(const char* moduleName);
10083-
void facebook::react::BridgeNativeModulePerfLogger::moduleJSRequireEndingStart(const char* moduleName);
10084-
void facebook::react::BridgeNativeModulePerfLogger::syncMethodCallArgConversionEnd(const char* moduleName, const char* methodName);
10085-
void facebook::react::BridgeNativeModulePerfLogger::syncMethodCallArgConversionStart(const char* moduleName, const char* methodName);
10086-
void facebook::react::BridgeNativeModulePerfLogger::syncMethodCallEnd(const char* moduleName, const char* methodName);
10087-
void facebook::react::BridgeNativeModulePerfLogger::syncMethodCallExecutionEnd(const char* moduleName, const char* methodName);
10088-
void facebook::react::BridgeNativeModulePerfLogger::syncMethodCallExecutionStart(const char* moduleName, const char* methodName);
10089-
void facebook::react::BridgeNativeModulePerfLogger::syncMethodCallFail(const char* moduleName, const char* methodName);
10090-
void facebook::react::BridgeNativeModulePerfLogger::syncMethodCallReturnConversionEnd(const char* moduleName, const char* methodName);
10091-
void facebook::react::BridgeNativeModulePerfLogger::syncMethodCallReturnConversionStart(const char* moduleName, const char* methodName);
10092-
void facebook::react::BridgeNativeModulePerfLogger::syncMethodCallStart(const char* moduleName, const char* methodName);
10093-
10094-
1009510029
void facebook::react::LowPriorityExecutor::execute(std::function<void()>&& workItem);
1009610030

1009710031

‎scripts/cxx-api/api-snapshots/ReactAppleFrameworksCxx.api‎

Lines changed: 0 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -4458,16 +4458,6 @@ class facebook::react::EventTarget {
44584458
public void setEnabled(bool enabled);
44594459
}
44604460

4461-
class facebook::react::FuseboxTracer {
4462-
public FuseboxTracer(const facebook::react::FuseboxTracer&) = delete;
4463-
public bool isTracing();
4464-
public bool startTracing();
4465-
public bool stopTracing(const std::function<void(const folly::dynamic& eventsChunk)>& resultCallback);
4466-
public bool stopTracingAndWriteToFile(const std::string& path);
4467-
public static facebook::react::FuseboxTracer& getFuseboxTracer();
4468-
public void addEvent(const std::string_view& name, uint64_t start, uint64_t end, const std::optional<std::string_view>& track);
4469-
}
4470-
44714461
class facebook::react::HermesInstance {
44724462
public static std::unique_ptr<facebook::react::JSRuntime> createJSRuntime(std::shared_ptr<hermes::vm::CrashManager> crashManager, std::shared_ptr<facebook::react::MessageQueueThread> msgQueueThread, bool allocInOldGenBeforeTTI) noexcept;
44734463
}
@@ -5628,12 +5618,6 @@ struct facebook::react::ReactInstance::JSRuntimeFlags {
56285618
public const std::string runtimeDiagnosticFlags;
56295619
}
56305620

5631-
class facebook::react::ReactPerfettoLogger {
5632-
public static bool isTracing();
5633-
public static void mark(const std::string_view& eventName, facebook::react::HighResTimeStamp startTime, const std::optional<std::string_view>& trackName = std::nullopt, const std::optional<std::string_view>& trackGroup = std::nullopt);
5634-
public static void measure(const std::string_view& eventName, facebook::react::HighResTimeStamp startTime, facebook::react::HighResTimeStamp endTime, const std::optional<std::string_view>& trackName = std::nullopt, const std::optional<std::string_view>& trackGroup = std::nullopt);
5635-
}
5636-
56375621
class facebook::react::RootProps : public facebook::react::HostPlatformViewProps {
56385622
public RootProps() = default;
56395623
public RootProps(const facebook::react::PropsParserContext& context, const facebook::react::RootProps& sourceProps, const facebook::react::LayoutConstraints& layoutConstraints, const facebook::react::LayoutContext& layoutContext);
@@ -7952,13 +7936,6 @@ struct facebook::react::Bridging<void> {
79527936
public static void fromJs(facebook::jsi::Runtime&, const facebook::jsi::Value&);
79537937
}
79547938

7955-
struct facebook::react::BufferEvent {
7956-
public std::string name;
7957-
public std::string track;
7958-
public uint64_t end;
7959-
public uint64_t start;
7960-
}
7961-
79627939
struct facebook::react::BundleHeader {
79637940
public BundleHeader();
79647941
public facebook::react::Magic32 magic32;
@@ -11906,49 +11883,6 @@ struct facebook::react::ReactMarker::ReactMarkerEvent {
1190611883
}
1190711884

1190811885

11909-
void facebook::react::BridgeNativeModulePerfLogger::asyncMethodCallArgConversionEnd(const char* moduleName, const char* methodName);
11910-
void facebook::react::BridgeNativeModulePerfLogger::asyncMethodCallArgConversionStart(const char* moduleName, const char* methodName);
11911-
void facebook::react::BridgeNativeModulePerfLogger::asyncMethodCallBatchPreprocessEnd(int batchSize);
11912-
void facebook::react::BridgeNativeModulePerfLogger::asyncMethodCallBatchPreprocessStart();
11913-
void facebook::react::BridgeNativeModulePerfLogger::asyncMethodCallDispatch(const char* moduleName, const char* methodName);
11914-
void facebook::react::BridgeNativeModulePerfLogger::asyncMethodCallEnd(const char* moduleName, const char* methodName);
11915-
void facebook::react::BridgeNativeModulePerfLogger::asyncMethodCallExecutionArgConversionEnd(const char* moduleName, const char* methodName, int32_t id);
11916-
void facebook::react::BridgeNativeModulePerfLogger::asyncMethodCallExecutionArgConversionStart(const char* moduleName, const char* methodName, int32_t id);
11917-
void facebook::react::BridgeNativeModulePerfLogger::asyncMethodCallExecutionEnd(const char* moduleName, const char* methodName, int32_t id);
11918-
void facebook::react::BridgeNativeModulePerfLogger::asyncMethodCallExecutionFail(const char* moduleName, const char* methodName, int32_t id);
11919-
void facebook::react::BridgeNativeModulePerfLogger::asyncMethodCallExecutionStart(const char* moduleName, const char* methodName, int32_t id);
11920-
void facebook::react::BridgeNativeModulePerfLogger::asyncMethodCallFail(const char* moduleName, const char* methodName);
11921-
void facebook::react::BridgeNativeModulePerfLogger::asyncMethodCallStart(const char* moduleName, const char* methodName);
11922-
void facebook::react::BridgeNativeModulePerfLogger::disableLogging();
11923-
void facebook::react::BridgeNativeModulePerfLogger::enableLogging(std::unique_ptr<facebook::react::NativeModulePerfLogger>&& logger);
11924-
void facebook::react::BridgeNativeModulePerfLogger::moduleCreateCacheHit(const char* moduleName, int32_t id);
11925-
void facebook::react::BridgeNativeModulePerfLogger::moduleCreateConstructEnd(const char* moduleName, int32_t id);
11926-
void facebook::react::BridgeNativeModulePerfLogger::moduleCreateConstructStart(const char* moduleName, int32_t id);
11927-
void facebook::react::BridgeNativeModulePerfLogger::moduleCreateEnd(const char* moduleName, int32_t id);
11928-
void facebook::react::BridgeNativeModulePerfLogger::moduleCreateFail(const char* moduleName, int32_t id);
11929-
void facebook::react::BridgeNativeModulePerfLogger::moduleCreateSetUpEnd(const char* moduleName, int32_t id);
11930-
void facebook::react::BridgeNativeModulePerfLogger::moduleCreateSetUpStart(const char* moduleName, int32_t id);
11931-
void facebook::react::BridgeNativeModulePerfLogger::moduleCreateStart(const char* moduleName, int32_t id);
11932-
void facebook::react::BridgeNativeModulePerfLogger::moduleDataCreateEnd(const char* moduleName, int32_t id);
11933-
void facebook::react::BridgeNativeModulePerfLogger::moduleDataCreateStart(const char* moduleName, int32_t id);
11934-
void facebook::react::BridgeNativeModulePerfLogger::moduleJSRequireBeginningCacheHit(const char* moduleName);
11935-
void facebook::react::BridgeNativeModulePerfLogger::moduleJSRequireBeginningEnd(const char* moduleName);
11936-
void facebook::react::BridgeNativeModulePerfLogger::moduleJSRequireBeginningFail(const char* moduleName);
11937-
void facebook::react::BridgeNativeModulePerfLogger::moduleJSRequireBeginningStart(const char* moduleName);
11938-
void facebook::react::BridgeNativeModulePerfLogger::moduleJSRequireEndingEnd(const char* moduleName);
11939-
void facebook::react::BridgeNativeModulePerfLogger::moduleJSRequireEndingFail(const char* moduleName);
11940-
void facebook::react::BridgeNativeModulePerfLogger::moduleJSRequireEndingStart(const char* moduleName);
11941-
void facebook::react::BridgeNativeModulePerfLogger::syncMethodCallArgConversionEnd(const char* moduleName, const char* methodName);
11942-
void facebook::react::BridgeNativeModulePerfLogger::syncMethodCallArgConversionStart(const char* moduleName, const char* methodName);
11943-
void facebook::react::BridgeNativeModulePerfLogger::syncMethodCallEnd(const char* moduleName, const char* methodName);
11944-
void facebook::react::BridgeNativeModulePerfLogger::syncMethodCallExecutionEnd(const char* moduleName, const char* methodName);
11945-
void facebook::react::BridgeNativeModulePerfLogger::syncMethodCallExecutionStart(const char* moduleName, const char* methodName);
11946-
void facebook::react::BridgeNativeModulePerfLogger::syncMethodCallFail(const char* moduleName, const char* methodName);
11947-
void facebook::react::BridgeNativeModulePerfLogger::syncMethodCallReturnConversionEnd(const char* moduleName, const char* methodName);
11948-
void facebook::react::BridgeNativeModulePerfLogger::syncMethodCallReturnConversionStart(const char* moduleName, const char* methodName);
11949-
void facebook::react::BridgeNativeModulePerfLogger::syncMethodCallStart(const char* moduleName, const char* methodName);
11950-
11951-
1195211886
void facebook::react::LowPriorityExecutor::execute(std::function<void()>&& workItem);
1195311887

1195411888

0 commit comments

Comments
 (0)