Skip to content

Bazel Kotlin

Daemonitor identifies Kotlin persistent workers used by rules_kotlin and distinguishes them from Gradle's Kotlin compiler daemons and standalone Kotlin Toolchain / Amper CLIs.

Recognized Bazel Kotlin processes

Process Process type Classification Matching signatures
rules_kotlin persistent worker BAZEL_WORKER BAZEL / JVM / KOTLIN --persistent_worker + rules_kotlin, io.bazel.kotlin, or KotlinBuilder (matched before KOTLIN_DAEMON)
Kotlin daemon under Bazel KOTLIN_DAEMON BAZEL / JVM / KOTLIN KotlinCompileDaemon owned by a live BAZEL_SERVER (BazelOwnerPID) or containing _bazel_, rules_kotlin, bazel-out/, or bazel-bin/

Distinguishing Bazel Kotlin from Gradle Kotlin

Daemonitor never assumes a KOTLIN_DAEMON belongs to Gradle:

Workload build_system process_type toolchain
Bazel rules_kotlin worker BAZEL BAZEL_WORKER KOTLIN
Gradle Kotlin compiler daemon GRADLE KOTLIN_DAEMON KOTLIN
Standalone Amper CLI AMPER KOTLIN_TOOLCHAIN KOTLIN
Unattributed Kotlin daemon UNKNOWN KOTLIN_DAEMON KOTLIN

Telemetry and presentation

  • JVM telemetry: Eligible rules_kotlin workers (runtime == JVM with a java/javaw executable) receive full live heap, metaspace, GC, JIT, code cache, class loading, and safepoint probing.
  • Ownership: Linked to the parent BAZEL_SERVER via validated (OwnerPID, OwnerStartTimeMs) ancestry.
  • UI labels: Displayed as Kotlin worker inside the Bazel section in Desktop and TUI, and as Bazel Kotlin worker in plain CLI ps output.

CLI examples

# Inspect Bazel processes (including Bazel Kotlin workers)
daemonitor-cli ps --ecosystem bazel --details

# Inspect Gradle processes (including Gradle Kotlin daemons)
daemonitor-cli ps --ecosystem gradle --details