comparison src/share/vm/gc_implementation/shared/adaptiveSizePolicy.cpp @ 14909:4ca6dc0799b6

Backout jdk9 merge
author Gilles Duboscq <duboscq@ssw.jku.at>
date Tue, 01 Apr 2014 13:57:07 +0200
parents e5d78f318aec
children 52b4284cb496
comparison
equal deleted inserted replaced
14908:8db6e76cb658 14909:4ca6dc0799b6
119 MAX2((uintx) GCWorkersPerJavaThread * application_workers, 119 MAX2((uintx) GCWorkersPerJavaThread * application_workers,
120 min_workers); 120 min_workers);
121 121
122 // Choose a number of GC threads based on the current size 122 // Choose a number of GC threads based on the current size
123 // of the heap. This may be complicated because the size of 123 // of the heap. This may be complicated because the size of
124 // the heap depends on factors such as the throughput goal. 124 // the heap depends on factors such as the thoughput goal.
125 // Still a large heap should be collected by more GC threads. 125 // Still a large heap should be collected by more GC threads.
126 active_workers_by_heap_size = 126 active_workers_by_heap_size =
127 MAX2((size_t) 2U, Universe::heap()->capacity() / HeapSizePerGCThread); 127 MAX2((size_t) 2U, Universe::heap()->capacity() / HeapSizePerGCThread);
128 128
129 uintx max_active_workers = 129 uintx max_active_workers =
166 "Jiggled active workers too much"); 166 "Jiggled active workers too much");
167 } 167 }
168 168
169 if (TraceDynamicGCThreads) { 169 if (TraceDynamicGCThreads) {
170 gclog_or_tty->print_cr("GCTaskManager::calc_default_active_workers() : " 170 gclog_or_tty->print_cr("GCTaskManager::calc_default_active_workers() : "
171 "active_workers(): %d new_active_workers: %d " 171 "active_workers(): %d new_acitve_workers: %d "
172 "prev_active_workers: %d\n" 172 "prev_active_workers: %d\n"
173 " active_workers_by_JT: %d active_workers_by_heap_size: %d", 173 " active_workers_by_JT: %d active_workers_by_heap_size: %d",
174 active_workers, new_active_workers, prev_active_workers, 174 active_workers, new_active_workers, prev_active_workers,
175 active_workers_by_JT, active_workers_by_heap_size); 175 active_workers_by_JT, active_workers_by_heap_size);
176 } 176 }
443 // young gen or the average of the live in the young gen. 443 // young gen or the average of the live in the young gen.
444 // If the current value drops quickly, that should be taken 444 // If the current value drops quickly, that should be taken
445 // into account (i.e., don't trigger if the amount of free 445 // into account (i.e., don't trigger if the amount of free
446 // space has suddenly jumped up). If the current is much 446 // space has suddenly jumped up). If the current is much
447 // higher than the average, use the average since it represents 447 // higher than the average, use the average since it represents
448 // the longer term behavior. 448 // the longer term behavor.
449 const size_t live_in_eden = 449 const size_t live_in_eden =
450 MIN2(eden_live, (size_t) avg_eden_live()->average()); 450 MIN2(eden_live, (size_t) avg_eden_live()->average());
451 const size_t free_in_eden = max_eden_size > live_in_eden ? 451 const size_t free_in_eden = max_eden_size > live_in_eden ?
452 max_eden_size - live_in_eden : 0; 452 max_eden_size - live_in_eden : 0;
453 const size_t free_in_old_gen = (size_t)(max_old_gen_size - avg_old_live()->average()); 453 const size_t free_in_old_gen = (size_t)(max_old_gen_size - avg_old_live()->average());