changeset 49151:e9b007212236

8197857: fieldDescriptor prints incorrect 32-bit representation of compressed oops Reviewed-by: coleenp
author iklam
date Wed, 14 Feb 2018 06:57:28 -0800
parents b2bb70f5effd
children 7b9fcae23a16
files src/hotspot/share/runtime/fieldDescriptor.cpp
diffstat 1 files changed, 7 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/hotspot/share/runtime/fieldDescriptor.cpp	Wed Feb 14 09:09:37 2018 -0500
+++ b/src/hotspot/share/runtime/fieldDescriptor.cpp	Wed Feb 14 06:57:28 2018 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -201,6 +201,12 @@
   }
   // Print a hint as to the underlying integer representation. This can be wrong for
   // pointers on an LP64 machine
+#ifdef _LP64
+  if ((ft == T_OBJECT || ft == T_ARRAY) && UseCompressedOops) {
+    st->print(" (%x)", obj->int_field(offset()));
+  }
+  else // <- intended
+#endif
   if (ft == T_LONG || ft == T_DOUBLE LP64_ONLY(|| !is_java_primitive(ft)) ) {
     st->print(" (%x %x)", obj->int_field(offset()), obj->int_field(offset()+sizeof(jint)));
   } else if (as_int < 0 || as_int > 9) {