From 945eb6f05b76190bbc57a135b41d284c239d5703 Mon Sep 17 00:00:00 2001 From: tstuefe Date: Thu, 19 Sep 2024 13:57:23 +0200 Subject: [PATCH] review feedback --- src/hotspot/share/oops/compressedKlass.cpp | 2 +- src/hotspot/share/oops/compressedKlass.hpp | 1 + test/hotspot/gtest/metaspace/test_clms.cpp | 12 ++++-------- 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/src/hotspot/share/oops/compressedKlass.cpp b/src/hotspot/share/oops/compressedKlass.cpp index c1082a5be6363..f8b08bed2f398 100644 --- a/src/hotspot/share/oops/compressedKlass.cpp +++ b/src/hotspot/share/oops/compressedKlass.cpp @@ -239,7 +239,7 @@ void CompressedKlassPointers::initialize(address addr, size_t len) { } else { - // Traditional (non-compact) header mode) + // Traditional (non-compact) header mode const uintptr_t unscaled_max = nth_bit(narrow_klass_pointer_bits()); const uintptr_t zerobased_max = nth_bit(narrow_klass_pointer_bits() + max_shift()); diff --git a/src/hotspot/share/oops/compressedKlass.hpp b/src/hotspot/share/oops/compressedKlass.hpp index 0a429e7cb71a4..6fb2080dd8ac6 100644 --- a/src/hotspot/share/oops/compressedKlass.hpp +++ b/src/hotspot/share/oops/compressedKlass.hpp @@ -259,4 +259,5 @@ class CompressedKlassPointers : public AllStatic { } }; + #endif // SHARE_OOPS_COMPRESSEDKLASS_HPP diff --git a/test/hotspot/gtest/metaspace/test_clms.cpp b/test/hotspot/gtest/metaspace/test_clms.cpp index 2ea7932ceb10e..efe83c415e02f 100644 --- a/test/hotspot/gtest/metaspace/test_clms.cpp +++ b/test/hotspot/gtest/metaspace/test_clms.cpp @@ -1,6 +1,6 @@ /* - * Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2023 Red Hat, Inc. All rights reserved. + * Copyright (c) 2024 Red Hat, Inc. All rights reserved. + * Copyright (c) 2024, 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 @@ -184,12 +184,8 @@ class ClmsTester { EXPECT_FREEBLOCKS_UNCHANGED(nca); } return bl; - - } // end: is_class - - else - - { + // end: is_class + } else { // Nonclass arena allocation. // Allocation waste can happen: // - if we allocate from nonclass freeblocks, the block remainder