Measuring Time: From Java to Kernel and back - JVM Advent
Even the most basic problems become interesting when you dig deep enough. Today, I would like to do a deep dive into measuring time in Java. We will start with the very basics of the Java API and gradually move lower in our stack: through the OpenJDK source code, glibc, all the way down to the Linux kernel. We will look at the performance overhead in various environments and try to reason about the results. We are going to explore the measurement of the elapsed time: the amount of time that passes from the start-event to the end-event of some activity. This is useful for performance improvements, operational monitoring and timeout enforcement. The following pseudo-code is the common idiom we can see in pretty much any codebase: Sometimes it’s less explicit. We could use Aspect-Oriented Programming principles to avoid polluting our business code with what’s essentially an operational concern, but it’s still there in one form or another. Java offers two basic primitives for measuring tim
Measuring Time: From Java to Kernel and back - JVM Advent Skip to the content Home About Calendar Archive Sponsors Search Home About Calendar Archive Sponsors Search JVM Advent The JVM Programming Advent Calendar December 4, 2019 Measuring Time: From Java to Kernel and back Problem Statement Even the most basic problems become interesting when you dig deep enough. Today, I would like to do a deep dive into measuring time in Java. We will start with the very basics of the Java API and gradually move lower in our stack: through the OpenJDK source code, glibc, all the way down to the Linux kernel
Explore this link on the map →saved by
related reading
- Python time.time() vs time.perf_counter() – SuperFastPythonsuperfastpython.com
- abseil / Performance Hintsabseil.io
- NYSRGnotes.ekzhang.com
- “This Kernel Was Faster Yesterday” — In Pursuit of High-Fidelity GPU Kernel Benchmarkingstandardkernel.com
- [Java][Profiling] Async-profiler - manual by use cases | JVM/Java profiling and tuningkrzysztofslusarski.github.io
- Introduction to Real-time Systemsdesign.ros2.org
- All my favorite tracing tools: eBPF, QEMU, Perfetto, new ones I built and more - Tristan Humethume.ca
- PERF tutorial: Finding execution hot spots - Sand, software and soundSand, software and soundsandsoftwaresound.net
- The "Basics" | Putting the "You" in CPUcpu.land
- Infographics: Operation Costs in CPU Clock Cycles - 6IT6it.dev
- Measuring Mutexes, Spinlocks and how Bad the Linux Scheduler Really is | Probably Danceprobablydance.com
- abseil / Performance Hintsabseil.io