src/share/vm/gc_implementation/shared/allocationStats.hpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File hotspot Sdiff src/share/vm/gc_implementation/shared

src/share/vm/gc_implementation/shared/allocationStats.hpp

Print this page




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




   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 #ifndef SHARE_VM_GC_IMPLEMENTATION_SHARED_ALLOCATIONSTATS_HPP
  26 #define SHARE_VM_GC_IMPLEMENTATION_SHARED_ALLOCATIONSTATS_HPP
  27 
  28 #include "utilities/macros.hpp"


  29 #include "memory/allocation.hpp"
  30 #include "utilities/globalDefinitions.hpp"
  31 #include "gc_implementation/shared/gcUtil.hpp"
  32 
  33 class AllocationStats VALUE_OBJ_CLASS_SPEC {
  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 


src/share/vm/gc_implementation/shared/allocationStats.hpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File