Merge pull request #9932 from ctiller/lto

Enable lto for performance testing
pull/9950/head
Craig Tiller 8 years ago committed by GitHub
commit 6f249772d1
  1. 122
      Makefile
  2. 11
      build.yaml
  3. 51
      tools/run_tests/generated/configs.json
  4. 34
      tools/run_tests/generated/tests.json
  5. 6
      tools/run_tests/run_microbenchmark.py
  6. 4
      tools/run_tests/run_performance_tests.py

@ -95,6 +95,42 @@ 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)
@ -121,22 +157,25 @@ 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_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_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_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_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_stapprof = 1
CC_stapprof = $(DEFAULT_CC)
@ -164,52 +203,22 @@ CPPFLAGS_memcheck = -O0
LDFLAGS_memcheck = -rdynamic
DEFINES_memcheck = _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_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_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_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
LDFLAGS_mutrace = -rdynamic
CPPFLAGS_mutrace = -O3 -fno-omit-frame-pointer -flto
LDFLAGS_mutrace = -rdynamic -O3 -flto
DEFINES_mutrace = NDEBUG
VALID_CONFIG_counters = 1
@ -217,7 +226,8 @@ CC_counters = $(DEFAULT_CC)
CXX_counters = $(DEFAULT_CXX)
LD_counters = $(DEFAULT_CC)
LDXX_counters = $(DEFAULT_CXX)
CPPFLAGS_counters = -O2 -DGPR_LOW_LEVEL_COUNTERS
CPPFLAGS_counters = -O3 -flto -DGPR_LOW_LEVEL_COUNTERS
LDFLAGS_counters = -O3 -flto
DEFINES_counters = NDEBUG

@ -4031,8 +4031,9 @@ configs:
CPPFLAGS: -O2 -DGRPC_BASIC_PROFILER -DGRPC_TIMERS_RDTSC
DEFINES: NDEBUG
counters:
CPPFLAGS: -O2 -DGPR_LOW_LEVEL_COUNTERS
CPPFLAGS: -O3 -flto -DGPR_LOW_LEVEL_COUNTERS
DEFINES: NDEBUG
LDFLAGS: -O3 -flto
dbg:
CPPFLAGS: -O0
DEFINES: _DEBUG DEBUG
@ -4049,6 +4050,10 @@ configs:
DEFINES: _DEBUG DEBUG
LDFLAGS: -rdynamic
valgrind: --tool=helgrind
lto:
CPPFLAGS: -O3 -flto
DEFINES: NDEBUG
LDFLAGS: -O3 -flto
memcheck:
CPPFLAGS: -O0
DEFINES: _DEBUG DEBUG
@ -4067,9 +4072,9 @@ configs:
LDXX: clang++
compile_the_world: true
mutrace:
CPPFLAGS: -O3 -fno-omit-frame-pointer
CPPFLAGS: -O3 -fno-omit-frame-pointer -flto
DEFINES: NDEBUG
LDFLAGS: -rdynamic
LDFLAGS: -rdynamic -O3 -flto
opt:
CPPFLAGS: -O2
DEFINES: NDEBUG

