Skip to content

Commit 57d2ff2

Browse files
christophpurrermeta-codesync[bot]
authored andcommitted
Delete deprecated RCTProfile systrace feature
Summary: RCTProfile hooked bridge modules for systrace capture, driven only by the deleted legacy bridge. With all call sites migrated or removed, delete the header, implementation, trampolines, and remaining hooks in the display link, module methods, performance logger, and downstream systrace callers. Changelog: [iOS][Removed] - Remove deprecated RCTProfile systrace API Differential Revision: D126581734
1 parent db4d33d commit 57d2ff2

15 files changed

Lines changed: 0 additions & 1635 deletions

‎packages/react-native/React/Base/RCTBridge.mm‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
#import "RCTModuleData.h"
2828
#import "RCTPausedInDebuggerOverlayController.h"
2929
#import "RCTPerformanceLogger.h"
30-
#import "RCTProfile.h"
3130
#import "RCTReloadCommand.h"
3231
#import "RCTUtils.h"
3332

‎packages/react-native/React/Base/RCTDisplayLink.m‎

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212

1313
#import "RCTAssert.h"
1414
#import "RCTFrameUpdate.h"
15-
#import "RCTProfile.h"
1615

1716
#define RCTAssertRunLoop() \
1817
RCTAssert(_runLoop == [NSRunLoop currentRunLoop], @"This method must be called on the CADisplayLink run loop")
@@ -81,8 +80,6 @@ - (void)_jsThreadUpdate:(CADisplayLink *)displayLink
8180
{
8281
RCTAssertRunLoop();
8382

84-
RCT_PROFILE_BEGIN_EVENT(RCTProfileTagAlways, @"-[RCTDisplayLink _jsThreadUpdate:]", nil);
85-
8683
// This always runs on the JS thread run loop, which is the queue the frame
8784
// update observer expects its callbacks on, so dispatch inline.
8885
RCTFrameUpdate *frameUpdate = [[RCTFrameUpdate alloc] initWithDisplayLink:displayLink];
@@ -91,10 +88,6 @@ - (void)_jsThreadUpdate:(CADisplayLink *)displayLink
9188
}
9289

9390
[self updateJSDisplayLinkState];
94-
95-
RCTProfileImmediateEvent(RCTProfileTagAlways, @"JS Thread Tick", displayLink.timestamp, 'g');
96-
97-
RCT_PROFILE_END_EVENT(RCTProfileTagAlways, @"objc_call");
9891
}
9992

10093
- (void)updateJSDisplayLinkState

‎packages/react-native/React/Base/RCTModuleMethod.mm‎

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
#import "RCTLog.h"
1818
#import "RCTManagedPointer.h"
1919
#import "RCTParserUtils.h"
20-
#import "RCTProfile.h"
2120
#import "RCTUtils.h"
2221

2322
typedef BOOL (^RCTArgumentBlock)(RCTBridge *, NSUInteger, id);
@@ -471,12 +470,7 @@ - (void)processMethodSignature
471470
- (SEL)selector
472471
{
473472
if (_selector == NULL) {
474-
RCT_PROFILE_BEGIN_EVENT(
475-
RCTProfileTagAlways,
476-
@"",
477-
(@{@"module" : NSStringFromClass(_moduleClass), @"method" : @(_methodInfo->objcName)}));
478473
[self processMethodSignature];
479-
RCT_PROFILE_END_EVENT(RCTProfileTagAlways, @"");
480474
}
481475

482476
return _selector;

‎packages/react-native/React/Base/RCTPerformanceLogger.mm‎

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,12 @@
1212
#import "RCTLog.h"
1313
#import "RCTPerformanceLogger.h"
1414
#import "RCTPerformanceLoggerLabels.h"
15-
#import "RCTProfile.h"
1615
#import "RCTRootView.h"
1716

1817
using namespace facebook::react;
1918

2019
@interface RCTPerformanceLogger () {
2120
int64_t _data[RCTPLSize][2];
22-
NSInteger _cookies[RCTPLSize];
2321
}
2422

2523
@end
@@ -46,12 +44,6 @@ @implementation RCTPerformanceLogger
4644

4745
- (void)markStartForTag:(RCTPLTag)tag
4846
{
49-
#if RCT_PROFILE
50-
if (RCTProfileIsProfiling()) {
51-
NSString *label = RCTPLLabelForTag(tag);
52-
_cookies[tag] = RCTProfileBeginAsyncEvent(RCTProfileTagAlways, label, nil);
53-
}
54-
#endif
5547
const NSTimeInterval currentTime = CACurrentMediaTime() * 1000;
5648
_data[tag][0] = currentTime;
5749
_data[tag][1] = 0;
@@ -65,12 +57,6 @@ - (void)markStartForTag:(RCTPLTag)tag
6557

6658
- (void)markStopForTag:(RCTPLTag)tag
6759
{
68-
#if RCT_PROFILE
69-
if (RCTProfileIsProfiling()) {
70-
NSString *label = RCTPLLabelForTag(tag);
71-
RCTProfileEndAsyncEvent(RCTProfileTagAlways, @"native", _cookies[tag], label, @"RCTPerformanceLogger");
72-
}
73-
#endif
7460
const NSTimeInterval currentTime = CACurrentMediaTime() * 1000;
7561
if (_data[tag][0] != 0 && _data[tag][1] == 0) {
7662
_data[tag][1] = currentTime;

‎packages/react-native/React/Base/RCTRootView.m‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
#import "RCTKeyCommands.h"
1616
#import "RCTLog.h"
1717
#import "RCTPerformanceLogger.h"
18-
#import "RCTProfile.h"
1918
#import "RCTTouchHandler.h"
2019
#import "RCTUIManager.h"
2120
#import "RCTUIManagerUtils.h"

‎packages/react-native/React/Base/Surface/SurfaceHostingView/RCTSurfaceHostingProxyRootView.mm‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
#import "RCTBridge.h"
1414
#import "RCTLog.h"
1515
#import "RCTPerformanceLogger.h"
16-
#import "RCTProfile.h"
1716
#import "RCTRootViewDelegate.h"
1817
#import "RCTSurface.h"
1918
#import "UIView+React.h"

‎packages/react-native/React/CoreModules/RCTEventDispatcher.mm‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99

1010
#import <React/RCTAssert.h>
1111
#import <React/RCTComponentEvent.h>
12-
#import <React/RCTProfile.h>
1312
#import <React/RCTUtils.h>
1413
#import <ReactCommon/RCTTurboModule.h>
1514

‎packages/react-native/React/Modules/RCTUIManager.mm‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
#import "RCTLog.h"
2525
#import "RCTModuleData.h"
2626
#import "RCTModuleMethod.h"
27-
#import "RCTProfile.h"
2827
#import "RCTScrollableProtocol.h"
2928
#import "RCTShadowView.h"
3029
#import "RCTSurfaceRootShadowView.h"

‎packages/react-native/React/Profiler/RCTMacros.h‎

Lines changed: 0 additions & 16 deletions
This file was deleted.

0 commit comments

Comments
 (0)