From 7d7d403ecfa4b4bd752e77880651d7764e67d01c Mon Sep 17 00:00:00 2001 From: Samuel Susla Date: Fri, 12 Jul 2024 04:10:31 -0700 Subject: [PATCH] add number of instructions to systrace (#45384) Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/45384 changelog: [internal] add a little more information to the mounting instructions block Reviewed By: javache, rubennorte, mdvacca Differential Revision: D59631537 fbshipit-source-id: 140ba1834172686998c51a9645ea1e66fff1879d --- .../fabric/mounting/mountitems/IntBufferBatchMountItem.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/fabric/mounting/mountitems/IntBufferBatchMountItem.java b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/fabric/mounting/mountitems/IntBufferBatchMountItem.java index 52ea0ed8a99..174409c9173 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/fabric/mounting/mountitems/IntBufferBatchMountItem.java +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/fabric/mounting/mountitems/IntBufferBatchMountItem.java @@ -95,9 +95,13 @@ final class IntBufferBatchMountItem implements BatchMountItem { int type = rawType & ~INSTRUCTION_FLAG_MULTIPLE; int numInstructions = ((rawType & INSTRUCTION_FLAG_MULTIPLE) != 0 ? mIntBuffer[i++] : 1); + String[] args = {"numInstructions", String.valueOf(numInstructions)}; + Systrace.beginSection( Systrace.TRACE_TAG_REACT_JAVA_BRIDGE, - "IntBufferBatchMountItem::mountInstructions::" + nameForInstructionString(type)); + "IntBufferBatchMountItem::mountInstructions::" + nameForInstructionString(type), + args, + args.length); for (int k = 0; k < numInstructions; k++) { if (type == INSTRUCTION_CREATE) { String componentName = getFabricComponentName((String) mObjBuffer[j++]);