[K/N][tests] Do not run backed.native tests with aggressive GC
This commit is contained in:
@@ -110,13 +110,6 @@ tasks.withType(RunExternalTestGroup.class).configureEach {
|
|||||||
ext.isExperimentalMM = project.globalTestArgs.contains("-memory-model") && project.globalTestArgs.contains("experimental")
|
ext.isExperimentalMM = project.globalTestArgs.contains("-memory-model") && project.globalTestArgs.contains("experimental")
|
||||||
ext.isNoopGC = project.globalTestArgs.contains("-Xgc=noop")
|
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.
|
// TODO: It also makes sense to test -g without asserts, and also to test -opt with asserts.
|
||||||
if (project.globalTestArgs.contains("-g")) {
|
if (project.globalTestArgs.contains("-g")) {
|
||||||
tasks.withType(KonanCompileNativeBinary.class).configureEach {
|
tasks.withType(KonanCompileNativeBinary.class).configureEach {
|
||||||
|
|||||||
@@ -89,11 +89,6 @@ fun testClear() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Test fun runTest() {
|
@Test fun runTest() {
|
||||||
// TODO: Do not manually control this.
|
|
||||||
if (Platform.memoryModel == MemoryModel.EXPERIMENTAL) {
|
|
||||||
GC.threshold = 1000000
|
|
||||||
GC.thresholdAllocations = 1000000
|
|
||||||
}
|
|
||||||
testRehashAndCompact()
|
testRehashAndCompact()
|
||||||
testClear()
|
testClear()
|
||||||
println("OK")
|
println("OK")
|
||||||
|
|||||||
@@ -58,9 +58,8 @@ fun test() {
|
|||||||
val progressReportsCount = 100
|
val progressReportsCount = 100
|
||||||
|
|
||||||
if (Platform.memoryModel == MemoryModel.EXPERIMENTAL) {
|
if (Platform.memoryModel == MemoryModel.EXPERIMENTAL) {
|
||||||
kotlin.native.internal.GC.thresholdAllocations = retainLimit
|
kotlin.native.internal.GC.autotune = false
|
||||||
// Effectively disable trigger on safepoints.
|
kotlin.native.internal.GC.targetHeapBytes = retainLimit
|
||||||
kotlin.native.internal.GC.threshold = Int.MAX_VALUE
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// On Linux, the child process might immediately commit the same amount of memory as the parent.
|
// On Linux, the child process might immediately commit the same amount of memory as the parent.
|
||||||
|
|||||||
Reference in New Issue
Block a user