Skip to content

Commit 9c11b81

Browse files
rubennortefacebook-github-bot
authored andcommitted
Add some additional Systrace markers in Fabric (#37675)
Summary: Pull Request resolved: #37675 Changelog: [Internal] Reviewed By: rshest Differential Revision: D46393554 fbshipit-source-id: 905097c82c96c7f627f1999f53b509ba0f434dd5
1 parent 52154e5 commit 9c11b81

File tree

3 files changed

+9
-0
lines changed

3 files changed

+9
-0
lines changed

packages/react-native/ReactAndroid/src/main/jni/react/fabric/FabricMountingManager.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -253,6 +253,8 @@ jni::local_ref<jobject> FabricMountingManager::getProps(
253253

254254
void FabricMountingManager::executeMount(
255255
const MountingTransaction &transaction) {
256+
SystraceSection section("FabricMountingManager::executeMount");
257+
256258
std::lock_guard<std::recursive_mutex> lock(commitMutex_);
257259
auto finishTransactionStartTime = telemetryTimePointNow();
258260

packages/react-native/ReactCommon/react/renderer/mounting/MountingCoordinator.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
#include <condition_variable>
1616

1717
#include <react/debug/react_native_assert.h>
18+
#include <react/renderer/debug/SystraceSection.h>
1819
#include <react/renderer/mounting/ShadowViewMutation.h>
1920

2021
namespace facebook::react {
@@ -76,6 +77,8 @@ void MountingCoordinator::resetLatestRevision() const {
7677

7778
std::optional<MountingTransaction> MountingCoordinator::pullTransaction()
7879
const {
80+
SystraceSection section("MountingCoordinator::pullTransaction");
81+
7982
std::lock_guard<std::mutex> lock(mutex_);
8083

8184
auto transaction = std::optional<MountingTransaction>{};

packages/react-native/ReactCommon/react/renderer/uimanager/UIManager.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -633,6 +633,8 @@ RootShadowNode::Unshared UIManager::shadowTreeWillCommit(
633633
ShadowTree const &shadowTree,
634634
RootShadowNode::Shared const &oldRootShadowNode,
635635
RootShadowNode::Unshared const &newRootShadowNode) const {
636+
SystraceSection s("UIManager::shadowTreeWillCommit");
637+
636638
std::shared_lock lock(commitHookMutex_);
637639

638640
auto resultRootShadowNode = newRootShadowNode;
@@ -656,6 +658,8 @@ void UIManager::shadowTreeDidFinishTransaction(
656658
}
657659

658660
void UIManager::reportMount(SurfaceId surfaceId) const {
661+
SystraceSection s("UIManager::reportMount");
662+
659663
auto time = JSExecutor::performanceNow();
660664

661665
auto rootShadowNode = RootShadowNode::Shared{};

0 commit comments

Comments
 (0)