Skip to content

Commit 45a2ae4

Browse files
committed
benchmarks: replace the Ounchecked build with an Osize build
We don't measure Ounchecked anymore. On the other hand we want to benchmark the Osize build.
1 parent 96fe8ef commit 45a2ae4

File tree

9 files changed

+14
-14
lines changed

9 files changed

+14
-14
lines changed

benchmark/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ Available configurations: <Optlevel>_SINGLEFILE, <Optlevel>_MULTITHREADED")
199199
# Syntax for an optset: <optimization-level>_<configuration>
200200
# where "_<configuration>" is optional.
201201
if(NOT SWIFT_OPTIMIZATION_LEVELS)
202-
set(SWIFT_OPTIMIZATION_LEVELS "Onone" "O" "Ounchecked"
202+
set(SWIFT_OPTIMIZATION_LEVELS "Onone" "O" "Osize"
203203
${SWIFT_EXTRA_BENCH_CONFIGS})
204204
endif()
205205

benchmark/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ The following build options are available:
4848
(default: "macosx;iphoneos;appletvos;watchos")
4949
* `-DSWIFT_OPTIMIZATION_LEVELS`
5050
* A list of Swift optimization levels to build against
51-
(default: "O;Onone;Ounchecked")
51+
(default: "O;Onone;Osize")
5252
* `-DSWIFT_BENCHMARK_EMIT_SIB`
5353
* A boolean value indicating whether .sib files should be generated
5454
alongside .o files (default: FALSE)
@@ -92,7 +92,7 @@ Using the Benchmark Driver
9292

9393
* `$ ./Benchmark_O --num-iters=1 --num-samples=1`
9494
* `$ ./Benchmark_Onone --list`
95-
* `$ ./Benchmark_Ounchecked Ackermann`
95+
* `$ ./Benchmark_Osize Ackermann`
9696

9797
### Note
9898
As a shortcut, you can also refer to benchmarks by their ordinal numbers.

benchmark/cmake/modules/AddSwiftBenchmarkSuite.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ function (swift_benchmark_compile_archopts)
204204
set(common_swift4_options ${common_options} "-swift-version" "4")
205205

206206
# Always optimize the driver modules.
207-
# Note that we compile the driver for Ounchecked also with -Ounchecked
207+
# Note that we compile the driver for Osize also with -Osize
208208
# (and not with -O), because of <rdar://problem/19614516>.
209209
string(REPLACE "Onone" "O" driver_opt "${optflag}")
210210

benchmark/scripts/Benchmark_DTrace.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ DTRACE_PATH = os.path.join(DRIVER_LIBRARY_PATH, 'swift_stats.d')
2323

2424
import perf_test_driver # noqa (E402 module level import not at top of file)
2525

26-
# Regexes for the XFAIL_LIST. Matches against '([Onone|O|Ounchecked],TestName)'
26+
# Regexes for the XFAIL_LIST. Matches against '([Onone|O|Osize],TestName)'
2727
XFAIL_LIST = [
2828
]
2929

benchmark/scripts/Benchmark_Driver

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -401,7 +401,7 @@ def main():
401401
'multiple filters are supported', metavar="PATTERN")
402402
parent_parser.add_argument(
403403
'-t', '--tests',
404-
help='directory containing Benchmark_O{,none,unchecked} ' +
404+
help='directory containing Benchmark_O{,none,size} ' +
405405
'(default: DRIVER_DIR)',
406406
default=DRIVER_DIR)
407407

@@ -411,8 +411,8 @@ def main():
411411
parents=[parent_parser])
412412
submit_parser.add_argument(
413413
'-o', '--optimization', nargs='+',
414-
help='optimization levels to use (default: O Onone Ounchecked)',
415-
default=['O', 'Onone', 'Ounchecked'])
414+
help='optimization levels to use (default: O Onone Osize)',
415+
default=['O', 'Onone', 'Osize'])
416416
submit_parser.add_argument(
417417
'-i', '--iterations',
418418
help='number of times to run each test (default: 10)',
@@ -435,8 +435,8 @@ def main():
435435
run_parser.add_argument(
436436
'-o', '--optimization',
437437
metavar='OPT',
438-
choices=['O', 'Onone', 'Ounchecked'],
439-
help='optimization level to use: {O,Onone,Ounchecked}, (default: O)',
438+
choices=['O', 'Onone', 'Osize'],
439+
help='optimization level to use: {O,Onone,Osize}, (default: O)',
440440
default='O')
441441
run_parser.add_argument(
442442
'-i', '--iterations',

benchmark/scripts/Benchmark_GuardMalloc.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ sys.path.append("@PATH_TO_DRIVER_LIBRARY@")
2020

2121
import perf_test_driver # noqa (E402 module level import not at top of file)
2222

23-
# Regexes for the XFAIL_LIST. Matches against '([Onone|O|Ounchecked],TestName)'
23+
# Regexes for the XFAIL_LIST. Matches against '([Onone|O|Osize],TestName)'
2424
XFAIL_LIST = [
2525
]
2626

benchmark/scripts/compare_perf_tests.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
class PerformanceTestResult(object):
2525
"""PerformanceTestResult holds results from executing an individual
2626
benchmark from the Swift Benchmark Suite as reported by the test driver
27-
(Benchmark_O, Benchmark_Onone, Benchmark_Ounchecked or Benchmark_Driver).
27+
(Benchmark_O, Benchmark_Onone, Benchmark_Osize or Benchmark_Driver).
2828
2929
It depends on the log format emitted by the test driver in the form:
3030
#,TEST,SAMPLES,MIN(μs),MAX(μs),MEAN(μs),SD(μs),MEDIAN(μs),MAX_RSS(B)

benchmark/scripts/perf_test_driver/perf_test_driver.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ def _unwrap_self(args):
6161
return type(args[0]).process_input(*args)
6262

6363

64-
BenchmarkDriver_OptLevels = ['Onone', 'O', 'Ounchecked']
64+
BenchmarkDriver_OptLevels = ['Onone', 'O', 'Osize']
6565

6666

6767
class BenchmarkDriver(object):

cmake/modules/SwiftExternalBenchmarkBuild.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ function (add_external_benchmark_suite)
6161
set(stamp_dir ${SWIFT_BINARY_DIR}/external-benchmark/stamps)
6262
set(prefix_dir ${SWIFT_BINARY_DIR}/external-benchmark/prefix)
6363

64-
set(bench_targets Benchmark_O Benchmark_Onone Benchmark_Ounchecked)
64+
set(bench_targets Benchmark_O Benchmark_Onone Benchmark_Osize)
6565
set(library_targets swift-benchmark-macosx-x86_64-external)
6666

6767
set(all_stdlib_dependencies)

0 commit comments

Comments
 (0)