6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation.
8 *
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 *
23 */
24
25 #include "precompiled.hpp"
26 #include "gc_implementation/shared/adaptiveSizePolicy.hpp"
27 #include "gc_interface/gcCause.hpp"
28 #include "memory/collectorPolicy.hpp"
29 #include "runtime/timer.hpp"
30 #include "utilities/ostream.hpp"
31 #include "utilities/workgroup.hpp"
32 elapsedTimer AdaptiveSizePolicy::_minor_timer;
33 elapsedTimer AdaptiveSizePolicy::_major_timer;
34 bool AdaptiveSizePolicy::_debug_perturbation = false;
35
36 // The throughput goal is implemented as
37 // _throughput_goal = 1 - ( 1 / (1 + gc_cost_ratio))
38 // gc_cost_ratio is the ratio
39 // application cost / gc cost
40 // For example a gc_cost_ratio of 4 translates into a
41 // throughput goal of .80
42
43 AdaptiveSizePolicy::AdaptiveSizePolicy(size_t init_eden_size,
44 size_t init_promo_size,
45 size_t init_survivor_size,
46 double gc_pause_goal_sec,
47 uint gc_cost_ratio) :
48 _eden_size(init_eden_size),
49 _promo_size(init_promo_size),
50 _survivor_size(init_survivor_size),
51 _gc_pause_goal_sec(gc_pause_goal_sec),
|
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation.
8 *
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 *
23 */
24
25 #include "precompiled.hpp"
26 #include "gc/shared/adaptiveSizePolicy.hpp"
27 #include "gc/shared/collectorPolicy.hpp"
28 #include "gc/shared/gcCause.hpp"
29 #include "gc/shared/workgroup.hpp"
30 #include "runtime/timer.hpp"
31 #include "utilities/ostream.hpp"
32 elapsedTimer AdaptiveSizePolicy::_minor_timer;
33 elapsedTimer AdaptiveSizePolicy::_major_timer;
34 bool AdaptiveSizePolicy::_debug_perturbation = false;
35
36 // The throughput goal is implemented as
37 // _throughput_goal = 1 - ( 1 / (1 + gc_cost_ratio))
38 // gc_cost_ratio is the ratio
39 // application cost / gc cost
40 // For example a gc_cost_ratio of 4 translates into a
41 // throughput goal of .80
42
43 AdaptiveSizePolicy::AdaptiveSizePolicy(size_t init_eden_size,
44 size_t init_promo_size,
45 size_t init_survivor_size,
46 double gc_pause_goal_sec,
47 uint gc_cost_ratio) :
48 _eden_size(init_eden_size),
49 _promo_size(init_promo_size),
50 _survivor_size(init_survivor_size),
51 _gc_pause_goal_sec(gc_pause_goal_sec),
|