mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-17 17:44:40 +02:00
8149973: Optimize object alignment check in debug builds
Reviewed-by: coleenp, tschatzl
This commit is contained in:
parent
6b037d45a6
commit
34effca3ac
3 changed files with 4 additions and 18 deletions
|
@ -295,7 +295,7 @@ address* oopDesc::address_field_addr(int offset) const { return (address*) f
|
|||
// in inner GC loops so these are separated.
|
||||
|
||||
inline bool check_obj_alignment(oop obj) {
|
||||
return cast_from_oop<intptr_t>(obj) % MinObjAlignmentInBytes == 0;
|
||||
return (cast_from_oop<intptr_t>(obj) & MinObjAlignmentInBytesMask) == 0;
|
||||
}
|
||||
|
||||
oop oopDesc::decode_heap_oop_not_null(narrowOop v) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue