8231025: Incorrect method tag offset for big endian platform
Reviewed-by: egahlin
--- 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 18:45:24 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
}
};