Changeset 286963 in webkit
- Timestamp:
- Dec 13, 2021, 11:56:23 AM (5 years ago)
- Location:
- trunk/Tools
- Files:
-
- 2 edited
-
ChangeLog (modified) (1 diff)
-
Scripts/run-jsc-stress-tests (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Tools/ChangeLog
r286950 r286963 1 2021-12-13 Angelos Oikonomopoulos <angelos@igalia.com> 2 3 [JSC] Unify default/noisy tests definition 4 https://bugs.webkit.org/show_bug.cgi?id=233926 5 6 Reviewed by Yusuke Suzuki. 7 8 Currently, changing a test to be noisy (i.e. using 9 defaultRunNoisyTest) results in only a subset of the tests being 10 run. 11 12 Instead of manually changing the noisy test test handler, this 13 patch makes the mode definitions table-driven. However, for 14 compatibility with the existing code, it uses the table to define 15 the ruby methods that the testcase definitions (//@ comments, 16 yaml) and other callers in run-jsc-stress-tests (e.g. all 17 default*Run methods) expect. 18 19 Note that this slightly increases the number of tests executed (as 20 more test modes are enabled for the noisy tests). 21 22 This is an exploratory first step; other callers in 23 run-jsc-stress-tests could be simplified in the same way. 24 25 * Scripts/run-jsc-stress-tests: 26 1 27 2021-12-13 Youenn Fablet <youenn@apple.com> 2 28 -
trunk/Tools/Scripts/run-jsc-stress-tests
r286128 r286963 779 779 end 780 780 781 def addRunCommand(kind, command, outputHandler, errorHandler, *additionalEnv) 781 def addRunCommandCfg(cfg, *additionalEnv) 782 [:kind, :command, :outputHandler, :errorHandler].each { |key| 783 if not cfg.has_key?(key) 784 raise "Missing #{key} in #{cfg}" 785 end 786 } 782 787 $didAddRunCommand = true 783 name = baseOutputName( kind)788 name = baseOutputName(cfg[:kind]) 784 789 if $filter and name !~ $filter 785 790 return 786 791 end 787 792 plan = Plan.create( 788 $benchmarkDirectory, command, "#{$collectionName}/#{$benchmark}", name, outputHandler, 789 errorHandler) 790 plan.additionalEnv.push(*additionalEnv) 793 $benchmarkDirectory, cfg[:command], "#{$collectionName}/#{$benchmark}", name, cfg[:outputHandler], 794 cfg[:errorHandler]) 795 if cfg.has_key?(:additionalEnv) 796 plan.additionalEnv.push(*(cfg[:additionalEnv])) 797 end 791 798 if $runCommandOptions[:serial] 792 799 # Add this to the list of tests to be run on their own, so … … 802 809 $runlist << plan 803 810 end 811 end 812 813 def addRunCommand(kind, command, outputHandler, errorHandler, *additionalEnv) 814 cfg = { 815 :kind => kind, 816 :command => command, 817 :outputHandler => outputHandler, 818 :errorHandler => errorHandler, 819 :additionalEnv => additionalEnv, 820 } 821 addRunCommandCfg(cfg) 804 822 end 805 823 … … 901 919 end 902 920 921 def runWithOptions(cfg, *options) 922 baseOptions = BASE_OPTIONS 923 if cfg.has_key?(:no_base_options) 924 baseOptions = [] 925 end 926 commandPrefix = cfg.fetch(:command_prefix, []) 927 if cfg.has_key?(:place_benchmark_early) 928 cfg[:command] = commandPrefix + vmCommand + [$benchmark.to_s] + baseOptions + options + $testSpecificRequiredOptions 929 else 930 cfg[:command] = commandPrefix + vmCommand + baseOptions + options + $testSpecificRequiredOptions + [$benchmark.to_s] 931 end 932 addRunCommandCfg(cfg) 933 end 934 903 935 def runWithOutputHandler(kind, outputHandler, *options) 904 addRunCommand(kind, vmCommand + BASE_OPTIONS + options + $testSpecificRequiredOptions + [$benchmark.to_s], outputHandler, simpleErrorHandler) 936 cfg = { 937 :kind => kind, 938 :outputHandler => outputHandler, 939 :errorHandler => simpleErrorHandler, 940 } 941 runWithOptions(cfg, *options) 905 942 end 906 943 907 944 def runWithOutputHandlerWithoutBaseOption(kind, outputHandler, *options) 908 addRunCommand(kind, vmCommand + options + $testSpecificRequiredOptions + [$benchmark.to_s], outputHandler, simpleErrorHandler) 945 cfg = { 946 :kind => kind, 947 :outputHandler => outputHandler, 948 :errorHandler => simpleErrorHandler, 949 :no_base_options => true, 950 } 951 runWithOptions(cfg, *options) 909 952 end 910 953 … … 913 956 end 914 957 958 def runInner(cfg, *options) 959 cfg = cfg.dup 960 if not cfg.has_key?(:outputHandler) 961 cfg[:outputHandler] = silentOutputHandler 962 end 963 if not cfg.has_key?(:errorHandler) 964 cfg[:errorHandler] = simpleErrorHandler 965 end 966 runWithOptions(cfg, *options) 967 end 968 969 def runWithoutBaseOptionCfg(cfg, *options) 970 cfg = cfg.dup 971 cfg[:no_base_options] = true 972 runWithOptions(cfg, *options) 973 end 974 915 975 def runWithoutBaseOption(kind, *options) 916 976 runWithOutputHandlerWithoutBaseOption(kind, silentOutputHandler, *options) 917 end918 919 def runNoFTL(*optionalTestSpecificOptions)920 run("no-ftl", *optionalTestSpecificOptions)921 end922 923 def runWithRAMSize(size, *optionalTestSpecificOptions)924 run("ram-size-#{size}", "--forceRAMSize=#{size}", *optionalTestSpecificOptions)925 977 end 926 978 … … 934 986 end 935 987 936 def runNoJIT(*optionalTestSpecificOptions) 937 run("no-jit", "--useJIT=false", *optionalTestSpecificOptions) 938 end 939 940 def runNoLLInt(*optionalTestSpecificOptions) 941 if $jitTests 942 run("no-llint", "--useLLInt=false", *optionalTestSpecificOptions) 943 end 944 end 945 946 # NOTE: Tests rely on this using scribbleFreeCells. 947 def runNoCJITValidate(*optionalTestSpecificOptions) 948 run("no-cjit", "--validateBytecode=true", "--validateGraph=true", *(NO_CJIT_OPTIONS + optionalTestSpecificOptions)) 949 end 950 951 def runNoCJITValidatePhases(*optionalTestSpecificOptions) 952 run("no-cjit-validate-phases", "--validateBytecode=true", "--validateGraphAtEachPhase=true", "--useSourceProviderCache=false", "--useRandomizingExecutableIslandAllocation=true", *(NO_CJIT_OPTIONS + optionalTestSpecificOptions)) 953 end 954 955 def runNoCJITCollectContinuously(*optionalTestSpecificOptions) 956 run("no-cjit-collect-continuously", *(NO_CJIT_OPTIONS + COLLECT_CONTINUOUSLY_OPTIONS + optionalTestSpecificOptions)) 957 end 958 959 def runDefault(*optionalTestSpecificOptions) 960 run("default", *(FTL_OPTIONS + optionalTestSpecificOptions)) 961 end 962 963 # FIXME: need to fix https://bugs.webkit.org/show_bug.cgi?id=218703 to enable this on Linux/MIPS. 988 def bytecodeCacheTemplate 989 if ($hostOS == "darwin") 990 return "bytecode-cache" 991 elsif ($hostOS == "linux" && $architecture != "mips") 992 # FIXME: need to fix https://bugs.webkit.org/show_bug.cgi?id=218703 to enable this on Linux/MIPS. 993 return "bytecode-cacheXXXXXX" 994 end 995 nil 996 end 997 964 998 def runBytecodeCacheImpl(optionalTestSpecificOptions, *additionalEnv) 965 if ($hostOS == "darwin") 966 fileTemplate = "bytecode-cache" 967 elsif ($hostOS == "linux" && $architecture != "mips") 968 fileTemplate = "bytecode-cacheXXXXXX" 969 else 970 skip 971 return 972 end 973 974 options = BASE_OPTIONS + FTL_OPTIONS + optionalTestSpecificOptions + $testSpecificRequiredOptions 975 addRunCommand("bytecode-cache", ["sh", (pathToHelpers + "bytecode-cache-test-helper.sh").to_s, fileTemplate.to_s, *vmCommand, $benchmark.to_s] + options, silentOutputHandler, simpleErrorHandler, *additionalEnv) 976 end 977 978 def runBytecodeCache(*optionalTestSpecificOptions) 979 runBytecodeCacheImpl(optionalTestSpecificOptions) 980 end 981 982 def runBytecodeCacheNoAssertion(*optionalTestSpecificOptions) 983 runBytecodeCacheImpl(optionalTestSpecificOptions, "JSC_forceDiskCache=false") 984 end 985 986 def runFTLNoCJIT(*optionalTestSpecificOptions) 987 run("misc-ftl-no-cjit", "--useDataIC=true", *(FTL_OPTIONS + NO_CJIT_OPTIONS + optionalTestSpecificOptions)) 988 end 989 990 def runFTLNoCJITB3O0(*optionalTestSpecificOptions) 991 run("ftl-no-cjit-b3o0", "--useArrayAllocationProfiling=false", "--forcePolyProto=true", "--useRandomizingExecutableIslandAllocation=true", *(FTL_OPTIONS + NO_CJIT_OPTIONS + B3O0_OPTIONS + FORCE_LLINT_EXIT_OPTIONS + optionalTestSpecificOptions)) 992 end 993 994 def runFTLNoCJITValidate(*optionalTestSpecificOptions) 995 run("ftl-no-cjit-validate-sampling-profiler", "--validateGraph=true", "--validateBCE=true", "--useSamplingProfiler=true", "--airForceIRCAllocator=true", "--useDataIC=true", *(FTL_OPTIONS + NO_CJIT_OPTIONS + optionalTestSpecificOptions)) 996 end 997 998 def runFTLNoCJITNoPutStackValidate(*optionalTestSpecificOptions) 999 run("ftl-no-cjit-no-put-stack-validate", "--validateGraph=true", "--usePutStackSinking=false", "--airForceIRCAllocator=true", *(FTL_OPTIONS + NO_CJIT_OPTIONS + optionalTestSpecificOptions)) 1000 end 1001 1002 def runFTLNoCJITNoInlineValidate(*optionalTestSpecificOptions) 1003 run("ftl-no-cjit-no-inline-validate", "--validateGraph=true", "--maximumInliningDepth=1", "--airForceBriggsAllocator=true", "--useB3HoistLoopInvariantValues=true", *(FTL_OPTIONS + NO_CJIT_OPTIONS + optionalTestSpecificOptions)) 1004 end 1005 1006 def runFTLNoCJITOSRValidation(*optionalTestSpecificOptions) 1007 run("ftl-no-cjit-osr-validation", "--validateFTLOSRExitLiveness=true", *(FTL_OPTIONS + NO_CJIT_OPTIONS + optionalTestSpecificOptions)) 1008 end 1009 1010 def runDFGEager(*optionalTestSpecificOptions) 1011 run("dfg-eager", *(EAGER_OPTIONS + COLLECT_CONTINUOUSLY_OPTIONS + FORCE_LLINT_EXIT_OPTIONS + optionalTestSpecificOptions)) 1012 end 1013 1014 def runDFGEagerNoCJITValidate(*optionalTestSpecificOptions) 1015 run("dfg-eager-no-cjit-validate", "--validateGraph=true", *(NO_CJIT_OPTIONS + EAGER_OPTIONS + COLLECT_CONTINUOUSLY_OPTIONS + optionalTestSpecificOptions)) 1016 end 1017 1018 def runFTLEager(*optionalTestSpecificOptions) 1019 run("ftl-eager", "--airForceBriggsAllocator=true", "--useRandomizingExecutableIslandAllocation=true", "--forcePolyProto=true", "--useDataIC=true", *(FTL_OPTIONS + EAGER_OPTIONS + COLLECT_CONTINUOUSLY_OPTIONS + optionalTestSpecificOptions)) 1020 end 1021 1022 def runFTLEagerWatchdog(*optionalTestSpecificOptions) 1023 timeout = rand(100) 1024 run("ftl-eager-watchdog-#{timeout}", "--watchdog=#{timeout}", "--watchdog-exception-ok", *(FTL_OPTIONS + EAGER_OPTIONS + COLLECT_CONTINUOUSLY_OPTIONS + optionalTestSpecificOptions)) 1025 end 1026 1027 def runFTLEagerNoCJITValidate(*optionalTestSpecificOptions) 1028 run("ftl-eager-no-cjit", "--validateGraph=true", "--validateBCE=true", "--airForceIRCAllocator=true", *(FTL_OPTIONS + NO_CJIT_OPTIONS + EAGER_OPTIONS + COLLECT_CONTINUOUSLY_OPTIONS + FORCE_LLINT_EXIT_OPTIONS + EXECUTABLE_FUZZER_OPTIONS + optionalTestSpecificOptions)) 1029 end 1030 1031 def runFTLEagerNoCJITB3O1(*optionalTestSpecificOptions) 1032 run("ftl-eager-no-cjit-b3o1", "--validateGraph=true", *(FTL_OPTIONS + NO_CJIT_OPTIONS + EAGER_OPTIONS + B3O1_OPTIONS + optionalTestSpecificOptions)) 1033 end 1034 1035 def runFTLEagerNoCJITOSRValidation(*optionalTestSpecificOptions) 1036 run("ftl-eager-no-cjit-osr-validation", "--validateFTLOSRExitLiveness=true", *(FTL_OPTIONS + NO_CJIT_OPTIONS + EAGER_OPTIONS + COLLECT_CONTINUOUSLY_OPTIONS + optionalTestSpecificOptions)) 1037 end 1038 1039 def runNoCJITNoASO(*optionalTestSpecificOptions) 1040 run("no-cjit-no-aso", "--useArchitectureSpecificOptimizations=false", *(NO_CJIT_OPTIONS + optionalTestSpecificOptions)) 1041 end 1042 1043 def runNoCJITNoAccessInlining(*optionalTestSpecificOptions) 1044 run("no-cjit-no-access-inlining", "--useAccessInlining=false", *(NO_CJIT_OPTIONS + optionalTestSpecificOptions)) 1045 end 1046 1047 def runFTLNoCJITNoAccessInlining(*optionalTestSpecificOptions) 1048 run("ftl-no-cjit-no-access-inlining", "--useAccessInlining=false", *(FTL_OPTIONS + NO_CJIT_OPTIONS + optionalTestSpecificOptions)) 1049 end 1050 1051 def runFTLNoCJITSmallPool(*optionalTestSpecificOptions) 1052 run("ftl-no-cjit-small-pool", "--jitMemoryReservationSize=202400", *(FTL_OPTIONS + NO_CJIT_OPTIONS + optionalTestSpecificOptions)) 1053 end 1054 1055 def runNoCJIT(*optionalTestSpecificOptions) 1056 run("no-cjit", *(NO_CJIT_OPTIONS + optionalTestSpecificOptions)) 1057 end 1058 1059 def runEagerJettisonNoCJIT(*optionalTestSpecificOptions) 1060 run("eager-jettison-no-cjit", "--useRandomizingExecutableIslandAllocation=true", "--forceCodeBlockToJettisonDueToOldAge=true", "--verifyGC=true", *(NO_CJIT_OPTIONS + optionalTestSpecificOptions)) 1061 end 1062 1063 def runShadowChicken(*optionalTestSpecificOptions) 1064 run("shadow-chicken", "--useDFGJIT=false", "--alwaysUseShadowChicken=true", *optionalTestSpecificOptions) 1065 end 1066 1067 def runMiniMode(*optionalTestSpecificOptions) 1068 run("mini-mode", "--forceMiniVMMode=true", *optionalTestSpecificOptions) 1069 end 1070 1071 def runLogicalAssignmentOperatorsEnabled(*optionalTestSpecificOptions) 1072 run("logical-assignment-operators-enabled", "--useLogicalAssignmentOperators=true" , *(FTL_OPTIONS + optionalTestSpecificOptions)) 999 fileTemplate = bytecodeCacheTemplate 1000 if fileTemplate.nil? 1001 return nil 1002 end 1003 { 1004 :cfg => { 1005 :command_prefix => [ 1006 "sh", 1007 (pathToHelpers + "bytecode-cache-test-helper.sh").to_s, 1008 fileTemplate.to_s, 1009 ], 1010 :place_benchmark_early => true, 1011 :additionalEnv => additionalEnv, 1012 }, 1013 :testSpecificOptions => FTL_OPTIONS + optionalTestSpecificOptions, 1014 } 1015 end 1016 1017 1018 def cfgInitializerPlain 1019 Proc.new { |cfg, kind| 1020 { :kind => kind} 1021 } 1022 end 1023 1024 def cfgInitializerCfg 1025 Proc.new { |cfg, kind| 1026 cfg = cfg.dup 1027 cfg[:kind] = kind 1028 cfg 1029 } 1030 end 1031 1032 # For each base mode (defined below) we generate two kinds of functions: 1033 # 1034 # - a version which takes a cfg argument and passes it along, only 1035 # setting the kind field 1036 # - a "plain" version which starts out with an empty cfg 1037 # 1038 # The plain version is intended for use in the testcase definitions 1039 # (in `//@` comments and the like). 1040 # 1041 # The former version is used for plumbing. The caller may set various 1042 # fields in the cfg which will be respected. 1043 # 1044 # This way, we can 1045 # - define a set of test modes in defaultRunCfg 1046 # - have defaultRunCfg propagate the cfg argument to the run*Cfg 1047 # functions it calls 1048 # - call defaultRunCfg from e.g. defaultRunNoisyTest with the output 1049 # handlers appropriately set, in order to make sure we're running 1050 # the exact same of tests. 1051 CfgKind = Struct.new(:extension, :expectCfg, :initializer) 1052 cfgKinds = [ 1053 CfgKind.new("", false, cfgInitializerPlain), 1054 CfgKind.new("Cfg", true, cfgInitializerCfg), 1055 ] 1056 1057 # Define base test modes. Each mode is an array of [name, kind, 1058 # options]. The name is used to derive the ruby method names, the kind 1059 # is used for reporting (i.e. what you'd see in this script's 1060 # output). In the common case, options is a static array; if not, it's 1061 # a Proc that returns a dict that needs to be unpacked (see its use 1062 # site for a more detailed description). 1063 BASE_MODES = [ 1064 [ 1065 "NoCJIT", 1066 "ftl-no-cjit", 1067 [ 1068 "--validateBytecode=true", "--validateGraphAtEachPhase=true" 1069 ] + 1070 FTL_OPTIONS + 1071 NO_CJIT_OPTIONS + 1072 COLLECT_CONTINUOUSLY_OPTIONS 1073 ], 1074 [ 1075 "FTLNoCJIT", 1076 "misc-ftl-no-cjit", 1077 [ 1078 "--useDataIC=true", 1079 ] + 1080 FTL_OPTIONS + 1081 NO_CJIT_OPTIONS 1082 ], 1083 [ 1084 "FTLNoCJITB3O0", 1085 "ftl-no-cjit-b3o0", 1086 [ 1087 "--useArrayAllocationProfiling=false", 1088 "--forcePolyProto=true", 1089 "--useRandomizingExecutableIslandAllocation=true", 1090 ] + 1091 FTL_OPTIONS + 1092 NO_CJIT_OPTIONS + 1093 B3O0_OPTIONS + 1094 FORCE_LLINT_EXIT_OPTIONS 1095 ], 1096 [ 1097 "FTLNoCJITValidate", 1098 "ftl-no-cjit-validate-sampling-profiler", 1099 [ 1100 "--validateGraph=true", 1101 "--validateBCE=true", 1102 "--useSamplingProfiler=true", 1103 "--airForceIRCAllocator=true", 1104 "--useDataIC=true", 1105 ] + 1106 FTL_OPTIONS + 1107 NO_CJIT_OPTIONS 1108 ], 1109 [ 1110 "FTLNoCJITNoPutStackValidate", 1111 "ftl-no-cjit-no-put-stack-validate", 1112 [ 1113 "--validateGraph=true", 1114 "--usePutStackSinking=false", 1115 "--airForceIRCAllocator=true", 1116 ] + 1117 FTL_OPTIONS + 1118 NO_CJIT_OPTIONS 1119 ], 1120 [ 1121 "FTLNoCJITNoInlineValidate", 1122 "ftl-no-cjit-no-inline-validate", 1123 [ 1124 "--validateGraph=true", 1125 "--maximumInliningDepth=1", 1126 "--airForceBriggsAllocator=true", 1127 "--useB3HoistLoopInvariantValues=true", 1128 ] + 1129 FTL_OPTIONS + 1130 NO_CJIT_OPTIONS 1131 ], 1132 [ 1133 "FTLNoCJITOSRValidation", 1134 "ftl-no-cjit-osr-validation", 1135 [ 1136 "--validateFTLOSRExitLiveness=true", 1137 ] + 1138 FTL_OPTIONS + 1139 NO_CJIT_OPTIONS 1140 ], 1141 [ 1142 "DFGEager", 1143 "dfg-eager", 1144 EAGER_OPTIONS + 1145 COLLECT_CONTINUOUSLY_OPTIONS + 1146 FORCE_LLINT_EXIT_OPTIONS 1147 ], 1148 [ 1149 "DFGEagerNoCJITValidate", 1150 "dfg-eager-no-cjit-validate", 1151 [ 1152 "--validateGraph=true", 1153 ] + 1154 NO_CJIT_OPTIONS + 1155 EAGER_OPTIONS + 1156 COLLECT_CONTINUOUSLY_OPTIONS 1157 ], 1158 [ 1159 "FTLEager", 1160 "ftl-eager", 1161 [ 1162 "--airForceBriggsAllocator=true", 1163 "--useRandomizingExecutableIslandAllocation=true", 1164 "--forcePolyProto=true", 1165 "--useDataIC=true", 1166 ] + 1167 FTL_OPTIONS + 1168 EAGER_OPTIONS + 1169 COLLECT_CONTINUOUSLY_OPTIONS 1170 ], 1171 [ 1172 "FTLEagerNoCJITValidate", 1173 "ftl-eager-no-cjit", 1174 [ 1175 "--validateGraph=true", 1176 "--validateBCE=true", 1177 "--airForceIRCAllocator=true", 1178 ] + 1179 FTL_OPTIONS + 1180 NO_CJIT_OPTIONS + 1181 EAGER_OPTIONS + 1182 COLLECT_CONTINUOUSLY_OPTIONS + 1183 FORCE_LLINT_EXIT_OPTIONS + 1184 EXECUTABLE_FUZZER_OPTIONS 1185 ], 1186 [ 1187 "FTLEagerNoCJITB3O1", 1188 "ftl-eager-no-cjit-b3o1", 1189 [ 1190 "--validateGraph=true", 1191 ] + 1192 FTL_OPTIONS + 1193 NO_CJIT_OPTIONS + 1194 EAGER_OPTIONS + 1195 B3O1_OPTIONS 1196 ], 1197 [ 1198 "FTLEagerNoCJITOSRValidation", 1199 "ftl-eager-no-cjit-osr-validation", 1200 [ 1201 "--validateFTLOSRExitLiveness=true", 1202 ] + 1203 FTL_OPTIONS + 1204 NO_CJIT_OPTIONS + 1205 EAGER_OPTIONS + 1206 COLLECT_CONTINUOUSLY_OPTIONS 1207 ], 1208 [ 1209 "NoCJITNoASO", 1210 "no-cjit-no-aso", 1211 [ 1212 "--useArchitectureSpecificOptimizations=false", 1213 ] + 1214 NO_CJIT_OPTIONS 1215 ], 1216 [ 1217 "NoCJITNoAccessInlining", 1218 "no-cjit-no-access-inlining", 1219 [ 1220 "--useAccessInlining=false", 1221 ] + 1222 NO_CJIT_OPTIONS 1223 ], 1224 [ 1225 "FTLNoCJITNoAccessInlining", 1226 "ftl-no-cjit-no-access-inlining", 1227 [ 1228 "--useAccessInlining=false", 1229 ] + 1230 FTL_OPTIONS + 1231 NO_CJIT_OPTIONS 1232 ], 1233 [ 1234 "FTLNoCJITSmallPool", 1235 "ftl-no-cjit-small-pool", 1236 [ 1237 "--jitMemoryReservationSize=202400", 1238 ] + 1239 FTL_OPTIONS + 1240 NO_CJIT_OPTIONS 1241 ], 1242 [ 1243 "NoCJIT", 1244 "no-cjit", 1245 NO_CJIT_OPTIONS 1246 ], 1247 [ 1248 "EagerJettisonNoCJIT", 1249 "eager-jettison-no-cjit", 1250 [ 1251 "--useRandomizingExecutableIslandAllocation=true", 1252 "--forceCodeBlockToJettisonDueToOldAge=true", 1253 "--verifyGC=true", 1254 ] + 1255 NO_CJIT_OPTIONS 1256 ], 1257 [ 1258 "ShadowChicken", 1259 "shadow-chicken", 1260 [ 1261 "--useDFGJIT=false", 1262 "--alwaysUseShadowChicken=true", 1263 ] 1264 ], 1265 [ 1266 "MiniMode", 1267 "mini-mode", 1268 [ 1269 "--forceMiniVMMode=true", 1270 ] 1271 ], 1272 [ 1273 "LogicalAssignmentOperatorsEnabled", 1274 "logical-assignment-operators-enabled", 1275 [ 1276 "--useLogicalAssignmentOperators=true", 1277 ] + 1278 FTL_OPTIONS 1279 ], 1280 [ 1281 "NoJIT", 1282 "no-jit", 1283 [ 1284 "--useJIT=false", 1285 ] 1286 ], 1287 [ 1288 # NOTE: Tests rely on this using scribbleFreeCells. 1289 "NoCJITValidate", 1290 "no-cjit", 1291 [ 1292 "--validateBytecode=true", 1293 "--validateGraph=true", 1294 ] + 1295 NO_CJIT_OPTIONS 1296 ], 1297 [ 1298 "NoCJITValidatePhases", 1299 "no-cjit-validate-phases", 1300 [ 1301 "--validateBytecode=true", 1302 "--validateGraphAtEachPhase=true", 1303 "--useSourceProviderCache=false", 1304 "--useRandomizingExecutableIslandAllocation=true", 1305 ] + 1306 NO_CJIT_OPTIONS 1307 ], 1308 [ 1309 "NoCJITCollectContinuously", 1310 "no-cjit-collect-continuously", 1311 NO_CJIT_OPTIONS + 1312 COLLECT_CONTINUOUSLY_OPTIONS 1313 ], 1314 [ 1315 "Default", 1316 "default", 1317 FTL_OPTIONS 1318 ], 1319 [ 1320 "NoFTL", 1321 "no-ftl", 1322 [] 1323 ], 1324 [ 1325 "WithRAMSize", 1326 nil, # Not used 1327 Proc.new { |size, *optionalTestSpecificOptions| 1328 { 1329 :cfg => { 1330 :kind => "ram-size-#{size}", 1331 }, 1332 :testSpecificOptions => [ 1333 "--forceRAMSize=#{size}", 1334 ] + optionalTestSpecificOptions 1335 } 1336 } 1337 ], 1338 [ 1339 "BytecodeCache", 1340 "bytecode-cache", 1341 Proc.new { |*optionalTestSpecificOptions| 1342 runBytecodeCacheImpl(optionalTestSpecificOptions) 1343 } 1344 ], 1345 [ 1346 "BytecodeCacheNoAssertion", 1347 "bytecode-cache", 1348 Proc.new { |*optionalTestSpecificOptions| 1349 runBytecodeCacheImpl(optionalTestSpecificOptions, "JSC_forceDiskCache=false") 1350 } 1351 ], 1352 [ 1353 "FTLEagerWatchdog", 1354 nil, 1355 Proc.new { |*optionalTestSpecificOptions| 1356 timeout = rand(100) 1357 { 1358 :cfg => { 1359 :kind => "ftl-eager-watchdog-#{timeout}", 1360 }, 1361 :testSpecificOptions => [ 1362 "--watchdog=#{timeout}", 1363 "--watchdog-exception-ok", 1364 ] + 1365 FTL_OPTIONS + 1366 EAGER_OPTIONS + 1367 COLLECT_CONTINUOUSLY_OPTIONS + 1368 optionalTestSpecificOptions 1369 } 1370 } 1371 ], 1372 [ 1373 "NoLLInt", 1374 "no-llint", 1375 Proc.new { |*optionalTestSpecificOptions| 1376 return nil unless $jitTests 1377 { 1378 :cfg => { 1379 }, 1380 :testSpecificOptions => [ 1381 "--useLLInt=false", 1382 ] + optionalTestSpecificOptions 1383 } 1384 } 1385 ], 1386 [ 1387 "OneLangeHeap", 1388 "default", 1389 Proc.new { |*optionalTestSpecificOptions| 1390 if $memoryLimited 1391 return nil 1392 end 1393 { 1394 :testSpecificOptions => optionalTestSpecificOptions 1395 } 1396 } 1397 ] 1398 ] 1399 1400 BASE_MODES.each { |mode| 1401 name = "run#{mode[0]}" 1402 kind = mode[1] 1403 options = mode[2] 1404 1405 # We need to define two variants, one expecting a cfg as the first 1406 # argument, one not. 1407 cfgKinds.each { |cfgKind| 1408 methodName = "#{name}#{cfgKind.extension}".to_sym 1409 define_method(methodName) { |*args| 1410 cfg = nil 1411 if cfgKind.expectCfg 1412 # If we're defining a method that expects a cfg 1413 # argument, pick it out of the args to pass to the 1414 # initializer. 1415 cfg = args.shift 1416 end 1417 # The cfg is initialized differently depending on whether 1418 # we're in a run*Cfg method or not. 1419 cfg = cfgKind.initializer.call(cfg, kind) 1420 finalOptions = nil 1421 if options.respond_to?(:call) 1422 dynamicOptions = options.call(*args) 1423 if dynamicOptions.nil? 1424 skip 1425 return 1426 end 1427 # The Proc object may override any cfg option passed 1428 # in. This is used e.g. for dynamic test names as used 1429 # by WithRAMSize and FTLEagerWatchdog. 1430 cfg.merge!(dynamicOptions[:cfg]) 1431 # As the Proc may consume arguments, it's responsible 1432 # for returning the final option list. Needed e.g. by 1433 # WithRAMSize. 1434 finalOptions = dynamicOptions[:testSpecificOptions] 1435 else 1436 finalOptions = options + args 1437 end 1438 runInner(cfg, *finalOptions) 1439 } 1440 } 1441 } 1442 1443 CFG_NOISY = { 1444 :outputHandler => noisyOutputHandler, 1445 :errorHandler => noisyErrorHandler, 1446 }.freeze 1447 1448 BASE_MODES.each { |mode| 1449 name = "runNoisyTest#{mode[0]}".to_sym 1450 define_method(name) { |*args| 1451 # For each base mode, define the "noisy" variant which simply 1452 # calls the respective run#{name}Cfg, passing in the "noisy" 1453 # cfg. 1454 send("run#{mode[0]}Cfg", CFG_NOISY, "--validateBytecode=true", "--validateGraphAtEachPhase=true", *args) 1455 } 1456 } 1457 1458 # Default set of tests to run; propagates the cfg to every callee. 1459 def defaultRunCfg(cfg) 1460 cfg.freeze 1461 if $mode == "quick" 1462 defaultQuickRunCfg(cfg) 1463 else 1464 runDefaultCfg(cfg) 1465 runBytecodeCacheCfg(cfg) 1466 runMiniModeCfg(cfg) 1467 if $jitTests 1468 runNoLLIntCfg(cfg) 1469 runNoCJITValidatePhasesCfg(cfg) 1470 runNoCJITCollectContinuouslyCfg(cfg) if shouldCollectContinuously? 1471 runDFGEagerCfg(cfg) 1472 if $mode != "basic" 1473 runDFGEagerNoCJITValidateCfg(cfg) 1474 runEagerJettisonNoCJITCfg(cfg) 1475 end 1476 1477 return if !$isFTLPlatform 1478 1479 runNoFTLCfg(cfg) 1480 runFTLEagerCfg(cfg) 1481 runFTLEagerNoCJITValidateCfg(cfg) if $buildType == "release" 1482 runFTLNoCJITSmallPoolCfg(cfg) 1483 1484 return if $mode == "basic" 1485 1486 runFTLNoCJITValidateCfg(cfg) 1487 runFTLNoCJITB3O0Cfg(cfg) 1488 runFTLNoCJITNoPutStackValidateCfg(cfg) 1489 runFTLNoCJITNoInlineValidateCfg(cfg) 1490 runFTLEagerNoCJITB3O1Cfg(cfg) 1491 end 1492 end 1073 1493 end 1074 1494 1075 1495 def defaultRun 1076 if $mode == "quick" 1077 defaultQuickRun 1078 else 1079 runDefault 1080 runBytecodeCache 1081 runMiniMode 1082 if $jitTests 1083 runNoLLInt 1084 runNoCJITValidatePhases 1085 runNoCJITCollectContinuously if shouldCollectContinuously? 1086 runDFGEager 1087 if $mode != "basic" 1088 runDFGEagerNoCJITValidate 1089 runEagerJettisonNoCJIT 1090 end 1091 1092 return if !$isFTLPlatform 1093 1094 runNoFTL 1095 runFTLEager 1096 runFTLEagerNoCJITValidate if $buildType == "release" 1097 runFTLNoCJITSmallPool 1098 1099 return if $mode == "basic" 1100 1101 runFTLNoCJITValidate 1102 runFTLNoCJITB3O0 1103 runFTLNoCJITNoPutStackValidate 1104 runFTLNoCJITNoInlineValidate 1105 runFTLEagerNoCJITB3O1 1106 end 1107 end 1496 defaultRunCfg({}) 1108 1497 end 1109 1498 … … 1139 1528 end 1140 1529 1530 def defaultQuickRunCfg(cfg) 1531 runDefaultCfg(cfg) 1532 if $jitTests 1533 runNoCJITValidateCfg(cfg) 1534 1535 return if !$isFTLPlatform 1536 1537 runNoFTLCfg(cfg) 1538 runFTLNoCJITValidateCfg(cfg) 1539 end 1540 end 1541 1141 1542 def defaultQuickRun 1142 runDefault 1143 if $jitTests 1144 runNoCJITValidate 1145 1146 return if !$isFTLPlatform 1147 1148 runNoFTL 1149 runFTLNoCJITValidate 1150 end 1543 defaultQuickRunCfg({}) 1151 1544 end 1152 1545 … … 1801 2194 end 1802 2195 1803 def runNoisyTestImpl(kind, options, additionalEnv)1804 addRunCommand(kind, vmCommand + BASE_OPTIONS + options + $testSpecificRequiredOptions + [$benchmark.to_s], noisyOutputHandler, noisyErrorHandler, *additionalEnv)1805 end1806 1807 def runNoisyTest(kind, *options)1808 runNoisyTestImpl(kind, options, [])1809 end1810 1811 2196 def runNoisyTestWithEnv(kind, *additionalEnv) 1812 runNoisyTestImpl(kind, [], additionalEnv) 1813 end 1814 1815 def runNoisyTestDefault 1816 runNoisyTest("default", *FTL_OPTIONS) 1817 end 1818 1819 def runNoisyTestNoFTL 1820 runNoisyTest("no-ftl") 1821 end 1822 1823 def runNoisyTestNoCJIT 1824 runNoisyTest("ftl-no-cjit", "--validateBytecode=true", "--validateGraphAtEachPhase=true", *(FTL_OPTIONS + NO_CJIT_OPTIONS + COLLECT_CONTINUOUSLY_OPTIONS)) 1825 end 1826 1827 def runNoisyTestNoCJITB3O1 1828 runNoisyTest("ftl-no-cjit-b3o1", "--validateBytecode=true", "--validateGraphAtEachPhase=true", *(FTL_OPTIONS + NO_CJIT_OPTIONS + B3O1_OPTIONS)) 1829 end 1830 1831 def runNoisyTestEagerNoCJIT 1832 runNoisyTest("ftl-eager-no-cjit", "--validateBytecode=true", "--validateGraphAtEachPhase=true", *(FTL_OPTIONS + NO_CJIT_OPTIONS + EAGER_OPTIONS + COLLECT_CONTINUOUSLY_OPTIONS)) 2197 cfg = CFG_NOISY.dup 2198 cfg[:kind] = kind 2199 cfg[:additionalEnv] = additionalEnv 2200 runDefaultCfg(cfg) 1833 2201 end 1834 2202 1835 2203 def defaultRunNoisyTest 1836 runNoisyTestDefault 1837 if $jitTests and $isFTLPlatform 1838 runNoisyTestNoFTL 1839 runNoisyTestNoCJIT 1840 runNoisyTestNoCJITB3O1 1841 runNoisyTestEagerNoCJIT 1842 end 2204 cfg = { 2205 :outputHandler => noisyOutputHandler, 2206 :errorHandler => noisyErrorHandler, 2207 } 2208 defaultRunCfg(cfg) 1843 2209 end 1844 2210
Note:
See TracChangeset
for help on using the changeset viewer.