JDK-8231025 : Incorrect method tag offset for big endian platform
  • Type: Bug
  • Component: hotspot
  • Sub-Component: jfr
  • Affected Version: 14
  • Priority: P2
  • Status: Closed
  • Resolution: Fixed
  • OS: solaris
  • CPU: sparc
  • Submitted: 2019-09-14
  • Updated: 2020-06-16
  • Resolved: 2019-09-14
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 11 JDK 13 JDK 14
11.0.7Fixed 13.0.4Fixed 14 b15Fixed
Related Reports
Relates :  
Description
JDK-8225797 extended the method trace field from a jbyte to a jshort to include additional metadata tagging. The two bytes are accessed individually as a jbyte quantity and are semantically disjoint. Clearing operations however are atomic over the entire jshort.

The reason for this omission is that when building JDK-8225797 as part of the JFR Streaming feature, the test submit scripts only included a small subset of platforms.

Comments
Fix Request [13u] The reason are the same as for 11u. The patch applies cleanly
08-06-2020

Verified by inspecting the code and making sure that the change is there as described: http://hg.openjdk.java.net/jdk/jdk14/file/a23e471deb84/src/hotspot/share/jfr/support/jfrTraceIdExtension.hpp
30-01-2020

Fix request [11] This is a necessary followup fix for the planned backport of JDK-8225797. This patch applies with minimal line-offset fuzz only. The associated risk is very low.
24-01-2020

URL: https://hg.openjdk.java.net/jdk/jdk/rev/515fc9f6b2d6 User: mgronlun Date: 2019-09-14 16:51:14 +0000
14-09-2019

diff -r caa25ab47aca src/hotspot/share/jfr/support/jfrTraceIdExtension.hpp --- a/src/hotspot/share/jfr/support/jfrTraceIdExtension.hpp Sat Sep 14 14:40:09 2019 +0200 +++ b/src/hotspot/share/jfr/support/jfrTraceIdExtension.hpp Sat Sep 14 17:52:10 2019 +0200 @@ -26,6 +26,7 @@ #define SHARE_JFR_SUPPORT_JFRTRACEIDEXTENSION_HPP #include "jfr/recorder/checkpoint/types/traceid/jfrTraceId.hpp" +#include "utilities/macros.hpp" #define DEFINE_TRACE_ID_FIELD mutable traceid _trace_id @@ -59,10 +60,19 @@ } jbyte* flags_addr() const { +#ifdef VM_LITTLE_ENDIAN return (jbyte*)&_flags; +#else + return ((jbyte*)&_flags) + 1; +#endif } + jbyte* meta_addr() const { - return ((jbyte*)&_flags) + 1; +#ifdef VM_LITTLE_ENDIAN + return (jbyte*)(&_flags) + 1; +#else + return (jbyte*)&_flags; +#endif } };
14-09-2019