mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Configure __RCTProfileIsProfiling for perfetto builds (#48201)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/48201 For any build for which we enable the perfetto build flag, we should probably enable the `__RCTProfileIsProfiling` so we get systrace markers. Changelog: [Internal] Reviewed By: bgirard Differential Revision: D67031171 fbshipit-source-id: 5e7f56f911acacd3156778bd9151202fc809e291
This commit is contained in:
committed by
Facebook GitHub Bot
parent
9ecf290d27
commit
93c6be496e
@@ -512,6 +512,7 @@ android {
|
||||
buildConfigField("boolean", "IS_INTERNAL_BUILD", "false")
|
||||
buildConfigField("int", "EXOPACKAGE_FLAGS", "0")
|
||||
buildConfigField("boolean", "UNSTABLE_ENABLE_FUSEBOX_RELEASE", "false")
|
||||
buildConfigField("boolean", "ENABLE_PERFETTO", "false")
|
||||
|
||||
resValue("integer", "react_native_dev_server_port", reactNativeDevServerPort())
|
||||
|
||||
|
||||
+2
-1
@@ -1521,7 +1521,8 @@ public class ReactInstanceManager {
|
||||
if (mBridgeIdleDebugListener != null) {
|
||||
catalystInstance.addBridgeIdleDebugListener(mBridgeIdleDebugListener);
|
||||
}
|
||||
if (Systrace.isTracing(TRACE_TAG_REACT_APPS | TRACE_TAG_REACT_JS_VM_CALLS)) {
|
||||
if (BuildConfig.ENABLE_PERFETTO
|
||||
|| Systrace.isTracing(TRACE_TAG_REACT_APPS | TRACE_TAG_REACT_JS_VM_CALLS)) {
|
||||
catalystInstance.setGlobalVariable("__RCTProfileIsProfiling", "true");
|
||||
}
|
||||
|
||||
|
||||
+4
-1
@@ -17,6 +17,7 @@ import com.facebook.infer.annotation.ThreadConfined;
|
||||
import com.facebook.infer.annotation.ThreadSafe;
|
||||
import com.facebook.jni.HybridData;
|
||||
import com.facebook.proguard.annotations.DoNotStrip;
|
||||
import com.facebook.react.BuildConfig;
|
||||
import com.facebook.react.DebugCorePackage;
|
||||
import com.facebook.react.ReactPackage;
|
||||
import com.facebook.react.ViewManagerOnDemandReactPackage;
|
||||
@@ -144,7 +145,9 @@ final class ReactInstance {
|
||||
BindingsInstaller bindingsInstaller = delegate.getBindingsInstaller();
|
||||
// Notify JS if profiling is enabled
|
||||
boolean isProfiling =
|
||||
Systrace.isTracing(Systrace.TRACE_TAG_REACT_APPS | Systrace.TRACE_TAG_REACT_JS_VM_CALLS);
|
||||
BuildConfig.ENABLE_PERFETTO
|
||||
|| Systrace.isTracing(
|
||||
Systrace.TRACE_TAG_REACT_APPS | Systrace.TRACE_TAG_REACT_JS_VM_CALLS);
|
||||
|
||||
mHybridData =
|
||||
initHybrid(
|
||||
|
||||
Reference in New Issue
Block a user