[K/N] Add signposts to safepoints ^KT-62689
Disabled by default. Merge-request: KT-MR-12679 Merged-by: Alexander Shabalin <Alexander.Shabalin@jetbrains.com>
This commit is contained in:
committed by
Space Team
parent
b309786353
commit
4c36538646
+2
@@ -66,6 +66,8 @@ object BinaryOptions : BinaryOptionRegistry() {
|
||||
val disableMmap by booleanOption()
|
||||
|
||||
val disableAllocatorOverheadEstimate by booleanOption()
|
||||
|
||||
val enableSafepointSignposts by booleanOption()
|
||||
}
|
||||
|
||||
open class BinaryOption<T : Any>(
|
||||
|
||||
+6
@@ -242,6 +242,12 @@ class KonanConfig(val project: Project, val configuration: CompilerConfiguration
|
||||
configuration.get(BinaryOptions.objcDisposeOnMain) ?: true
|
||||
}
|
||||
|
||||
val enableSafepointSignposts: Boolean = configuration.get(BinaryOptions.enableSafepointSignposts)?.also {
|
||||
if (it && !target.supportsSignposts) {
|
||||
configuration.report(CompilerMessageSeverity.STRONG_WARNING, "Signposts are not available on $target. The setting will have no effect.")
|
||||
}
|
||||
} ?: false
|
||||
|
||||
init {
|
||||
if (!platformManager.isEnabled(target)) {
|
||||
error("Target ${target.visibleName} is not available on the ${HostManager.hostName} host")
|
||||
|
||||
+1
@@ -2833,6 +2833,7 @@ internal class CodeGeneratorVisitor(
|
||||
overrideRuntimeGlobal("Kotlin_mimallocUseDefaultOptions", llvm.constInt32(if (context.config.mimallocUseDefaultOptions) 1 else 0))
|
||||
overrideRuntimeGlobal("Kotlin_mimallocUseCompaction", llvm.constInt32(if (context.config.mimallocUseCompaction) 1 else 0))
|
||||
overrideRuntimeGlobal("Kotlin_objcDisposeOnMain", llvm.constInt32(if (context.config.objcDisposeOnMain) 1 else 0))
|
||||
overrideRuntimeGlobal("Kotlin_enableSafepointSignposts", llvm.constInt32(if (context.config.enableSafepointSignposts) 1 else 0))
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------//
|
||||
|
||||
Reference in New Issue
Block a user