Skip to content

Commit dae1ab3

Browse files
committed
8304844: JFR: Missing disk parameter in ActiveRecording event
Reviewed-by: mgronlun
1 parent e012685 commit dae1ab3

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

src/jdk.jfr/share/classes/jdk/jfr/events/ActiveRecordingEvent.java

+5-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2016, 2023, 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
@@ -52,6 +52,9 @@ public final class ActiveRecordingEvent extends AbstractJDKEvent {
5252
@Label("Destination")
5353
public String destination;
5454

55+
@Label("To Disk")
56+
public boolean disk;
57+
5558
@Label("Max Age")
5659
@Timespan(Timespan.MILLISECONDS)
5760
public long maxAge;
@@ -77,7 +80,7 @@ public static boolean enabled() {
7780
}
7881

7982
public static void commit(long timestamp, long duration, long id, String name,
80-
String destination, long maxAge, long flushInterval,
83+
String destination, boolean disk, long maxAge, long flushInterval,
8184
long maxSize, long recordingStart, long recordingDuration) {
8285
// Generated
8386
}

src/jdk.jfr/share/classes/jdk/jfr/internal/PlatformRecorder.java

+1
Original file line numberDiff line numberDiff line change
@@ -474,6 +474,7 @@ private void writeMetaEvents() {
474474
r.getId(),
475475
r.getName(),
476476
path == null ? null : path.getRealPathText(),
477+
r.isToDisk(),
477478
age == null ? Long.MAX_VALUE : age.toMillis(),
478479
flush == null ? Long.MAX_VALUE : flush.toMillis(),
479480
size == null ? Long.MAX_VALUE : size,

test/jdk/jdk/jfr/event/runtime/TestActiveRecordingEvent.java

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2016, 2023, 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
@@ -118,6 +118,8 @@ private static void testWithPath(Path path) throws Throwable {
118118

119119
assertEquals(recording.getId(), ev.getValue("id"));
120120

121+
assertEquals(recording.isToDisk(), ev.getValue("disk"));
122+
121123
ValueDescriptor maxAgeField = evType.getField("maxAge");
122124
assertEquals(maxAgeField.getAnnotation(Timespan.class).value(), Timespan.MILLISECONDS);
123125
}

0 commit comments

Comments
 (0)