@ -2,6 +2,26 @@
{
"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"
},
@ -19,14 +39,16 @@
}
},
{
"config": "asan-trace-cmp",
"config": "ubsan",
"environ": {
"ASAN_OPTIONS": "detect_leaks=1:color=always",
"LSAN_OPTIONS": "suppressions=tools/lsan_suppressions.txt:report_objects=1"
"UBSAN_OPTIONS": "halt_on_error=1:print_stacktrace=1"
}
},
{
"config": "dbg"
"config": "tsan",
"environ": {
"TSAN_OPTIONS": "suppressions=tools/tsan_suppressions.txt:halt_on_error=1:second_deadlock_stack=1"
}
},
{
"config": "stapprof"
@ -43,26 +65,7 @@
]
},
{
"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": "lto"
},
{
"config": "mutrace"

@ -40165,6 +40165,7 @@
"dbg",
"gcov",
"helgrind",
"lto",
"memcheck",
"msan",
"mutrace",
@ -40201,6 +40202,7 @@
"dbg",
"gcov",
"helgrind",
"lto",
"memcheck",
"msan",
"mutrace",
@ -40237,6 +40239,7 @@
"dbg",
"gcov",
"helgrind",
"lto",
"memcheck",
"msan",
"mutrace",
@ -40273,6 +40276,7 @@
"dbg",
"gcov",
"helgrind",
"lto",
"memcheck",
"msan",
"mutrace",
@ -40311,6 +40315,7 @@
"dbg",
"gcov",
"helgrind",
"lto",
"memcheck",
"msan",
"mutrace",
@ -40349,6 +40354,7 @@
"dbg",
"gcov",
"helgrind",
"lto",
"memcheck",
"msan",
"mutrace",
@ -40385,6 +40391,7 @@
"dbg",
"gcov",
"helgrind",
"lto",
"memcheck",
"msan",
"mutrace",
@ -40421,6 +40428,7 @@
"dbg",
"gcov",
"helgrind",
"lto",
"memcheck",
"msan",
"mutrace",
@ -40457,6 +40465,7 @@
"dbg",
"gcov",
"helgrind",
"lto",
"memcheck",
"msan",
"mutrace",
@ -40493,6 +40502,7 @@
"dbg",
"gcov",
"helgrind",
"lto",
"memcheck",
"msan",
"mutrace",
@ -40529,6 +40539,7 @@
"dbg",
"gcov",
"helgrind",
"lto",
"memcheck",
"msan",
"mutrace",
@ -40565,6 +40576,7 @@
"dbg",
"gcov",
"helgrind",
"lto",
"memcheck",
"msan",
"mutrace",
@ -40601,6 +40613,7 @@
"dbg",
"gcov",
"helgrind",
"lto",
"memcheck",
"msan",
"mutrace",
@ -40637,6 +40650,7 @@
"dbg",
"gcov",
"helgrind",
"lto",
"memcheck",
"msan",
"mutrace",
@ -40673,6 +40687,7 @@
"dbg",
"gcov",
"helgrind",
"lto",
"memcheck",
"msan",
"mutrace",
@ -40709,6 +40724,7 @@
"dbg",
"gcov",
"helgrind",
"lto",
"memcheck",
"msan",
"mutrace",
@ -40745,6 +40761,7 @@
"dbg",
"gcov",
"helgrind",
"lto",
"memcheck",
"msan",
"mutrace",
@ -40781,6 +40798,7 @@
"dbg",
"gcov",
"helgrind",
"lto",
"memcheck",
"msan",
"mutrace",
@ -40817,6 +40835,7 @@
"dbg",
"gcov",
"helgrind",
"lto",
"memcheck",
"msan",
"mutrace",
@ -40853,6 +40872,7 @@
"dbg",
"gcov",
"helgrind",
"lto",
"memcheck",
"msan",
"mutrace",
@ -40889,6 +40909,7 @@
"dbg",
"gcov",
"helgrind",
"lto",
"memcheck",
"msan",
"mutrace",
@ -40927,6 +40948,7 @@
"dbg",
"gcov",
"helgrind",
"lto",
"memcheck",
"msan",
"mutrace",
@ -40965,6 +40987,7 @@
"dbg",
"gcov",
"helgrind",
"lto",
"memcheck",
"msan",
"mutrace",
@ -41001,6 +41024,7 @@
"dbg",
"gcov",
"helgrind",
"lto",
"memcheck",
"msan",
"mutrace",
@ -41037,6 +41061,7 @@
"dbg",
"gcov",
"helgrind",
"lto",
"memcheck",
"msan",
"mutrace",
@ -41073,6 +41098,7 @@
"dbg",
"gcov",
"helgrind",
"lto",
"memcheck",
"msan",
"mutrace",
@ -41109,6 +41135,7 @@
"dbg",
"gcov",
"helgrind",
"lto",
"memcheck",
"msan",
"mutrace",
@ -41145,6 +41172,7 @@
"dbg",
"gcov",
"helgrind",
"lto",
"memcheck",
"msan",
"mutrace",
@ -41181,6 +41209,7 @@
"dbg",
"gcov",
"helgrind",
"lto",
"memcheck",
"msan",
"mutrace",
@ -41217,6 +41246,7 @@
"dbg",
"gcov",
"helgrind",
"lto",
"memcheck",
"msan",
"mutrace",
@ -41253,6 +41283,7 @@
"dbg",
"gcov",
"helgrind",
"lto",
"memcheck",
"msan",
"mutrace",
@ -41289,6 +41320,7 @@
"dbg",
"gcov",
"helgrind",
"lto",
"memcheck",
"msan",
"mutrace",
@ -41325,6 +41357,7 @@
"dbg",
"gcov",
"helgrind",
"lto",
"memcheck",
"msan",
"mutrace",
@ -41361,6 +41394,7 @@
"dbg",
"gcov",
"helgrind",
"lto",
"memcheck",
"msan",
"mutrace",

@ -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, 'opt', 'out'))
text(run_summary(bm_name, 'lto', '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, 'opt', '%s.new' % bm_name)
run_summary(bm_name, 'lto', '%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, 'opt', '%s.old' % bm_name)
run_summary(bm_name, 'lto', '%s.old' % bm_name)
comparables.append(bm_name)
except subprocess.CalledProcessError, e:
pass

@ -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': 'opt'},
environ = {'USER_AT_HOST': user_at_host, 'CONFIG': 'lto'},
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': 'opt'},
environ = {'CONFIG': 'lto'},
timeout_seconds=build_timeout))
jobset.message('START', 'Building.', do_newline=True)
num_failures, _ = jobset.run(

Loading…
Cancel
Save