Mercurial > hg > graal-jvmci-8
comparison src/share/vm/asm/assembler.cpp @ 642:660978a2a31a
6791178: Specialize for zero as the compressed oop vm heap base
Summary: Use zero based compressed oops if java heap is below 32gb and unscaled compressed oops if java heap is below 4gb.
Reviewed-by: never, twisti, jcoomes, coleenp
author | kvn |
---|---|
date | Thu, 12 Mar 2009 10:37:46 -0700 |
parents | 56aae7be60d4 |
children | bd02caa94611 |
comparison
equal
deleted
inserted
replaced
641:6af0a709d52b | 642:660978a2a31a |
---|---|
319 } | 319 } |
320 | 320 |
321 bool MacroAssembler::needs_explicit_null_check(intptr_t offset) { | 321 bool MacroAssembler::needs_explicit_null_check(intptr_t offset) { |
322 // Exception handler checks the nmethod's implicit null checks table | 322 // Exception handler checks the nmethod's implicit null checks table |
323 // only when this method returns false. | 323 // only when this method returns false. |
324 if (UseCompressedOops) { | 324 #ifdef _LP64 |
325 if (UseCompressedOops && Universe::narrow_oop_base() != NULL) { | |
326 assert (Universe::heap() != NULL, "java heap should be initialized"); | |
325 // The first page after heap_base is unmapped and | 327 // The first page after heap_base is unmapped and |
326 // the 'offset' is equal to [heap_base + offset] for | 328 // the 'offset' is equal to [heap_base + offset] for |
327 // narrow oop implicit null checks. | 329 // narrow oop implicit null checks. |
328 uintptr_t heap_base = (uintptr_t)Universe::heap_base(); | 330 uintptr_t base = (uintptr_t)Universe::narrow_oop_base(); |
329 if ((uintptr_t)offset >= heap_base) { | 331 if ((uintptr_t)offset >= base) { |
330 // Normalize offset for the next check. | 332 // Normalize offset for the next check. |
331 offset = (intptr_t)(pointer_delta((void*)offset, (void*)heap_base, 1)); | 333 offset = (intptr_t)(pointer_delta((void*)offset, (void*)base, 1)); |
332 } | 334 } |
333 } | 335 } |
336 #endif | |
334 return offset < 0 || os::vm_page_size() <= offset; | 337 return offset < 0 || os::vm_page_size() <= offset; |
335 } | 338 } |
336 | 339 |
337 #ifndef PRODUCT | 340 #ifndef PRODUCT |
338 void Label::print_instructions(MacroAssembler* masm) const { | 341 void Label::print_instructions(MacroAssembler* masm) const { |