From 0bb6af3bc0fa608c4a988fee9c0f10947e899e2e Mon Sep 17 00:00:00 2001 From: Coleen Phillimore Date: Mon, 7 Aug 2023 12:06:41 +0000 Subject: [PATCH] 8313791: Fix just zPage.inline.hpp and xPage.inline.hpp Reviewed-by: stefank, tschatzl --- src/hotspot/share/gc/x/xPage.inline.hpp | 6 +++--- src/hotspot/share/gc/z/zPage.inline.hpp | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/hotspot/share/gc/x/xPage.inline.hpp b/src/hotspot/share/gc/x/xPage.inline.hpp index 8017b2dadf6..8407d6be6fc 100644 --- a/src/hotspot/share/gc/x/xPage.inline.hpp +++ b/src/hotspot/share/gc/x/xPage.inline.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -139,7 +139,7 @@ inline XPhysicalMemory& XPage::physical_memory() { inline uint8_t XPage::numa_id() { if (_numa_id == (uint8_t)-1) { - _numa_id = XNUMA::memory_id(XAddress::good(start())); + _numa_id = checked_cast(XNUMA::memory_id(XAddress::good(start()))); } return _numa_id; @@ -158,7 +158,7 @@ inline uint64_t XPage::last_used() const { } inline void XPage::set_last_used() { - _last_used = ceil(os::elapsedTime()); + _last_used = (uint64_t)ceil(os::elapsedTime()); } inline bool XPage::is_in(uintptr_t addr) const { diff --git a/src/hotspot/share/gc/z/zPage.inline.hpp b/src/hotspot/share/gc/z/zPage.inline.hpp index 6cacf699145..40ab533f84a 100644 --- a/src/hotspot/share/gc/z/zPage.inline.hpp +++ b/src/hotspot/share/gc/z/zPage.inline.hpp @@ -180,7 +180,7 @@ inline ZPhysicalMemory& ZPage::physical_memory() { inline uint8_t ZPage::numa_id() { if (_numa_id == (uint8_t)-1) { - _numa_id = ZNUMA::memory_id(untype(ZOffset::address(start()))); + _numa_id = checked_cast(ZNUMA::memory_id(untype(ZOffset::address(start())))); } return _numa_id; @@ -207,7 +207,7 @@ inline uint64_t ZPage::last_used() const { } inline void ZPage::set_last_used() { - _last_used = ceil(os::elapsedTime()); + _last_used = (uint64_t)ceil(os::elapsedTime()); } inline bool ZPage::is_in(zoffset offset) const {