diff --git a/litho-rendercore/src/main/java/com/facebook/rendercore/MountState.java b/litho-rendercore/src/main/java/com/facebook/rendercore/MountState.java index 0c2fa265157..e3f3b7116a9 100644 --- a/litho-rendercore/src/main/java/com/facebook/rendercore/MountState.java +++ b/litho-rendercore/src/main/java/com/facebook/rendercore/MountState.java @@ -833,6 +833,8 @@ private void unmountItemRecursively(final long id) { attributes -> { attributes.put(RenderUnitId, id); attributes.put(Description, unit.getDescription()); + attributes.put(Bounds, node.getBounds()); + attributes.put(RootHostHashCode, mRootHost.hashCode()); }, scope -> { if (isTracing) { @@ -1084,14 +1086,27 @@ private void updateMountItemIfNeeded(RenderTreeNode renderTreeNode, MountItem cu mTracer.beginSection("UpdateItem: " + renderUnit.getDescription()); } - renderUnit.updateBinders( - mContext, - content, - currentRenderUnit, - currentLayoutData, - newLayoutData, - mountDelegate, - currentMountItem.isBound()); + trace( + DebugEvent.RenderUnitUpdated, + String.valueOf(mRenderTree.getRenderStateId()), + attributes -> { + attributes.put(RenderUnitId, renderTreeNode.getRenderUnit().getId()); + attributes.put(Description, renderTreeNode.getRenderUnit().getDescription()); + attributes.put(Bounds, renderTreeNode.getBounds()); + attributes.put(RootHostHashCode, mRootHost.hashCode()); + }, + scope -> { + renderUnit.updateBinders( + mContext, + content, + currentRenderUnit, + currentLayoutData, + newLayoutData, + mountDelegate, + currentMountItem.isBound()); + + return Unit.INSTANCE; + }); } currentMountItem.setIsBound(true); diff --git a/litho-rendercore/src/main/java/com/facebook/rendercore/debug/DebugEvents.kt b/litho-rendercore/src/main/java/com/facebook/rendercore/debug/DebugEvents.kt index cf13ffa39b3..8ca33cf636f 100644 --- a/litho-rendercore/src/main/java/com/facebook/rendercore/debug/DebugEvents.kt +++ b/litho-rendercore/src/main/java/com/facebook/rendercore/debug/DebugEvents.kt @@ -38,6 +38,7 @@ sealed class DebugEvent( const val MountItemMount = "RenderCore.MountItem.Mount" const val RenderUnitMounted = "RenderCore.RenderUnit.Mounted" const val RenderUnitUnmounted = "RenderCore.RenderUnit.Unmounted" + const val RenderUnitUpdated = "RenderCore.RenderUnit.Updated" } /** Returns the value of attribute with [name]. */