Request for reviews (M): 6709093: Compressed Oops: reduce size of compiled methods

Vladimir Kozlov Vladimir.Kozlov at Sun.COM
Wed Jun 4 12:19:08 PDT 2008


http://webrev.invokedynamic.info/kvn/6709093/index.html

Fixed 6709093: Compressed Oops: reduce size of compiled methods

Problem:
There is ~60% regression in monte_carlo due to not inlining
nextDouble() method and, as result, not (EA) scalarizing Random object.
The method is not inlinined since the size of its compiled
code > 1000 (inlining threshold) because of additional
encoding/decoding instructions.

Solution:
Reduce size of unvalidated entry code.
Use addressing through narrow oop to get prototype header:

Instead of this:
000   N: #   B1
000     movl    rscratch1, [j_rarg0 + oopDesc::klass_offset_in_bytes() #8]
leaq    rscratch1, [r12_heapbase, r, Address::times_8, 0]
cmpq    rax, rscratch1   # Inline cache check
         jne     SharedRuntime::_ic_miss_stub
         nop
         nop

         nop     # 12 bytes pad for loops and calls

020   B1: #

generate this:
000   N: #   B1
000     subq    rax, r12_heapbase        # encode_heap_oop_not_null(rax)
         shrq    rax, 3
         cmpl    rax, [j_rarg0 + oopDesc::klass_offset_in_bytes() #8]    # Inline cache check
         jne     SharedRuntime::_ic_miss_stub
000
010   B1: #

And instead of this:
      movl    R11, narrowoop: precise klass jnt/scimark2/Random: 0x000000000083b418:Constant:exact *  # compressed ptr
      movq    R10, precise klass jnt/scimark2/Random: 0x000000000083b418:Constant:exact *     # ptr
      movq    R10, [R10 + #176 (32-bit)]      # ptr
      movq    [RAX], R10      # ptr
      movl    [RAX + #8 (8-bit)], R11 # compressed ptr

generate this:
      movl    R11, narrowoop: precise klass Point: 0x00000000007ad518:Constant:exact *        # compressed ptr
      movq    R10, [R12 + R11 << 3 + #176] (compressed oop addressing)        # ptr
      movq    [R8], R10       # ptr
      movl    [R8 + #8 (8-bit)], R11  # compressed ptr


Reviewed by:
Fix verified (y/n): y, generated code.

Other testing:
JPRT, scimark




More information about the hotspot-compiler-dev mailing list