RFR (XS): 8003879: Duplicate definitions in vmStructs
serguei.spitsyn at oracle.com
serguei.spitsyn at oracle.com
Wed Nov 21 21:42:28 PST 2012
It looks good modulo what David pointed out.
Thanks,
Serguie
On 11/21/12 8:17 PM, David Holmes wrote:
> Hi Mikael,
>
> On 22/11/2012 11:42 AM, Mikael Vidstedt wrote:
>>
>> Please review the below change.
>>
>> The change for 7045397 introduced a couple of duplicate entries in the
>> vmStructs::localHotSpotVMTypes array. This shows up when using the jmap
>> tool in a rather ugly way:
> <snip>
>
> Other than an indentation problem (which I don't think you introduced)
> this fixup seems fine.
>
>> In addition to removing the two duplicated entries I also added a
>> simple, naive runtime test to walk through and make sure no type is
>> repeated. The VMStructs::init only called in debug_only so there's no
>> startup overhead in product, but it may be better to turn the test into
>> a unit test and only running it as part of ExecuteInternalVMTests.
>> Feedback appreciated!
>
> I have a few comments on this part:
>
> - Array indices should be int's not size_t (ie signed not unsigned)
> - I can't clearly see how the localHotSpotVMTypes array is declared or
> filled but I assume there is guaranteed to be a sentinel entry at the
> end so that we don't index past the end?
> - assert(0, ...) should be assert(false, ...) (as per style guide [1]
> ;-) )
>
> That all said I'm not sure this test belongs there, but I don't feel
> strongly either way.
>
> Cheers,
> David
>
> [1] https://wikis.oracle.com/display/HotSpotInternals/StyleGuide
>
>>
>> http://cr.openjdk.java.net/~mikael/8003879/webrev.00/
>>
>> Cheers,
>> Mikael
>>
More information about the serviceability-dev
mailing list