< prev index next >

src/hotspot/share/gc/cms/allocationStats.hpp

Print this page




  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 #ifndef SHARE_VM_GC_CMS_ALLOCATIONSTATS_HPP
  26 #define SHARE_VM_GC_CMS_ALLOCATIONSTATS_HPP
  27 
  28 #include "gc/shared/gcUtil.hpp"
  29 #include "logging/log.hpp"
  30 #include "memory/allocation.hpp"
  31 #include "utilities/globalDefinitions.hpp"
  32 #include "utilities/macros.hpp"
  33 
  34 class AllocationStats VALUE_OBJ_CLASS_SPEC {
  35   // A duration threshold (in ms) used to filter
  36   // possibly unreliable samples.
  37   static float _threshold;
  38 
  39   // We measure the demand between the end of the previous sweep and
  40   // beginning of this sweep:
  41   //   Count(end_last_sweep) - Count(start_this_sweep)
  42   //     + split_births(between) - split_deaths(between)
  43   // The above number divided by the time since the end of the
  44   // previous sweep gives us a time rate of demand for blocks
  45   // of this size. We compute a padded average of this rate as
  46   // our current estimate for the time rate of demand for blocks
  47   // of this size. Similarly, we keep a padded average for the time
  48   // between sweeps. Our current estimate for demand for blocks of
  49   // this size is then simply computed as the product of these two
  50   // estimates.
  51   AdaptivePaddedAverage _demand_rate_estimate;
  52 
  53   ssize_t     _desired;          // Demand estimate computed as described above
  54   ssize_t     _coal_desired;     // desired +/- small-percent for tuning coalescing




  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 #ifndef SHARE_VM_GC_CMS_ALLOCATIONSTATS_HPP
  26 #define SHARE_VM_GC_CMS_ALLOCATIONSTATS_HPP
  27 
  28 #include "gc/shared/gcUtil.hpp"
  29 #include "logging/log.hpp"

  30 #include "utilities/globalDefinitions.hpp"
  31 #include "utilities/macros.hpp"
  32 
  33 class AllocationStats {
  34   // A duration threshold (in ms) used to filter
  35   // possibly unreliable samples.
  36   static float _threshold;
  37 
  38   // We measure the demand between the end of the previous sweep and
  39   // beginning of this sweep:
  40   //   Count(end_last_sweep) - Count(start_this_sweep)
  41   //     + split_births(between) - split_deaths(between)
  42   // The above number divided by the time since the end of the
  43   // previous sweep gives us a time rate of demand for blocks
  44   // of this size. We compute a padded average of this rate as
  45   // our current estimate for the time rate of demand for blocks
  46   // of this size. Similarly, we keep a padded average for the time
  47   // between sweeps. Our current estimate for demand for blocks of
  48   // this size is then simply computed as the product of these two
  49   // estimates.
  50   AdaptivePaddedAverage _demand_rate_estimate;
  51 
  52   ssize_t     _desired;          // Demand estimate computed as described above
  53   ssize_t     _coal_desired;     // desired +/- small-percent for tuning coalescing


< prev index next >