< prev index next >

test/hotspot/jtreg/runtime/os/THPsInThreadStackPreventionTest.java

Print this page

 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  * @test id=ENABLED
 27  * @bug 8303215 8312182
 28  * @summary On THP=always systems, we prevent THPs from forming within thread stacks
 29  * @library /test/lib

 30  * @requires os.family == "linux"
 31  * @requires vm.debug
 32  * @requires os.arch=="amd64" | os.arch=="x86_64" | os.arch=="aarch64"
 33  * @modules java.base/jdk.internal.misc
 34  *          java.management
 35  * @run driver THPsInThreadStackPreventionTest PATCH-ENABLED
 36  */
 37 
 38 /*
 39  * @test id=DISABLED
 40  * @bug 8303215 8312182
 41  * @summary On THP=always systems, we prevent THPs from forming within thread stacks (negative test)
 42  * @library /test/lib

 43  * @requires os.family == "linux"
 44  * @requires vm.debug
 45  * @requires os.arch=="amd64" | os.arch=="x86_64" | os.arch=="aarch64"
 46  * @modules java.base/jdk.internal.misc
 47  *          java.management
 48  * @run main/manual THPsInThreadStackPreventionTest  PATCH-DISABLED
 49  */
 50 import jdk.test.lib.process.OutputAnalyzer;
 51 import jdk.test.lib.process.ProcessTools;
 52 import jtreg.SkippedException;
 53 
 54 import java.io.BufferedReader;
 55 import java.io.FileReader;
 56 import java.io.IOException;
 57 import java.util.ArrayList;
 58 import java.util.Arrays;
 59 import java.util.Objects;
 60 import java.util.concurrent.BrokenBarrierException;
 61 import java.util.concurrent.CyclicBarrier;
 62 

 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  * @test id=ENABLED
 27  * @bug 8303215 8312182
 28  * @summary On THP=always systems, we prevent THPs from forming within thread stacks
 29  * @library /test/lib
 30  * @requires vm.flagless
 31  * @requires os.family == "linux"
 32  * @requires vm.debug
 33  * @requires os.arch=="amd64" | os.arch=="x86_64" | os.arch=="aarch64"
 34  * @modules java.base/jdk.internal.misc
 35  *          java.management
 36  * @run driver THPsInThreadStackPreventionTest PATCH-ENABLED
 37  */
 38 
 39 /*
 40  * @test id=DISABLED
 41  * @bug 8303215 8312182
 42  * @summary On THP=always systems, we prevent THPs from forming within thread stacks (negative test)
 43  * @library /test/lib
 44  * @requires vm.flagless
 45  * @requires os.family == "linux"
 46  * @requires vm.debug
 47  * @requires os.arch=="amd64" | os.arch=="x86_64" | os.arch=="aarch64"
 48  * @modules java.base/jdk.internal.misc
 49  *          java.management
 50  * @run main/manual THPsInThreadStackPreventionTest  PATCH-DISABLED
 51  */
 52 import jdk.test.lib.process.OutputAnalyzer;
 53 import jdk.test.lib.process.ProcessTools;
 54 import jtreg.SkippedException;
 55 
 56 import java.io.BufferedReader;
 57 import java.io.FileReader;
 58 import java.io.IOException;
 59 import java.util.ArrayList;
 60 import java.util.Arrays;
 61 import java.util.Objects;
 62 import java.util.concurrent.BrokenBarrierException;
 63 import java.util.concurrent.CyclicBarrier;
 64 
< prev index next >