Bringing fbsystrace to iOS 8's JSC

Reviewed By: michalgr

Differential Revision: D3163295

fb-gh-sync-id: 3cc2083accc4ba6947efc631f3574412022b1e1f
fbshipit-source-id: 3cc2083accc4ba6947efc631f3574412022b1e1f
This commit is contained in:
Tadeu Zagallo 2016-04-25 09:44:16 -07:00 committed by Facebook Github Bot 3
parent 69c083b27d
commit c5307a6e7c
4 changed files with 6 additions and 11 deletions

View File

@ -14,8 +14,7 @@ PREPROCESSOR_FLAGS = [
'-DLOG_TAG="ReactNative"',
'-DWITH_JSC_EXTRA_TRACING=1',
'-DWITH_FBSYSTRACE=1',
'-DWITH_JSC_MEMORY_PRESSURE=1',
# '-DWITH_JSC_INTERNAL=1', # Taken care of in D3163295
'-DWITH_REACT_INTERNAL_SETTINGS=1',
]
def react_library(**kwargs):

View File

@ -156,7 +156,7 @@ void JSCExecutor::destroy() {
}
void JSCExecutor::initOnJSVMThread() {
#if defined(WITH_FB_JSC_TUNING) && !defined(WITH_JSC_INTERNAL)
#if defined(WITH_FB_JSC_TUNING)
configureJSCForAndroid(m_jscConfig);
#endif
m_context = JSGlobalContextCreateInGroup(nullptr, nullptr);
@ -170,10 +170,6 @@ void JSCExecutor::initOnJSVMThread() {
installGlobalFunction(m_context, "nativeLoggingHook", JSLogging::nativeHook);
#if defined(WITH_JSC_INTERNAL) && defined(WITH_FB_JSC_TUNING)
configureJSCForAndroid();
#endif
#ifdef WITH_JSC_EXTRA_TRACING
addNativeTracingHooks(m_context);
addNativeProfilingHooks(m_context);
@ -188,7 +184,7 @@ void JSCExecutor::initOnJSVMThread() {
addJSCPerfStatsHooks(m_context);
#endif
#if defined(WITH_FB_JSC_TUNING) && !defined(WITH_JSC_INTERNAL)
#if defined(WITH_FB_JSC_TUNING)
configureJSContextForAndroid(m_context, m_jscConfig, m_deviceCacheDir);
#endif
}
@ -345,7 +341,7 @@ bool JSCExecutor::supportsProfiling() {
void JSCExecutor::startProfiler(const std::string &titleString) {
#ifdef WITH_JSC_EXTRA_TRACING
JSStringRef title = JSStringCreateWithUTF8CString(titleString.c_str());
#if WITH_JSC_INTERNAL
#if WITH_REACT_INTERNAL_SETTINGS
JSStartProfiling(m_context, title, false);
#else
JSStartProfiling(m_context, title);

View File

@ -26,7 +26,7 @@ static JSValueRef nativeProfilerStart(
}
JSStringRef title = JSValueToStringCopy(ctx, arguments[0], exception);
#if WITH_JSC_INTERNAL
#if WITH_REACT_INTERNAL_SETTINGS
JSStartProfiling(ctx, title, false);
#else
JSStartProfiling(ctx, title);

View File

@ -427,7 +427,7 @@ static JSValueRef nativeTraceBeginLegacy(
}
JSStringRef title = JSStringCreateWithUTF8CString(ENABLED_FBSYSTRACE_PROFILE_NAME);
#if WITH_JSC_INTERNAL
#if WITH_REACT_INTERNAL_SETTINGS
JSStartProfiling(ctx, title, true);
#else
JSStartProfiling(ctx, title);