if (_enabled) {
      profileName = typeof profileName === 'function' ?
        profileName() : profileName;
      global.nativeTraceEndAsyncSection(TRACE_TAG_REACT_APPS, profileName, cookie);
    }
beginAsyncEvent/endAsyncEvent for starting and then ending a profile where the end can either
occur on another thread or out of the current stack frame, eg await
the returned cookie variable should be used as input into the endAsyncEvent call to end the profile