diff --git a/Libraries/Utilities/Systrace.js b/Libraries/Utilities/Systrace.js index bdd2c5992..6c23a7e11 100644 --- a/Libraries/Utilities/Systrace.js +++ b/Libraries/Utilities/Systrace.js @@ -66,11 +66,11 @@ const Systrace = { /** * beginEvent/endEvent for starting and then ending a profile within the same call stack frame **/ - beginEvent(profileName?: any) { + beginEvent(profileName?: any, args?: any) { if (_enabled) { profileName = typeof profileName === 'function' ? profileName() : profileName; - global.nativeTraceBeginSection(TRACE_TAG_REACT_APPS, profileName); + global.nativeTraceBeginSection(TRACE_TAG_REACT_APPS, profileName, args); } }, diff --git a/React/Executors/RCTJSCExecutor.mm b/React/Executors/RCTJSCExecutor.mm index 25272fd78..921225f78 100644 --- a/React/Executors/RCTJSCExecutor.mm +++ b/React/Executors/RCTJSCExecutor.mm @@ -415,13 +415,13 @@ static void RCTInstallJSCProfiler(RCTBridge *bridge, JSContextRef context) CFDictionaryRemoveValue(strongSelf->_cookieMap, (const void *)cookie); }]; - [self addSynchronousHookWithName:@"nativeTraceBeginSection" usingBlock:^(NSNumber *tag, NSString *profileName){ + [self addSynchronousHookWithName:@"nativeTraceBeginSection" usingBlock:^(NSNumber *tag, NSString *profileName, NSDictionary *args) { static int profileCounter = 1; if (!profileName) { profileName = [NSString stringWithFormat:@"Profile %d", profileCounter++]; } - RCT_PROFILE_BEGIN_EVENT(tag.longLongValue, profileName, nil); + RCT_PROFILE_BEGIN_EVENT(tag.longLongValue, profileName, args); }]; [self addSynchronousHookWithName:@"nativeTraceEndSection" usingBlock:^(NSNumber *tag) {