Xo 0.18 release notes
Introduction
Xo 0.18 adds a profiler, debug line tables, and race checking, moves the runtime’s stress tests to Xo, and makes arm64 code faster.
Tools
- Profiling:
XO_PROF=cpu,heap, orxo runandxo testwith--profile=cpu,heap, writes pprof output and a text summary, on the arm64 and LLVM backends, on macOS and Linux (decision 0238). - Debug information: DWARF line tables from both native backends (a
dSYM on macOS), so lldb stops at
.xolines and shows inlined calls, and the profiler names.xolines.XO_TRACEBACKprints a fault’s frames, andxo testsets it (decision 0239). - Races:
xo build --backend=llvm --racebuilds every function, the runtime’s too, with ThreadSanitizer. The races it reported in the runtime are fixed.
Runtime
- The scheduler has a monitor thread and defers wakes for channel hand
offs and spawns, bounded by the waker’s next runtime call. Real-time
programs get none,
XO_DEFER_WAKE=0turns it off, and mutex wakes stay direct (decision 0077). - The runtime’s C stress tests are Xo programs (decision 0241).
Compiler
- arm64: SHA-256 on the SHA instructions; add with carry chains with
constant operands and the zero register;
bic,orn,eonandextr; one more register for the allocator. RSA, P-256, P-521 and X25519 are faster on arm64. - The WebAssembly backend passes its compiler build test again (it failed since 0.15).
Ports
- macOS arm64 links with Xo’s own linker by default again. The XProtect false positive and the stall at a program’s first launch from each path are fixed. TLS loads Security and CoreFoundation only at the first certificate check.