equal
deleted
inserted
replaced
311 // This operation is going to be performed only at the end of a safepoint |
311 // This operation is going to be performed only at the end of a safepoint |
312 // and hence GC's will not be going on, all Java mutators are suspended |
312 // and hence GC's will not be going on, all Java mutators are suspended |
313 // at this point and hence SystemDictionary_lock is also not needed. |
313 // at this point and hence SystemDictionary_lock is also not needed. |
314 assert(SafepointSynchronize::is_at_safepoint(), "can only be executed at a safepoint"); |
314 assert(SafepointSynchronize::is_at_safepoint(), "can only be executed at a safepoint"); |
315 int nclasses = InstanceKlass::number_of_instance_classes(); |
315 int nclasses = InstanceKlass::number_of_instance_classes(); |
316 double classes_per_tick = nclasses * (CounterDecayMinIntervalLength * 1e-3 / |
316 int classes_per_tick = nclasses * (CounterDecayMinIntervalLength * 1e-3 / |
317 CounterHalfLifeTime); |
317 CounterHalfLifeTime); |
318 for (int i = 0; i < classes_per_tick; i++) { |
318 for (int i = 0; i < classes_per_tick; i++) { |
319 InstanceKlass* k = ClassLoaderDataGraph::try_get_next_class(); |
319 InstanceKlass* k = ClassLoaderDataGraph::try_get_next_class(); |
320 if (k != NULL) { |
320 if (k != NULL) { |
321 k->methods_do(do_method); |
321 k->methods_do(do_method); |