# HG changeset patch # User iklam # Date 1518620248 28800 # Node ID e9b0072122369bb71a4ee55d10ee211abc20e9d6 # Parent b2bb70f5effdf423060efa9d1b3aba693dc0dd07 8197857: fieldDescriptor prints incorrect 32-bit representation of compressed oops Reviewed-by: coleenp diff -r b2bb70f5effd -r e9b007212236 src/hotspot/share/runtime/fieldDescriptor.cpp --- 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) {