diff --git a/idea/idea-gradle/src/org/jetbrains/kotlin/idea/statistics/KotlinGradleFUSLogger.kt b/idea/idea-gradle/src/org/jetbrains/kotlin/idea/statistics/KotlinGradleFUSLogger.kt index 53d2ab6426509..0266bc9a74f99 100644 --- a/idea/idea-gradle/src/org/jetbrains/kotlin/idea/statistics/KotlinGradleFUSLogger.kt +++ b/idea/idea-gradle/src/org/jetbrains/kotlin/idea/statistics/KotlinGradleFUSLogger.kt @@ -129,7 +129,8 @@ class KotlinGradleFUSLogger : StartupActivity, DumbAware, Runnable { BooleanMetrics.ENABLED_COMPILER_PLUGIN_JPA_SUPPORT, BooleanMetrics.ENABLED_COMPILER_PLUGIN_SAM_WITH_RECEIVER, BooleanMetrics.JVM_COMPILER_IR_MODE, - StringMetrics.JVM_DEFAULTS + StringMetrics.JVM_DEFAULTS, + StringMetrics.USE_OLD_BACKEND ) container.log( diff --git a/libraries/tools/kotlin-gradle-plugin/src/main/kotlin/org/jetbrains/kotlin/compilerRunner/GradleKotlinCompilerRunner.kt b/libraries/tools/kotlin-gradle-plugin/src/main/kotlin/org/jetbrains/kotlin/compilerRunner/GradleKotlinCompilerRunner.kt index fb4fc14b5a21d..536efe012c026 100644 --- a/libraries/tools/kotlin-gradle-plugin/src/main/kotlin/org/jetbrains/kotlin/compilerRunner/GradleKotlinCompilerRunner.kt +++ b/libraries/tools/kotlin-gradle-plugin/src/main/kotlin/org/jetbrains/kotlin/compilerRunner/GradleKotlinCompilerRunner.kt @@ -134,10 +134,13 @@ internal open class GradleCompilerRunner(protected val taskProvider: GradleCompi // compiler would report metrics by itself via JMX KotlinBuildStatsService.applyIfInitialised { if (compilerArgs is K2JVMCompilerArguments) { - val args = K2JVMCompilerArguments() - parseCommandLineArguments(argsArray.toList(), args) - KotlinBuildStatsService.getInstance()?.report(BooleanMetrics.JVM_COMPILER_IR_MODE, args.useIR) - KotlinBuildStatsService.getInstance()?.report(StringMetrics.JVM_DEFAULTS, args.jvmDefault) + KotlinBuildStatsService.getInstance()?.apply { + val args = K2JVMCompilerArguments() + parseCommandLineArguments(argsArray.toList(), args) + report(BooleanMetrics.JVM_COMPILER_IR_MODE, args.useIR) + report(StringMetrics.JVM_DEFAULTS, args.jvmDefault) + report(StringMetrics.USE_OLD_BACKEND, args.useOldBackend.toString()) + } } } diff --git a/libraries/tools/kotlin-gradle-statistics/src/org/jetbrains/kotlin/statistics/metrics/StringMetrics.kt b/libraries/tools/kotlin-gradle-statistics/src/org/jetbrains/kotlin/statistics/metrics/StringMetrics.kt index 9457360e63eb1..3672d934503c1 100644 --- a/libraries/tools/kotlin-gradle-statistics/src/org/jetbrains/kotlin/statistics/metrics/StringMetrics.kt +++ b/libraries/tools/kotlin-gradle-statistics/src/org/jetbrains/kotlin/statistics/metrics/StringMetrics.kt @@ -46,4 +46,6 @@ enum class StringMetrics(val type: StringOverridePolicy, val anonymization: Stri // Compiler parameters JVM_DEFAULTS(CONCAT, SAFE), + USE_OLD_BACKEND(CONCAT, SAFE) + }