[K/N][tests] Do not run backed.native tests with aggressive GC

This commit is contained in:
Ilya Matveev
2022-01-28 19:31:00 +07:00
committed by Space
parent 6379fe4c4c
commit 8668797afd
3 changed files with 2 additions and 15 deletions
@@ -110,13 +110,6 @@ tasks.withType(RunExternalTestGroup.class).configureEach {
ext.isExperimentalMM = project.globalTestArgs.contains("-memory-model") && project.globalTestArgs.contains("experimental")
ext.isNoopGC = project.globalTestArgs.contains("-Xgc=noop")
if (ext.isExperimentalMM) {
// TODO: Make it more aggressive and only turn it on for a subset of tests.
tasks.withType(KonanCompileNativeBinary.class).configureEach {
extraOpts "-Xbinary=gcSchedulerType=aggressive"
}
}
// TODO: It also makes sense to test -g without asserts, and also to test -opt with asserts.
if (project.globalTestArgs.contains("-g")) {
tasks.withType(KonanCompileNativeBinary.class).configureEach {
@@ -89,11 +89,6 @@ fun testClear() {
}
@Test fun runTest() {
// TODO: Do not manually control this.
if (Platform.memoryModel == MemoryModel.EXPERIMENTAL) {
GC.threshold = 1000000
GC.thresholdAllocations = 1000000
}
testRehashAndCompact()
testClear()
println("OK")
@@ -58,9 +58,8 @@ fun test() {
val progressReportsCount = 100
if (Platform.memoryModel == MemoryModel.EXPERIMENTAL) {
kotlin.native.internal.GC.thresholdAllocations = retainLimit
// Effectively disable trigger on safepoints.
kotlin.native.internal.GC.threshold = Int.MAX_VALUE
kotlin.native.internal.GC.autotune = false
kotlin.native.internal.GC.targetHeapBytes = retainLimit
}
// On Linux, the child process might immediately commit the same amount of memory as the parent.