File tree Expand file tree Collapse file tree 2 files changed +8
-3
lines changed
test/jdk/jdk/jfr/api/consumer/streaming Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change 11/*
2- * Copyright (c) 2019, 2021 , Oracle and/or its affiliates. All rights reserved.
2+ * Copyright (c) 2019, 2022 , Oracle and/or its affiliates. All rights reserved.
33 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44 *
55 * This code is free software; you can redistribute it and/or modify it
@@ -43,7 +43,7 @@ public class TestJVMCrash {
4343 public static void main (String ... args ) throws Exception {
4444 int id = 1 ;
4545 while (true ) {
46- try (TestProcess process = new TestProcess ("crash-application-" + id ++)) {
46+ try (TestProcess process = new TestProcess ("crash-application-" + id ++, false /* createCore */ )) {
4747 AtomicInteger eventCounter = new AtomicInteger ();
4848 try (EventStream es = EventStream .openRepository (process .getRepository ())) {
4949 // Start from first event in repository
Original file line number Diff line number Diff line change 11/*
2- * Copyright (c) 2019, 2020 , Oracle and/or its affiliates. All rights reserved.
2+ * Copyright (c) 2019, 2022 , Oracle and/or its affiliates. All rights reserved.
33 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44 *
55 * This code is free software; you can redistribute it and/or modify it
@@ -54,11 +54,16 @@ private static class TestEvent extends Event {
5454 private final Path path ;
5555
5656 public TestProcess (String name ) throws IOException {
57+ this (name , true /* createCore */ );
58+ }
59+
60+ public TestProcess (String name , boolean createCore ) throws IOException {
5761 this .path = Paths .get ("action-" + System .currentTimeMillis ()).toAbsolutePath ();
5862 String [] args = {
5963 "--add-exports" ,
6064 "java.base/jdk.internal.misc=ALL-UNNAMED" ,
6165 "-XX:StartFlightRecording:settings=none" ,
66+ "-XX:" + (createCore ? "+" : "-" ) + "CreateCoredumpOnCrash" ,
6267 TestProcess .class .getName (), path .toString ()
6368 };
6469 ProcessBuilder pb = ProcessTools .createJavaProcessBuilder (args );
You can’t perform that action at this time.
0 commit comments