1 /*
   2  * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved.
   3  * Copyright (c) 2020 SAP SE. All rights reserved.
   4  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   5  *
   6  * This code is free software; you can redistribute it and/or modify it
   7  * under the terms of the GNU General Public License version 2 only, as
   8  * published by the Free Software Foundation.
   9  *
  10  * This code is distributed in the hope that it will be useful, but WITHOUT
  11  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  12  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  13  * version 2 for more details (a copy is included in the LICENSE file that
  14  * accompanied this code).
  15  *
  16  * You should have received a copy of the GNU General Public License version
  17  * 2 along with this work; if not, write to the Free Software Foundation,
  18  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  19  *
  20  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  21  * or visit www.oracle.com if you need additional information or have any
  22  * questions.
  23  *
  24  */
  25 
  26 /*
  27  * Note: This runs the metaspace-related parts of gtest in configurations which
  28  *  are not tested explicitely in the standard gtests.
  29  *
  30  */
  31 
  32 /* @test id=reclaim-none-debug
  33  * @summary Run metaspace-related gtests for reclaim policy none (with verifications)
  34  * @requires vm.debug
  35  * @library /test/lib
  36  * @modules java.base/jdk.internal.misc
  37  *          java.xml
  38  * @run main/native GTestWrapper --gtest_filter=metaspace* -XX:MetaspaceReclaimPolicy=none -XX:+UnlockDiagnosticVMOptions -XX:VerifyMetaspaceInterval=3
  39  */
  40 
  41 /* @test id=reclaim-none-ndebug
  42  * @summary Run metaspace-related gtests for reclaim policy none
  43  * @library /test/lib
  44  * @modules java.base/jdk.internal.misc
  45  *          java.xml
  46  * @run main/native GTestWrapper --gtest_filter=metaspace* -XX:MetaspaceReclaimPolicy=none
  47  */
  48 
  49 
  50 
  51 
  52 /* @test id=reclaim-aggressive-debug
  53  * @summary Run metaspace-related gtests for reclaim policy aggressive (with verifications)
  54  * @requires vm.debug
  55  * @library /test/lib
  56  * @modules java.base/jdk.internal.misc
  57  *          java.xml
  58  * @run main/native GTestWrapper --gtest_filter=metaspace* -XX:MetaspaceReclaimPolicy=aggressive -XX:+UnlockDiagnosticVMOptions -XX:VerifyMetaspaceInterval=3
  59  */
  60 
  61 /* @test id=reclaim-aggressive-ndebug
  62  * @summary Run metaspace-related gtests for reclaim policy aggressive
  63  * @library /test/lib
  64  * @modules java.base/jdk.internal.misc
  65  *          java.xml
  66  * @run main/native GTestWrapper --gtest_filter=metaspace* -XX:MetaspaceReclaimPolicy=aggressive
  67  */
  68 
  69 
  70 
  71 
  72 /* @test id=balanced-with-guards
  73  * @summary Run metaspace-related gtests with allocation guards enabled
  74  * @requires vm.debug
  75  * @library /test/lib
  76  * @modules java.base/jdk.internal.misc
  77  *          java.xml
  78  * @run main/native GTestWrapper --gtest_filter=metaspace* -XX:+UnlockDiagnosticVMOptions -XX:VerifyMetaspaceInterval=3 -XX:+MetaspaceGuardAllocations
  79  */
  80 
  81 
  82 
  83 
  84 /* @test id=balanced-no-ccs
  85  * @summary Run metaspace-related gtests with compressed class pointers off
  86  * @library /test/lib
  87  * @modules java.base/jdk.internal.misc
  88  *          java.xml
  89  * @run main/native GTestWrapper --gtest_filter=metaspace* -XX:MetaspaceReclaimPolicy=balanced -XX:-UseCompressedClassPointers
  90  */