diff options
73 files changed, 327 insertions, 114 deletions
diff --git a/perf.groovy b/perf.groovy index 8d3a6c58ed..9ac98d9665 100644 --- a/perf.groovy +++ b/perf.groovy @@ -20,7 +20,7 @@ def static getOSGroup(def os) { 'OpenSUSE13.2': 'Linux', 'OpenSUSE42.1': 'Linux', 'LinuxARMEmulator': 'Linux'] - def osGroup = osGroupMap.get(os, null) + def osGroup = osGroupMap.get(os, null) assert osGroup != null : "Could not find os group for ${os}" return osGroupMap[os] } @@ -42,18 +42,19 @@ def static getOSGroup(def os) { steps { // Batch - - batchFile("C:\\Tools\\nuget.exe install Microsoft.BenchView.JSONFormat -Source http://benchviewtestfeed.azurewebsites.net/nuget -OutputDirectory C:\\tools -Prerelease -ExcludeVersion") + + batchFile("if exist \"%WORKSPACE%\\Microsoft.BenchView.JSONFormat\" rmdir /s /q \"%WORKSPACE%\\Microsoft.BenchView.JSONFormat\"") + batchFile("C:\\Tools\\nuget.exe install Microsoft.BenchView.JSONFormat -Source http://benchviewtestfeed.azurewebsites.net/nuget -OutputDirectory \"%WORKSPACE%\" -Prerelease -ExcludeVersion") //Do this here to remove the origin but at the front of the branch name as this is a problem for BenchView //we have to do it all as one statement because cmd is called each time and we lose the set environment variable batchFile("if [%GIT_BRANCH:~0,7%] == [origin/] (set GIT_BRANCH_WITHOUT_ORIGIN=%GIT_BRANCH:origin/=%) else (set GIT_BRANCH_WITHOUT_ORIGIN=%GIT_BRANCH%)\n" + - "py C:\\tools\\Microsoft.BenchView.JSONFormat\\tools\\submission-metadata.py --name " + "\"" + benchViewName + "\"" + " --user " + "\"dotnet-bot@microsoft.com\"\n" + - "py C:\\tools\\Microsoft.BenchView.JSONFormat\\tools\\build.py git --branch %GIT_BRANCH_WITHOUT_ORIGIN% --type " + runType) - batchFile("py C:\\tools\\Microsoft.BenchView.JSONFormat\\tools\\machinedata.py") + "py \"%WORKSPACE%\\Microsoft.BenchView.JSONFormat\\tools\\submission-metadata.py\" --name " + "\"" + benchViewName + "\"" + " --user " + "\"dotnet-bot@microsoft.com\"\n" + + "py \"%WORKSPACE%\\Microsoft.BenchView.JSONFormat\\tools\\build.py\" git --branch %GIT_BRANCH_WITHOUT_ORIGIN% --type " + runType) + batchFile("py \"%WORKSPACE%\\Microsoft.BenchView.JSONFormat\\tools\\machinedata.py\"") batchFile("set __TestIntermediateDir=int&&build.cmd release ${architecture}") batchFile("tests\\runtest.cmd release ${architecture} GenerateLayoutOnly") - batchFile("tests\\scripts\\run-xunit-perf.cmd -arch ${architecture} -configuration ${configuration} -testBinLoc bin\\tests\\Windows_NT.${architecture}.Release\\performance\\perflab\\Perflab -library -uploadToBenchview C:\\Tools\\Microsoft.Benchview.JSONFormat\\tools -runtype " + runType) - batchFile("tests\\scripts\\run-xunit-perf.cmd -arch ${architecture} -configuration ${configuration} -testBinLoc bin\\tests\\Windows_NT.${architecture}.Release\\Jit\\Performance\\CodeQuality -uploadToBenchview C:\\Tools\\Microsoft.Benchview.JSONFormat\\tools -runtype " + runType) + batchFile("tests\\scripts\\run-xunit-perf.cmd -arch ${architecture} -configuration ${configuration} -testBinLoc bin\\tests\\Windows_NT.${architecture}.Release\\performance\\perflab\\Perflab -library -uploadToBenchview \"%WORKSPACE%\\Microsoft.Benchview.JSONFormat\\tools\" -runtype " + runType) + batchFile("tests\\scripts\\run-xunit-perf.cmd -arch ${architecture} -configuration ${configuration} -testBinLoc bin\\tests\\Windows_NT.${architecture}.Release\\Jit\\Performance\\CodeQuality -uploadToBenchview \"%WORKSPACE%\\Microsoft.Benchview.JSONFormat\\tools\" -runtype " + runType) } } @@ -64,7 +65,7 @@ def static getOSGroup(def os) { Utilities.addArchival(newJob, archiveSettings) Utilities.standardJobSetup(newJob, project, isPR, "*/${branch}") - + if (isPR) { TriggerBuilder builder = TriggerBuilder.triggerOnPullRequest() builder.setGithubContext("${os} CoreCLR Perf Tests") diff --git a/tests/scripts/run-xunit-perf.cmd b/tests/scripts/run-xunit-perf.cmd index 0c42673d43..a7d3c410d7 100644 --- a/tests/scripts/run-xunit-perf.cmd +++ b/tests/scripts/run-xunit-perf.cmd @@ -26,8 +26,10 @@ if NOT EXIST %CORECLR_OVERLAY% ( @echo --- setting up sandbox -rd /s /q sandbox -mkdir sandbox +if exist sandbox rd /s /q sandbox +if exist sandbox echo ERROR: Failed to remove the sandbox folder& exit /b 1 +if not exist sandbox mkdir sandbox +if not exist sandbox echo ERROR: Failed to create the sandbox folder& exit /b 1 pushd sandbox @rem stage stuff we need @@ -43,6 +45,22 @@ for /R %CORECLR_PERF% %%T in (*.%TEST_FILE_EXT%) do ( call :DOIT %%T ) +@rem optionally upload results to benchview +if not [%BENCHVIEW_PATH%] == [] ( + py "%BENCHVIEW_PATH%\submission.py" measurement.json ^ + --build ..\build.json ^ + --machine-data ..\machinedata.json ^ + --metadata ..\submission-metadata.json ^ + --group "CoreCLR" ^ + --type "%RUN_TYPE%" ^ + --config-name "%TEST_CONFIG%" ^ + --config Configuration "%TEST_CONFIG%" ^ + --config OS "Windows_NT" ^ + --arch "%TEST_ARCH%" ^ + --machinepool "PerfSnake" + py "%BENCHVIEW_PATH%\upload.py" submission.json --container coreclr +) + goto :EOF :DOIT @@ -60,28 +78,16 @@ xunit.performance.run.exe %BENCHNAME%.%TEST_FILE_EXT% -runner xunit.console.netc xunit.performance.analysis.exe %PERFOUT%.xml -xml %XMLOUT% > %BENCHNAME%-analysis.out -@rem optionally upload results to benchview +@rem optionally generate results for benchview if not [%BENCHVIEW_PATH%] == [] ( - py %BENCHVIEW_PATH%\measurement.py xunit perf-%BENCHNAME%.xml --better desc --drop-first-value - py %BENCHVIEW_PATH%\submission.py measurement.json ^ - --build ..\build.json ^ - --machine-data ..\machinedata.json ^ - --metadata ..\submission-metadata.json ^ - --group "CoreCLR" ^ - --type "%RUN_TYPE%" ^ - --config-name "%TEST_CONFIG%" ^ - --config Configuration "%TEST_CONFIG%" ^ - --config OS "Windows_NT" ^ - --arch "%TEST_ARCH%" ^ - --machinepool "PerfSnake" - py %BENCHVIEW_PATH%\upload.py submission.json --container coreclr + py "%BENCHVIEW_PATH%\measurement.py" xunit "perf-%BENCHNAME%.xml" --better desc --drop-first-value --append REM Save off the results to the root directory for recovery later in Jenkins xcopy perf-%BENCHNAME%*.xml %CORECLR_REPO%\ xcopy perf-%BENCHNAME%*.etl %CORECLR_REPO%\ ) else ( - type %XMLOUT% | findstr "test name" - type %XMLOUT% | findstr Duration - type %XMLOUT% | findstr InstRetired + type %XMLOUT% | findstr "test name" + type %XMLOUT% | findstr Duration + type %XMLOUT% | findstr InstRetired ) goto :EOF @@ -146,3 +152,5 @@ echo -uploadtoBenchview is used to specify a path to the Benchview tooling and w echo set we will upload the results of the tests to the coreclr container in benchviewupload. echo Runtype sets the runtype that we upload to Benchview, rolling for regular runs, and private for echo PRs. + +goto :EOF diff --git a/tests/src/JIT/Performance/CodeQuality/BenchF/Adams/Adams.cs b/tests/src/JIT/Performance/CodeQuality/BenchF/Adams/Adams.cs index 427ec9269e..431d857f16 100644 --- a/tests/src/JIT/Performance/CodeQuality/BenchF/Adams/Adams.cs +++ b/tests/src/JIT/Performance/CodeQuality/BenchF/Adams/Adams.cs @@ -18,6 +18,8 @@ using Microsoft.Xunit.Performance; [assembly: MeasureInstructionsRetired] #endif // XUNIT_PERF +namespace Benchstone.BenchF +{ public static class Adams { #if DEBUG @@ -41,7 +43,7 @@ public static class Adams #if VERBOSE Console.WriteLine(" ADAMS-MOULTON METHOD "); -#endif // VERBOSE +#endif // VERBOSE n = 4; h = 1.0 / 32.0; @@ -67,7 +69,7 @@ public static class Adams f[i] = xn + yn; #if VERBOSE Console.WriteLine("{0}, {1}, {2}, {3}, {4}", k, xn, yn, dn, en); -#endif // VERBOSE +#endif // VERBOSE } for (k = 4; k <= nstep; k++) @@ -137,7 +139,7 @@ public static class Adams bool result = true; // Note: we can't check xn or yn better because of the precision - // with which original results are given + // with which original results are given result &= System.Math.Abs(g_xn_base - g_xn) <= 1.5e-7; result &= System.Math.Abs(g_yn_base - g_yn) <= 1.5e-7; result &= System.Math.Abs(g_dn) <= 2.5e-9; @@ -161,3 +163,4 @@ public static class Adams return (result ? 100 : -1); } } +} diff --git a/tests/src/JIT/Performance/CodeQuality/BenchF/BenchMk2/BenchMk2.cs b/tests/src/JIT/Performance/CodeQuality/BenchF/BenchMk2/BenchMk2.cs index 970164405b..c4cfc0b217 100644 --- a/tests/src/JIT/Performance/CodeQuality/BenchF/BenchMk2/BenchMk2.cs +++ b/tests/src/JIT/Performance/CodeQuality/BenchF/BenchMk2/BenchMk2.cs @@ -11,6 +11,8 @@ using Xunit; [assembly: OptimizeForBenchmarks] [assembly: MeasureInstructionsRetired] +namespace Benchstone.BenchF +{ public static class BenchMk2 { #if DEBUG @@ -64,3 +66,4 @@ public static class BenchMk2 return (result ? 100 : -1); } } +} diff --git a/tests/src/JIT/Performance/CodeQuality/BenchF/BenchMrk/BenchMrk.cs b/tests/src/JIT/Performance/CodeQuality/BenchF/BenchMrk/BenchMrk.cs index 27a5fe617c..f342b2d84e 100644 --- a/tests/src/JIT/Performance/CodeQuality/BenchF/BenchMrk/BenchMrk.cs +++ b/tests/src/JIT/Performance/CodeQuality/BenchF/BenchMrk/BenchMrk.cs @@ -11,6 +11,8 @@ using Xunit; [assembly: OptimizeForBenchmarks] [assembly: MeasureInstructionsRetired] +namespace Benchstone.BenchF +{ public static class BenchMrk { #if DEBUG @@ -64,3 +66,4 @@ public static class BenchMrk return (result ? 100 : -1); } } +} diff --git a/tests/src/JIT/Performance/CodeQuality/BenchF/Bisect/Bisect.cs b/tests/src/JIT/Performance/CodeQuality/BenchF/Bisect/Bisect.cs index 1c27003567..724416a626 100644 --- a/tests/src/JIT/Performance/CodeQuality/BenchF/Bisect/Bisect.cs +++ b/tests/src/JIT/Performance/CodeQuality/BenchF/Bisect/Bisect.cs @@ -12,6 +12,8 @@ using Xunit; [assembly: OptimizeForBenchmarks] [assembly: MeasureInstructionsRetired] +namespace Benchstone.BenchF +{ public static class Bisect { #if DEBUG @@ -161,3 +163,4 @@ public static class Bisect return (result ? 100 : -1); } } +} diff --git a/tests/src/JIT/Performance/CodeQuality/BenchF/DMath/DMath.cs b/tests/src/JIT/Performance/CodeQuality/BenchF/DMath/DMath.cs index a2c3a385cd..47c5e20285 100644 --- a/tests/src/JIT/Performance/CodeQuality/BenchF/DMath/DMath.cs +++ b/tests/src/JIT/Performance/CodeQuality/BenchF/DMath/DMath.cs @@ -11,6 +11,8 @@ using Xunit; [assembly: OptimizeForBenchmarks] [assembly: MeasureInstructionsRetired] +namespace Benchstone.BenchF +{ public static class DMath { #if DEBUG @@ -110,4 +112,5 @@ public static class DMath return (result ? 100 : -1); } } +} diff --git a/tests/src/JIT/Performance/CodeQuality/BenchF/FFT/FFT.cs b/tests/src/JIT/Performance/CodeQuality/BenchF/FFT/FFT.cs index 3e853273fb..8881eae6c6 100644 --- a/tests/src/JIT/Performance/CodeQuality/BenchF/FFT/FFT.cs +++ b/tests/src/JIT/Performance/CodeQuality/BenchF/FFT/FFT.cs @@ -13,6 +13,8 @@ using Xunit; [assembly: OptimizeForBenchmarks] [assembly: MeasureInstructionsRetired] +namespace Benchstone.BenchF +{ public static class FFT { #if DEBUG @@ -151,3 +153,4 @@ public static class FFT return (result ? 100 : -1); } } +} diff --git a/tests/src/JIT/Performance/CodeQuality/BenchF/InProd/InProd.cs b/tests/src/JIT/Performance/CodeQuality/BenchF/InProd/InProd.cs index ff54ea7acd..26096b736e 100644 --- a/tests/src/JIT/Performance/CodeQuality/BenchF/InProd/InProd.cs +++ b/tests/src/JIT/Performance/CodeQuality/BenchF/InProd/InProd.cs @@ -11,6 +11,8 @@ using Xunit; [assembly: OptimizeForBenchmarks] [assembly: MeasureInstructionsRetired] +namespace Benchstone.BenchF +{ public static class InProd { #if DEBUG @@ -132,3 +134,4 @@ public static class InProd return (result ? 100 : -1); } } +} diff --git a/tests/src/JIT/Performance/CodeQuality/BenchF/InvMt/InvMt.cs b/tests/src/JIT/Performance/CodeQuality/BenchF/InvMt/InvMt.cs index a5f387b7f5..6ecfb62d91 100644 --- a/tests/src/JIT/Performance/CodeQuality/BenchF/InvMt/InvMt.cs +++ b/tests/src/JIT/Performance/CodeQuality/BenchF/InvMt/InvMt.cs @@ -12,6 +12,8 @@ using Xunit; [assembly: OptimizeForBenchmarks] [assembly: MeasureInstructionsRetired] +namespace Benchstone.BenchF +{ public static class InvMt { #if DEBUG @@ -135,3 +137,4 @@ public static class InvMt return (result ? 100 : -1); } } +} diff --git a/tests/src/JIT/Performance/CodeQuality/BenchF/LLoops/LLoops.cs b/tests/src/JIT/Performance/CodeQuality/BenchF/LLoops/LLoops.cs index 6dcb6c435c..73ec09aa04 100644 --- a/tests/src/JIT/Performance/CodeQuality/BenchF/LLoops/LLoops.cs +++ b/tests/src/JIT/Performance/CodeQuality/BenchF/LLoops/LLoops.cs @@ -60,6 +60,8 @@ using Xunit; [assembly: OptimizeForBenchmarks] [assembly: MeasureInstructionsRetired] +namespace Benchstone.BenchF +{ public class LLoops { #if DEBUG @@ -648,3 +650,4 @@ public class LLoops return (result ? 100 : -1); } } +} diff --git a/tests/src/JIT/Performance/CodeQuality/BenchF/Lorenz/Lorenz.cs b/tests/src/JIT/Performance/CodeQuality/BenchF/Lorenz/Lorenz.cs index bff6398d3b..5819446bf0 100644 --- a/tests/src/JIT/Performance/CodeQuality/BenchF/Lorenz/Lorenz.cs +++ b/tests/src/JIT/Performance/CodeQuality/BenchF/Lorenz/Lorenz.cs @@ -12,6 +12,8 @@ using Xunit; [assembly: OptimizeForBenchmarks] [assembly: MeasureInstructionsRetired] +namespace Benchstone.BenchF +{ public static class Lorenz { #if DEBUG @@ -132,3 +134,4 @@ public static class Lorenz return (result ? 100 : -1); } } +} diff --git a/tests/src/JIT/Performance/CodeQuality/BenchF/MatInv4/MatInv4.cs b/tests/src/JIT/Performance/CodeQuality/BenchF/MatInv4/MatInv4.cs index eb5e33b130..a00c29b843 100644 --- a/tests/src/JIT/Performance/CodeQuality/BenchF/MatInv4/MatInv4.cs +++ b/tests/src/JIT/Performance/CodeQuality/BenchF/MatInv4/MatInv4.cs @@ -10,6 +10,8 @@ using Xunit; [assembly: OptimizeForBenchmarks] [assembly: MeasureInstructionsRetired] +namespace Benchstone.BenchF +{ public static class MatInv4 { #if DEBUG @@ -217,11 +219,11 @@ public static class MatInv4 // 0 < ik <= n^2 ik = nk + i; hold = a[ik - 1]; - // -n < ij <= 0 + // -n < ij <= 0 ij = i - n; for (j = 1; j <= n; ++j) { - // i <= n, ij <= n + n + ... + n (n times) or ij <= n * n + // i <= n, ij <= n + n + ... + n (n times) or ij <= n * n ij = ij + n; if (j == k) { @@ -237,7 +239,7 @@ public static class MatInv4 kj = k - n; for (j = 1; j <= n; ++j) { - // k <= n, kj <= n + n + ... + n (n times) or kj <= n * n + // k <= n, kj <= n + n + ... + n (n times) or kj <= n * n kj = kj + n; if (j == k) { @@ -268,11 +270,11 @@ public static class MatInv4 jr = n * (i - 1); for (j = 1; j <= n; ++j) { - // jk <= n^2 - n + n + // jk <= n^2 - n + n // jk <= n^2 jk = jq + j; hold = a[jk - 1]; - // ji <= n^2 - n + n + // ji <= n^2 - n + n // ji <= n^2 ji = jr + j; a[jk - 1] = -a[ji - 1]; @@ -288,7 +290,7 @@ public static class MatInv4 ki = k - n; for (i = 1; i <= n; ++i) { - // ki <= n + n + ... + n (n times) or ki <= n * n + // ki <= n + n + ... + n (n times) or ki <= n * n ki = ki + n; hold = a[ki - 1]; // if i=1, ji = (1 + (n-1) * n) - 1 + n ==> ij = n^2 @@ -378,7 +380,7 @@ public static class MatInv4 { if (j != k) { - // Accessing upto n^2 - n + n - 1 ==> n^2 - 1 + // Accessing upto n^2 - n + n - 1 ==> n^2 - 1 a[(i - 1) * n + (j - 1)] = a[(i - 1) * n + (k - 1)] * a[(k - 1) * n + (j - 1)] + a[(i - 1) * n + (j - 1)]; } } @@ -493,3 +495,4 @@ public static class MatInv4 return (result ? 100 : -1); } } +} diff --git a/tests/src/JIT/Performance/CodeQuality/BenchF/NewtE/NewtE.cs b/tests/src/JIT/Performance/CodeQuality/BenchF/NewtE/NewtE.cs index 0fc14132f1..47f90d8616 100644 --- a/tests/src/JIT/Performance/CodeQuality/BenchF/NewtE/NewtE.cs +++ b/tests/src/JIT/Performance/CodeQuality/BenchF/NewtE/NewtE.cs @@ -13,6 +13,8 @@ using Xunit; [assembly: OptimizeForBenchmarks] [assembly: MeasureInstructionsRetired] +namespace Benchstone.BenchF +{ public static class NewtE { #if DEBUG @@ -133,3 +135,4 @@ public static class NewtE return (result ? 100 : -1); } } +} diff --git a/tests/src/JIT/Performance/CodeQuality/BenchF/NewtR/NewtR.cs b/tests/src/JIT/Performance/CodeQuality/BenchF/NewtR/NewtR.cs index cf945bc110..c590f6e570 100644 --- a/tests/src/JIT/Performance/CodeQuality/BenchF/NewtR/NewtR.cs +++ b/tests/src/JIT/Performance/CodeQuality/BenchF/NewtR/NewtR.cs @@ -12,6 +12,8 @@ using Xunit; [assembly: OptimizeForBenchmarks] [assembly: MeasureInstructionsRetired] +namespace Benchstone.BenchF +{ public static class NewtR { #if DEBUG @@ -129,3 +131,4 @@ public static class NewtR return (result ? 100 : -1); } } +} diff --git a/tests/src/JIT/Performance/CodeQuality/BenchF/Regula/Regula.cs b/tests/src/JIT/Performance/CodeQuality/BenchF/Regula/Regula.cs index 9743ab698c..0011288e55 100644 --- a/tests/src/JIT/Performance/CodeQuality/BenchF/Regula/Regula.cs +++ b/tests/src/JIT/Performance/CodeQuality/BenchF/Regula/Regula.cs @@ -12,6 +12,8 @@ using Xunit; [assembly: OptimizeForBenchmarks] [assembly: MeasureInstructionsRetired] +namespace Benchstone.BenchF +{ public static class Regula { #if DEBUG @@ -191,3 +193,4 @@ public static class Regula return (result ? 100 : -1); } } +} diff --git a/tests/src/JIT/Performance/CodeQuality/BenchF/Romber/Romber.cs b/tests/src/JIT/Performance/CodeQuality/BenchF/Romber/Romber.cs index 5824cd43cc..a4d56f7b0f 100644 --- a/tests/src/JIT/Performance/CodeQuality/BenchF/Romber/Romber.cs +++ b/tests/src/JIT/Performance/CodeQuality/BenchF/Romber/Romber.cs @@ -12,6 +12,8 @@ using Xunit; [assembly: OptimizeForBenchmarks] [assembly: MeasureInstructionsRetired] +namespace Benchstone.BenchF +{ public static class Romber { #if DEBUG @@ -167,3 +169,4 @@ public static class Romber return (result ? 100 : -1); } } +} diff --git a/tests/src/JIT/Performance/CodeQuality/BenchF/Secant/Secant.cs b/tests/src/JIT/Performance/CodeQuality/BenchF/Secant/Secant.cs index e7d1ace2e6..060fb5b0a4 100644 --- a/tests/src/JIT/Performance/CodeQuality/BenchF/Secant/Secant.cs +++ b/tests/src/JIT/Performance/CodeQuality/BenchF/Secant/Secant.cs @@ -12,6 +12,8 @@ using Xunit; [assembly: OptimizeForBenchmarks] [assembly: MeasureInstructionsRetired] +namespace Benchstone.BenchF +{ public static class Secant { #if DEBUG @@ -140,3 +142,4 @@ public static class Secant return (result ? 100 : -1); } } +} diff --git a/tests/src/JIT/Performance/CodeQuality/BenchF/Simpsn/Simpsn.cs b/tests/src/JIT/Performance/CodeQuality/BenchF/Simpsn/Simpsn.cs index e1e9f0eb1f..5b2df292af 100644 --- a/tests/src/JIT/Performance/CodeQuality/BenchF/Simpsn/Simpsn.cs +++ b/tests/src/JIT/Performance/CodeQuality/BenchF/Simpsn/Simpsn.cs @@ -12,6 +12,8 @@ using Xunit; [assembly: OptimizeForBenchmarks] [assembly: MeasureInstructionsRetired] +namespace Benchstone.BenchF +{ public static class Simpsn { #if DEBUG @@ -91,3 +93,4 @@ public static class Simpsn return (result ? 100 : -1); } } +} diff --git a/tests/src/JIT/Performance/CodeQuality/BenchF/SqMtx/SqMtx.cs b/tests/src/JIT/Performance/CodeQuality/BenchF/SqMtx/SqMtx.cs index 673757cedf..b22aad88b7 100644 --- a/tests/src/JIT/Performance/CodeQuality/BenchF/SqMtx/SqMtx.cs +++ b/tests/src/JIT/Performance/CodeQuality/BenchF/SqMtx/SqMtx.cs @@ -11,6 +11,8 @@ using Xunit; [assembly: OptimizeForBenchmarks] [assembly: MeasureInstructionsRetired] +namespace Benchstone.BenchF +{ public static class SqMtx { #if DEBUG @@ -101,3 +103,4 @@ public static class SqMtx return (result ? 100 : -1); } } +} diff --git a/tests/src/JIT/Performance/CodeQuality/BenchF/Trap/Trap.cs b/tests/src/JIT/Performance/CodeQuality/BenchF/Trap/Trap.cs index a5e3e5c0d6..3a0de102ed 100644 --- a/tests/src/JIT/Performance/CodeQuality/BenchF/Trap/Trap.cs +++ b/tests/src/JIT/Performance/CodeQuality/BenchF/Trap/Trap.cs @@ -12,6 +12,8 @@ using Xunit; [assembly: OptimizeForBenchmarks] [assembly: MeasureInstructionsRetired] +namespace Benchstone.BenchF +{ public static class Trap { #if DEBUG @@ -94,3 +96,4 @@ public static class Trap return (result ? 100 : -1); } } +} diff --git a/tests/src/JIT/Performance/CodeQuality/BenchF/Whetsto/Whetsto.cs b/tests/src/JIT/Performance/CodeQuality/BenchF/Whetsto/Whetsto.cs index 2ab0b61ee0..ffe3fa5d8b 100644 --- a/tests/src/JIT/Performance/CodeQuality/BenchF/Whetsto/Whetsto.cs +++ b/tests/src/JIT/Performance/CodeQuality/BenchF/Whetsto/Whetsto.cs @@ -12,6 +12,8 @@ using Xunit; [assembly: OptimizeForBenchmarks] [assembly: MeasureInstructionsRetired] +namespace Benchstone.BenchF +{ public static class Whetsto { #if DEBUG @@ -240,3 +242,4 @@ public static class Whetsto return (result ? 100 : -1); } } +} diff --git a/tests/src/JIT/Performance/CodeQuality/BenchI/8Queens/8Queens.cs b/tests/src/JIT/Performance/CodeQuality/BenchI/8Queens/8Queens.cs index 76ed0c8e71..e641ee0a74 100644 --- a/tests/src/JIT/Performance/CodeQuality/BenchI/8Queens/8Queens.cs +++ b/tests/src/JIT/Performance/CodeQuality/BenchI/8Queens/8Queens.cs @@ -11,6 +11,8 @@ using Xunit; [assembly: OptimizeForBenchmarks] [assembly: MeasureInstructionsRetired] +namespace Benchstone.BenchI +{ public static class EightQueens { @@ -68,7 +70,7 @@ public static class EightQueens } i = i + 1; } - + TryMe(1, ref q, b, a); return (q == 1); @@ -92,9 +94,10 @@ public static class EightQueens } return result; } - + public static int Main() { bool result = TestBase(); return (result ? 100 : -1); } } +} diff --git a/tests/src/JIT/Performance/CodeQuality/BenchI/Ackermann/Ackermann.cs b/tests/src/JIT/Performance/CodeQuality/BenchI/Ackermann/Ackermann.cs index 512f35f82d..5bfa196527 100644 --- a/tests/src/JIT/Performance/CodeQuality/BenchI/Ackermann/Ackermann.cs +++ b/tests/src/JIT/Performance/CodeQuality/BenchI/Ackermann/Ackermann.cs @@ -11,6 +11,8 @@ using Xunit; [assembly: OptimizeForBenchmarks] [assembly: MeasureInstructionsRetired] +namespace Benchstone.BenchI +{ public static class Ackermann { @@ -40,7 +42,7 @@ public static class Ackermann int a33 = Acker(3, 3); return (a00 == 1) && (a11 == 3) && (a22 == 7) & (a33 == 61); } - + [Benchmark] public static void Test() { foreach (var iteration in Benchmark.Iterations) { @@ -59,9 +61,10 @@ public static class Ackermann } return result; } - + public static int Main() { bool result = TestBase(); return (result ? 100 : -1); } } +} diff --git a/tests/src/JIT/Performance/CodeQuality/BenchI/AddArray/AddArray.cs b/tests/src/JIT/Performance/CodeQuality/BenchI/AddArray/AddArray.cs index 0fa2ff90eb..d38e6b4475 100644 --- a/tests/src/JIT/Performance/CodeQuality/BenchI/AddArray/AddArray.cs +++ b/tests/src/JIT/Performance/CodeQuality/BenchI/AddArray/AddArray.cs @@ -11,6 +11,8 @@ using Xunit; [assembly: OptimizeForBenchmarks] [assembly: MeasureInstructionsRetired] +namespace Benchstone.BenchI +{ public static class AddArray { @@ -48,14 +50,14 @@ public static class AddArray m = j; flags4[m] = flags3[l] + m + m + m + m; } - + for (j = 0; j <= Size; j++) { k = j; l = j; m = j; flags1[j] = flags1[j] + flags2[k] + flags3[l] + flags4[m] - flags2[k - j + l]; } - + // Escape each flags array so that their elements will appear live-out Escape(flags1); Escape(flags2); @@ -83,9 +85,10 @@ public static class AddArray } return result; } - + public static int Main() { bool result = TestBase(); return (result ? 100 : -1); } } +} diff --git a/tests/src/JIT/Performance/CodeQuality/BenchI/AddArray2/AddArray2.cs b/tests/src/JIT/Performance/CodeQuality/BenchI/AddArray2/AddArray2.cs index 865b9445f6..a6004f0309 100644 --- a/tests/src/JIT/Performance/CodeQuality/BenchI/AddArray2/AddArray2.cs +++ b/tests/src/JIT/Performance/CodeQuality/BenchI/AddArray2/AddArray2.cs @@ -11,6 +11,8 @@ using Xunit; [assembly: OptimizeForBenchmarks] [assembly: MeasureInstructionsRetired] +namespace Benchstone.BenchI +{ public static class AddArray2 { #if DEBUG @@ -129,3 +131,4 @@ public static class AddArray2 return (result ? 100 : -1); } } +} diff --git a/tests/src/JIT/Performance/CodeQuality/BenchI/Array1/Array1.cs b/tests/src/JIT/Performance/CodeQuality/BenchI/Array1/Array1.cs index 8d5dbd6153..780b7ce66f 100644 --- a/tests/src/JIT/Performance/CodeQuality/BenchI/Array1/Array1.cs +++ b/tests/src/JIT/Performance/CodeQuality/BenchI/Array1/Array1.cs @@ -18,6 +18,8 @@ using Xunit; [assembly: OptimizeForBenchmarks] [assembly: MeasureInstructionsRetired] +namespace Benchstone.BenchI +{ public static class Array1 { #if DEBUG @@ -152,3 +154,4 @@ public static class Array1 return (result ? 100 : -1); } } +} diff --git a/tests/src/JIT/Performance/CodeQuality/BenchI/Array2/Array2.cs b/tests/src/JIT/Performance/CodeQuality/BenchI/Array2/Array2.cs index 1b720b94fa..dac100c5a7 100644 --- a/tests/src/JIT/Performance/CodeQuality/BenchI/Array2/Array2.cs +++ b/tests/src/JIT/Performance/CodeQuality/BenchI/Array2/Array2.cs @@ -11,6 +11,8 @@ using Xunit; [assembly: OptimizeForBenchmarks] [assembly: MeasureInstructionsRetired] +namespace Benchstone.BenchI +{ public static class Array2 { @@ -75,7 +77,7 @@ public static class Array2 } bool result = VerifyCopy(s, d); - + return result; } @@ -92,9 +94,10 @@ public static class Array2 bool result = Bench(Iterations); return result; } - + public static int Main() { bool result = TestBase(); return (result ? 100 : -1); } } +} diff --git a/tests/src/JIT/Performance/CodeQuality/BenchI/BenchE/BenchE.cs b/tests/src/JIT/Performance/CodeQuality/BenchI/BenchE/BenchE.cs index 9cf7d770dc..b16c48280b 100644 --- a/tests/src/JIT/Performance/CodeQuality/BenchI/BenchE/BenchE.cs +++ b/tests/src/JIT/Performance/CodeQuality/BenchI/BenchE/BenchE.cs @@ -11,6 +11,8 @@ using Xunit; [assembly: OptimizeForBenchmarks] [assembly: MeasureInstructionsRetired] +namespace Benchstone.BenchI +{ public static class BenchE { #if DEBUG @@ -115,3 +117,4 @@ public static class BenchE return (result ? 100 : -1); } } +} diff --git a/tests/src/JIT/Performance/CodeQuality/BenchI/BubbleSort/BubbleSort.cs b/tests/src/JIT/Performance/CodeQuality/BenchI/BubbleSort/BubbleSort.cs index 78626fffc9..558484d3d6 100644 --- a/tests/src/JIT/Performance/CodeQuality/BenchI/BubbleSort/BubbleSort.cs +++ b/tests/src/JIT/Performance/CodeQuality/BenchI/BubbleSort/BubbleSort.cs @@ -11,6 +11,8 @@ using Xunit; [assembly: OptimizeForBenchmarks] [assembly: MeasureInstructionsRetired] +namespace Benchstone.BenchI +{ public static class BubbleSort { @@ -43,7 +45,7 @@ public static class BubbleSort return false; } } - + return true; } @@ -79,9 +81,10 @@ public static class BubbleSort } return result; } - + public static int Main() { bool result = TestBase(); return (result ? 100 : -1); } } +} diff --git a/tests/src/JIT/Performance/CodeQuality/BenchI/BubbleSort2/BubbleSort2.cs b/tests/src/JIT/Performance/CodeQuality/BenchI/BubbleSort2/BubbleSort2.cs index 55e5a5f8c5..8c2e63a954 100644 --- a/tests/src/JIT/Performance/CodeQuality/BenchI/BubbleSort2/BubbleSort2.cs +++ b/tests/src/JIT/Performance/CodeQuality/BenchI/BubbleSort2/BubbleSort2.cs @@ -11,6 +11,8 @@ using Xunit; [assembly: OptimizeForBenchmarks] [assembly: MeasureInstructionsRetired] +namespace Benchstone.BenchI +{ public static class BubbleSort2 { @@ -82,9 +84,10 @@ public static class BubbleSort2 } return result; } - + public static int Main() { bool result = TestBase(); return (result ? 100 : -1); } } +} diff --git a/tests/src/JIT/Performance/CodeQuality/BenchI/CSieve/CSieve.cs b/tests/src/JIT/Performance/CodeQuality/BenchI/CSieve/CSieve.cs index 606f740fb6..aca263711d 100644 --- a/tests/src/JIT/Performance/CodeQuality/BenchI/CSieve/CSieve.cs +++ b/tests/src/JIT/Performance/CodeQuality/BenchI/CSieve/CSieve.cs @@ -12,6 +12,8 @@ using Xunit; [assembly: OptimizeForBenchmarks] [assembly: MeasureInstructionsRetired] +namespace Benchstone.BenchI +{ public static class CSieve { @@ -74,9 +76,10 @@ public static class CSieve } return result; } - + public static int Main() { bool result = TestBase(); return (result ? 100 : -1); } } +} diff --git a/tests/src/JIT/Performance/CodeQuality/BenchI/Fib/Fib.cs b/tests/src/JIT/Performance/CodeQuality/BenchI/Fib/Fib.cs index 01064bb168..ee028db20f 100644 --- a/tests/src/JIT/Performance/CodeQuality/BenchI/Fib/Fib.cs +++ b/tests/src/JIT/Performance/CodeQuality/BenchI/Fib/Fib.cs @@ -11,6 +11,8 @@ using Xunit; [assembly: OptimizeForBenchmarks] [assembly: MeasureInstructionsRetired] +namespace Benchstone.BenchI +{ public static class Fib { @@ -30,7 +32,7 @@ public static class Fib return 1; } } - + [MethodImpl(MethodImplOptions.NoInlining)] static bool Bench() { int fib = Fibonacci(Number); @@ -55,9 +57,10 @@ public static class Fib } return result; } - + public static int Main() { bool result = TestBase(); return (result ? 100 : -1); } } +} diff --git a/tests/src/JIT/Performance/CodeQuality/BenchI/HeapSort/HeapSort.cs b/tests/src/JIT/Performance/CodeQuality/BenchI/HeapSort/HeapSort.cs index 9fd7aa32e0..64b5c8f33b 100644 --- a/tests/src/JIT/Performance/CodeQuality/BenchI/HeapSort/HeapSort.cs +++ b/tests/src/JIT/Performance/CodeQuality/BenchI/HeapSort/HeapSort.cs @@ -11,6 +11,8 @@ using Xunit; [assembly: OptimizeForBenchmarks] [assembly: MeasureInstructionsRetired] +namespace Benchstone.BenchI +{ public static class HeapSort { @@ -32,7 +34,7 @@ public static class HeapSort j = i; k = j / 2; m = x[i]; - + // 0 < k <= (n / 2) // 1 <= j <= n while (k > 0) { @@ -113,9 +115,10 @@ public static class HeapSort } return result; } - + public static int Main() { bool result = TestBase(); return (result ? 100 : -1); } } +} diff --git a/tests/src/JIT/Performance/CodeQuality/BenchI/IniArray/IniArray.cs b/tests/src/JIT/Performance/CodeQuality/BenchI/IniArray/IniArray.cs index 78fa233dbf..268af7b779 100644 --- a/tests/src/JIT/Performance/CodeQuality/BenchI/IniArray/IniArray.cs +++ b/tests/src/JIT/Performance/CodeQuality/BenchI/IniArray/IniArray.cs @@ -11,6 +11,8 @@ using Xunit; [assembly: OptimizeForBenchmarks] [assembly: MeasureInstructionsRetired] +namespace Benchstone.BenchI +{ public static class IniArray { @@ -52,9 +54,10 @@ public static class IniArray bool result = Bench(); return result; } - + public static int Main() { bool result = TestBase(); return (result ? 100 : -1); } } +} diff --git a/tests/src/JIT/Performance/CodeQuality/BenchI/LogicArray/LogicArray.cs b/tests/src/JIT/Performance/CodeQuality/BenchI/LogicArray/LogicArray.cs index f5ff746b86..c5b4e3b0d8 100644 --- a/tests/src/JIT/Performance/CodeQuality/BenchI/LogicArray/LogicArray.cs +++ b/tests/src/JIT/Performance/CodeQuality/BenchI/LogicArray/LogicArray.cs @@ -11,6 +11,8 @@ using Xunit; [assembly: OptimizeForBenchmarks] [assembly: MeasureInstructionsRetired] +namespace Benchstone.BenchI +{ public static class LogicArray { @@ -89,9 +91,10 @@ public static class LogicArray bool result = Bench(); return result; } - + public static int Main() { bool result = TestBase(); return (result ? 100 : -1); } } +} diff --git a/tests/src/JIT/Performance/CodeQuality/BenchI/Midpoint/Midpoint.cs b/tests/src/JIT/Performance/CodeQuality/BenchI/Midpoint/Midpoint.cs index 6e4f193746..9146874358 100644 --- a/tests/src/JIT/Performance/CodeQuality/BenchI/Midpoint/Midpoint.cs +++ b/tests/src/JIT/Performance/CodeQuality/BenchI/Midpoint/Midpoint.cs @@ -11,6 +11,8 @@ using Xunit; [assembly: OptimizeForBenchmarks] [assembly: MeasureInstructionsRetired] +namespace Benchstone.BenchI +{ public static class Midpoint { @@ -96,9 +98,10 @@ public static class Midpoint bool result = Bench(); return result; } - + public static int Main() { bool result = TestBase(); return (result ? 100 : -1); } } +} diff --git a/tests/src/JIT/Performance/CodeQuality/BenchI/MulMatrix/MulMatrix.cs b/tests/src/JIT/Performance/CodeQuality/BenchI/MulMatrix/MulMatrix.cs index 3f9c224d3d..a45c012984 100644 --- a/tests/src/JIT/Performance/CodeQuality/BenchI/MulMatrix/MulMatrix.cs +++ b/tests/src/JIT/Performance/CodeQuality/BenchI/MulMatrix/MulMatrix.cs @@ -11,6 +11,8 @@ using Xunit; [assembly: OptimizeForBenchmarks] [assembly: MeasureInstructionsRetired] +namespace Benchstone.BenchI +{ public static class MulMatrix { @@ -19,7 +21,7 @@ public static class MulMatrix #else public const int Iterations = 100; #endif - + const int Size = 75; static volatile object VolatileObject; @@ -132,9 +134,10 @@ public static class MulMatrix bool result = Bench(); return result; } - + public static int Main() { bool result = TestBase(); return (result ? 100 : -1); } } +} diff --git a/tests/src/JIT/Performance/CodeQuality/BenchI/NDhrystone/NDhrystone.cs b/tests/src/JIT/Performance/CodeQuality/BenchI/NDhrystone/NDhrystone.cs index c2526748ce..33effcbf40 100644 --- a/tests/src/JIT/Performance/CodeQuality/BenchI/NDhrystone/NDhrystone.cs +++ b/tests/src/JIT/Performance/CodeQuality/BenchI/NDhrystone/NDhrystone.cs @@ -7,7 +7,7 @@ // Dhrystone: a synthetic systems programming benchmark // Reinhold P. Weicker // Communications of the ACM, Volume 27 Issue 10, Oct 1984, Pages 1013-1030 - + using Microsoft.Xunit.Performance; using System; using System.Runtime.CompilerServices; @@ -16,6 +16,8 @@ using Xunit; [assembly: OptimizeForBenchmarks] [assembly: MeasureInstructionsRetired] +namespace Benchstone.BenchI +{ public static class NDhrystone { @@ -63,9 +65,9 @@ public static class NDhrystone int intLoc2; int intLoc3 = 0; Enumeration enumLoc; - + int i; /* modification */ - + m_ptrGlb.PtrComp = m_ptrGlbNext; m_ptrGlb.Discr = Enumeration.Ident1; m_ptrGlb.EnumComp = Enumeration.Ident3; @@ -117,12 +119,12 @@ public static class NDhrystone ptrParIn = ptrParIn.PtrComp; } } - + static void Proc2(ref int intParIO) { int intLoc; Enumeration enumLoc = Enumeration.Ident2; intLoc = intParIO + 10; - + for (;;) { if (s_char1Glob == 'A') { --intLoc; @@ -142,17 +144,17 @@ public static class NDhrystone else { s_intGlob = 100; } - + Proc7(10, s_intGlob, ref m_ptrGlb.IntComp); } - + static void Proc4() { bool boolLoc; boolLoc = s_char1Glob == 'A'; boolLoc |= s_boolGlob; s_char2Glob = 'B'; } - + static void Proc5() { s_char1Glob = 'A'; s_boolGlob = false; @@ -163,12 +165,12 @@ public static class NDhrystone if (!Func3(enumParIn)) { enumParOut = Enumeration.Ident4; } - + switch (enumParIn) { - case Enumeration.Ident1: + case Enumeration.Ident1: enumParOut = Enumeration.Ident1; break; - case Enumeration.Ident2: + case Enumeration.Ident2: if (s_intGlob > 100) { enumParOut = Enumeration.Ident1; } @@ -176,12 +178,12 @@ public static class NDhrystone enumParOut = Enumeration.Ident4; } break; - case Enumeration.Ident3: + case Enumeration.Ident3: enumParOut = Enumeration.Ident2; break; - case Enumeration.Ident4: + case Enumeration.Ident4: break; - case Enumeration.Ident5: + case Enumeration.Ident5: enumParOut = Enumeration.Ident3; break; } @@ -192,7 +194,7 @@ public static class NDhrystone intLoc = intParI1 + 2; intParOut = intParI2 + intLoc; } - + static void Proc8(int[] array1Par, int[][] array2Par, int intParI1, int intParI2) { int intLoc; intLoc = intParI1 + 5; @@ -206,7 +208,7 @@ public static class NDhrystone array2Par[intLoc + 20][intLoc] = array1Par[intLoc]; s_intGlob = 5; } - + static Enumeration Func1(char charPar1, char charPar2) { char charLoc1; char charLoc2; @@ -219,7 +221,7 @@ public static class NDhrystone return (Enumeration.Ident2); } } - + static bool Func2(char[] strParI1, char[] strParI2) { int intLoc; char charLoc = '\0'; @@ -243,18 +245,18 @@ public static class NDhrystone return true; } } - + return false; } } - + static bool Func3(Enumeration enumParIn) { Enumeration enumLoc; enumLoc = enumParIn; if (enumLoc == Enumeration.Ident3) { return true; } - + return false; } @@ -278,9 +280,10 @@ public static class NDhrystone bool result = Bench(); return result; } - + public static int Main() { bool result = TestBase(); return (result ? 100 : -1); } } +} diff --git a/tests/src/JIT/Performance/CodeQuality/BenchI/Permutate/Permutate.cs b/tests/src/JIT/Performance/CodeQuality/BenchI/Permutate/Permutate.cs index d7457cdbc1..43fc28b370 100644 --- a/tests/src/JIT/Performance/CodeQuality/BenchI/Permutate/Permutate.cs +++ b/tests/src/JIT/Performance/CodeQuality/BenchI/Permutate/Permutate.cs @@ -11,6 +11,8 @@ using Xunit; [assembly: OptimizeForBenchmarks] [assembly: MeasureInstructionsRetired] +namespace Benchstone.BenchI +{ public class Permutate { #if DEBUG @@ -114,3 +116,4 @@ public class Permutate return (result ? 100 : -1); } } +} diff --git a/tests/src/JIT/Performance/CodeQuality/BenchI/Pi/Pi.cs b/tests/src/JIT/Performance/CodeQuality/BenchI/Pi/Pi.cs index 112ff6df9b..2fe0918784 100644 --- a/tests/src/JIT/Performance/CodeQuality/BenchI/Pi/Pi.cs +++ b/tests/src/JIT/Performance/CodeQuality/BenchI/Pi/Pi.cs @@ -11,6 +11,8 @@ using Xunit; [assembly: OptimizeForBenchmarks] [assembly: MeasureInstructionsRetired] +namespace Benchstone.BenchI +{ public static class Pi { @@ -78,9 +80,10 @@ public static class Pi } return result; } - + public static int Main() { bool result = TestBase(); return (result ? 100 : -1); } } +} diff --git a/tests/src/JIT/Performance/CodeQuality/BenchI/Puzzle/Puzzle.cs b/tests/src/JIT/Performance/CodeQuality/BenchI/Puzzle/Puzzle.cs index 2b1c2847f4..2271e02455 100644 --- a/tests/src/JIT/Performance/CodeQuality/BenchI/Puzzle/Puzzle.cs +++ b/tests/src/JIT/Performance/CodeQuality/BenchI/Puzzle/Puzzle.cs @@ -11,6 +11,8 @@ using Xunit; [assembly: OptimizeForBenchmarks] [assembly: MeasureInstructionsRetired] +namespace Benchstone.BenchI +{ public class Puzzle { #if DEBUG @@ -391,3 +393,4 @@ public class Puzzle return (result ? 100 : -1); } } +} diff --git a/tests/src/JIT/Performance/CodeQuality/BenchI/QuickSort/QuickSort.cs b/tests/src/JIT/Performance/CodeQuality/BenchI/QuickSort/QuickSort.cs index 191211aaa8..7cdac96a69 100644 --- a/tests/src/JIT/Performance/CodeQuality/BenchI/QuickSort/QuickSort.cs +++ b/tests/src/JIT/Performance/CodeQuality/BenchI/QuickSort/QuickSort.cs @@ -11,6 +11,8 @@ using Xunit; [assembly: OptimizeForBenchmarks] [assembly: MeasureInstructionsRetired] +namespace Benchstone.BenchI +{ public static class QuickSort { @@ -52,7 +54,7 @@ public static class QuickSort arr[j] = temp; } } - + // need to swap the pivot and a[i](or a[j] as i==j) so // that the pivot will be at its final place in the sorted array @@ -108,9 +110,10 @@ public static class QuickSort } return result; } - + public static int Main() { bool result = TestBase(); return (result ? 100 : -1); } } +} diff --git a/tests/src/JIT/Performance/CodeQuality/BenchI/TreeInsert/TreeInsert.cs b/tests/src/JIT/Performance/CodeQuality/BenchI/TreeInsert/TreeInsert.cs index 8a24240538..2867abc4d4 100644 --- a/tests/src/JIT/Performance/CodeQuality/BenchI/TreeInsert/TreeInsert.cs +++ b/tests/src/JIT/Performance/CodeQuality/BenchI/TreeInsert/TreeInsert.cs @@ -11,6 +11,8 @@ using Xunit; [assembly: OptimizeForBenchmarks] [assembly: MeasureInstructionsRetired] +namespace Benchstone.BenchI +{ public class TreeInsert { #if DEBUG @@ -136,3 +138,4 @@ public class TreeInsert return (result ? 100 : -1); } } +} diff --git a/tests/src/JIT/Performance/CodeQuality/BenchI/TreeSort/TreeSort.cs b/tests/src/JIT/Performance/CodeQuality/BenchI/TreeSort/TreeSort.cs index 68b5c965f7..e0971346cf 100644 --- a/tests/src/JIT/Performance/CodeQuality/BenchI/TreeSort/TreeSort.cs +++ b/tests/src/JIT/Performance/CodeQuality/BenchI/TreeSort/TreeSort.cs @@ -11,6 +11,8 @@ using Xunit; [assembly: OptimizeForBenchmarks] [assembly: MeasureInstructionsRetired] +namespace Benchstone.BenchI +{ public static class TreeSort { @@ -74,7 +76,7 @@ public static class TreeSort else { Insert(n, t.Left); } - } + } else if (n < t.Val) { if (t.Right == null) { t.Right = new Node(n); @@ -117,7 +119,7 @@ public static class TreeSort bool result = CheckTree(tree); return result; } - + [MethodImpl(MethodImplOptions.NoInlining)] static bool Bench() { int[] sortList = new int[SortElements + 1]; @@ -143,9 +145,10 @@ public static class TreeSort } return result; } - + public static int Main() { bool result = TestBase(); return (result ? 100 : -1); } } +} diff --git a/tests/src/JIT/Performance/CodeQuality/BenchI/XposMatrix/XposMatrix.cs b/tests/src/JIT/Performance/CodeQuality/BenchI/XposMatrix/XposMatrix.cs index 0bb17b8cc5..de8b486049 100644 --- a/tests/src/JIT/Performance/CodeQuality/BenchI/XposMatrix/XposMatrix.cs +++ b/tests/src/JIT/Performance/CodeQuality/BenchI/XposMatrix/XposMatrix.cs @@ -11,6 +11,8 @@ using Xunit; [assembly: OptimizeForBenchmarks] [assembly: MeasureInstructionsRetired] +namespace Benchstone.BenchI +{ public static class XposMatrix { public const int ArraySize = 100; @@ -48,11 +50,11 @@ public static class XposMatrix matrix[i][j] = 1; } } - + if (matrix[n][n] != 1) { return false; } - + Inner(matrix, n); if (matrix[n][n] != 1) { @@ -88,3 +90,4 @@ public static class XposMatrix return (result ? 100 : -1); } } +} diff --git a/tests/src/JIT/Performance/CodeQuality/BenchmarksGame/binarytrees/binarytrees.csharp.cs b/tests/src/JIT/Performance/CodeQuality/BenchmarksGame/binarytrees/binarytrees.csharp.cs index e4118b2963..c77e802989 100644 --- a/tests/src/JIT/Performance/CodeQuality/BenchmarksGame/binarytrees/binarytrees.csharp.cs +++ b/tests/src/JIT/Performance/CodeQuality/BenchmarksGame/binarytrees/binarytrees.csharp.cs @@ -2,9 +2,9 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. /* The Computer Language Benchmarks Game - http://benchmarksgame.alioth.debian.org/ + http://benchmarksgame.alioth.debian.org/ - contributed by Marek Safar + contributed by Marek Safar modified for use with xunit-performance */ @@ -17,6 +17,8 @@ using Xunit; [assembly: OptimizeForBenchmarks] [assembly: MeasureInstructionsRetired] +namespace BenchmarksGame +{ public class BinaryTrees { private const int minDepth = 4; @@ -149,3 +151,4 @@ public class BinaryTrees return (result ? 100 : -1); } } +} diff --git a/tests/src/JIT/Performance/CodeQuality/BenchmarksGame/fasta/fasta.csharp-2.cs b/tests/src/JIT/Performance/CodeQuality/BenchmarksGame/fasta/fasta.csharp-2.cs index c58ce0bd97..92fbceb692 100644 --- a/tests/src/JIT/Performance/CodeQuality/BenchmarksGame/fasta/fasta.csharp-2.cs +++ b/tests/src/JIT/Performance/CodeQuality/BenchmarksGame/fasta/fasta.csharp-2.cs @@ -18,6 +18,8 @@ using System.Text; [assembly: OptimizeForBenchmarks] [assembly: MeasureInstructionsRetired] +namespace BenchmarksGame +{ public class Fasta { #if DEBUG @@ -218,3 +220,4 @@ public class Fasta s.Write(s_buf, 0, s_index); } } +} diff --git a/tests/src/JIT/Performance/CodeQuality/BenchmarksGame/fastaredux/fastaredux.csharp.cs b/tests/src/JIT/Performance/CodeQuality/BenchmarksGame/fastaredux/fastaredux.csharp.cs index 7128e326fc..df8999a2de 100644 --- a/tests/src/JIT/Performance/CodeQuality/BenchmarksGame/fastaredux/fastaredux.csharp.cs +++ b/tests/src/JIT/Performance/CodeQuality/BenchmarksGame/fastaredux/fastaredux.csharp.cs @@ -18,6 +18,8 @@ using System.Text; [assembly: OptimizeForBenchmarks] [assembly: MeasureInstructionsRetired] +namespace BenchmarksGame +{ public static class FastaRedux { #if DEBUG @@ -181,4 +183,5 @@ public static class FastaRedux if (br < BUF_LEN) s.Write(s_buf, 0, BUF_LEN - br); } } +} diff --git a/tests/src/JIT/Performance/CodeQuality/BenchmarksGame/nbody/nbody.csharp-3.cs b/tests/src/JIT/Performance/CodeQuality/BenchmarksGame/nbody/nbody.csharp-3.cs index 70c87095ad..2124cf4d9e 100644 --- a/tests/src/JIT/Performance/CodeQuality/BenchmarksGame/nbody/nbody.csharp-3.cs +++ b/tests/src/JIT/Performance/CodeQuality/BenchmarksGame/nbody/nbody.csharp-3.cs @@ -15,6 +15,8 @@ using System; [assembly: OptimizeForBenchmarks] [assembly: MeasureInstructionsRetired] +namespace BenchmarksGame +{ public class NBody { public static int Main(String[] args) @@ -153,4 +155,5 @@ internal class NBodySystem return e; } } +} diff --git a/tests/src/JIT/Performance/CodeQuality/BenchmarksGame/pidigits/pi-digits.cs b/tests/src/JIT/Performance/CodeQuality/BenchmarksGame/pidigits/pi-digits.cs index 3395e29a55..7e36f0e424 100644 --- a/tests/src/JIT/Performance/CodeQuality/BenchmarksGame/pidigits/pi-digits.cs +++ b/tests/src/JIT/Performance/CodeQuality/BenchmarksGame/pidigits/pi-digits.cs @@ -6,7 +6,7 @@ * * Port of the C code that uses GMP * Just switched it to use C#'s BigInteger instead - * + * * To compile use csc /o+ /r:System.Numerics.dll * * modified for use with xunit-performance @@ -20,6 +20,8 @@ using System.Text; [assembly: OptimizeForBenchmarks] [assembly: MeasureInstructionsRetired] +namespace BenchmarksGame +{ public class pidigits { #if DEBUG @@ -111,4 +113,5 @@ public class pidigits } } } +} diff --git a/tests/src/JIT/Performance/CodeQuality/BenchmarksGame/spectralnorm/spectralnorm.cs b/tests/src/JIT/Performance/CodeQuality/BenchmarksGame/spectralnorm/spectralnorm.cs index 9e984864a7..01eeea07bf 100644 --- a/tests/src/JIT/Performance/CodeQuality/BenchmarksGame/spectralnorm/spectralnorm.cs +++ b/tests/src/JIT/Performance/CodeQuality/BenchmarksGame/spectralnorm/spectralnorm.cs @@ -3,8 +3,8 @@ // See the LICENSE file in the project root for more information. /* The Computer Language Benchmarks Game http://benchmarksgame.alioth.debian.org/ - - contributed by Isaac Gouy + + contributed by Isaac Gouy modified for use with xunit-performance */ @@ -15,6 +15,8 @@ using System; [assembly: OptimizeForBenchmarks] [assembly: MeasureInstructionsRetired] +namespace BenchmarksGame +{ public class SpectralNorm { #if DEBUG @@ -78,7 +80,7 @@ public class SpectralNorm } // B=AtA A multiplied by A transposed - // v.Bv /(v.v) eigenvalue of v + // v.Bv /(v.v) eigenvalue of v double vBv = 0, vv = 0; for (int i = 0; i < n; i++) { @@ -124,3 +126,4 @@ public class SpectralNorm MultiplyAtv(n, u, AtAv); } } +} diff --git a/tests/src/JIT/Performance/CodeQuality/Inlining/ConstantArgsByte.cs b/tests/src/JIT/Performance/CodeQuality/Inlining/ConstantArgsByte.cs index 8271c40a43..3b28f87fe5 100644 --- a/tests/src/JIT/Performance/CodeQuality/Inlining/ConstantArgsByte.cs +++ b/tests/src/JIT/Performance/CodeQuality/Inlining/ConstantArgsByte.cs @@ -13,6 +13,8 @@ using Xunit; [assembly: OptimizeForBenchmarks] [assembly: MeasureInstructionsRetired] +namespace Inlining +{ public static class ConstantArgsByte { @@ -928,3 +930,4 @@ public static class ConstantArgsByte return (result ? 100 : -1); } } +} diff --git a/tests/src/JIT/Performance/CodeQuality/Inlining/ConstantArgsChar.cs b/tests/src/JIT/Performance/CodeQuality/Inlining/ConstantArgsChar.cs index 0d1f9284ba..0cc4b9c558 100644 --- a/tests/src/JIT/Performance/CodeQuality/Inlining/ConstantArgsChar.cs +++ b/tests/src/JIT/Performance/CodeQuality/Inlining/ConstantArgsChar.cs @@ -13,6 +13,8 @@ using Xunit; [assembly: OptimizeForBenchmarks] [assembly: MeasureInstructionsRetired] +namespace Inlining +{ public static class ConstantArgsChar { @@ -928,3 +930,4 @@ public static class ConstantArgsChar return (result ? 100 : -1); } } +} diff --git a/tests/src/JIT/Performance/CodeQuality/Inlining/ConstantArgsDouble.cs b/tests/src/JIT/Performance/CodeQuality/Inlining/ConstantArgsDouble.cs index 6c95d482d5..4bd5683f0c 100644 --- a/tests/src/JIT/Performance/CodeQuality/Inlining/ConstantArgsDouble.cs +++ b/tests/src/JIT/Performance/CodeQuality/Inlining/ConstantArgsDouble.cs @@ -13,6 +13,8 @@ using Xunit; [assembly: OptimizeForBenchmarks] [assembly: MeasureInstructionsRetired] +namespace Inlining +{ public static class ConstantArgsDouble { @@ -808,3 +810,4 @@ public static class ConstantArgsDouble return (result ? 100 : -1); } } +} diff --git a/tests/src/JIT/Performance/CodeQuality/Inlining/ConstantArgsFloat.cs b/tests/src/JIT/Performance/CodeQuality/Inlining/ConstantArgsFloat.cs index bbd65a4004..f609a4bb44 100644 --- a/tests/src/JIT/Performance/CodeQuality/Inlining/ConstantArgsFloat.cs +++ b/tests/src/JIT/Performance/CodeQuality/Inlining/ConstantArgsFloat.cs @@ -13,6 +13,8 @@ using Xunit; [assembly: OptimizeForBenchmarks] [assembly: MeasureInstructionsRetired] +namespace Inlining +{ public static class ConstantArgsFloat { @@ -808,3 +810,4 @@ public static class ConstantArgsFloat return (result ? 100 : -1); } } +} diff --git a/tests/src/JIT/Performance/CodeQuality/Inlining/ConstantArgsInt.cs b/tests/src/JIT/Performance/CodeQuality/Inlining/ConstantArgsInt.cs index 03d59f93d0..f54e800d17 100644 --- a/tests/src/JIT/Performance/CodeQuality/Inlining/ConstantArgsInt.cs +++ b/tests/src/JIT/Performance/CodeQuality/Inlining/ConstantArgsInt.cs @@ -13,6 +13,8 @@ using Xunit; [assembly: OptimizeForBenchmarks] [assembly: MeasureInstructionsRetired] +namespace Inlining +{ public static class ConstantArgsInt { @@ -928,3 +930,4 @@ public static class ConstantArgsInt return (result ? 100 : -1); } } +} diff --git a/tests/src/JIT/Performance/CodeQuality/Inlining/ConstantArgsLong.cs b/tests/src/JIT/Performance/CodeQuality/Inlining/ConstantArgsLong.cs index f4e45f50db..e5679f1638 100644 --- a/tests/src/JIT/Performance/CodeQuality/Inlining/ConstantArgsLong.cs +++ b/tests/src/JIT/Performance/CodeQuality/Inlining/ConstantArgsLong.cs @@ -13,6 +13,8 @@ using Xunit; [assembly: OptimizeForBenchmarks] [assembly: MeasureInstructionsRetired] +namespace Inlining +{ public static class ConstantArgsLong { @@ -928,3 +930,4 @@ public static class ConstantArgsLong return (result ? 100 : -1); } } +} diff --git a/tests/src/JIT/Performance/CodeQuality/Inlining/ConstantArgsSByte.cs b/tests/src/JIT/Performance/CodeQuality/Inlining/ConstantArgsSByte.cs index b329122967..0ec29b8341 100644 --- a/tests/src/JIT/Performance/CodeQuality/Inlining/ConstantArgsSByte.cs +++ b/tests/src/JIT/Performance/CodeQuality/Inlining/ConstantArgsSByte.cs @@ -13,6 +13,8 @@ using Xunit; [assembly: OptimizeForBenchmarks] [assembly: MeasureInstructionsRetired] +namespace Inlining +{ public static class ConstantArgsSByte { @@ -928,3 +930,4 @@ public static class ConstantArgsSByte return (result ? 100 : -1); } } +} diff --git a/tests/src/JIT/Performance/CodeQuality/Inlining/ConstantArgsShort.cs b/tests/src/JIT/Performance/CodeQuality/Inlining/ConstantArgsShort.cs index 8718111a72..f8cf23e8da 100644 --- a/tests/src/JIT/Performance/CodeQuality/Inlining/ConstantArgsShort.cs +++ b/tests/src/JIT/Performance/CodeQuality/Inlining/ConstantArgsShort.cs @@ -13,6 +13,8 @@ using Xunit; [assembly: OptimizeForBenchmarks] [assembly: MeasureInstructionsRetired] +namespace Inlining +{ public static class ConstantArgsShort { @@ -928,3 +930,4 @@ public static class ConstantArgsShort return (result ? 100 : -1); } } +} diff --git a/tests/src/JIT/Performance/CodeQuality/Inlining/ConstantArgsString.cs b/tests/src/JIT/Performance/CodeQuality/Inlining/ConstantArgsString.cs index b7319086d7..38a3f7e6b9 100644 --- a/tests/src/JIT/Performance/CodeQuality/Inlining/ConstantArgsString.cs +++ b/tests/src/JIT/Performance/CodeQuality/Inlining/ConstantArgsString.cs @@ -16,6 +16,8 @@ using Xunit; [assembly: OptimizeForBenchmarks] [assembly: MeasureInstructionsRetired] +namespace Inlining +{ public static class ConstantArgsString { @@ -328,3 +330,4 @@ public static class ConstantArgsString return (result ? 100 : -1); } } +} diff --git a/tests/src/JIT/Performance/CodeQuality/Inlining/ConstantArgsUInt.cs b/tests/src/JIT/Performance/CodeQuality/Inlining/ConstantArgsUInt.cs index db3316ea32..e3f6e2aae8 100644 --- a/tests/src/JIT/Performance/CodeQuality/Inlining/ConstantArgsUInt.cs +++ b/tests/src/JIT/Performance/CodeQuality/Inlining/ConstantArgsUInt.cs @@ -13,6 +13,8 @@ using Xunit; [assembly: OptimizeForBenchmarks] [assembly: MeasureInstructionsRetired] +namespace Inlining +{ public static class ConstantArgsUInt { @@ -888,3 +890,4 @@ public static class ConstantArgsUInt return (result ? 100 : -1); } } +} diff --git a/tests/src/JIT/Performance/CodeQuality/Inlining/ConstantArgsULong.cs b/tests/src/JIT/Performance/CodeQuality/Inlining/ConstantArgsULong.cs index 72087077e2..7585a3e1fc 100644 --- a/tests/src/JIT/Performance/CodeQuality/Inlining/ConstantArgsULong.cs +++ b/tests/src/JIT/Performance/CodeQuality/Inlining/ConstantArgsULong.cs @@ -13,6 +13,8 @@ using Xunit; [assembly: OptimizeForBenchmarks] [assembly: MeasureInstructionsRetired] +namespace Inlining +{ public static class ConstantArgsULong { @@ -888,3 +890,4 @@ public static class ConstantArgsULong return (result ? 100 : -1); } } +} diff --git a/tests/src/JIT/Performance/CodeQuality/Inlining/ConstantArgsUShort.cs b/tests/src/JIT/Performance/CodeQuality/Inlining/ConstantArgsUShort.cs index 249e985496..c96274e424 100644 --- a/tests/src/JIT/Performance/CodeQuality/Inlining/ConstantArgsUShort.cs +++ b/tests/src/JIT/Performance/CodeQuality/Inlining/ConstantArgsUShort.cs @@ -13,6 +13,8 @@ using Xunit; [assembly: OptimizeForBenchmarks] [assembly: MeasureInstructionsRetired] +namespace Inlining +{ public static class ConstantArgsUShort { @@ -928,3 +930,4 @@ public static class ConstantArgsUShort return (result ? 100 : -1); } } +} diff --git a/tests/src/JIT/Performance/CodeQuality/Inlining/InlineGCStruct.cs b/tests/src/JIT/Performance/CodeQuality/Inlining/InlineGCStruct.cs index 64f10c6403..660627cc72 100644 --- a/tests/src/JIT/Performance/CodeQuality/Inlining/InlineGCStruct.cs +++ b/tests/src/JIT/Performance/CodeQuality/Inlining/InlineGCStruct.cs @@ -22,6 +22,8 @@ using Xunit; [assembly: OptimizeForBenchmarks] [assembly: MeasureInstructionsRetired] +namespace Inlining +{ public class InlineGCStruct { #if DEBUG @@ -142,4 +144,5 @@ public class InlineGCStruct return (withFormat && withoutFormat ? 100 : -1); } } +} diff --git a/tests/src/JIT/Performance/CodeQuality/Inlining/NoThrowInline.cs b/tests/src/JIT/Performance/CodeQuality/Inlining/NoThrowInline.cs index 9b689ce376..dc05f44b33 100644 --- a/tests/src/JIT/Performance/CodeQuality/Inlining/NoThrowInline.cs +++ b/tests/src/JIT/Performance/CodeQuality/Inlining/NoThrowInline.cs @@ -13,6 +13,8 @@ using Xunit; [assembly: OptimizeForBenchmarks] [assembly: MeasureInstructionsRetired] +namespace Inlining +{ public static class NoThrowInline { #if DEBUG @@ -34,7 +36,7 @@ public static class NoThrowInline // // We expect ThrowArgumentNullException to not be inlined into Bench, the throw code is pretty - // large and throws are extremly slow. However, we need to be careful not to degrade the + // large and throws are extremly slow. However, we need to be careful not to degrade the // non-exception path performance by preserving registers across the call. For this the compiler // will have to understand that ThrowArgumentNullException never returns and omit the register // preservation code. @@ -73,3 +75,4 @@ public static class NoThrowInline return (Bench("a", "bc", "def", "ghij") == 10) ? 100 : -1; } } +} diff --git a/tests/src/JIT/Performance/CodeQuality/SIMD/ConsoleMandel/ConsoleMandel.cs b/tests/src/JIT/Performance/CodeQuality/SIMD/ConsoleMandel/ConsoleMandel.cs index ed7f675700..5ab08202b6 100644 --- a/tests/src/JIT/Performance/CodeQuality/SIMD/ConsoleMandel/ConsoleMandel.cs +++ b/tests/src/JIT/Performance/CodeQuality/SIMD/ConsoleMandel/ConsoleMandel.cs @@ -11,9 +11,9 @@ using Xunit; [assembly: OptimizeForBenchmarks] [assembly: MeasureInstructionsRetired] -namespace ConsoleMandel +namespace SIMD { - public static class Program + public static class ConsoleMandel { private const int Pass = 100; private const int Fail = -1; diff --git a/tests/src/JIT/Performance/CodeQuality/SIMD/RayTracer/RayTracerBench.cs b/tests/src/JIT/Performance/CodeQuality/SIMD/RayTracer/RayTracerBench.cs index 064f860611..254672b462 100644 --- a/tests/src/JIT/Performance/CodeQuality/SIMD/RayTracer/RayTracerBench.cs +++ b/tests/src/JIT/Performance/CodeQuality/SIMD/RayTracer/RayTracerBench.cs @@ -2,8 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. // -// Based on the Raytracer example from -// Samples for Parallel Programming with the .NET Framework +// Based on the Raytracer example from +// Samples for Parallel Programming with the .NET Framework // https://code.msdn.microsoft.com/windowsdesktop/Samples-for-Parallel-b4b76364 using Microsoft.Xunit.Performance; @@ -16,6 +16,8 @@ using System.Collections.Concurrent; [assembly: OptimizeForBenchmarks] [assembly: MeasureInstructionsRetired] +namespace SIMD +{ public class RayTracerBench { #if DEBUG @@ -142,3 +144,4 @@ public class RayTracerBench return (result ? 100 : -1); } } +} diff --git a/tests/src/JIT/Performance/CodeQuality/Serialization/Deserialize.cs b/tests/src/JIT/Performance/CodeQuality/Serialization/Deserialize.cs index b0ed00d40b..56fc2665ad 100644 --- a/tests/src/JIT/Performance/CodeQuality/Serialization/Deserialize.cs +++ b/tests/src/JIT/Performance/CodeQuality/Serialization/Deserialize.cs @@ -15,6 +15,8 @@ using Microsoft.Xunit.Performance; [assembly: OptimizeForBenchmarks] [assembly: MeasureInstructionsRetired] +namespace Serialization +{ public class JsonBenchmarks { @@ -26,7 +28,7 @@ public class JsonBenchmarks public const int JsonNetIterations = 90000; #endif - const string DataContractXml = @"<JsonBenchmarks.TestObject xmlns=""http://schemas.datacontract.org/2004/07/"" xmlns:i=""http://www.w3.org/2001/XMLSchema-instance""><Id>33</Id><Name>SqMtx</Name><Results xmlns:a=""http://schemas.microsoft.com/2003/10/Serialization/Arrays""><a:double>101.3</a:double><a:double>99.8</a:double><a:double>99.6</a:double><a:double>100.4</a:double></Results><WhenRun>2015-01-01T00:00:00-08:00</WhenRun></JsonBenchmarks.TestObject>"; + const string DataContractXml = @"<JsonBenchmarks.TestObject xmlns=""http://schemas.datacontract.org/2004/07/Serialization"" xmlns:i=""http://www.w3.org/2001/XMLSchema-instance""><Id>33</Id><Name>SqMtx</Name><Results xmlns:a=""http://schemas.microsoft.com/2003/10/Serialization/Arrays""><a:double>101.3</a:double><a:double>99.8</a:double><a:double>99.6</a:double><a:double>100.4</a:double></Results><WhenRun>2015-01-01T00:00:00-08:00</WhenRun></JsonBenchmarks.TestObject>"; const string DataContractJson = @"{""Id"":33,""Name"":""SqMtx"",""Results"":[101.3,99.8,99.6,100.4],""WhenRun"":""\/Date(1420099200000-0800)\/""}"; @@ -83,7 +85,7 @@ public class JsonBenchmarks } [Benchmark] - private void DeserializeDataContract() + private void DeserializeDataContract() { foreach (var iteration in Benchmark.Iterations) { using (iteration.StartMeasurement()) { @@ -199,3 +201,4 @@ public class JsonBenchmarks return result ? 100 : -1; } } +} diff --git a/tests/src/JIT/Performance/CodeQuality/Serialization/Serialize.cs b/tests/src/JIT/Performance/CodeQuality/Serialization/Serialize.cs index 905cf56584..39ab5876c9 100644 --- a/tests/src/JIT/Performance/CodeQuality/Serialization/Serialize.cs +++ b/tests/src/JIT/Performance/CodeQuality/Serialization/Serialize.cs @@ -14,6 +14,8 @@ using Microsoft.Xunit.Performance; [assembly: OptimizeForBenchmarks] [assembly: MeasureInstructionsRetired] +namespace Serialization +{ public class JsonBenchmarks { @@ -72,7 +74,7 @@ public class JsonBenchmarks } [Benchmark] - private void SerializeDataContract() + private void SerializeDataContract() { foreach (var iteration in Benchmark.Iterations) { using (iteration.StartMeasurement()) { @@ -186,3 +188,4 @@ public class JsonBenchmarks return result ? 100 : -1; } } +} diff --git a/tests/src/JIT/Performance/CodeQuality/V8/Crypto/Crypto.cs b/tests/src/JIT/Performance/CodeQuality/V8/Crypto/Crypto.cs index 23eab8db5b..620e012848 100644 --- a/tests/src/JIT/Performance/CodeQuality/V8/Crypto/Crypto.cs +++ b/tests/src/JIT/Performance/CodeQuality/V8/Crypto/Crypto.cs @@ -46,7 +46,7 @@ using System.Globalization; [assembly: OptimizeForBenchmarks] [assembly: MeasureInstructionsRetired] -namespace Crypto +namespace V8.Crypto { public class Support { diff --git a/tests/src/JIT/Performance/CodeQuality/V8/DeltaBlue/DeltaBlue.cs b/tests/src/JIT/Performance/CodeQuality/V8/DeltaBlue/DeltaBlue.cs index ee14b8b1b1..27f77182b2 100644 --- a/tests/src/JIT/Performance/CodeQuality/V8/DeltaBlue/DeltaBlue.cs +++ b/tests/src/JIT/Performance/CodeQuality/V8/DeltaBlue/DeltaBlue.cs @@ -24,13 +24,15 @@ using System.Collections; [assembly: OptimizeForBenchmarks] [assembly: MeasureInstructionsRetired] -/* +/* Strengths are used to measure the relative importance of constraints. New strengths may be inserted in the strength hierarchy without disrupting current constraints. Strengths cannot be created outside this class, so pointer comparison can be used for value comparison. */ +namespace V8 +{ internal class Strength { private int _strengthValue; @@ -1066,3 +1068,4 @@ public class deltablue throw new Exception(s); } } +} diff --git a/tests/src/JIT/Performance/CodeQuality/V8/Richards/Richards.cs b/tests/src/JIT/Performance/CodeQuality/V8/Richards/Richards.cs index 6d26593e2f..5095d22ad7 100644 --- a/tests/src/JIT/Performance/CodeQuality/V8/Richards/Richards.cs +++ b/tests/src/JIT/Performance/CodeQuality/V8/Richards/Richards.cs @@ -20,7 +20,7 @@ using System.Collections.Generic; // using System.Diagnostics; // using System.Text.RegularExpressions; -namespace Richards +namespace V8.Richards { /// <summary> /// Support is used for a place to generate any 'miscellaneous' methods generated as part @@ -501,7 +501,7 @@ namespace Richards public #if !INTF_FOR_TASK - override + override #endif TaskControlBlock run(Packet packet) { @@ -521,7 +521,7 @@ namespace Richards public #if !INTF_FOR_TASK - override + override #endif String toString() { @@ -548,7 +548,7 @@ namespace Richards public #if !INTF_FOR_TASK - override + override #endif TaskControlBlock run(Packet packet) { @@ -568,7 +568,7 @@ namespace Richards public #if !INTF_FOR_TASK - override + override #endif String toString() { @@ -598,7 +598,7 @@ namespace Richards public #if !INTF_FOR_TASK - override + override #endif TaskControlBlock run(Packet packet) { @@ -630,7 +630,7 @@ namespace Richards public #if !INTF_FOR_TASK - override + override #endif String toString() { @@ -658,7 +658,7 @@ namespace Richards public #if !INTF_FOR_TASK - override + override #endif TaskControlBlock run(Packet packet) { @@ -700,7 +700,7 @@ namespace Richards public #if !INTF_FOR_TASK - override + override #endif String toString() { |