From 07a2e99c68ce97610f610fab96c66e3536fc5edb Mon Sep 17 00:00:00 2001 From: Alexander Markov Date: Thu, 15 Oct 2020 19:01:37 +0000 Subject: [PATCH] Remove bytecode modes from DartFuzz Change-Id: Ied5b9ec9c0f326b62df456dce810fcdcb0a4f4d7 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/167841 Reviewed-by: Ben Konyi Commit-Queue: Alexander Markov --- runtime/tools/dartfuzz/README.md | 4 - runtime/tools/dartfuzz/dartfuzz_test.dart | 105 +--------------------- 2 files changed, 2 insertions(+), 107 deletions(-) diff --git a/runtime/tools/dartfuzz/README.md b/runtime/tools/dartfuzz/README.md index 7165b63d723..b1531d0c966 100644 --- a/runtime/tools/dartfuzz/README.md +++ b/runtime/tools/dartfuzz/README.md @@ -61,10 +61,6 @@ where --mode2 : m2, and values one of jit-[debug-][ia32|x64|arm32|arm64] = Dart JIT aot-[debug-][x64|arm32|arm64] = Dart AOT - kbc-[int|mix|cmp]-[debug-][ia32|x64|arm32|arm64] = Dart KBC - (interpreted/ - mixed-mode/ - compiled bytecode) djs-x64 = dart2js + Node.JS --[no-]rerun : re-run a testcase if there is only a divergence in the return codes outside the range [-255,+255]; diff --git a/runtime/tools/dartfuzz/dartfuzz_test.dart b/runtime/tools/dartfuzz/dartfuzz_test.dart index 8093309e514..8e826fa8cda 100644 --- a/runtime/tools/dartfuzz/dartfuzz_test.dart +++ b/runtime/tools/dartfuzz/dartfuzz_test.dart @@ -51,26 +51,6 @@ abstract class TestRunner { String prefix = mode.substring(0, 3).toUpperCase(); String tag = getTag(mode); List extraFlags = []; - // Required extra flags for kbc. - if (mode.startsWith('kbc-int')) { - prefix += '-INT'; - extraFlags += [ - '--enable-interpreter', - '--compilation-counter-threshold=-1' - ]; - } else if (mode.startsWith('kbc-mix')) { - prefix += '-MIX'; - extraFlags += ['--enable-interpreter']; - } else if (mode.startsWith('kbc-cmp')) { - prefix += '-CMP'; - extraFlags += ['--use-bytecode-compiler']; - } - // Every once in a while, go directly from source for kbc. - bool kbcSrc = false; - if (mode.startsWith('kbc') && rand.nextInt(4) == 0) { - prefix += '-SRC'; - kbcSrc = true; - } // Every once in a while, stress test JIT. if (mode.startsWith('jit') && rand.nextInt(4) == 0) { final r = rand.nextInt(7); @@ -126,9 +106,6 @@ abstract class TestRunner { return TestRunnerJIT(prefix, tag, top, tmp, env, fileName, extraFlags); } else if (mode.startsWith('aot')) { return TestRunnerAOT(prefix, tag, top, tmp, env, fileName, extraFlags); - } else if (mode.startsWith('kbc')) { - return TestRunnerKBC( - prefix, tag, top, tmp, env, fileName, extraFlags, kbcSrc); } else if (mode.startsWith('djs')) { return TestRunnerDJS(prefix, tag, top, tmp, env, fileName); } @@ -227,60 +204,6 @@ class TestRunnerAOT implements TestRunner { List cmd; } -/// Concrete test runner of bytecode. -class TestRunnerKBC implements TestRunner { - TestRunnerKBC(String prefix, String tag, this.top, this.tmp, this.env, - this.fileName, List extraFlags, bool kbcSrc) { - description = '$prefix-$tag'; - dart = '$top/out/$tag/dart'; - if (kbcSrc) { - cmd = [ - dart, - ...extraFlags, - '--old_gen_heap_size=${dartHeapSize}', - fileName - ]; - } else { - generate = '$top/pkg/vm/tool/gen_kernel'; - platform = '--platform=$top/out/$tag/vm_platform_strong.dill'; - dill = '$tmp/out.dill'; - cmd = [dart, ...extraFlags, '--old_gen_heap_size=${dartHeapSize}', dill]; - } - } - - TestResult run() { - if (generate != null) { - TestResult result = runCommand( - [generate, '--gen-bytecode', platform, '-o', dill, fileName], env); - if (result.exitCode != 0) { - return result; - } - } - return runCommand(cmd, env); - } - - void printReproductionCommand() { - if (generate != null) { - print([generate, '--gen-bytecode', platform, '-o', dill, fileName] - .join(" ") - .replaceAll('$top/', '') - .replaceAll('$tmp/', '')); - } - print(cmd.join(" ").replaceAll('$top/', '').replaceAll('$tmp/', '')); - } - - String description; - String generate; - String platform; - String dill; - String dart; - String fileName; - final String top; - final String tmp; - Map env; - List cmd; -} - /// Concrete test runner of Dart2JS. class TestRunnerDJS implements TestRunner { TestRunnerDJS( @@ -413,8 +336,8 @@ class DartFuzzTest { (mode1.contains('ia32') && mode2.contains('ia32'))); bool ffiCapable(String mode1, String mode2) => - (mode1.startsWith('jit') || mode1.startsWith('kbc')) && - (mode2.startsWith('jit') || mode2.startsWith('kbc')) && + mode1.startsWith('jit') && + mode2.startsWith('jit') && (!mode1.contains('arm') && !mode2.contains('arm')); bool nestedTypesAllowed(String mode1, String mode2) => @@ -759,30 +682,6 @@ class DartFuzzTestSession { 'jit-arm64', 'aot-debug-x64', 'aot-x64', - 'kbc-int-debug-ia32', - 'kbc-cmp-debug-ia32', - 'kbc-mix-debug-ia32', - 'kbc-int-debug-x64', - 'kbc-cmp-debug-x64', - 'kbc-mix-debug-x64', - 'kbc-int-debug-arm32', - 'kbc-cmp-debug-arm32', - 'kbc-mix-debug-arm32', - 'kbc-int-debug-arm64', - 'kbc-cmp-debug-arm64', - 'kbc-mix-debug-arm64', - 'kbc-int-ia32', - 'kbc-cmp-ia32', - 'kbc-mix-ia32', - 'kbc-int-x64', - 'kbc-cmp-x64', - 'kbc-mix-x64', - 'kbc-int-arm32', - 'kbc-cmp-arm32', - 'kbc-mix-arm32', - 'kbc-int-arm64', - 'kbc-cmp-arm64', - 'kbc-mix-arm64', ]; // Modes not used on cluster runs because they have outstanding issues.