changeset 56308:515fc9f6b2d6

8231025: Incorrect method tag offset for big endian platform Reviewed-by: egahlin
author mgronlun
date Sat, 14 Sep 2019 18:45:24 +0200
parents caa25ab47aca
children 51cd29502ea9
files src/hotspot/share/jfr/support/jfrTraceIdExtension.hpp
diffstat 1 files changed, 11 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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
   }
 };