Skip to content

Commit

Permalink
clarify systrace annotations in MountItemDispatcher (facebook#44747)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: facebook#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
  • Loading branch information
sammy-SC authored and facebook-github-bot committed Jun 1, 2024
1 parent c046198 commit 033a55f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ private boolean dispatchMountItems() {
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");
Expand Down Expand Up @@ -263,7 +263,7 @@ private boolean dispatchMountItems() {
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");
Expand All @@ -277,7 +277,7 @@ private boolean dispatchMountItems() {
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();

Expand Down Expand Up @@ -314,12 +314,12 @@ private boolean dispatchMountItems() {
}
}
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;
}

Expand All @@ -337,7 +337,8 @@ public void dispatchPreMountItems(long frameTimeNanos) {
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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit 033a55f

Please sign in to comment.