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

coleen.phillimore at oracle.com coleen.phillimore at oracle.com
Thu Feb 8 18:11:32 UTC 2018


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
>
>
>



More information about the hotspot-runtime-dev mailing list