From b36afe74ca7a0173d3236779861ac85e61664d6c Mon Sep 17 00:00:00 2001 From: Joshua Gross Date: Mon, 23 May 2022 16:54:58 -0700 Subject: [PATCH] Improve systrace marker in IntBufferBatchMountItem Summary: It's useful to have more systrace markers that are all the same, so that they can all be aggregated and work underneath them aggregated across an entire trace. As it is, this marker gets treated as unique nearly every time which makes analysis harder. Changelog: [Internal] Reviewed By: javache Differential Revision: D36533075 fbshipit-source-id: 925afa7db152eca1166891b41e7c6f6a511840af --- .../react/fabric/mounting/MountItemDispatcher.java | 9 +++------ .../mounting/mountitems/IntBufferBatchMountItem.java | 11 +---------- 2 files changed, 4 insertions(+), 16 deletions(-) diff --git a/ReactAndroid/src/main/java/com/facebook/react/fabric/mounting/MountItemDispatcher.java b/ReactAndroid/src/main/java/com/facebook/react/fabric/mounting/MountItemDispatcher.java index 663634c2859..a14cc858c5d 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/fabric/mounting/MountItemDispatcher.java +++ b/ReactAndroid/src/main/java/com/facebook/react/fabric/mounting/MountItemDispatcher.java @@ -206,8 +206,7 @@ public class MountItemDispatcher { if (viewCommandMountItemsToDispatch != null) { Systrace.beginSection( Systrace.TRACE_TAG_REACT_JAVA_BRIDGE, - "FabricUIManager::mountViews viewCommandMountItems to execute: " - + viewCommandMountItemsToDispatch.size()); + "FabricUIManager::mountViews viewCommandMountItems"); for (DispatchCommandMountItem command : viewCommandMountItemsToDispatch) { if (ENABLE_FABRIC_LOGS) { printMountItem(command, "dispatchMountItems: Executing viewCommandMountItem"); @@ -250,9 +249,7 @@ public class MountItemDispatcher { if (preMountItemsToDispatch != null) { Systrace.beginSection( - Systrace.TRACE_TAG_REACT_JAVA_BRIDGE, - "FabricUIManager::mountViews preMountItems to execute: " - + preMountItemsToDispatch.size()); + Systrace.TRACE_TAG_REACT_JAVA_BRIDGE, "FabricUIManager::mountViews preMountItems"); for (PreAllocateViewMountItem preMountItem : preMountItemsToDispatch) { executeOrEnqueue(preMountItem); @@ -264,7 +261,7 @@ public class MountItemDispatcher { if (mountItemsToDispatch != null) { Systrace.beginSection( Systrace.TRACE_TAG_REACT_JAVA_BRIDGE, - "FabricUIManager::mountViews mountItems to execute: " + mountItemsToDispatch.size()); + "FabricUIManager::mountViews mountItems to execute"); long batchedExecutionStartTime = SystemClock.uptimeMillis(); diff --git a/ReactAndroid/src/main/java/com/facebook/react/fabric/mounting/mountitems/IntBufferBatchMountItem.java b/ReactAndroid/src/main/java/com/facebook/react/fabric/mounting/mountitems/IntBufferBatchMountItem.java index 41d17f384ec..6644b942ba8 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/fabric/mounting/mountitems/IntBufferBatchMountItem.java +++ b/ReactAndroid/src/main/java/com/facebook/react/fabric/mounting/mountitems/IntBufferBatchMountItem.java @@ -71,16 +71,7 @@ public class IntBufferBatchMountItem implements MountItem { } private void beginMarkers(String reason) { - Systrace.beginSection( - Systrace.TRACE_TAG_REACT_JAVA_BRIDGE, - "FabricUIManager::" - + reason - + " - " - + mIntBufferLen - + " intBufSize " - + " - " - + mObjBufferLen - + " objBufSize"); + Systrace.beginSection(Systrace.TRACE_TAG_REACT_JAVA_BRIDGE, "FabricUIManager::" + reason); if (mCommitNumber > 0) { ReactMarker.logFabricMarker(