Java Solaris Communities Sun Store Join SDN My Profile Why Join?
 
Bug Database
Bug Detail
Quick Lists
Top 25 Bugs
Top 25 RFE's
Recently Closed Bugs
Printable Page Printable Page


Bug Database
Bug ID: 6547163
Votes 0
Synopsis 6498658 changes introduced regression in arraycopy on sparc
Category hotspot:compiler2
Reported Against
Release Fixed hs10(b13), 6u2(b03) (Bug ID:2148621) , 7(b13) (Bug ID:2176927)
State 10-Fix Delivered, bug
Priority: 2-High
Related Bugs 6498658 , 6563987
Submit Date 18-APR-2007
Description
6498658 changes introduced regression in arraycopy on sparc (32-bits VM)
when the copy offsets statically known constants which have heapWordSize mod
values (4 bytes in 32-bits VM) and offset's difference is not 8 bytes mod:

20070214101449.sgoldman.6524971
jaberwocky% gamma -Xbatch ArrayCopyTest5

Disjoint +4 bytes offset small arraycopy:
Time to copy 128 bytes (128 bytes): 122
Time to copy 64  chars (128 bytes): 134
Time to copy 32   ints (128 bytes): 125
Time to copy 32   oops (128 bytes): 134

Disjoint +8 bytes offset small arraycopy:
Time to copy 128 bytes (128 bytes): 124
Time to copy 64  chars (128 bytes): 98
Time to copy 32   ints (128 bytes): 103
Time to copy 32   oops (128 bytes): 110
Time to copy 16  longs (128 bytes): 87

Disjoint +4 bytes offset small arraycopy:
Time to copy 128 bytes (128 bytes): 117
Time to copy 64  chars (128 bytes): 103
Time to copy 32   ints (128 bytes): 100
Time to copy 32   oops (128 bytes): 109

Disjoint +8 bytes offset small arraycopy:
Time to copy 128 bytes (128 bytes): 103
Time to copy 64  chars (128 bytes): 72
Time to copy 32   ints (128 bytes): 77
Time to copy 32   oops (128 bytes): 86
Time to copy 16  longs (128 bytes): 62

Disjoint +4 bytes offset small arraycopy:
Time to copy 128 bytes (128 bytes): 89
Time to copy 64  chars (128 bytes): 99
Time to copy 32   ints (128 bytes): 108
Time to copy 32   oops (128 bytes): 96

Disjoint +8 bytes offset small arraycopy:
Time to copy 128 bytes (128 bytes): 90
Time to copy 64  chars (128 bytes): 65
Time to copy 32   ints (128 bytes): 65
Time to copy 32   oops (128 bytes): 78
Time to copy 16  longs (128 bytes): 55

20070214151808.kvn.6498658
jaberwocky% gamma -Xbatch ArrayCopyTest5

Disjoint +4 bytes offset small arraycopy:
Time to copy 128 bytes (128 bytes): 18451
Time to copy 64  chars (128 bytes): 18401
Time to copy 32   ints (128 bytes): 17089
Time to copy 32   oops (128 bytes): 17070

Disjoint +8 bytes offset small arraycopy:
Time to copy 128 bytes (128 bytes): 81
Time to copy 64  chars (128 bytes): 80
Time to copy 32   ints (128 bytes): 81
Time to copy 32   oops (128 bytes): 80
Time to copy 16  longs (128 bytes): 68

Disjoint +4 bytes offset small arraycopy:
Time to copy 128 bytes (128 bytes): 18694
Time to copy 64  chars (128 bytes): 18658
Time to copy 32   ints (128 bytes): 17317
Time to copy 32   oops (128 bytes): 17259

Disjoint +8 bytes offset small arraycopy:
Time to copy 128 bytes (128 bytes): 57
Time to copy 64  chars (128 bytes): 54
Time to copy 32   ints (128 bytes): 54
Time to copy 32   oops (128 bytes): 60
Time to copy 16  longs (128 bytes): 43

Disjoint +4 bytes offset small arraycopy:
Time to copy 128 bytes (128 bytes): 18660
Time to copy 64  chars (128 bytes): 18573
Time to copy 32   ints (128 bytes): 17239
Time to copy 32   oops (128 bytes): 17221

Disjoint +8 bytes offset small arraycopy:
Time to copy 128 bytes (128 bytes): 53
Time to copy 64  chars (128 bytes): 47
Time to copy 32   ints (128 bytes): 45
Time to copy 32   oops (128 bytes): 46
Time to copy 16  longs (128 bytes): 35

Fixed VM
jaberwocky% gamma -Xbatch ArrayCopyTest5

Disjoint +4 bytes offset small arraycopy:
Time to copy 128 bytes (128 bytes): 98
Time to copy 64  chars (128 bytes): 87
Time to copy 32   ints (128 bytes): 89
Time to copy 32   oops (128 bytes): 93

Disjoint +8 bytes offset small arraycopy:
Time to copy 128 bytes (128 bytes): 80
Time to copy 64  chars (128 bytes): 73
Time to copy 32   ints (128 bytes): 79
Time to copy 32   oops (128 bytes): 78
Time to copy 16  longs (128 bytes): 67

