RFR: 8038934: Remove prefix allocated_ from methods and variables in Metaspace
Coleen Phillimore
coleen.phillimore at oracle.com
Wed Apr 2 14:24:56 UTC 2014
BTW, this looks fine.
Coleen
On 4/1/14 12:32 PM, Coleen Phillimore wrote:
>
> What happened to renaming MetaspaceAux?
> Coleen
>
> On 04/01/2014 11:02 AM, Erik Helin wrote:
>> Hi all,
>>
>> this patch removes the prefix "allocated_" from some members in the
>> class MetaspaceAux.
>>
>> From the beginning, there were only functions named used_in_bytes()
>> and capacity_in_bytes(). These functions iterated over the
>> ClassLoaderDataGraph to reach all metaspaces and then iterated over
>> the chunk list, which made them quite slow.
>>
>> Later, the functions allocated_used_bytes() and
>> allocated_capacity_bytes() were added that used accounting to be able
>> to return a value faster and without using a lock. When these
>> functions were added, the functions used_bytes() and capacity_bytes()
>> were renamed to used_bytes_slow() and capacity_bytes_slow() to
>> clarify the difference (the slow functions were later made private).
>>
>> Since the old, slow functions end in "_slow", we can drop the prefix
>> "allocated_" from the accounting functions.
>>
>> Webrev:
>> http://cr.openjdk.java.net/~ehelin/8038934/webrev.00/
>>
>> Thanks,
>> Erik
>
More information about the hotspot-dev
mailing list