author | mchernov |
Fri, 03 Feb 2017 15:45:57 +0300 | |
changeset 43933 | 85ee551f3948 |
parent 42585 | 570f4b5312af |
child 44633 | d2f5e8921045 |
permissions | -rw-r--r-- |
35493
863fb33f9940
8130063: Refactoring tmtools jstat and jstack tests to jtreg
akulyakh
parents:
diff
changeset
|
1 |
/* |
43933 | 2 |
* Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved. |
35493
863fb33f9940
8130063: Refactoring tmtools jstat and jstack tests to jtreg
akulyakh
parents:
diff
changeset
|
3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
863fb33f9940
8130063: Refactoring tmtools jstat and jstack tests to jtreg
akulyakh
parents:
diff
changeset
|
4 |
* |
863fb33f9940
8130063: Refactoring tmtools jstat and jstack tests to jtreg
akulyakh
parents:
diff
changeset
|
5 |
* This code is free software; you can redistribute it and/or modify it |
863fb33f9940
8130063: Refactoring tmtools jstat and jstack tests to jtreg
akulyakh
parents:
diff
changeset
|
6 |
* under the terms of the GNU General Public License version 2 only, as |
863fb33f9940
8130063: Refactoring tmtools jstat and jstack tests to jtreg
akulyakh
parents:
diff
changeset
|
7 |
* published by the Free Software Foundation. |
863fb33f9940
8130063: Refactoring tmtools jstat and jstack tests to jtreg
akulyakh
parents:
diff
changeset
|
8 |
* |
863fb33f9940
8130063: Refactoring tmtools jstat and jstack tests to jtreg
akulyakh
parents:
diff
changeset
|
9 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
863fb33f9940
8130063: Refactoring tmtools jstat and jstack tests to jtreg
akulyakh
parents:
diff
changeset
|
10 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
863fb33f9940
8130063: Refactoring tmtools jstat and jstack tests to jtreg
akulyakh
parents:
diff
changeset
|
11 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
863fb33f9940
8130063: Refactoring tmtools jstat and jstack tests to jtreg
akulyakh
parents:
diff
changeset
|
12 |
* version 2 for more details (a copy is included in the LICENSE file that |
863fb33f9940
8130063: Refactoring tmtools jstat and jstack tests to jtreg
akulyakh
parents:
diff
changeset
|
13 |
* accompanied this code). |
863fb33f9940
8130063: Refactoring tmtools jstat and jstack tests to jtreg
akulyakh
parents:
diff
changeset
|
14 |
* |
863fb33f9940
8130063: Refactoring tmtools jstat and jstack tests to jtreg
akulyakh
parents:
diff
changeset
|
15 |
* You should have received a copy of the GNU General Public License version |
863fb33f9940
8130063: Refactoring tmtools jstat and jstack tests to jtreg
akulyakh
parents:
diff
changeset
|
16 |
* 2 along with this work; if not, write to the Free Software Foundation, |
863fb33f9940
8130063: Refactoring tmtools jstat and jstack tests to jtreg
akulyakh
parents:
diff
changeset
|
17 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
863fb33f9940
8130063: Refactoring tmtools jstat and jstack tests to jtreg
akulyakh
parents:
diff
changeset
|
18 |
* |
863fb33f9940
8130063: Refactoring tmtools jstat and jstack tests to jtreg
akulyakh
parents:
diff
changeset
|
19 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
863fb33f9940
8130063: Refactoring tmtools jstat and jstack tests to jtreg
akulyakh
parents:
diff
changeset
|
20 |
* or visit www.oracle.com if you need additional information or have any |
863fb33f9940
8130063: Refactoring tmtools jstat and jstack tests to jtreg
akulyakh
parents:
diff
changeset
|
21 |
* questions. |
863fb33f9940
8130063: Refactoring tmtools jstat and jstack tests to jtreg
akulyakh
parents:
diff
changeset
|
22 |
*/ |
863fb33f9940
8130063: Refactoring tmtools jstat and jstack tests to jtreg
akulyakh
parents:
diff
changeset
|
23 |
|
863fb33f9940
8130063: Refactoring tmtools jstat and jstack tests to jtreg
akulyakh
parents:
diff
changeset
|
24 |
/* |
863fb33f9940
8130063: Refactoring tmtools jstat and jstack tests to jtreg
akulyakh
parents:
diff
changeset
|
25 |
* @test |
863fb33f9940
8130063: Refactoring tmtools jstat and jstack tests to jtreg
akulyakh
parents:
diff
changeset
|
26 |
* @summary Test checks output displayed with jstat -gccause. |
863fb33f9940
8130063: Refactoring tmtools jstat and jstack tests to jtreg
akulyakh
parents:
diff
changeset
|
27 |
* Test scenario: |
43933 | 28 |
* test forces debuggee application eat ~70% of heap and runs jstat. |
29 |
* jstat should show actual usage of old gen (OC/OU ~= old gen usage). |
|
42585
570f4b5312af
8168396: Unexpected OOME in GcCauseTest02 and GcTest02
mchernov
parents:
42083
diff
changeset
|
30 |
* @requires vm.opt.ExplicitGCInvokesConcurrent != true |
38152
80e5da81fb2c
8154258: [TESTBUG] Various serviceability tests fail compilation
dsamersoff
parents:
37434
diff
changeset
|
31 |
* @modules java.base/jdk.internal.misc |
40631
ed82623d7831
8157957: ClassNotFoundException: jdk.test.lib.JDKToolFinder
ctornqvi
parents:
38152
diff
changeset
|
32 |
* @library /test/lib |
35493
863fb33f9940
8130063: Refactoring tmtools jstat and jstack tests to jtreg
akulyakh
parents:
diff
changeset
|
33 |
* @library ../share |
43933 | 34 |
* @run main/othervm -XX:+UsePerfData -XX:MaxNewSize=4m -XX:MaxHeapSize=128M -XX:MaxMetaspaceSize=128M GcCauseTest02 |
35493
863fb33f9940
8130063: Refactoring tmtools jstat and jstack tests to jtreg
akulyakh
parents:
diff
changeset
|
35 |
*/ |
863fb33f9940
8130063: Refactoring tmtools jstat and jstack tests to jtreg
akulyakh
parents:
diff
changeset
|
36 |
import utils.*; |
863fb33f9940
8130063: Refactoring tmtools jstat and jstack tests to jtreg
akulyakh
parents:
diff
changeset
|
37 |
|
863fb33f9940
8130063: Refactoring tmtools jstat and jstack tests to jtreg
akulyakh
parents:
diff
changeset
|
38 |
public class GcCauseTest02 { |
863fb33f9940
8130063: Refactoring tmtools jstat and jstack tests to jtreg
akulyakh
parents:
diff
changeset
|
39 |
|
863fb33f9940
8130063: Refactoring tmtools jstat and jstack tests to jtreg
akulyakh
parents:
diff
changeset
|
40 |
public static void main(String[] args) throws Exception { |
43933 | 41 |
new GarbageProducerTest(new JstatGcCauseTool(ProcessHandle.current().getPid())).run(); |
35493
863fb33f9940
8130063: Refactoring tmtools jstat and jstack tests to jtreg
akulyakh
parents:
diff
changeset
|
42 |
} |
863fb33f9940
8130063: Refactoring tmtools jstat and jstack tests to jtreg
akulyakh
parents:
diff
changeset
|
43 |
} |