Skip to content

Commit 1fc8a46

Browse files
alexeylangfacebook-github-bot
authored andcommitted
Bump up the buffer size and show a warning if the trace might be truncated
Summary: The current buffer size isn't enough even to capture a short TTI trace. Reviewed By: mhorowitz Differential Revision: D10112538 fbshipit-source-id: 266fa6ffa916049245b21d7725a364d75589c776
1 parent ff084a4 commit 1fc8a46

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

React/CxxBridge/RCTCxxBridge.mm

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1261,6 +1261,10 @@ - (void)stopProfiling:(void (^)(NSData *))callback
12611261
NSData *logData = [log dataUsingEncoding:NSUTF8StringEncoding];
12621262
callback(logData);
12631263
#if WITH_FBSYSTRACE
1264+
if (![RCTFBSystrace verifyTraceSize:logData.length]) {
1265+
RCTLogWarn(@"Your FBSystrace trace might be truncated, try to bump up the buffer size"
1266+
" in RCTFBSystrace.m or capture a shorter trace");
1267+
}
12641268
[RCTFBSystrace unregisterCallbacks];
12651269
#endif
12661270
});

0 commit comments

Comments
 (0)