RFR (XS) CR 8014509: @Contended: explicit default value behaves differently from the implicit value
Aleksey Shipilev
aleksey.shipilev at oracle.com
Wed May 15 09:38:29 PDT 2013
Thanks!
On 05/15/2013 08:34 PM, Vladimir Kozlov wrote:
> Why you need to test 2 fields but not class annotation?
The tags are only meaningful on fields, tags are inducing the
equivalence class over the fields. The tags are plainly ignored on
class-level @Contended.
> It would be nice to have a comment in parse_annotations() explaining
> what formats of Contended are expected.
I think I really, really need to push the proper Javadoc to @Contended,
and not push the explanation about this to VM code.
> And the code could be rearranged to simplify it a little:
>
> if (id == AnnotationCollector::_sun_misc_Contended) {
> u2 group_index = 0; // default contended group
> if (count == 1
> && s_size == (index - index0) // match size
> && s_tag_val == *(abase + tag_off)
> && member == vmSymbols::value_name()) {
> u2 group_index = Bytes::get_Java_u2(abase + s_con_off);
> if (_cp->symbol_at(group_index)->utf8_length() == 0) {
> group_index = 0; // empty tag => default contended group
> }
> }
> coll->set_contended_group(group_index);
> }
Good, I'll fix this and re-spin JPRT.
-Aleksey.
More information about the hotspot-dev
mailing list