equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. |
7 * published by the Free Software Foundation. |
23 */ |
23 */ |
24 |
24 |
25 #ifndef SHARE_VM_GC_G1_G1YOUNGGENSIZER_HPP |
25 #ifndef SHARE_VM_GC_G1_G1YOUNGGENSIZER_HPP |
26 #define SHARE_VM_GC_G1_G1YOUNGGENSIZER_HPP |
26 #define SHARE_VM_GC_G1_G1YOUNGGENSIZER_HPP |
27 |
27 |
28 #include "memory/allocation.hpp" |
28 #include "utilities/globalDefinitions.hpp" |
29 |
29 |
30 // There are three command line options related to the young gen size: |
30 // There are three command line options related to the young gen size: |
31 // NewSize, MaxNewSize and NewRatio (There is also -Xmn, but that is |
31 // NewSize, MaxNewSize and NewRatio (There is also -Xmn, but that is |
32 // just a short form for NewSize==MaxNewSize). G1 will use its internal |
32 // just a short form for NewSize==MaxNewSize). G1 will use its internal |
33 // heuristics to calculate the actual young gen size, so these options |
33 // heuristics to calculate the actual young gen size, so these options |
61 // NewSize==MaxNewSize case above. But we will update the min and max |
61 // NewSize==MaxNewSize case above. But we will update the min and max |
62 // every time the heap size changes. |
62 // every time the heap size changes. |
63 // |
63 // |
64 // NewSize and MaxNewSize override NewRatio. So, NewRatio is ignored if it is |
64 // NewSize and MaxNewSize override NewRatio. So, NewRatio is ignored if it is |
65 // combined with either NewSize or MaxNewSize. (A warning message is printed.) |
65 // combined with either NewSize or MaxNewSize. (A warning message is printed.) |
66 class G1YoungGenSizer VALUE_OBJ_CLASS_SPEC { |
66 class G1YoungGenSizer { |
67 private: |
67 private: |
68 enum SizerKind { |
68 enum SizerKind { |
69 SizerDefaults, |
69 SizerDefaults, |
70 SizerNewSizeOnly, |
70 SizerNewSizeOnly, |
71 SizerMaxNewSizeOnly, |
71 SizerMaxNewSizeOnly, |