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
This commit is contained in:
Alexey Lang 2018-10-02 05:43:14 -07:00 committed by Facebook Github Bot
parent ff084a4e80
commit 1fc8a46570
1 changed files with 4 additions and 0 deletions

View File

@ -1261,6 +1261,10 @@ RCT_NOT_IMPLEMENTED(- (instancetype)initWithBundleURL:(__unused NSURL *)bundleUR
NSData *logData = [log dataUsingEncoding:NSUTF8StringEncoding];
callback(logData);
#if WITH_FBSYSTRACE
if (![RCTFBSystrace verifyTraceSize:logData.length]) {
RCTLogWarn(@"Your FBSystrace trace might be truncated, try to bump up the buffer size"
" in RCTFBSystrace.m or capture a shorter trace");
}
[RCTFBSystrace unregisterCallbacks];
#endif
});