17 * You should have received a copy of the GNU General Public License version
18 * 2 along with this work; if not, write to the Free Software Foundation,
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
23 * questions.
24 */
25
26 package jdk.jfr.event.compiler;
27
28 import java.util.List;
29
30 import jdk.jfr.Recording;
31 import jdk.jfr.consumer.RecordedEvent;
32 import jdk.test.lib.Asserts;
33 import jdk.test.lib.jfr.EventNames;
34 import jdk.test.lib.jfr.Events;
35 import sun.hotspot.WhiteBox;
36
37 /*
38 * @test TestCodeCacheConfig
39 * @key jfr
40 * @library /test/lib
41 * @build sun.hotspot.WhiteBox
42 * @run main ClassFileInstaller sun.hotspot.WhiteBox
43 * sun.hotspot.WhiteBox$WhiteBoxPermission
44 * @run main/othervm -Xbootclasspath/a:.
45 * -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
46 * -XX:+SegmentedCodeCache jdk.jfr.event.compiler.TestCodeCacheConfig
47 * @run main/othervm -Xbootclasspath/a:.
48 * -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
49 * -XX:-SegmentedCodeCache jdk.jfr.event.compiler.TestCodeCacheConfig
50 * @summary check "Code Cache Configuration" jfr event
51 */
52 public class TestCodeCacheConfig {
53 private final static String EVENT_NAME = EventNames.CodeCacheConfiguration;
54
55 private static final long CodeCacheExpectedSize = WhiteBox.getWhiteBox().getUintxVMFlag("ReservedCodeCacheSize");
56
57 public static void main(String[] args) throws Exception {
58 Recording recording = new Recording();
59 recording.enable(EVENT_NAME);
|
17 * You should have received a copy of the GNU General Public License version
18 * 2 along with this work; if not, write to the Free Software Foundation,
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
23 * questions.
24 */
25
26 package jdk.jfr.event.compiler;
27
28 import java.util.List;
29
30 import jdk.jfr.Recording;
31 import jdk.jfr.consumer.RecordedEvent;
32 import jdk.test.lib.Asserts;
33 import jdk.test.lib.jfr.EventNames;
34 import jdk.test.lib.jfr.Events;
35 import sun.hotspot.WhiteBox;
36
37 /**
38 * @test TestCodeCacheConfig
39 * @key jfr
40 * @requires vm.hasJFR
41 * @library /test/lib
42 * @build sun.hotspot.WhiteBox
43 * @run main ClassFileInstaller sun.hotspot.WhiteBox
44 * sun.hotspot.WhiteBox$WhiteBoxPermission
45 * @run main/othervm -Xbootclasspath/a:.
46 * -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
47 * -XX:+SegmentedCodeCache jdk.jfr.event.compiler.TestCodeCacheConfig
48 * @run main/othervm -Xbootclasspath/a:.
49 * -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
50 * -XX:-SegmentedCodeCache jdk.jfr.event.compiler.TestCodeCacheConfig
51 * @summary check "Code Cache Configuration" jfr event
52 */
53 public class TestCodeCacheConfig {
54 private final static String EVENT_NAME = EventNames.CodeCacheConfiguration;
55
56 private static final long CodeCacheExpectedSize = WhiteBox.getWhiteBox().getUintxVMFlag("ReservedCodeCacheSize");
57
58 public static void main(String[] args) throws Exception {
59 Recording recording = new Recording();
60 recording.enable(EVENT_NAME);
|