define out the memory heap jsc functions
Reviewed By: mkonicek Differential Revision: D2764964 fb-gh-sync-id: 26eff3e29762287f3527de84b146cee90eccd580
This commit is contained in:
parent
42a1620b1e
commit
1be5777265
|
@ -30,7 +30,10 @@ using fbsystrace::FbSystraceSection;
|
||||||
|
|
||||||
// Add native performance markers support
|
// Add native performance markers support
|
||||||
#include <react/JSCPerfLogging.h>
|
#include <react/JSCPerfLogging.h>
|
||||||
|
|
||||||
|
#ifdef WITH_FB_MEMORY_PROFILING
|
||||||
#include <react/JSCMemory.h>
|
#include <react/JSCMemory.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef WITH_FB_JSC_TUNING
|
#ifdef WITH_FB_JSC_TUNING
|
||||||
#include <jsc_config_android.h>
|
#include <jsc_config_android.h>
|
||||||
|
@ -134,7 +137,9 @@ JSCExecutor::JSCExecutor(FlushImmediateCallback cb) :
|
||||||
addNativePerfLoggingHooks(m_context);
|
addNativePerfLoggingHooks(m_context);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef WITH_FB_MEMORY_PROFILING
|
||||||
addNativeMemoryHooks(m_context);
|
addNativeMemoryHooks(m_context);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
JSCExecutor::~JSCExecutor() {
|
JSCExecutor::~JSCExecutor() {
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
|
|
||||||
#include "Value.h"
|
#include "Value.h"
|
||||||
|
|
||||||
#if WITH_FB_MEMORY_PROFILING
|
#ifdef WITH_FB_MEMORY_PROFILING
|
||||||
|
|
||||||
static JSValueRef nativeEnableAllocationTag(
|
static JSValueRef nativeEnableAllocationTag(
|
||||||
JSContextRef ctx,
|
JSContextRef ctx,
|
||||||
|
@ -143,7 +143,7 @@ namespace facebook {
|
||||||
namespace react {
|
namespace react {
|
||||||
|
|
||||||
void addNativeMemoryHooks(JSGlobalContextRef ctx) {
|
void addNativeMemoryHooks(JSGlobalContextRef ctx) {
|
||||||
#if WITH_FB_MEMORY_PROFILING
|
#ifdef WITH_FB_MEMORY_PROFILING
|
||||||
installGlobalFunction(ctx, "nativeEnableAllocationTag", nativeEnableAllocationTag);
|
installGlobalFunction(ctx, "nativeEnableAllocationTag", nativeEnableAllocationTag);
|
||||||
installGlobalFunction(ctx, "nativeAllocationPushTag", nativeAllocationPushTag);
|
installGlobalFunction(ctx, "nativeAllocationPushTag", nativeAllocationPushTag);
|
||||||
installGlobalFunction(ctx, "nativeAllocationPopTag", nativeAllocationPopTag);
|
installGlobalFunction(ctx, "nativeAllocationPopTag", nativeAllocationPopTag);
|
||||||
|
|
Loading…
Reference in New Issue