--- old/test/hotspot/gtest/memory/test_metaspace_allocation.cpp 2020-03-26 16:01:18.000000000 -0700 +++ new/test/hotspot/gtest/memory/test_metaspace_allocation.cpp 2020-03-26 16:01:17.000000000 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2018, 2020, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2018, SAP. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * @@ -102,9 +102,9 @@ _spaces[i].lock = new Mutex(Monitor::native, "gtest-MetaspaceAllocationTest-lock", false, Monitor::_safepoint_check_never); ASSERT_TRUE(_spaces[i].lock != NULL); } - // Let every ~10th space be an unsafe anonymous one to test different allocation patterns. + // Let every ~10th space be a short-lived one to test different allocation patterns. const Metaspace::MetaspaceType msType = (os::random() % 100 < 10) ? - Metaspace::UnsafeAnonymousMetaspaceType : Metaspace::StandardMetaspaceType; + Metaspace::ClassMirrorHolderMetaspaceType : Metaspace::StandardMetaspaceType; { // Pull lock during space creation, since this is what happens in the VM too // (see ClassLoaderData::metaspace_non_null(), which we mimick here).