From aa5141c381230356b777eebdbdd649322d9e6c9b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rub=C3=A9n=20Norte?= Date: Fri, 3 Nov 2023 08:10:58 -0700 Subject: [PATCH] Remove Systrace annotation that is breaking logged data Summary: We're logging a systrace section that for some reason is breaking the data in application traces. That section isn't especially relevant so we can just remove it. Changelog: [internal] Reviewed By: sammy-SC Differential Revision: D50939346 fbshipit-source-id: 350a528d83c6fe6e7100275644d3d02a96700e59 --- .../UIManagerModuleConstantsHelper.java | 23 ++++--------------- 1 file changed, 5 insertions(+), 18 deletions(-) diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/UIManagerModuleConstantsHelper.java b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/UIManagerModuleConstantsHelper.java index 6d0770447bfb90..76ae277be99300 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/UIManagerModuleConstantsHelper.java +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/UIManagerModuleConstantsHelper.java @@ -7,15 +7,12 @@ package com.facebook.react.uimanager; -import static com.facebook.systrace.Systrace.TRACE_TAG_REACT_JAVA_BRIDGE; - import androidx.annotation.Nullable; import androidx.annotation.VisibleForTesting; import com.facebook.common.logging.FLog; import com.facebook.react.common.MapBuilder; import com.facebook.react.common.build.ReactBuildConfig; import com.facebook.react.config.ReactFeatureFlags; -import com.facebook.systrace.SystraceMessage; import java.util.ArrayList; import java.util.HashMap; import java.util.HashSet; @@ -112,21 +109,11 @@ private static void validateDirectEventNames( for (ViewManager viewManager : viewManagers) { final String viewManagerName = viewManager.getName(); - SystraceMessage.beginSection( - TRACE_TAG_REACT_JAVA_BRIDGE, "UIManagerModuleConstantsHelper.createConstants") - .arg("ViewManager", viewManagerName) - .arg("Lazy", false) - .flush(); - - try { - Map viewManagerConstants = - createConstantsForViewManager( - viewManager, null, null, allBubblingEventTypes, allDirectEventTypes); - if (!viewManagerConstants.isEmpty()) { - constants.put(viewManagerName, viewManagerConstants); - } - } finally { - SystraceMessage.endSection(TRACE_TAG_REACT_JAVA_BRIDGE); + Map viewManagerConstants = + createConstantsForViewManager( + viewManager, null, null, allBubblingEventTypes, allDirectEventTypes); + if (!viewManagerConstants.isEmpty()) { + constants.put(viewManagerName, viewManagerConstants); } }