On Mon, 26 May 2025 06:28:25 GMT, Johannes Bechberger <jbechber...@openjdk.org> wrote:
>> src/hotspot/share/jfr/periodic/sampling/jfrCPUTimeThreadSampler.cpp line 590: >> >>> 588: // so samples might be skipped and we have to compute the actual >>> period >>> 589: int64_t period = get_sampling_period() * (info->si_overrun + 1); >>> 590: request._cpu_time_period = Ticks(period / 1000000000.0 * >>> JfrTime::frequency()) - Ticks(0); >> >> Are you treating JfrTime::frequency() as nanos here? JfrTime::frequency() >> can be in ticks, hence not a valid conversion. > > Could you give me a hand with the conversion? My code is the inversion of template <typename TimeSource, const int unit> inline double conversion(typename TimeSource::Type& value) { return (double)value * ((double)unit / (double)TimeSource::frequency()); } ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/25302#discussion_r2106855512