1 /*
2 * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation.
8 *
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 *
23 */
24
25 /**
26 * @test
27 * @bug 8026775
28 * @summary Uncommon trap blob did not bang all the stack shadow pages
29 *
30 * @run main/othervm -server -XX:+IgnoreUnrecognizedVMOptions -XX:+TieredCompilation UncommonTrapStackBang
31 * @run main/othervm -server -XX:+IgnoreUnrecognizedVMOptions -XX:-TieredCompilation UncommonTrapStackBang
32 *
33 *
34 * Note: This test does not reproduce the problem with absolute
35 * certainty. Empirically the bug reproduces on Windows some 80+% of
36 * the time. Setting everything up to fail in 100% of the cases turns
37 * out to be tricky at best.
38 *
39 *
40 * The goal of this test is to set up the following stack:
41 *
42 * doIt()
43 * eatStack()
44 * ...
45 * eatStack()
46 * run()
47 *
48 *
49 * When doIt() gets executed it will hit an uncommon trap and expand
50 * into a huge interpreter frame. The doIt method then calls the
51 * compiled version of StringBuilder.<init>() which does a single
52 * stack bang StackShadowPages down.
|
1 /*
2 * Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation.
8 *
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 *
23 */
24
25 /**
26 * @test
27 * @bug 8026775
28 * @summary Uncommon trap blob did not bang all the stack shadow pages
29 *
30 * @run main/othervm UncommonTrapStackBang
31 *
32 * Note: This test does not reproduce the problem with absolute
33 * certainty. Empirically the bug reproduces on Windows some 80+% of
34 * the time. Setting everything up to fail in 100% of the cases turns
35 * out to be tricky at best.
36 *
37 *
38 * The goal of this test is to set up the following stack:
39 *
40 * doIt()
41 * eatStack()
42 * ...
43 * eatStack()
44 * run()
45 *
46 *
47 * When doIt() gets executed it will hit an uncommon trap and expand
48 * into a huge interpreter frame. The doIt method then calls the
49 * compiled version of StringBuilder.<init>() which does a single
50 * stack bang StackShadowPages down.
|