Permalink
Browse files

Update systrace markers

Reviewed By: AaaChiuuu

Differential Revision: D5707578

fbshipit-source-id: 90afc7c0c7dd66eda621f990ca3a11848adeb4e5
  • Loading branch information...
javache authored and facebook-github-bot committed Aug 30, 2017
1 parent e9d7711 commit c68bb6a72c0a63cc26e5cdcfcddf21e270d1de19
Showing with 6 additions and 6 deletions.
  1. +5 −5 ReactCommon/cxxreact/Instance.cpp
  2. +1 −1 ReactCommon/cxxreact/ModuleRegistry.cpp
@@ -54,7 +54,7 @@ void Instance::loadApplication(std::unique_ptr<JSModulesUnbundle> unbundle,
std::unique_ptr<const JSBigString> string,
std::string sourceURL) {
callback_->incrementPendingJSCalls();
SystraceSection s("reactbridge_xplat_loadApplication", "sourceURL",
SystraceSection s("Instance::loadApplication", "sourceURL",
sourceURL);
nativeToJsBridge_->loadApplication(std::move(unbundle), std::move(string),
std::move(sourceURL));
@@ -66,23 +66,23 @@ void Instance::loadApplicationSync(std::unique_ptr<JSModulesUnbundle> unbundle,
std::unique_lock<std::mutex> lock(m_syncMutex);
m_syncCV.wait(lock, [this] { return m_syncReady; });
SystraceSection s("reactbridge_xplat_loadApplicationSync", "sourceURL",
SystraceSection s("Instance::loadApplicationSync", "sourceURL",
sourceURL);
nativeToJsBridge_->loadApplicationSync(std::move(unbundle), std::move(string),
std::move(sourceURL));
}
void Instance::setSourceURL(std::string sourceURL) {
callback_->incrementPendingJSCalls();
SystraceSection s("reactbridge_xplat_setSourceURL", "sourceURL", sourceURL);
SystraceSection s("Instance::setSourceURL", "sourceURL", sourceURL);
nativeToJsBridge_->loadApplication(nullptr, nullptr, std::move(sourceURL));
}
void Instance::loadScriptFromString(std::unique_ptr<const JSBigString> string,
std::string sourceURL,
bool loadSynchronously) {
SystraceSection s("reactbridge_xplat_loadScriptFromString", "sourceURL",
SystraceSection s("Instance::loadScriptFromString", "sourceURL",
sourceURL);
if (loadSynchronously) {
loadApplicationSync(nullptr, std::move(string), std::move(sourceURL));
@@ -123,7 +123,7 @@ void Instance::callJSFunction(std::string &&module, std::string &&method,
}
void Instance::callJSCallback(uint64_t callbackId, folly::dynamic &&params) {
SystraceSection s("<callback>");
SystraceSection s("Instance::callJSCallback");
callback_->incrementPendingJSCalls();
nativeToJsBridge_->invokeCallback((double)callbackId, std::move(params));
}
@@ -74,7 +74,7 @@ std::vector<std::string> ModuleRegistry::moduleNames() {
}
folly::Optional<ModuleConfig> ModuleRegistry::getConfig(const std::string& name) {
SystraceSection s("getConfig", "module", name);
SystraceSection s("ModuleRegistry::getConfig", "module", name);
// Initialize modulesByName_
if (modulesByName_.empty() && !modules_.empty()) {

0 comments on commit c68bb6a

Please sign in to comment.