Add Systrace-based telemetry to Hermes GC.

Reviewed By: amnn

Differential Revision: D6393879

fbshipit-source-id: d35a4647d000356dc99bce3187acc50d3a69ddeb
This commit is contained in:
David Detlefs
2017-11-23 15:10:52 -08:00
committed by Facebook Github Bot
parent 968c88d141
commit 05e862d48d
3 changed files with 9 additions and 8 deletions

View File

@@ -27,7 +27,7 @@ type RelayProfiler = {
/* eslint no-bitwise: 0 */
const TRACE_TAG_REACT_APPS = 1 << 17;
const TRACE_TAG_JSC_CALLS = 1 << 27;
const TRACE_TAG_JS_VM_CALLS = 1 << 27;
let _enabled = false;
let _asyncCookie = 0;
@@ -155,9 +155,9 @@ const Systrace = {
if (_enabled !== enabled) {
if (__DEV__) {
if (enabled) {
global.nativeTraceBeginLegacy && global.nativeTraceBeginLegacy(TRACE_TAG_JSC_CALLS);
global.nativeTraceBeginLegacy && global.nativeTraceBeginLegacy(TRACE_TAG_JS_VM_CALLS);
} else {
global.nativeTraceEndLegacy && global.nativeTraceEndLegacy(TRACE_TAG_JSC_CALLS);
global.nativeTraceEndLegacy && global.nativeTraceEndLegacy(TRACE_TAG_JS_VM_CALLS);
}
if (_canInstallReactHook) {
if (_useFiber) {