Enable folly::Symbolizer for debug symbols #8123
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR enables folly::Symbolizer in HHVM, in order to have debug symbols (in stacktraces, perf, GDB) when huge pages are enabled (default behavior for open source builds). This feature can be
turned off by setting the CMake option ENABLE_FOLLY_SYMBOLIZER to OFF.
Also, one nice side-effect is that this change causes HHVM to show symbols in backtraces (after a crash) for non-huge-pages builds, which were missing for some reason.
It also fixes an issue with the build system, by creating a new cmake file that initializes the OS variables and including it before Options.cmake, where these variables are used. More specifically, MAP_TEXT_HUGE_PAGES and ENABLE_FOLLY_SYMBOLIZER are set depending on the value of the LINUX variable, which is only set in HPHPCompiler.cmake, included later. This causes these 2 variables not to be visible in third-party modules the first time configure is run (subsequent times the variables are taken from the cmake cache).
This PR depends on hhvm/hhvm-third-party#123.