Path: blob/master/test/hotspot/jtreg/vmTestbase/metaspace/gc/readme.txt
41155 views
Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved.1DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.23This code is free software; you can redistribute it and/or modify it4under the terms of the GNU General Public License version 2 only, as5published by the Free Software Foundation.67This code is distributed in the hope that it will be useful, but WITHOUT8ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or9FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License10version 2 for more details (a copy is included in the LICENSE file that11accompanied this code).1213You should have received a copy of the GNU General Public License version142 along with this work; if not, write to the Free Software Foundation,15Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.1617Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA18or visit www.oracle.com if you need additional information or have any19questions.20212223metaspace/gc tests - are the test for the Metaspace GC tuning, which is described in the24Java SE 8 HotSpot[tm] Virtual Machine Garbage Collection Tuning2526Tests load classes and monitor the used/committed amounts of metaspace.27There are three types of tests all extending base class - MetaspaceBaseGC2829MemoryUsageTest -30trivial test to check memory dynamic (loading classes should lead to growth31of used memory, gc to reduce)3233FirstGCTest -34loads classes until the GC has happened and check the GC has happened at the35right moment (as stated in the Spec)3637HighWaterMarkTest38The test loads classes until the committed metaspace achieves the certain39level between MetaspaceSize and MaxMetaspaceSize.40Then it counts how many times GC has been induced.41Test verifies that MinMetaspaceFreeRatio/MaxMetaspaceFreeRatio settings42affect the frequency of GC. (High-water mark)4344Note: GC could be caused not by Metaspace. When GC happens, the tests check45gc.log file to find the reason of GC. Tests will pass if there is no guarantee46that GC was induced by metaspace.474849