2014-03-18 18:07:22 +00:00
|
|
|
/*
|
2021-05-14 18:38:58 +00:00
|
|
|
* Copyright (c) 2014, 2021, Oracle and/or its affiliates. All rights reserved.
|
2014-03-18 18:07:22 +00:00
|
|
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
|
|
*
|
|
|
|
* This code is free software; you can redistribute it and/or modify it
|
|
|
|
* under the terms of the GNU General Public License version 2 only, as
|
|
|
|
* published by the Free Software Foundation.
|
|
|
|
*
|
|
|
|
* This code is distributed in the hope that it will be useful, but WITHOUT
|
|
|
|
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
|
|
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
|
|
* version 2 for more details (a copy is included in the LICENSE file that
|
|
|
|
* accompanied this code).
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License version
|
|
|
|
* 2 along with this work; if not, write to the Free Software Foundation,
|
|
|
|
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
|
|
*
|
|
|
|
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
|
|
* or visit www.oracle.com if you need additional information or have any
|
|
|
|
* questions.
|
|
|
|
*/
|
|
|
|
|
2021-05-14 18:38:58 +00:00
|
|
|
package gc.stringdedup;
|
2019-01-28 14:53:56 +00:00
|
|
|
|
2021-08-23 06:12:01 +00:00
|
|
|
/*
|
2021-09-21 07:42:36 +00:00
|
|
|
* @test id=Serial
|
2021-08-23 06:12:01 +00:00
|
|
|
* @summary Test string deduplication of interned strings
|
|
|
|
* @bug 8029075
|
|
|
|
* @requires vm.gc.Serial
|
|
|
|
* @library /test/lib
|
|
|
|
* @library /
|
|
|
|
* @modules java.base/jdk.internal.misc:open
|
|
|
|
* @modules java.base/java.lang:open
|
|
|
|
* java.management
|
|
|
|
* @run driver gc.stringdedup.TestStringDeduplicationInterned Serial
|
|
|
|
*/
|
|
|
|
|
2014-03-18 18:07:22 +00:00
|
|
|
/*
|
2021-09-21 07:42:36 +00:00
|
|
|
* @test id=G1
|
2014-03-18 18:07:22 +00:00
|
|
|
* @summary Test string deduplication of interned strings
|
|
|
|
* @bug 8029075
|
2021-07-19 13:43:46 +00:00
|
|
|
* @requires vm.gc.G1
|
2016-08-19 14:06:30 +00:00
|
|
|
* @library /test/lib
|
2019-01-28 14:53:56 +00:00
|
|
|
* @library /
|
2016-12-01 08:56:41 +00:00
|
|
|
* @modules java.base/jdk.internal.misc:open
|
|
|
|
* @modules java.base/java.lang:open
|
2015-03-26 15:36:56 +00:00
|
|
|
* java.management
|
2021-07-19 13:43:46 +00:00
|
|
|
* @run driver gc.stringdedup.TestStringDeduplicationInterned G1
|
2014-03-18 18:07:22 +00:00
|
|
|
*/
|
|
|
|
|
2021-08-20 11:30:00 +00:00
|
|
|
/*
|
2021-09-21 07:42:36 +00:00
|
|
|
* @test id=Parallel
|
2021-08-20 11:30:00 +00:00
|
|
|
* @summary Test string deduplication of interned strings
|
|
|
|
* @bug 8029075
|
|
|
|
* @requires vm.gc.Parallel
|
|
|
|
* @library /test/lib
|
|
|
|
* @library /
|
|
|
|
* @modules java.base/jdk.internal.misc:open
|
|
|
|
* @modules java.base/java.lang:open
|
|
|
|
* java.management
|
|
|
|
* @run driver gc.stringdedup.TestStringDeduplicationInterned Parallel
|
|
|
|
*/
|
|
|
|
|
2021-08-25 20:16:25 +00:00
|
|
|
/*
|
2021-09-21 07:42:36 +00:00
|
|
|
* @test id=Shenandoah
|
2021-08-25 20:16:25 +00:00
|
|
|
* @summary Test string deduplication of interned strings
|
|
|
|
* @bug 8029075
|
|
|
|
* @requires vm.gc.Shenandoah
|
|
|
|
* @library /test/lib
|
|
|
|
* @library /
|
|
|
|
* @modules java.base/jdk.internal.misc:open
|
|
|
|
* @modules java.base/java.lang:open
|
|
|
|
* java.management
|
|
|
|
* @run driver gc.stringdedup.TestStringDeduplicationInterned Shenandoah
|
|
|
|
*/
|
|
|
|
|
2021-08-11 11:07:12 +00:00
|
|
|
/*
|
2024-10-30 11:05:07 +00:00
|
|
|
* @test id=Z
|
2021-08-11 11:07:12 +00:00
|
|
|
* @summary Test string deduplication of interned strings
|
|
|
|
* @bug 8029075
|
2024-10-30 11:05:07 +00:00
|
|
|
* @requires vm.gc.Z
|
2021-08-11 11:07:12 +00:00
|
|
|
* @library /test/lib
|
|
|
|
* @library /
|
|
|
|
* @modules java.base/jdk.internal.misc:open
|
|
|
|
* @modules java.base/java.lang:open
|
|
|
|
* java.management
|
2024-10-30 11:05:07 +00:00
|
|
|
* @run driver gc.stringdedup.TestStringDeduplicationInterned Z
|
2021-08-11 11:07:12 +00:00
|
|
|
*/
|
|
|
|
|
2014-03-18 18:07:22 +00:00
|
|
|
public class TestStringDeduplicationInterned {
|
|
|
|
public static void main(String[] args) throws Exception {
|
2021-07-19 13:43:46 +00:00
|
|
|
TestStringDeduplicationTools.selectGC(args);
|
2014-03-18 18:07:22 +00:00
|
|
|
TestStringDeduplicationTools.testInterned();
|
|
|
|
}
|
|
|
|
}
|