Skip to content

Commit 560f148

Browse files
Drop MaxPermSize support from compiler daemon
#KT-17045 Fixed
1 parent db23131 commit 560f148

File tree

3 files changed

+5
-7
lines changed

3 files changed

+5
-7
lines changed

compiler/daemon/daemon-common/src/org/jetbrains/kotlin/daemon/common/DaemonParams.kt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -186,14 +186,12 @@ fun Iterable<String>.filterExtractProps(vararg groups: OptionsGroup, prefix: Str
186186

187187
data class DaemonJVMOptions(
188188
var maxMemory: String = "",
189-
var maxPermSize: String = "",
190189
var maxMetaspaceSize: String = "",
191190
var reservedCodeCacheSize: String = "",
192191
var jvmParams: MutableCollection<String> = arrayListOf()
193192
) : OptionsGroup {
194193
override val mappers: List<PropMapper<*, *, *>>
195194
get() = listOf(StringPropMapper(this, DaemonJVMOptions::maxMemory, listOf("Xmx"), mergeDelimiter = ""),
196-
StringPropMapper(this, DaemonJVMOptions::maxPermSize, listOf("XX:MaxPermSize"), mergeDelimiter = "="),
197195
StringPropMapper(this, DaemonJVMOptions::maxMetaspaceSize, listOf("XX:MaxMetaspaceSize"), mergeDelimiter = "="),
198196
StringPropMapper(this, DaemonJVMOptions::reservedCodeCacheSize, listOf("XX:ReservedCodeCacheSize"), mergeDelimiter = "="),
199197
restMapper)
@@ -368,7 +366,7 @@ private fun String.memToBytes(): Long? =
368366

369367

370368
private val daemonJVMOptionsMemoryProps =
371-
listOf(DaemonJVMOptions::maxMemory, DaemonJVMOptions::maxPermSize, DaemonJVMOptions::maxMetaspaceSize, DaemonJVMOptions::reservedCodeCacheSize)
369+
listOf(DaemonJVMOptions::maxMemory, DaemonJVMOptions::maxMetaspaceSize, DaemonJVMOptions::reservedCodeCacheSize)
372370

373371
infix fun DaemonJVMOptions.memorywiseFitsInto(other: DaemonJVMOptions): Boolean =
374372
daemonJVMOptionsMemoryProps

compiler/tests/org/jetbrains/kotlin/daemon/CompilerDaemonTest.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,10 +160,10 @@ class CompilerDaemonTest : KotlinIntegrationTestBase() {
160160
fun testDaemonJvmOptionsParsing() {
161161
val backupJvmOptions = System.getProperty(COMPILE_DAEMON_JVM_OPTIONS_PROPERTY)
162162
try {
163-
System.setProperty(COMPILE_DAEMON_JVM_OPTIONS_PROPERTY, "-aaa,-bbb\\,ccc,-ddd,-Xmx200m,-XX:MaxPermSize=10k,-XX:ReservedCodeCacheSize=100,-xxx\\,yyy")
163+
System.setProperty(COMPILE_DAEMON_JVM_OPTIONS_PROPERTY, "-aaa,-bbb\\,ccc,-ddd,-Xmx200m,-XX:MaxMetaspaceSize=10k,-XX:ReservedCodeCacheSize=100,-xxx\\,yyy")
164164
val opts = configureDaemonJVMOptions(inheritMemoryLimits = false, inheritAdditionalProperties = false, inheritOtherJvmOptions = false)
165165
assertEquals("200m", opts.maxMemory)
166-
assertEquals("10k", opts.maxPermSize)
166+
assertEquals("10k", opts.maxMetaspaceSize)
167167
assertEquals("100", opts.reservedCodeCacheSize)
168168
assertEquals(arrayListOf("aaa", "bbb,ccc", "ddd", "xxx,yyy"), opts.jvmParams)
169169

compiler/tests/org/jetbrains/kotlin/daemon/experimental/integration/CompilerDaemonTest.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -230,12 +230,12 @@ class CompilerDaemonTest : KotlinIntegrationTestBase() {
230230
try {
231231
System.setProperty(
232232
COMPILE_DAEMON_JVM_OPTIONS_PROPERTY,
233-
"-aaa,-bbb\\,ccc,-ddd,-Xmx200m,-XX:MaxPermSize=10k,-XX:ReservedCodeCacheSize=100,-xxx\\,yyy"
233+
"-aaa,-bbb\\,ccc,-ddd,-Xmx200m,-XX:MaxMetaspaceSize=10k,-XX:ReservedCodeCacheSize=100,-xxx\\,yyy"
234234
)
235235
val opts =
236236
configureDaemonJVMOptions(inheritMemoryLimits = false, inheritAdditionalProperties = false, inheritOtherJvmOptions = false)
237237
assertEquals("200m", opts.maxMemory)
238-
assertEquals("10k", opts.maxPermSize)
238+
assertEquals("10k", opts.maxMetaspaceSize)
239239
assertEquals("100", opts.reservedCodeCacheSize)
240240
assertEquals(arrayListOf("aaa", "bbb,ccc", "ddd", "xxx,yyy"), opts.jvmParams)
241241

0 commit comments

Comments
 (0)