Disjoint +4 bytes offset small arraycopy:
Time to copy 128 bytes (128 bytes): 84
Time to copy 64  chars (128 bytes): 67
Time to copy 32   ints (128 bytes): 65
Time to copy 32   oops (128 bytes): 68

Disjoint +8 bytes offset small arraycopy:
Time to copy 128 bytes (128 bytes): 55
Time to copy 64  chars (128 bytes): 49
Time to copy 32   ints (128 bytes): 54
Time to copy 32   oops (128 bytes): 52
Time to copy 16  longs (128 bytes): 41

Disjoint +4 bytes offset small arraycopy:
Time to copy 128 bytes (128 bytes): 59
Time to copy 64  chars (128 bytes): 55
Time to copy 32   ints (128 bytes): 55
Time to copy 32   oops (128 bytes): 62

Disjoint +8 bytes offset small arraycopy:
Time to copy 128 bytes (128 bytes): 50
Time to copy 64  chars (128 bytes): 49
Time to copy 32   ints (128 bytes): 42
Time to copy 32   oops (128 bytes): 51
Time to copy 16  longs (128 bytes): 35


64-bits VM is fine since heapWordSize is 8 bytes:

20070214101449.sgoldman.6524971
jaberwocky% gamma -Xbatch ArrayCopyTest5

Disjoint +4 bytes offset small arraycopy:
Time to copy 128 bytes (128 bytes): 135
Time to copy 64  chars (128 bytes): 142
Time to copy 32   ints (128 bytes): 133
Time to copy 32   oops (128 bytes): 145

Disjoint +8 bytes offset small arraycopy:
Time to copy 128 bytes (128 bytes): 135
Time to copy 64  chars (128 bytes): 110
Time to copy 32   ints (128 bytes): 111
Time to copy 32   oops (128 bytes): 145
Time to copy 16  longs (128 bytes): 91

Disjoint +4 bytes offset small arraycopy:
Time to copy 128 bytes (128 bytes): 126
Time to copy 64  chars (128 bytes): 115
Time to copy 32   ints (128 bytes): 110
Time to copy 32   oops (128 bytes): 118

Disjoint +8 bytes offset small arraycopy:
Time to copy 128 bytes (128 bytes): 112
Time to copy 64  chars (128 bytes): 82
Time to copy 32   ints (128 bytes): 85
Time to copy 32   oops (128 bytes): 118
Time to copy 16  longs (128 bytes): 68

Disjoint +4 bytes offset small arraycopy:
Time to copy 128 bytes (128 bytes): 101
Time to copy 64  chars (128 bytes): 108
Time to copy 32   ints (128 bytes): 112
Time to copy 32   oops (128 bytes): 113

Disjoint +8 bytes offset small arraycopy:
Time to copy 128 bytes (128 bytes): 103
Time to copy 64  chars (128 bytes): 77
Time to copy 32   ints (128 bytes): 72
Time to copy 32   oops (128 bytes): 106
Time to copy 16  longs (128 bytes): 60

20070214151808.kvn.6498658
jaberwocky% gamma -Xbatch ArrayCopyTest5

Disjoint +4 bytes offset small arraycopy:
Time to copy 128 bytes (128 bytes): 99
Time to copy 64  chars (128 bytes): 107
Time to copy 32   ints (128 bytes): 98
Time to copy 32   oops (128 bytes): 134

Disjoint +8 bytes offset small arraycopy:
Time to copy 128 bytes (128 bytes): 78
Time to copy 64  chars (128 bytes): 84
Time to copy 32   ints (128 bytes): 84
Time to copy 32   oops (128 bytes): 134
Time to copy 16  longs (128 bytes): 76

Disjoint +4 bytes offset small arraycopy:
Time to copy 128 bytes (128 bytes): 91
Time to copy 64  chars (128 bytes): 81
Time to copy 32   ints (128 bytes): 72
Time to copy 32   oops (128 bytes): 106

Disjoint +8 bytes offset small arraycopy:
Time to copy 128 bytes (128 bytes): 53
Time to copy 64  chars (128 bytes): 60
Time to copy 32   ints (128 bytes): 59
Time to copy 32   oops (128 bytes): 112
Time to copy 16  longs (128 bytes): 50

Disjoint +4 bytes offset small arraycopy:
Time to copy 128 bytes (128 bytes): 71
Time to copy 64  chars (128 bytes): 70
Time to copy 32   ints (128 bytes): 66
Time to copy 32   oops (128 bytes): 96

Disjoint +8 bytes offset small arraycopy:
Time to copy 128 bytes (128 bytes): 46
Time to copy 64  chars (128 bytes): 52
Time to copy 32   ints (128 bytes): 46
Time to copy 32   oops (128 bytes): 101
Time to copy 16  longs (128 bytes): 43
Posted Date : 2007-04-18 00:26:36.0
Work Around
N/A
Evaluation
The aligned arraycopy stubs are called when the copy offsets statically known constants 
which have heapWordSize mod values (4 bytes in 32-bits VM).
In aligned arraycopy stubs only destination address was checked and aligned to 8 bytes
causing the execution of ldx/stx instructions on address not aligned to 8 bytes.
Which causes HW traps on each instruction.
Posted Date : 2007-04-18 00:26:36.0
Comments
  
  Include a link with my name & email   


PLEASE NOTE: JDK6 is formerly known as Project Mustang