RFR(S) 8196923: [REDO] NMT: Report array class count in NMT summary

Zhengyu Gu zgu at redhat.com
Thu Feb 8 18:26:02 UTC 2018


Thanks, Coleen.

I attached the patch for pushing.

-Zhengyu

On 02/08/2018 01:11 PM, coleen.phillimore at oracle.com wrote:
> 
> Hi Zhengyu, This change looks good. It's passed tier1 testing here and 
> almost done with tier2.  I'll be happy to sponsor this for you.
> thanks,
> Coleen
> 
> On 2/8/18 10:43 AM, Zhengyu Gu wrote:
>> This patch fixed compilation errors on Windows in early patch 
>> (JDK-8193184), due following size_t => int conversions.
>>
>> classLoaderData.cpp.patch
>>
>>    InstanceKlass* try_get_next_class() {
>>      assert(SafepointSynchronize::is_at_safepoint(), "only called at 
>> safepoint");
>> -    int max_classes = InstanceKlass::number_of_instance_classes();
>> +    size_t max_classes = ClassLoaderDataGraph::num_instance_classes();
>>      assert(max_classes > 0, "should not be called with no instance 
>> classes");
>> -    for (int i = 0; i < max_classes; ) {
>> +    for (size_t i = 0; i < max_classes; ) {
>>
>>
>> compilationPolicy.cpp.patch
>>
>>    assert(SafepointSynchronize::is_at_safepoint(), "can only be 
>> executed at a safepoint");
>> -  int nclasses = InstanceKlass::number_of_instance_classes();
>> -  int classes_per_tick = nclasses * (CounterDecayMinIntervalLength * 
>> 1e-3 /
>> +  size_t nclasses = ClassLoaderDataGraph::num_instance_classes();
>> +  size_t classes_per_tick = nclasses * (CounterDecayMinIntervalLength 
>> * 1e-3 /
>>                                          CounterHalfLifeTime);
>> -  for (int i = 0; i < classes_per_tick; i++) {
>> +  for (size_t i = 0; i < classes_per_tick; i++) {
>>      InstanceKlass* k = ClassLoaderDataGraph::try_get_next_class();
>>      if (k != NULL) {
>>        k->methods_do(do_method);
>>
>> Bug: https://bugs.openjdk.java.net/browse/JDK-8196923
>>
>> Webrev: http://cr.openjdk.java.net/~zgu/8196923/webrev.00/
>>
>> Test:
>>
>>   hotspot_runtime on Linux 64 (fastdebug and release)
>>
>> Thanks,
>>
>> -Zhengyu
>>
>>
>>
> 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 8196923.patch
Type: text/x-patch
Size: 20090 bytes
Desc: not available
URL: <http://mail.openjdk.java.net/pipermail/hotspot-runtime-dev/attachments/20180208/d849eaac/8196923-0001.patch>


More information about the hotspot-runtime-dev mailing list