From 0a3d5f90a9688010257a323d57c7f4ede7b9871e Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Wed, 1 Mar 2017 17:08:39 -0800 Subject: [PATCH] Revert "Enable lto for performance testing" --- Makefile | 122 +++++++++++------------ build.yaml | 11 +- tools/run_tests/generated/configs.json | 51 +++++----- tools/run_tests/generated/tests.json | 34 ------- tools/run_tests/run_microbenchmark.py | 6 +- tools/run_tests/run_performance_tests.py | 4 +- 6 files changed, 88 insertions(+), 140 deletions(-) diff --git a/Makefile b/Makefile index 3a21854a1e8..c16b4ff8ea6 100644 --- a/Makefile +++ b/Makefile @@ -95,42 +95,6 @@ LDXX_opt = $(DEFAULT_CXX) CPPFLAGS_opt = -O2 DEFINES_opt = NDEBUG -VALID_CONFIG_asan-trace-cmp = 1 -REQUIRE_CUSTOM_LIBRARIES_asan-trace-cmp = 1 -CC_asan-trace-cmp = clang -CXX_asan-trace-cmp = clang++ -LD_asan-trace-cmp = clang -LDXX_asan-trace-cmp = clang++ -CPPFLAGS_asan-trace-cmp = -O0 -fsanitize-coverage=edge -fsanitize-coverage=trace-cmp -fsanitize=address -fno-omit-frame-pointer -Wno-unused-command-line-argument -DGPR_NO_DIRECT_SYSCALLS -LDFLAGS_asan-trace-cmp = -fsanitize=address - -VALID_CONFIG_dbg = 1 -CC_dbg = $(DEFAULT_CC) -CXX_dbg = $(DEFAULT_CXX) -LD_dbg = $(DEFAULT_CC) -LDXX_dbg = $(DEFAULT_CXX) -CPPFLAGS_dbg = -O0 -DEFINES_dbg = _DEBUG DEBUG - -VALID_CONFIG_asan = 1 -REQUIRE_CUSTOM_LIBRARIES_asan = 1 -CC_asan = clang -CXX_asan = clang++ -LD_asan = clang -LDXX_asan = clang++ -CPPFLAGS_asan = -O0 -fsanitize-coverage=edge -fsanitize=address -fno-omit-frame-pointer -Wno-unused-command-line-argument -DGPR_NO_DIRECT_SYSCALLS -LDFLAGS_asan = -fsanitize=address - -VALID_CONFIG_msan = 1 -REQUIRE_CUSTOM_LIBRARIES_msan = 1 -CC_msan = clang -CXX_msan = clang++ -LD_msan = clang -LDXX_msan = clang++ -CPPFLAGS_msan = -O0 -fsanitize-coverage=edge -fsanitize=memory -fsanitize-memory-track-origins -fno-omit-frame-pointer -DGTEST_HAS_TR1_TUPLE=0 -DGTEST_USE_OWN_TR1_TUPLE=1 -Wno-unused-command-line-argument -fPIE -pie -DGPR_NO_DIRECT_SYSCALLS -LDFLAGS_msan = -fsanitize=memory -DGTEST_HAS_TR1_TUPLE=0 -DGTEST_USE_OWN_TR1_TUPLE=1 -fPIE -pie $(if $(JENKINS_BUILD),-Wl$(comma)-Ttext-segment=0x7e0000000000,) -DEFINES_msan = NDEBUG - VALID_CONFIG_basicprof = 1 CC_basicprof = $(DEFAULT_CC) CXX_basicprof = $(DEFAULT_CXX) @@ -157,25 +121,22 @@ LDXX_asan-noleaks = clang++ CPPFLAGS_asan-noleaks = -O0 -fsanitize-coverage=edge -fsanitize=address -fno-omit-frame-pointer -Wno-unused-command-line-argument -DGPR_NO_DIRECT_SYSCALLS LDFLAGS_asan-noleaks = -fsanitize=address -VALID_CONFIG_ubsan = 1 -REQUIRE_CUSTOM_LIBRARIES_ubsan = 1 -CC_ubsan = clang -CXX_ubsan = clang++ -LD_ubsan = clang -LDXX_ubsan = clang++ -CPPFLAGS_ubsan = -O0 -fsanitize-coverage=edge -fsanitize=undefined,unsigned-integer-overflow -fno-omit-frame-pointer -Wno-unused-command-line-argument -Wvarargs -LDFLAGS_ubsan = -fsanitize=undefined,unsigned-integer-overflow -DEFINES_ubsan = NDEBUG +VALID_CONFIG_asan-trace-cmp = 1 +REQUIRE_CUSTOM_LIBRARIES_asan-trace-cmp = 1 +CC_asan-trace-cmp = clang +CXX_asan-trace-cmp = clang++ +LD_asan-trace-cmp = clang +LDXX_asan-trace-cmp = clang++ +CPPFLAGS_asan-trace-cmp = -O0 -fsanitize-coverage=edge -fsanitize-coverage=trace-cmp -fsanitize=address -fno-omit-frame-pointer -Wno-unused-command-line-argument -DGPR_NO_DIRECT_SYSCALLS +LDFLAGS_asan-trace-cmp = -fsanitize=address -VALID_CONFIG_tsan = 1 -REQUIRE_CUSTOM_LIBRARIES_tsan = 1 -CC_tsan = clang -CXX_tsan = clang++ -LD_tsan = clang -LDXX_tsan = clang++ -CPPFLAGS_tsan = -O0 -fsanitize=thread -fno-omit-frame-pointer -Wno-unused-command-line-argument -DGPR_NO_DIRECT_SYSCALLS -LDFLAGS_tsan = -fsanitize=thread -DEFINES_tsan = GRPC_TSAN +VALID_CONFIG_dbg = 1 +CC_dbg = $(DEFAULT_CC) +CXX_dbg = $(DEFAULT_CXX) +LD_dbg = $(DEFAULT_CC) +LDXX_dbg = $(DEFAULT_CXX) +CPPFLAGS_dbg = -O0 +DEFINES_dbg = _DEBUG DEBUG VALID_CONFIG_stapprof = 1 CC_stapprof = $(DEFAULT_CC) @@ -203,22 +164,52 @@ CPPFLAGS_memcheck = -O0 LDFLAGS_memcheck = -rdynamic DEFINES_memcheck = _DEBUG DEBUG -VALID_CONFIG_lto = 1 -CC_lto = $(DEFAULT_CC) -CXX_lto = $(DEFAULT_CXX) -LD_lto = $(DEFAULT_CC) -LDXX_lto = $(DEFAULT_CXX) -CPPFLAGS_lto = -O3 -flto -LDFLAGS_lto = -O3 -flto -DEFINES_lto = NDEBUG +VALID_CONFIG_asan = 1 +REQUIRE_CUSTOM_LIBRARIES_asan = 1 +CC_asan = clang +CXX_asan = clang++ +LD_asan = clang +LDXX_asan = clang++ +CPPFLAGS_asan = -O0 -fsanitize-coverage=edge -fsanitize=address -fno-omit-frame-pointer -Wno-unused-command-line-argument -DGPR_NO_DIRECT_SYSCALLS +LDFLAGS_asan = -fsanitize=address + +VALID_CONFIG_tsan = 1 +REQUIRE_CUSTOM_LIBRARIES_tsan = 1 +CC_tsan = clang +CXX_tsan = clang++ +LD_tsan = clang +LDXX_tsan = clang++ +CPPFLAGS_tsan = -O0 -fsanitize=thread -fno-omit-frame-pointer -Wno-unused-command-line-argument -DGPR_NO_DIRECT_SYSCALLS +LDFLAGS_tsan = -fsanitize=thread +DEFINES_tsan = GRPC_TSAN + +VALID_CONFIG_ubsan = 1 +REQUIRE_CUSTOM_LIBRARIES_ubsan = 1 +CC_ubsan = clang +CXX_ubsan = clang++ +LD_ubsan = clang +LDXX_ubsan = clang++ +CPPFLAGS_ubsan = -O0 -fsanitize-coverage=edge -fsanitize=undefined,unsigned-integer-overflow -fno-omit-frame-pointer -Wno-unused-command-line-argument -Wvarargs +LDFLAGS_ubsan = -fsanitize=undefined,unsigned-integer-overflow +DEFINES_ubsan = NDEBUG + +VALID_CONFIG_msan = 1 +REQUIRE_CUSTOM_LIBRARIES_msan = 1 +CC_msan = clang +CXX_msan = clang++ +LD_msan = clang +LDXX_msan = clang++ +CPPFLAGS_msan = -O0 -fsanitize-coverage=edge -fsanitize=memory -fsanitize-memory-track-origins -fno-omit-frame-pointer -DGTEST_HAS_TR1_TUPLE=0 -DGTEST_USE_OWN_TR1_TUPLE=1 -Wno-unused-command-line-argument -fPIE -pie -DGPR_NO_DIRECT_SYSCALLS +LDFLAGS_msan = -fsanitize=memory -DGTEST_HAS_TR1_TUPLE=0 -DGTEST_USE_OWN_TR1_TUPLE=1 -fPIE -pie $(if $(JENKINS_BUILD),-Wl$(comma)-Ttext-segment=0x7e0000000000,) +DEFINES_msan = NDEBUG VALID_CONFIG_mutrace = 1 CC_mutrace = $(DEFAULT_CC) CXX_mutrace = $(DEFAULT_CXX) LD_mutrace = $(DEFAULT_CC) LDXX_mutrace = $(DEFAULT_CXX) -CPPFLAGS_mutrace = -O3 -fno-omit-frame-pointer -flto -LDFLAGS_mutrace = -rdynamic -O3 -flto +CPPFLAGS_mutrace = -O3 -fno-omit-frame-pointer +LDFLAGS_mutrace = -rdynamic DEFINES_mutrace = NDEBUG VALID_CONFIG_counters = 1 @@ -226,8 +217,7 @@ CC_counters = $(DEFAULT_CC) CXX_counters = $(DEFAULT_CXX) LD_counters = $(DEFAULT_CC) LDXX_counters = $(DEFAULT_CXX) -CPPFLAGS_counters = -O3 -flto -DGPR_LOW_LEVEL_COUNTERS -LDFLAGS_counters = -O3 -flto +CPPFLAGS_counters = -O2 -DGPR_LOW_LEVEL_COUNTERS DEFINES_counters = NDEBUG diff --git a/build.yaml b/build.yaml index fe13b22a0d7..f59640f8abb 100644 --- a/build.yaml +++ b/build.yaml @@ -4031,9 +4031,8 @@ configs: CPPFLAGS: -O2 -DGRPC_BASIC_PROFILER -DGRPC_TIMERS_RDTSC DEFINES: NDEBUG counters: - CPPFLAGS: -O3 -flto -DGPR_LOW_LEVEL_COUNTERS + CPPFLAGS: -O2 -DGPR_LOW_LEVEL_COUNTERS DEFINES: NDEBUG - LDFLAGS: -O3 -flto dbg: CPPFLAGS: -O0 DEFINES: _DEBUG DEBUG @@ -4050,10 +4049,6 @@ configs: DEFINES: _DEBUG DEBUG LDFLAGS: -rdynamic valgrind: --tool=helgrind - lto: - CPPFLAGS: -O3 -flto - DEFINES: NDEBUG - LDFLAGS: -O3 -flto memcheck: CPPFLAGS: -O0 DEFINES: _DEBUG DEBUG @@ -4072,9 +4067,9 @@ configs: LDXX: clang++ compile_the_world: true mutrace: - CPPFLAGS: -O3 -fno-omit-frame-pointer -flto + CPPFLAGS: -O3 -fno-omit-frame-pointer DEFINES: NDEBUG - LDFLAGS: -rdynamic -O3 -flto + LDFLAGS: -rdynamic opt: CPPFLAGS: -O2 DEFINES: NDEBUG diff --git a/tools/run_tests/generated/configs.json b/tools/run_tests/generated/configs.json index d7e527ad76a..9173bd7c19c 100644 --- a/tools/run_tests/generated/configs.json +++ b/tools/run_tests/generated/configs.json @@ -2,26 +2,6 @@ { "config": "opt" }, - { - "config": "asan-trace-cmp", - "environ": { - "ASAN_OPTIONS": "detect_leaks=1:color=always", - "LSAN_OPTIONS": "suppressions=tools/lsan_suppressions.txt:report_objects=1" - } - }, - { - "config": "dbg" - }, - { - "config": "asan", - "environ": { - "ASAN_OPTIONS": "detect_leaks=1:color=always", - "LSAN_OPTIONS": "suppressions=tools/lsan_suppressions.txt:report_objects=1" - } - }, - { - "config": "msan" - }, { "config": "basicprof" }, @@ -39,16 +19,14 @@ } }, { - "config": "ubsan", + "config": "asan-trace-cmp", "environ": { - "UBSAN_OPTIONS": "halt_on_error=1:print_stacktrace=1" + "ASAN_OPTIONS": "detect_leaks=1:color=always", + "LSAN_OPTIONS": "suppressions=tools/lsan_suppressions.txt:report_objects=1" } }, { - "config": "tsan", - "environ": { - "TSAN_OPTIONS": "suppressions=tools/tsan_suppressions.txt:halt_on_error=1:second_deadlock_stack=1" - } + "config": "dbg" }, { "config": "stapprof" @@ -65,7 +43,26 @@ ] }, { - "config": "lto" + "config": "asan", + "environ": { + "ASAN_OPTIONS": "detect_leaks=1:color=always", + "LSAN_OPTIONS": "suppressions=tools/lsan_suppressions.txt:report_objects=1" + } + }, + { + "config": "tsan", + "environ": { + "TSAN_OPTIONS": "suppressions=tools/tsan_suppressions.txt:halt_on_error=1:second_deadlock_stack=1" + } + }, + { + "config": "ubsan", + "environ": { + "UBSAN_OPTIONS": "halt_on_error=1:print_stacktrace=1" + } + }, + { + "config": "msan" }, { "config": "mutrace" diff --git a/tools/run_tests/generated/tests.json b/tools/run_tests/generated/tests.json index 4ae23557676..ab7938d0ca1 100644 --- a/tools/run_tests/generated/tests.json +++ b/tools/run_tests/generated/tests.json @@ -40165,7 +40165,6 @@ "dbg", "gcov", "helgrind", - "lto", "memcheck", "msan", "mutrace", @@ -40202,7 +40201,6 @@ "dbg", "gcov", "helgrind", - "lto", "memcheck", "msan", "mutrace", @@ -40239,7 +40237,6 @@ "dbg", "gcov", "helgrind", - "lto", "memcheck", "msan", "mutrace", @@ -40276,7 +40273,6 @@ "dbg", "gcov", "helgrind", - "lto", "memcheck", "msan", "mutrace", @@ -40315,7 +40311,6 @@ "dbg", "gcov", "helgrind", - "lto", "memcheck", "msan", "mutrace", @@ -40354,7 +40349,6 @@ "dbg", "gcov", "helgrind", - "lto", "memcheck", "msan", "mutrace", @@ -40391,7 +40385,6 @@ "dbg", "gcov", "helgrind", - "lto", "memcheck", "msan", "mutrace", @@ -40428,7 +40421,6 @@ "dbg", "gcov", "helgrind", - "lto", "memcheck", "msan", "mutrace", @@ -40465,7 +40457,6 @@ "dbg", "gcov", "helgrind", - "lto", "memcheck", "msan", "mutrace", @@ -40502,7 +40493,6 @@ "dbg", "gcov", "helgrind", - "lto", "memcheck", "msan", "mutrace", @@ -40539,7 +40529,6 @@ "dbg", "gcov", "helgrind", - "lto", "memcheck", "msan", "mutrace", @@ -40576,7 +40565,6 @@ "dbg", "gcov", "helgrind", - "lto", "memcheck", "msan", "mutrace", @@ -40613,7 +40601,6 @@ "dbg", "gcov", "helgrind", - "lto", "memcheck", "msan", "mutrace", @@ -40650,7 +40637,6 @@ "dbg", "gcov", "helgrind", - "lto", "memcheck", "msan", "mutrace", @@ -40687,7 +40673,6 @@ "dbg", "gcov", "helgrind", - "lto", "memcheck", "msan", "mutrace", @@ -40724,7 +40709,6 @@ "dbg", "gcov", "helgrind", - "lto", "memcheck", "msan", "mutrace", @@ -40761,7 +40745,6 @@ "dbg", "gcov", "helgrind", - "lto", "memcheck", "msan", "mutrace", @@ -40798,7 +40781,6 @@ "dbg", "gcov", "helgrind", - "lto", "memcheck", "msan", "mutrace", @@ -40835,7 +40817,6 @@ "dbg", "gcov", "helgrind", - "lto", "memcheck", "msan", "mutrace", @@ -40872,7 +40853,6 @@ "dbg", "gcov", "helgrind", - "lto", "memcheck", "msan", "mutrace", @@ -40909,7 +40889,6 @@ "dbg", "gcov", "helgrind", - "lto", "memcheck", "msan", "mutrace", @@ -40948,7 +40927,6 @@ "dbg", "gcov", "helgrind", - "lto", "memcheck", "msan", "mutrace", @@ -40987,7 +40965,6 @@ "dbg", "gcov", "helgrind", - "lto", "memcheck", "msan", "mutrace", @@ -41024,7 +41001,6 @@ "dbg", "gcov", "helgrind", - "lto", "memcheck", "msan", "mutrace", @@ -41061,7 +41037,6 @@ "dbg", "gcov", "helgrind", - "lto", "memcheck", "msan", "mutrace", @@ -41098,7 +41073,6 @@ "dbg", "gcov", "helgrind", - "lto", "memcheck", "msan", "mutrace", @@ -41135,7 +41109,6 @@ "dbg", "gcov", "helgrind", - "lto", "memcheck", "msan", "mutrace", @@ -41172,7 +41145,6 @@ "dbg", "gcov", "helgrind", - "lto", "memcheck", "msan", "mutrace", @@ -41209,7 +41181,6 @@ "dbg", "gcov", "helgrind", - "lto", "memcheck", "msan", "mutrace", @@ -41246,7 +41217,6 @@ "dbg", "gcov", "helgrind", - "lto", "memcheck", "msan", "mutrace", @@ -41283,7 +41253,6 @@ "dbg", "gcov", "helgrind", - "lto", "memcheck", "msan", "mutrace", @@ -41320,7 +41289,6 @@ "dbg", "gcov", "helgrind", - "lto", "memcheck", "msan", "mutrace", @@ -41357,7 +41325,6 @@ "dbg", "gcov", "helgrind", - "lto", "memcheck", "msan", "mutrace", @@ -41394,7 +41361,6 @@ "dbg", "gcov", "helgrind", - "lto", "memcheck", "msan", "mutrace", diff --git a/tools/run_tests/run_microbenchmark.py b/tools/run_tests/run_microbenchmark.py index 0c773ddd43d..3a9461ecd3b 100755 --- a/tools/run_tests/run_microbenchmark.py +++ b/tools/run_tests/run_microbenchmark.py @@ -178,7 +178,7 @@ def run_summary(bm_name, cfg, base_json_name): def collect_summary(bm_name, args): heading('Summary: %s [no counters]' % bm_name) - text(run_summary(bm_name, 'lto', 'out')) + text(run_summary(bm_name, 'opt', 'out')) heading('Summary: %s [with counters]' % bm_name) text(run_summary(bm_name, 'counters', 'out')) if args.bigquery_upload: @@ -229,7 +229,7 @@ for bm_name in args.benchmarks: collectors[collect](bm_name, args) if args.diff_perf: for bm_name in args.benchmarks: - run_summary(bm_name, 'lto', '%s.new' % bm_name) + run_summary(bm_name, 'opt', '%s.new' % bm_name) where_am_i = subprocess.check_output(['git', 'rev-parse', '--abbrev-ref', 'HEAD']).strip() subprocess.check_call(['git', 'checkout', args.diff_perf]) comparables = [] @@ -237,7 +237,7 @@ if args.diff_perf: try: for bm_name in args.benchmarks: try: - run_summary(bm_name, 'lto', '%s.old' % bm_name) + run_summary(bm_name, 'opt', '%s.old' % bm_name) comparables.append(bm_name) except subprocess.CalledProcessError, e: pass diff --git a/tools/run_tests/run_performance_tests.py b/tools/run_tests/run_performance_tests.py index f1ecdb54801..7c04d228ba3 100755 --- a/tools/run_tests/run_performance_tests.py +++ b/tools/run_tests/run_performance_tests.py @@ -250,7 +250,7 @@ def build_on_remote_hosts(hosts, languages=scenario_config.LANGUAGES.keys(), bui jobset.JobSpec( cmdline=['tools/run_tests/performance/remote_host_build.sh'] + languages, shortname='remote_host_build.%s' % host, - environ = {'USER_AT_HOST': user_at_host, 'CONFIG': 'lto'}, + environ = {'USER_AT_HOST': user_at_host, 'CONFIG': 'opt'}, timeout_seconds=build_timeout)) if build_local: # Build locally as well @@ -258,7 +258,7 @@ def build_on_remote_hosts(hosts, languages=scenario_config.LANGUAGES.keys(), bui jobset.JobSpec( cmdline=['tools/run_tests/performance/build_performance.sh'] + languages, shortname='local_build', - environ = {'CONFIG': 'lto'}, + environ = {'CONFIG': 'opt'}, timeout_seconds=build_timeout)) jobset.message('START', 'Building.', do_newline=True) num_failures, _ = jobset.run(