Details
-
Bug
-
Resolution: Fixed
-
P4
-
None
-
b10
-
generic
-
generic
Backports
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8327131 | 21.0.4 | Paul Hohensee | P4 | Resolved | Fixed | b01 |
JDK-8334029 | 17.0.13 | Paul Hohensee | P4 | Resolved | Fixed | b01 |
Description
The value of "arrayElements" which is a field of "OldObjectSample" of JFR event is different from the description.
The description attribute of "arrayElements" is below.
"If the object is an array, the number of elements, or -1 if it is not an array"
https://github.com/openjdk/jdk/blob/a9d21c61fb12a11e18c6bb8aa903e5a8e42473f1/src/hotspot/share/jfr/metadata/metadata.xml#L743
This description is returned by ValueDescriptor.getDescription().
But actually, if the object is not an array, "arrayElements" is -2147483648, or INT_MIN.
RecordedEvent.toString() outputs N/A if the field value is INT_MIN.
jdk.OldObjectSample {
startTime = 10:42:35.890 (2023-07-19)
allocationTime = 10:42:35.872 (2023-07-19)
objectSize = 24 bytes
objectAge = 18.1 ms
lastKnownHeapUsage = 512.0 kB
object = [
java.lang.String
]
arrayElements = N/A
root = N/A
eventThread = "main" (javaThreadId = 1)
}
However, RecordedEvent.getValue("arrayElements") outputs -2147483648. Also, "arrayElements" is displayed as -2147483648 on the JMC browser.
This result is different from the description of OldObjectSample.
The description attribute of "arrayElements" is below.
"If the object is an array, the number of elements, or -1 if it is not an array"
https://github.com/openjdk/jdk/blob/a9d21c61fb12a11e18c6bb8aa903e5a8e42473f1/src/hotspot/share/jfr/metadata/metadata.xml#L743
This description is returned by ValueDescriptor.getDescription().
But actually, if the object is not an array, "arrayElements" is -2147483648, or INT_MIN.
RecordedEvent.toString() outputs N/A if the field value is INT_MIN.
jdk.OldObjectSample {
startTime = 10:42:35.890 (2023-07-19)
allocationTime = 10:42:35.872 (2023-07-19)
objectSize = 24 bytes
objectAge = 18.1 ms
lastKnownHeapUsage = 512.0 kB
object = [
java.lang.String
]
arrayElements = N/A
root = N/A
eventThread = "main" (javaThreadId = 1)
}
However, RecordedEvent.getValue("arrayElements") outputs -2147483648. Also, "arrayElements" is displayed as -2147483648 on the JMC browser.
This result is different from the description of OldObjectSample.
Attachments
Issue Links
- backported by
-
JDK-8327131 Array Elements in OldObjectSample event has the incorrect description
- Resolved
-
JDK-8334029 Array Elements in OldObjectSample event has the incorrect description
- Resolved
- links to
-
Commit openjdk/jdk17u-dev/d953de6b
-
Commit openjdk/jdk21u-dev/94634c08
-
Commit openjdk/jdk/e8c325de
-
Review openjdk/jdk17u-dev/1899
-
Review openjdk/jdk21u-dev/225
-
Review openjdk/jdk/15084
(3 links to)