Skip to content

ENABLE_JS_SYSTRACE_TO_ETW (JS ETW Tracing) is Unintentionally Always Disabled #4245

Closed

Description

In #3934 we introduced a subtle build-logic issue which leads to ENABLE_JS_SYSTRACE_TO_ETW always being disabled. We had intended to only enable it when using patched React Native, but end up comparing against a literal string instead of a property. See '$PATCH_RN'=='true' in the following condition.

<PreprocessorDefinitions Condition="'$(ENABLE_JS_SYSTRACE_TO_ETW)'=='true' AND '$PATCH_RN'=='true'">ENABLE_JS_SYSTRACE_TO_ETW;WITH_FBSYSTRACE;%(PreprocessorDefinitions)</PreprocessorDefinitions>

Reenabling this on deforked React Native leads to build errors:

d:\react-native-windows\vnext\reactwindowscore\tracing\fbsystrace.h(71): error C2664: 'void fbsystrace::FbSystraceSection::init(void)': cannot convert argument 1 from 'const double' to 'std::string &&' (compiling source file D:\react-native-windows\vnext\build\x64\Debug\ReactCommon\react-native-patched\ReactCommon\jsiexecutor\jsireact\JSIExecutor.cpp)
2>  d:\react-native-windows\vnext\reactwindowscore\tracing\fbsystrace.h(69): note: Reason: cannot convert from 'const double' to 'std::string' (compiling source file D:\react-native-windows\vnext\build\x64\Debug\ReactCommon\react-native-patched\ReactCommon\jsiexecutor\jsireact\JSIExecutor.cpp)
2>  d:\react-native-windows\vnext\reactwindowscore\tracing\fbsystrace.h(69): note: No constructor could take the source type, or constructor overload resolution was ambiguous (compiling source file D:\react-native-windows\vnext\build\x64\Debug\ReactCommon\react-native-patched\ReactCommon\jsiexecutor\jsireact\JSIExecutor.cpp)
2>  d:\react-native-windows\vnext\reactwindowscore\tracing\fbsystrace.h(82): note: see reference to function template instantiation 'void fbsystrace::FbSystraceSection::init<const double&>(std::string &&,const double &)' being compiled (compiling source file D:\react-native-windows\vnext\build\x64\Debug\ReactCommon\react-native-patched\ReactCommon\jsiexecutor\jsireact\JSIExecutor.cpp)
2>  d:\react-native-windows\vnext\build\x64\debug\reactcommon\react-native-patched\reactcommon\cxxreact\systracesection.h(30): note: see reference to function template instantiation 'fbsystrace::FbSystraceSection::FbSystraceSection<const char(&)[11],const double&>(uint64_t,std::string &&,const char (&)[11],const double &)' being compiled (compiling source file D:\react-native-windows\vnext\build\x64\Debug\ReactCommon\react-native-patched\ReactCommon\jsiexecutor\jsireact\JSIExecutor.cpp)
2>  d:\react-native-windows\vnext\build\x64\debug\reactcommon\react-native-patched\reactcommon\jsiexecutor\jsireact\jsiexecutor.cpp(233): note: see reference to function template instantiation 'facebook::react::ConcreteSystraceSection::ConcreteSystraceSection<const char(&)[11],const double&>(const char *,const char (&)[11],const double &)' being compiled
2>  d:\react-native-windows\node_modules\.folly\folly-2019.09.30.00\folly\range.h(1356): note: see reference to class template instantiation 'folly::Range<const char *>' being compiled (compiling source file D:\react-native-windows\vnext\build\x64\Debug\ReactCommon\react-native-patched\ReactCommon\jsiexecutor\jsireact\JSIExecutor.cpp)

We can fix this without much issue in 0.60-stable, but need to think a bit harder in how to do it in 0.61 where we don't use the fork.

Activity

  1. ghost added
    Needs: Triage 🔍New issue that needs to be reviewed by the issue management team (label applied by bot)
    on Mar 6, 2020
  2. NickGerleman commented on Mar 6, 2020

    @NickGerleman
    ContributorAuthor

    Anandraj (@mganandraj) what do you think the impact of this is? How urgent do you think it is to backport a fix to 0.60-stable?

  3. removed
    Needs: Triage 🔍New issue that needs to be reviewed by the issue management team (label applied by bot)
    on Mar 9, 2020
  4. ghost added a commit that references this issue on Mar 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions