Xcode processes¶
Daemonitor discovers and monitors native Xcode build processes on macOS, collecting proc_pid_rusage memory and disk I/O measurements and grouping compiler/tool trees beneath XCODE_BUILD_SERVICE.
Xcode IDE GUI is intentionally excluded
Daemonitor deliberately excludes Xcode.app itself so the IDE is never grouped with or terminated alongside build workers.
Recognized process types¶
| Process type | Display label | Direct signatures (argv[0] / toolchain path) |
|---|---|---|
XCODE_BUILD |
Xcode build | xcodebuild |
XCODE_BUILD_SERVICE |
Xcode build service | SWBBuildService, XCBBuildService |
XCODE_COMPILER |
Xcode compiler | swift-frontend, swiftc (under .app/Contents/Developer/, .xctoolchain/usr/bin/, or /Library/Developer/CommandLineTools/); clang, clang++ (under Xcode toolchain, or CLT with DerivedData / SDKs / XcodeDefault.xctoolchain in argv) |
XCODE_TOOL |
Xcode build tool | ld, ld-prime (scoped like clang), plus actool, ibtool, ibtoold, dsymutil, momc, mapc, metal, metallib, appintentsmetadataprocessor, clang-stat-cache, swift-driver, tapi |
Ancestor-verified build children (daemonitor-cored)¶
When at least one XCODE_BUILD or XCODE_BUILD_SERVICE anchor is live, daemonitor-cored runs a second classification pass (up to parent depth 6) that attributes build-phase child processes:
codesign,lipo,strip,bitcode_strip,plutil,sh,bash,zsh→XCODE_TOOL- Unscoped
swift-frontend,swiftc,clang,clang++→XCODE_COMPILER
(The Kotlin fallback --jvm-collector does not perform this ancestor-walk pass.)
Project attribution¶
For XCODE_BUILD, Daemonitor extracts -workspace, -project, or -package-path from xcodebuild arguments (resolving relative paths against the process working directory) and falls back to cwd.
Native macOS measurements¶
Because Xcode processes are native (isNativeBuildType), JVM argument parsing and jcmd/jstat probing are bypassed. On darwin builds compiled with cgo, proc_pid_rusage(RUSAGE_INFO_V4) collects:
physical_footprint_bytes(ri_phys_footprint)peak_resident_bytes(ri_lifetime_max_phys_footprint)disk_read_bytesanddisk_write_bytes(ri_diskio_bytesread/written)
Alongside standard gopsutil metrics (rss_memory_mb, virtual_memory_mb, thread_count, CPU, page faults, context switches, open file descriptors).
Process grouping and sessions¶
- Grouping:
XCODE_BUILD_SERVICEacts as a hierarchy root in Grouped view, aggregating RSS, CPU, and (in TUI) physical footprint across its child compilers and tools. - Fast polling:
daemonitor-coredautomatically accelerates polling from2sto1swhenever anXCODE_BUILDprocess is running or an observation session is active. - Passive sessions:
daemonitor-coredautomatically opens and closes passive observation sessions aroundXCODE_BUILDlifecycles and persists them into thebuildstable (daemonIdentityprefixedxcode:). - Explicit sessions: Wrap any build with
daemonitor-cli observe -- xcodebuild ...for confirmed anchor attribution and a JSON summary on exit.
Limitations¶
- No
.xcresultor Xcode build log parsing: Unlike Gradle, Xcode builds do not produce a daemon log tail in the Process Inspector or Build History. - Short-lived processes: Compiler or script invocations lasting less than 1 second may complete between poll ticks.
- Concurrent overlapping builds: If two Xcode builds run simultaneously without distinct
-derivedDataPathflags, shared compiler/tool processes are markedambiguousin session attribution. cgodependency:darwin && !cgobuilds degradephysical_footprint_bytes,peak_resident_bytes, disk I/O, host memory pressure, and thermal state totool_unavailable.