Add systrace sections to core

Summary:
I'm hunting down the source of a perf regression on a screen and think that having these systrace sections could be handy for this and future investigations.

Changelog: [internal]

Reviewed By: mdvacca

Differential Revision: D29802969

fbshipit-source-id: f4030261da8888ddeb32ae41b9cf2b25af6a5583
This commit is contained in:
Joshua Gross
2021-07-20 19:26:47 -07:00
committed by Facebook GitHub Bot
parent b0e39b2ed9
commit 24d91268b6
4 changed files with 45 additions and 30 deletions
@@ -260,7 +260,9 @@ void Binding::startSurface(
animationDriver_);
{
SystraceSection s2("FabricUIManagerBinding::startSurface::surfaceId::lock");
std::unique_lock<better::shared_mutex> lock(surfaceHandlerRegistryMutex_);
SystraceSection s3("FabricUIManagerBinding::startSurface::surfaceId");
surfaceHandlerRegistry_.emplace(surfaceId, std::move(surfaceHandler));
}
}
@@ -319,7 +321,11 @@ void Binding::startSurfaceWithConstraints(
animationDriver_);
{
SystraceSection s2(
"FabricUIManagerBinding::startSurfaceWithConstraints::surfaceId::lock");
std::unique_lock<better::shared_mutex> lock(surfaceHandlerRegistryMutex_);
SystraceSection s3(
"FabricUIManagerBinding::startSurfaceWithConstraints::surfaceId");
surfaceHandlerRegistry_.emplace(surfaceId, std::move(surfaceHandler));
}
}