[K/N][GC] Fix enabling the gc-aggressive mode

This commit is contained in:
Ilya Matveev
2021-09-24 17:07:47 +07:00
committed by Space
parent 363680e4c9
commit 37e9d8c8f5
2 changed files with 5 additions and 2 deletions
@@ -13,6 +13,7 @@
#include <utility>
#include "CompilerConstants.hpp"
#include "Logging.hpp"
#include "Types.h"
#include "Utils.hpp"
@@ -41,6 +42,8 @@ struct GCSchedulerConfig {
GCSchedulerConfig() noexcept {
if (compiler::gcAggressive()) {
// TODO: Make a separate GCSchedulerData for the aggressive mode and move this log there.
RuntimeLogInfo({kTagGC}, "Initialize GC scheduler config in the aggressive mode");
// TODO: Make it even more aggressive and run on a subset of backend.native tests.
threshold = 1000;
allocationThresholdBytes = 10000;
@@ -12,7 +12,7 @@ using namespace kotlin;
// These are defined by overrideRuntimeGlobals in IrToBitcode.kt
RUNTIME_WEAK int32_t Kotlin_destroyRuntimeMode = 1;
RUNTIME_WEAK int32_t Kotiln_gcAggressive = 0;
RUNTIME_WEAK int32_t Kotlin_gcAggressive = 0;
RUNTIME_WEAK int32_t Kotlin_workerExceptionHandling = 0;
RUNTIME_WEAK int32_t Kotlin_freezingEnabled = 1;
RUNTIME_WEAK const Kotlin_getSourceInfo_FunctionType Kotlin_getSourceInfo_Function = nullptr;
@@ -22,7 +22,7 @@ ALWAYS_INLINE compiler::DestroyRuntimeMode compiler::destroyRuntimeMode() noexce
}
ALWAYS_INLINE bool compiler::gcAggressive() noexcept {
return Kotiln_gcAggressive != 0;
return Kotlin_gcAggressive != 0;
}
ALWAYS_INLINE compiler::WorkerExceptionHandling compiler::workerExceptionHandling() noexcept {