diff --git a/src/jdk.jfr/share/classes/jdk/jfr/events/ActiveRecordingEvent.java b/src/jdk.jfr/share/classes/jdk/jfr/events/ActiveRecordingEvent.java index b36cf91d59b..bb2ad9a1ad8 100644 --- a/src/jdk.jfr/share/classes/jdk/jfr/events/ActiveRecordingEvent.java +++ b/src/jdk.jfr/share/classes/jdk/jfr/events/ActiveRecordingEvent.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -52,6 +52,9 @@ public final class ActiveRecordingEvent extends AbstractJDKEvent { @Label("Destination") public String destination; + @Label("To Disk") + public boolean disk; + @Label("Max Age") @Timespan(Timespan.MILLISECONDS) public long maxAge; @@ -77,7 +80,7 @@ public final class ActiveRecordingEvent extends AbstractJDKEvent { } public static void commit(long timestamp, long duration, long id, String name, - String destination, long maxAge, long flushInterval, + String destination, boolean disk, long maxAge, long flushInterval, long maxSize, long recordingStart, long recordingDuration) { // Generated } diff --git a/src/jdk.jfr/share/classes/jdk/jfr/internal/PlatformRecorder.java b/src/jdk.jfr/share/classes/jdk/jfr/internal/PlatformRecorder.java index 832a0bd7eac..02d9d33e183 100644 --- a/src/jdk.jfr/share/classes/jdk/jfr/internal/PlatformRecorder.java +++ b/src/jdk.jfr/share/classes/jdk/jfr/internal/PlatformRecorder.java @@ -474,6 +474,7 @@ public final class PlatformRecorder { r.getId(), r.getName(), path == null ? null : path.getRealPathText(), + r.isToDisk(), age == null ? Long.MAX_VALUE : age.toMillis(), flush == null ? Long.MAX_VALUE : flush.toMillis(), size == null ? Long.MAX_VALUE : size, diff --git a/test/jdk/jdk/jfr/event/runtime/TestActiveRecordingEvent.java b/test/jdk/jdk/jfr/event/runtime/TestActiveRecordingEvent.java index 8d3e3619520..c929ff1d5e8 100644 --- a/test/jdk/jdk/jfr/event/runtime/TestActiveRecordingEvent.java +++ b/test/jdk/jdk/jfr/event/runtime/TestActiveRecordingEvent.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -118,6 +118,8 @@ public final class TestActiveRecordingEvent { assertEquals(recording.getId(), ev.getValue("id")); + assertEquals(recording.isToDisk(), ev.getValue("disk")); + ValueDescriptor maxAgeField = evType.getField("maxAge"); assertEquals(maxAgeField.getAnnotation(Timespan.class).value(), Timespan.MILLISECONDS); }