Mercurial > hg > truffle
changeset 9891:558c73d8bdc0
Add compressed oops support in comments' copying in CodeInstaller
author | Christos Kotselidis <christos.kotselidis@oracle.com> |
---|---|
date | Wed, 05 Jun 2013 12:00:36 +0200 |
parents | f902b6a71670 |
children | 3d965e61b5f6 |
files | src/share/vm/graal/graalCodeInstaller.cpp |
diffstat | 1 files changed, 6 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/share/vm/graal/graalCodeInstaller.cpp Wed Jun 05 11:26:15 2013 +0200 +++ b/src/share/vm/graal/graalCodeInstaller.cpp Wed Jun 05 12:00:36 2013 +0200 @@ -479,9 +479,13 @@ #ifndef PRODUCT if (_comments != NULL) { - oop* comments = (oop*) _comments->base(T_OBJECT); + oop comment; for (int i = 0; i < _comments->length(); i++) { - oop comment = comments[i]; + if(UseCompressedOops) { + comment=oopDesc::decode_heap_oop(((narrowOop*) _comments->base(T_OBJECT))[i]); + } else { + comment=((oop*) (_comments->base(T_OBJECT)))[i]; + } assert(comment->is_a(HotSpotCompiledCode_Comment::klass()), "cce"); jint offset = HotSpotCompiledCode_Comment::pcOffset(comment); char* text = java_lang_String::as_utf8_string(HotSpotCompiledCode_Comment::text(comment));