| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 5623194 commit faba50d
4 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -2,6 +2,8 @@ | |||
| 2 | 2 | ||
| 3 | 3 | process.stdout.write(`${process.pid}`); | |
| 4 | 4 | ||
| 5 | + const wantOptimization = !process.argv.includes('--no-opt'); | ||
| 6 | + | ||
| 5 | 7 | const testRegex = /test-regex/gi; | |
| 6 | 8 | ||
| 7 | 9 | function functionOne() { | |
@@ -14,4 +16,16 @@ function functionTwo() { | |||
| 14 | 16 | functionOne(); | |
| 15 | 17 | } | |
| 16 | 18 | ||
| 19 | + if (wantOptimization) { | ||
| 20 | + %PrepareFunctionForOptimization(functionOne); | ||
| 21 | + %PrepareFunctionForOptimization(functionTwo); | ||
| 22 | + } | ||
| 23 | + | ||
| 24 | + functionTwo(); | ||
| 25 | + | ||
| 26 | + if (wantOptimization) { | ||
| 27 | + %OptimizeFunctionOnNextCall(functionOne); | ||
| 28 | + %OptimizeFunctionOnNextCall(functionTwo); | ||
| 29 | + } | ||
| 30 | + | ||
| 17 | 31 | functionTwo(); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -42,7 +42,7 @@ tmpdir.refresh(); | |||
| 42 | 42 | const testCases = [ | |
| 43 | 43 | { | |
| 44 | 44 | title: '--perf-basic-prof interpreted', | |
| 45 | - nodeFlags: ['--perf-basic-prof', '--no-turbo-inlining', '--no-opt'], | ||
| 45 | + nodeFlags: ['--allow-natives-syntax', '--perf-basic-prof', '--no-turbo-inlining', '--no-opt'], | ||
| 46 | 46 | matches: [ | |
| 47 | 47 | 'JS:~functionOne .+/linux-perf-logger.js', | |
| 48 | 48 | 'JS:~functionTwo .+/linux-perf-logger.js', | |
@@ -55,8 +55,7 @@ const testCases = [ | |||
| 55 | 55 | }, | |
| 56 | 56 | { | |
| 57 | 57 | title: '--perf-basic-prof compiled', | |
| 58 | - nodeFlags: ['--perf-basic-prof', '--no-turbo-inlining', '--always-turbofan', | ||
| 59 | - '--minimum-invocations-before-optimization=0'], | ||
| 58 | + nodeFlags: ['--allow-natives-syntax', '--perf-basic-prof', '--no-turbo-inlining'], | ||
| 60 | 59 | matches: [ | |
| 61 | 60 | String.raw`RegExp\.> src: 'test-regex' flags: 'gi'`, | |
| 62 | 61 | 'JS:~functionOne .+/linux-perf-logger.js', | |
@@ -68,7 +67,7 @@ const testCases = [ | |||
| 68 | 67 | }, | |
| 69 | 68 | { | |
| 70 | 69 | title: '--perf-basic-prof-only-functions interpreted', | |
| 71 | - nodeFlags: ['--perf-basic-prof-only-functions', '--no-turbo-inlining', '--no-opt'], | ||
| 70 | + nodeFlags: ['--allow-natives-syntax', '--perf-basic-prof-only-functions', '--no-turbo-inlining', '--no-opt'], | ||
| 72 | 71 | matches: [ | |
| 73 | 72 | 'JS:~functionOne .+/linux-perf-logger.js', | |
| 74 | 73 | 'JS:~functionTwo .+/linux-perf-logger.js', | |
@@ -81,8 +80,7 @@ const testCases = [ | |||
| 81 | 80 | }, | |
| 82 | 81 | { | |
| 83 | 82 | title: '--perf-basic-prof-only-functions compiled', | |
| 84 | - nodeFlags: ['--perf-basic-prof-only-functions', '--no-turbo-inlining', '--always-turbofan', | ||
| 85 | - '--minimum-invocations-before-optimization=0'], | ||
| 83 | + nodeFlags: ['--allow-natives-syntax', '--perf-basic-prof-only-functions', '--no-turbo-inlining'], | ||
| 86 | 84 | matches: [ | |
| 87 | 85 | 'JS:~functionOne .+/linux-perf-logger.js', | |
| 88 | 86 | 'JS:~functionTwo .+/linux-perf-logger.js', | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -61,7 +61,6 @@ const perfCompiledFramesArgs = [ | |||
| 61 | 61 | '--', | |
| 62 | 62 | process.execPath, | |
| 63 | 63 | ...nodeCommonFlags, | |
| 64 | - '--always-turbofan', | ||
| 65 | 64 | fixtures.path('linux-perf.js'), | |
| 66 | 65 | `${sleepTime}`, | |
| 67 | 66 | `${repeat}`, | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1677,9 +1677,6 @@ def Main(): | |||
| 1677 | 1677 | if options.check_deopts: | |
| 1678 | 1678 | options.node_args.append("--trace-opt") | |
| 1679 | 1679 | options.node_args.append("--trace-file-names") | |
| 1680 | - # --always-turbofan is needed because many tests do not run long enough for | ||
| 1681 | - # the optimizer to kick in, so this flag will force it to run. | ||
| 1682 | - options.node_args.append("--always-turbofan") | ||
| 1683 | 1680 | options.progress = "deopts" | |
| 1684 | 1681 | ||
| 1685 | 1682 | if options.error_reporter: | |
| Back | FazBrowse Home | New Git URL |
0 commit comments