RFR (XS): 8007257: metaspace.cpp: Incorrect arguments in calls to err_msg

Vitaly Davidovich vitalyd at gmail.com
Wed Jan 30 19:18:25 PST 2013


Hi Mikael,

Shouldn't this assert:

assert(chunk_word_size != 0 && class_chunk_word_size != 0,
1741     err_msg("Initial chunks sizes bad: data  " SIZE_FORMAT
1742             " class " SIZE_FORMAT,
1743             *chunk_word_size, *class_chunk_word_size));

be (deref the values in the pointers):

assert(*chunk_word_size != 0 && *class_chunk_word_size != 0,
1741     err_msg("Initial chunks sizes bad: data  " SIZE_FORMAT
1742             " class " SIZE_FORMAT,
1743             *chunk_word_size, *class_chunk_word_size));

Otherwise it's testing something other than what I think it's trying to
test.

Thanks

Sent from my phone
On Jan 30, 2013 7:53 PM, "Mikael Vidstedt" <mikael.vidstedt at oracle.com>
wrote:

>
> Please review the following webrev:
>
> http://cr.openjdk.java.net/~**mikael/8007257/webrev.00/<http://cr.openjdk.java.net/~mikael/8007257/webrev.00/>
>
>
> The key part of the fix is the change in SpaceManager::get_initial_**chunk_sizes(),
> where the intention is to print out the actual sizes, but accidentally the
> arguments to err_msg are pointers to the values.
>
> I also found three other mismatching format/arguments which I fixed while
> at it:
>
> HumongousChunkGranularity is an enum, which is an int, and therefore
> should be printed using %d. The others fixes are for size_t and uintx
> variables and should be printed using those respective formats.
>
> Cheers,
> Mikael
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/hotspot-runtime-dev/attachments/20130130/d5de069e/attachment.html 


More information about the hotspot-runtime-dev mailing list