Towards Runtime-Aware Observability for Java Virtual Threads
Abstract
OS-level observability tools join application requests to kernel events through the OS thread ID, assuming that a unit of work occupies one OS thread until it completes. Java virtual threads break this assumption: many virtual threads are multiplexed onto a few carrier threads, so a stable thread ID hides a changing unit of work, and the join fails silently. Existing virtual-thread-aware channels republish context or identity on every mount and unmount, and the JVMTI-based one pays this cost for the lifetime of the JVM, whether or not an observer is attached. We bind a 64-byte off-heap trace buffer to each virtual thread, at a fixed address for its lifetime, and publish the address to eBPF consumers through four USDT probes in a patched OpenJDK; a re-implemented JVMTI channel over the same buffer serves as a controlled comparison. The four-probe design attributed all 768 test markers correctly on both the content and the identity plane, while the naive two-probe design silently misattributes trace context. With no consumer attached, publication costs at most about 33 ns per transition; the remaining dormant cost is buffer allocation, about 0.37 microseconds per virtual thread, which is negligible on transition-heavy workloads but nearly doubles the cost of a creation-only microbenchmark. The JVMTI channel costs about 20% on transition-heavy workloads and about 1.8 microseconds per virtual thread on the creation-only one. We also show that, of the two update strategies OTEP 4947 permits, only in-place rewriting guarded by the record's valid flag is sound for readers that cache the record's address, as lifecycle-event readers do.
Create a lesson
Related papers
Held While Waiting: What LLM Agent Sessions Reserve on Serverless and Agent Runtimes
Shared title terminology · Mekhala Hithyshini Sreenivasa
High-Throughput Serving of Nemotron 3.5 Transcribe with Regime-Aware Megakernels and Kernel Fusion
Shared title terminology · Aditya Chatterjee, Sanjay Singh Chauhan, Mayank Jain et al.
Towards Automated Recommendation of Steady-State Detection Algorithms for Software Performance Benchmarks
Shared title terminology · Martin Beseda, Vittorio Cortellessa, Federico Di Menna et al.
Instruction-Aware Transfer of GPU Implementation Crossovers: a Tensor-Product Discontinuous Galerkin Operator on GB200, H100, and A100
Shared title terminology · Seiya Nishizawa, Yuta Kawai, Xuanzhengbo Ren
Memory-Access Profiling for Early Multicore Interference Awareness in Embedded Systems
Shared title terminology · Jean-Baptiste Lefoul, Ahmad Shahnejat Bushehri, Alaric Chan Lock et al.
EdgePace: Deadline- and Freshness-Aware LLM Scheduling on Unified-Memory Platforms
Shared title terminology · Teng Mei, Chengxuan Pei, Weijun Wang et al.