Log Memory tags using LegacyProfiler
Reviewed By: jspahrsummers Differential Revision: D2789647 fb-gh-sync-id: 220a0fc4eccccd92a6b8f45b07b32735a7054614
This commit is contained in:
parent
322a77340c
commit
dfcc4f8ad5
|
@ -419,18 +419,11 @@ static JSValueRef nativeTraceBeginLegacy(
|
|||
size_t argumentCount,
|
||||
const JSValueRef arguments[],
|
||||
JSValueRef* exception) {
|
||||
if (FBSYSTRACE_UNLIKELY(argumentCount < 1)) {
|
||||
if (exception) {
|
||||
*exception = facebook::react::makeJSCException(
|
||||
ctx,
|
||||
"nativeTraceBeginLegacy: requires TAG Argument");
|
||||
if (FBSYSTRACE_LIKELY(argumentCount >= 1)) {
|
||||
uint64_t tag = tagFromJSValue(ctx, arguments[0], exception);
|
||||
if (!fbsystrace_is_tracing(tag)) {
|
||||
return JSValueMakeUndefined(ctx);
|
||||
}
|
||||
return JSValueMakeUndefined(ctx);
|
||||
}
|
||||
|
||||
uint64_t tag = tagFromJSValue(ctx, arguments[0], exception);
|
||||
if (!fbsystrace_is_tracing(tag)) {
|
||||
return JSValueMakeUndefined(ctx);
|
||||
}
|
||||
|
||||
JSStringRef title = JSStringCreateWithUTF8CString(ENABLED_FBSYSTRACE_PROFILE_NAME);
|
||||
|
@ -451,18 +444,11 @@ static JSValueRef nativeTraceEndLegacy(
|
|||
size_t argumentCount,
|
||||
const JSValueRef arguments[],
|
||||
JSValueRef* exception) {
|
||||
if (FBSYSTRACE_UNLIKELY(argumentCount < 1)) {
|
||||
if (exception) {
|
||||
*exception = facebook::react::makeJSCException(
|
||||
ctx,
|
||||
"nativeTraceBeginLegacy: requires TAG Argument");
|
||||
if (FBSYSTRACE_LIKELY(argumentCount >= 1)) {
|
||||
uint64_t tag = tagFromJSValue(ctx, arguments[0], exception);
|
||||
if (!fbsystrace_is_tracing(tag)) {
|
||||
return JSValueMakeUndefined(ctx);
|
||||
}
|
||||
return JSValueMakeUndefined(ctx);
|
||||
}
|
||||
|
||||
uint64_t tag = tagFromJSValue(ctx, arguments[0], exception);
|
||||
if (!fbsystrace_is_tracing(tag)) {
|
||||
return JSValueMakeUndefined(ctx);
|
||||
}
|
||||
|
||||
JSStringRef title = JSStringCreateWithUTF8CString(ENABLED_FBSYSTRACE_PROFILE_NAME);
|
||||
|
|
Loading…
Reference in New Issue