Mercurial > hg > truffle
comparison src/share/vm/oops/oop.inline.hpp @ 12316:190899198332
7195622: CheckUnhandledOops has limited usefulness now
Summary: Enable CHECK_UNHANDLED_OOPS in fastdebug builds across all supported platforms.
Reviewed-by: coleenp, hseigel, dholmes, stefank, twisti, ihse, rdurbin
Contributed-by: lois.foltan@oracle.com
author | hseigel |
---|---|
date | Thu, 26 Sep 2013 10:25:02 -0400 |
parents | 7944aba7ba41 |
children | cefad50507d8 3205e78d8193 |
comparison
equal
deleted
inserted
replaced
12315:c1fbf21c7397 | 12316:190899198332 |
---|---|
181 // Algorithm for encoding and decoding oops from 64 bit pointers to 32 bit | 181 // Algorithm for encoding and decoding oops from 64 bit pointers to 32 bit |
182 // offset from the heap base. Saving the check for null can save instructions | 182 // offset from the heap base. Saving the check for null can save instructions |
183 // in inner GC loops so these are separated. | 183 // in inner GC loops so these are separated. |
184 | 184 |
185 inline bool check_obj_alignment(oop obj) { | 185 inline bool check_obj_alignment(oop obj) { |
186 return (intptr_t)obj % MinObjAlignmentInBytes == 0; | 186 return cast_from_oop<intptr_t>(obj) % MinObjAlignmentInBytes == 0; |
187 } | 187 } |
188 | 188 |
189 inline narrowOop oopDesc::encode_heap_oop_not_null(oop v) { | 189 inline narrowOop oopDesc::encode_heap_oop_not_null(oop v) { |
190 assert(!is_null(v), "oop value can never be zero"); | 190 assert(!is_null(v), "oop value can never be zero"); |
191 assert(check_obj_alignment(v), "Address not aligned"); | 191 assert(check_obj_alignment(v), "Address not aligned"); |