< prev index next >

src/hotspot/share/gc/shenandoah/heuristics/shenandoahAdaptiveHeuristics.hpp

Print this page
@@ -1,7 +1,8 @@
  /*
   * Copyright (c) 2018, 2019, Red Hat, Inc. All rights reserved.
+  * Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.
   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   *
   * This code is free software; you can redistribute it and/or modify it
   * under the terms of the GNU General Public License version 2 only, as
   * published by the Free Software Foundation.

@@ -23,13 +24,16 @@
   */
  
  #ifndef SHARE_GC_SHENANDOAH_HEURISTICS_SHENANDOAHADAPTIVEHEURISTICS_HPP
  #define SHARE_GC_SHENANDOAH_HEURISTICS_SHENANDOAHADAPTIVEHEURISTICS_HPP
  
+ #include "runtime/globals_extension.hpp"
+ #include "memory/allocation.hpp"
  #include "gc/shenandoah/heuristics/shenandoahHeuristics.hpp"
  #include "gc/shenandoah/heuristics/shenandoahSpaceInfo.hpp"
  #include "gc/shenandoah/shenandoahPhaseTimings.hpp"
+ #include "gc/shenandoah/shenandoahSharedVariables.hpp"
  #include "utilities/numberSeq.hpp"
  
  class ShenandoahAllocationRate : public CHeapObj<mtGC> {
   public:
    explicit ShenandoahAllocationRate();

@@ -37,11 +41,10 @@
  
    double sample(size_t allocated);
  
    double upper_bound(double sds) const;
    bool is_spiking(double rate, double threshold) const;
- 
   private:
  
    double instantaneous_rate(double time, size_t allocated) const;
  
    double _last_sample_time;

@@ -71,11 +74,11 @@
    virtual void choose_collection_set_from_regiondata(ShenandoahCollectionSet* cset,
                                                       RegionData* data, size_t size,
                                                       size_t actual_free);
  
    void record_cycle_start();
-   void record_success_concurrent();
+   void record_success_concurrent(bool abbreviated);
    void record_success_degenerated();
    void record_success_full();
  
    virtual bool should_start_gc();
  

@@ -136,8 +139,10 @@
  
    // Keep track of the available memory at the end of a GC cycle. This
    // establishes what is 'normal' for the application and is used as a
    // source of feedback to adjust trigger parameters.
    TruncatedSeq _available;
+ 
+   size_t min_free_threshold();
  };
  
  #endif // SHARE_GC_SHENANDOAH_HEURISTICS_SHENANDOAHADAPTIVEHEURISTICS_HPP
< prev index next >