Mercurial > hg > truffle
comparison src/share/vm/classfile/javaClasses.cpp @ 1245:6484c4ee11cb
6904516: More object array barrier fixes, following up on 6906727
Summary: Fixed missing pre-barrier calls for G1, modified C1 to call pre- and correct post-barrier interfaces, deleted obsolete interface, (temporarily) disabled redundant deferred barrier in BacktraceBuilder.
Reviewed-by: coleenp, jmasa, kvn, never
author | ysr |
---|---|
date | Mon, 01 Feb 2010 17:29:01 -0800 |
parents | 4ce7240d622c |
children | cd5dbf694d45 |
comparison
equal
deleted
inserted
replaced
1244:745c853ee57f | 1245:6484c4ee11cb |
---|---|
1119 _backtrace = _head; | 1119 _backtrace = _head; |
1120 _index = 0; | 1120 _index = 0; |
1121 } | 1121 } |
1122 | 1122 |
1123 void flush() { | 1123 void flush() { |
1124 // The following appears to have been an optimization to save from | |
1125 // doing a barrier for each individual store into the _methods array, | |
1126 // but rather to do it for the entire array after the series of writes. | |
1127 // That optimization seems to have been lost when compressed oops was | |
1128 // implemented. However, the extra card-marks below was left in place, | |
1129 // but is now redundant because the individual stores into the | |
1130 // _methods array already execute the barrier code. CR 6918185 has | |
1131 // been filed so the original code may be restored by deferring the | |
1132 // barriers until after the entire sequence of stores, thus re-enabling | |
1133 // the intent of the original optimization. In the meantime the redundant | |
1134 // card mark below is now disabled. | |
1124 if (_dirty && _methods != NULL) { | 1135 if (_dirty && _methods != NULL) { |
1136 #if 0 | |
1125 BarrierSet* bs = Universe::heap()->barrier_set(); | 1137 BarrierSet* bs = Universe::heap()->barrier_set(); |
1126 assert(bs->has_write_ref_array_opt(), "Barrier set must have ref array opt"); | 1138 assert(bs->has_write_ref_array_opt(), "Barrier set must have ref array opt"); |
1127 bs->write_ref_array((HeapWord*)_methods->base(), _methods->length()); | 1139 bs->write_ref_array((HeapWord*)_methods->base(), _methods->length()); |
1140 #endif | |
1128 _dirty = false; | 1141 _dirty = false; |
1129 } | 1142 } |
1130 } | 1143 } |
1131 | 1144 |
1132 void expand(TRAPS) { | 1145 void expand(TRAPS) { |
1166 methodHandle mhandle(THREAD, method); | 1179 methodHandle mhandle(THREAD, method); |
1167 expand(CHECK); | 1180 expand(CHECK); |
1168 method = mhandle(); | 1181 method = mhandle(); |
1169 } | 1182 } |
1170 | 1183 |
1171 _methods->obj_at_put(_index, method); | 1184 _methods->obj_at_put(_index, method); |
1172 // bad for UseCompressedOops | |
1173 // *_methods->obj_at_addr(_index) = method; | |
1174 _bcis->ushort_at_put(_index, bci); | 1185 _bcis->ushort_at_put(_index, bci); |
1175 _index++; | 1186 _index++; |
1176 _dirty = true; | 1187 _dirty = true; |
1177 } | 1188 } |
1178 | 1189 |