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 * Common helpers for TestSummarizeRSetStats* tests
26 */
27
28 import com.sun.management.HotSpotDiagnosticMXBean;
29 import com.sun.management.VMOption;
30
31 import com.oracle.java.testlibrary.*;
32 import java.lang.management.ManagementFactory;
33 import java.util.ArrayList;
34 import java.util.Arrays;
35
36 class VerifySummaryOutput {
37 // 4M size, both are directly allocated into the old gen
38 static Object[] largeObject1 = new Object[1024 * 1024];
39 static Object[] largeObject2 = new Object[1024 * 1024];
40
41 static int[] temp;
42
43 public static void main(String[] args) {
44 // create some cross-references between these objects
45 for (int i = 0; i < largeObject1.length; i++) {
46 largeObject1[i] = largeObject2;
47 }
48
49 for (int i = 0; i < largeObject2.length; i++) {
50 largeObject2[i] = largeObject1;
51 }
|
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 * Common helpers for TestSummarizeRSetStats* tests
26 */
27
28 import com.sun.management.HotSpotDiagnosticMXBean;
29 import com.sun.management.VMOption;
30
31 import jdk.test.lib.*;
32 import java.lang.management.ManagementFactory;
33 import java.util.ArrayList;
34 import java.util.Arrays;
35
36 class VerifySummaryOutput {
37 // 4M size, both are directly allocated into the old gen
38 static Object[] largeObject1 = new Object[1024 * 1024];
39 static Object[] largeObject2 = new Object[1024 * 1024];
40
41 static int[] temp;
42
43 public static void main(String[] args) {
44 // create some cross-references between these objects
45 for (int i = 0; i < largeObject1.length; i++) {
46 largeObject1[i] = largeObject2;
47 }
48
49 for (int i = 0; i < largeObject2.length; i++) {
50 largeObject2[i] = largeObject1;
51 }
|