RFR (XS): 8011972: Field can be erroneously marked as contended when @Contended annotation isn't present
vladimir.kozlov at oracle.com
Thu Apr 11 09:00:26 PDT 2013
On 4/11/13 8:57 AM, Vladimir Ivanov wrote:
> Thanks for review, VladimirK.
> I agree.
> Best regards,
> Vladimir Ivanov
> On 4/11/13 7:29 PM, Vladimir Kozlov wrote:
>> May be you should remove set_contended() method since I don't see other
>> usage after you removed those lines.
>> On 4/11/13 2:52 AM, Vladimir Ivanov wrote:
>>> 4 lines changed: 0 ins; 3 del; 1 mod
>>> If a field is marked with some annotation recognized by VM (but not
>>> @Contended), the field will be marked as contended anyway. It's because
>>> AnnotationCollector::set_contended(bool contended) ignores the parameter
>>> and always marks a field as contended.
>>> Moreover, calls to AnnotationCollector::set_contended in
>>> ClassFileParser::parse_annotations are redundant, because there's
>>> already a call right before:
>>> 1714 coll->set_annotation(id);
>>> The problem hasn't manifested itself before, because @Contended is the
>>> only annotation on fields  VM recognizes. I hit it when working on a
>>> new annotation on fields for VM.
>>> Testing: manual (w/ additional annotation on fields),
>>> Best regards,
>>> Vladimir Ivanov
More information about the hotspot-compiler-dev