clarify systrace annotations in MountItemDispatcher (#44747)

Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/44747

changelog: [internal]

Change names of systrace blocks to better reflect where the operation is happening.

Reviewed By: rubennorte

Differential Revision: D57969459

fbshipit-source-id: 3c857a66f060992e1792e18973caafea7c995c5b
This commit is contained in:
Samuel Susla
2024-06-01 00:56:31 -07:00
committed by Facebook GitHub Bot
parent c046198cc9
commit 033a55f7fb
2 changed files with 9 additions and 7 deletions
@@ -221,7 +221,7 @@ public class MountItemDispatcher {
if (viewCommandMountItemsToDispatch != null) {
Systrace.beginSection(
Systrace.TRACE_TAG_REACT_JAVA_BRIDGE,
"FabricUIManager::mountViews viewCommandMountItems");
"MountItemDispatcher::mountViews viewCommandMountItems");
for (DispatchCommandMountItem command : viewCommandMountItemsToDispatch) {
if (ENABLE_FABRIC_LOGS) {
printMountItem(command, "dispatchMountItems: Executing viewCommandMountItem");
@@ -263,7 +263,7 @@ public class MountItemDispatcher {
Collection<MountItem> preMountItemsToDispatch = getAndResetPreMountItems();
if (preMountItemsToDispatch != null) {
Systrace.beginSection(
Systrace.TRACE_TAG_REACT_JAVA_BRIDGE, "FabricUIManager::mountViews preMountItems");
Systrace.TRACE_TAG_REACT_JAVA_BRIDGE, "MountItemDispatcher::mountViews preMountItems");
for (MountItem preMountItem : preMountItemsToDispatch) {
if (ENABLE_FABRIC_LOGS) {
printMountItem(preMountItem, "dispatchMountItems: Executing preMountItem");
@@ -277,7 +277,7 @@ public class MountItemDispatcher {
if (mountItemsToDispatch != null) {
Systrace.beginSection(
Systrace.TRACE_TAG_REACT_JAVA_BRIDGE,
"FabricUIManager::mountViews mountItems to execute");
"MountItemDispatcher::mountViews mountItems to execute");
long batchedExecutionStartTime = SystemClock.uptimeMillis();
@@ -314,12 +314,12 @@ public class MountItemDispatcher {
}
}
mBatchedExecutionTime += SystemClock.uptimeMillis() - batchedExecutionStartTime;
Systrace.endSection(Systrace.TRACE_TAG_REACT_JAVA_BRIDGE);
}
mItemDispatchListener.didMountItems(mountItemsToDispatch);
Systrace.endSection(Systrace.TRACE_TAG_REACT_JAVA_BRIDGE);
return true;
}
@@ -337,7 +337,8 @@ public class MountItemDispatcher {
return;
}
Systrace.beginSection(Systrace.TRACE_TAG_REACT_JAVA_BRIDGE, "FabricUIManager::premountViews");
Systrace.beginSection(
Systrace.TRACE_TAG_REACT_JAVA_BRIDGE, "MountItemDispatcher::premountViews");
// dispatchPreMountItems cannot be reentrant, but we want to prevent dispatchMountItems from
// reentering during dispatchPreMountItems
@@ -75,7 +75,8 @@ final class IntBufferBatchMountItem implements BatchMountItem {
}
private void beginMarkers(String reason) {
Systrace.beginSection(Systrace.TRACE_TAG_REACT_JAVA_BRIDGE, "FabricUIManager::" + reason);
Systrace.beginSection(
Systrace.TRACE_TAG_REACT_JAVA_BRIDGE, "IntBufferBatchMountItem::" + reason);
if (mCommitNumber > 0) {
ReactMarker.logFabricMarker(