mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-05 22:38:59 +08:00
Remove legacy JSC profiler
Reviewed By: bnham Differential Revision: D5433406 fbshipit-source-id: 8cbea8b9b46a0d9f29c57a5bcf605e6bb61ed8a7
This commit is contained in:
committed by
Facebook Github Bot
parent
bf752014a9
commit
ed3c018ee4
@@ -39,7 +39,6 @@
|
||||
#endif
|
||||
|
||||
#ifdef WITH_JSC_EXTRA_TRACING
|
||||
#include "JSCLegacyProfiler.h"
|
||||
#include "JSCLegacyTracing.h"
|
||||
#endif
|
||||
|
||||
@@ -240,7 +239,6 @@ void JSCExecutor::initOnJSVMThread() throw(JSException) {
|
||||
#endif
|
||||
|
||||
#ifdef WITH_JSC_EXTRA_TRACING
|
||||
addNativeProfilingHooks(m_context);
|
||||
addNativeTracingLegacyHooks(m_context);
|
||||
#endif
|
||||
|
||||
@@ -554,32 +552,6 @@ void* JSCExecutor::getJavaScriptContext() {
|
||||
return m_context;
|
||||
}
|
||||
|
||||
bool JSCExecutor::supportsProfiling() {
|
||||
#ifdef WITH_FBSYSTRACE
|
||||
return true;
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
|
||||
void JSCExecutor::startProfiler(const std::string &titleString) {
|
||||
#ifdef WITH_JSC_EXTRA_TRACING
|
||||
String title(m_context, titleString.c_str());
|
||||
#if WITH_REACT_INTERNAL_SETTINGS
|
||||
JSStartProfiling(m_context, title, false);
|
||||
#else
|
||||
JSStartProfiling(m_context, title);
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
void JSCExecutor::stopProfiler(const std::string &titleString, const std::string& filename) {
|
||||
#ifdef WITH_JSC_EXTRA_TRACING
|
||||
String title(m_context, titleString.c_str());
|
||||
facebook::react::stopAndOutputProfilingFile(m_context, title, filename.c_str());
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef WITH_JSC_MEMORY_PRESSURE
|
||||
void JSCExecutor::handleMemoryPressure(int pressureLevel) {
|
||||
JSHandleMemoryPressure(this, m_context, static_cast<JSMemoryPressure>(pressureLevel));
|
||||
|
||||
Reference in New Issue
Block a user