Skip to content

Commit aa35010

Browse files
committed
#3116: Enable CXX11 ABI
Summary: We use a `-D_GLIBCXX_USE_CXX11_ABI=0` build option which we actually don't need and this causes single-line `std::string::_Rep::_S_create` stack traces in heap profiles which are responsible for a high amount of memory consumption in some of the scenarios we've seen investigating OOM issues. This change removes this option from both YB and third-party builds, so we will be using correct `std::string` implementation instead of the old one for GCC builds. Test Plan: - Jenkins - Populated cluster with data using `java -jar ~/code/yb-sample-apps.jar --workload CassandraBatchTimeseries --nodes $NODES --num_writes 100000 --num_threads_read 1 --num_threads_write 4 --min_metrics_count 10000 --max_metrics_count 20000 --num_unique_keys 1000000000 --nouuid --value_size 100`. Performed rolling upgrade. Checked that data is kept and there are no backward compatibility errors. - Checked local RF=3 cluster on AWS m3.xlarge with Xeon E5-2665. Tried load and query ysql sample data. Reviewers: sergei, mikhail Reviewed By: mikhail Subscribers: ybase Differential Revision: https://phabricator.dev.yugabyte.com/D7673
1 parent 4843cf2 commit aa35010

6 files changed

+3
-15
lines changed

.ycm_extra_conf.py

-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@
4444
'c++',
4545
'-DYB_HEADERS_NO_STUBS=1',
4646
'-Dintegration_tests_EXPORTS',
47-
'-D_GLIBCXX_USE_CXX11_ABI=0',
4847
'-D__STDC_FORMAT_MACROS',
4948
'-fno-strict-aliasing',
5049
'-msse4.2',

CMakeLists.txt

-10
Original file line numberDiff line numberDiff line change
@@ -709,16 +709,6 @@ else()
709709
message("Not specifying linker flags to not allow any undefined symbols: this is ASAN/TSAN")
710710
endif()
711711

712-
# Explicitly disable the new gcc5 ABI. Until clang supports abi tags [1], any
713-
# generated code (which always uses clang) must be built against the old ABI.
714-
# (Note: we are not using any LLVM codegen in YugaByte as of 08/2016).
715-
# There's no recourse for using both ABIs in the same process; gcc's advice [2]
716-
# is to build everything against the old ABI.
717-
#
718-
# 1. https://llvm.org/bugs/show_bug.cgi?id=23529
719-
# 2. https://gcc.gnu.org/onlinedocs/libstdc++/manual/using_dual_abi.html
720-
ADD_CXX_FLAGS(-D_GLIBCXX_USE_CXX11_ABI=0)
721-
722712
# We don't want to use any stubs; that's exclusively for builds using our
723713
# exported client headers).
724714
ADD_CXX_FLAGS(-DYB_HEADERS_NO_STUBS=1)
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2019-12-05T15_39_49
1+
2019-12-07T23_26_21
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2019-12-05T07_41_50
1+
2019-12-07T15_28_30
+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
https://github.com/yugabyte/yugabyte-db-thirdparty/releases/download/v20191209154536-779cc9fd56/yugabyte-db-thirdparty-v20191209154536-779cc9fd56-centos.tar.gz
1+
https://github.com/yugabyte/yugabyte-db-thirdparty/releases/download/v20191209181439-7fc63d1583/yugabyte-db-thirdparty-v20191209181439-7fc63d1583-centos.tar.gz

thirdparty/yb_build_thirdparty_main.py

-1
Original file line numberDiff line numberDiff line change
@@ -519,7 +519,6 @@ def init_flags(self):
519519
"/tmp/making_sure_we_have_enough_room_to_set_rpath_later_{}_end_of_rpath"
520520
.format('_' * 256))
521521

522-
self.cxx_flags.append('-D_GLIBCXX_USE_CXX11_ABI=0')
523522
self.dylib_suffix = "so"
524523
elif is_mac():
525524
self.dylib_suffix = "dylib"

0 commit comments

Comments
 (0)