Request for Review (s) - 8014862:Add fast Metasapce capacity and used per MetadataType

Stefan Karlsson stefan.karlsson at
Mon May 20 09:10:20 UTC 2013

On 05/20/2013 07:40 AM, Jon Masamitsu wrote:
> This fix calculates the running sums for allocated capacity and
> allocated used in MetaspaceAux to be  per MetaspaceType instead of
> the sum of both types.

I think this split looks mostly good. I have a few comments.

2497     err_msg("About to decrement below 0: words " SIZE_FORMAT
2498             " is greater than _allocated_capacity_words[%u] " 
2499             mdtype, words, allocated_capacity_words(mdtype)));

I think the order of mdtypes and words is wrong.

2511     err_msg("About to decrement below 0: words " SIZE_FORMAT
2512             " is greater than _allocated_used_words " SIZE_FORMAT,
2513             words, allocated_used_words(mdtype)));

This err_msg line doesn't say what mdtype is (like you do in the err_msg 

2630 // The calls to capacity_bytes_slow() and used_bytes_slow() cause
2631 // lock ordering assertion failures with some collectors.  Do
2632 // not include this code until the lock ordering is fixed.

This comment should be removed.

-  enum MetadataType {ClassType, NonClassType};
+  enum MetadataType {ClassType = 0,
+		     NonClassType = ClassType + 1,
+		     ClassTypeCount = ClassType + 2
+  };

Is there a reason why you had to explicitly enumerate the values here?

ClassTypeCount doesn't seem to be an appropriate name. Maybe use 
MetadataTypeCount instead?


More information about the hotspot-gc-dev mailing list