< prev index next >

src/share/vm/gc/g1/g1IHOPControl.hpp

Print this page
rev 9416 : dihop-changes
rev 9417 : imported patch sihop-thomas-review
rev 9418 : imported patch erik-jmasa-review
rev 9419 : [mq]: fix-evac-failure-needs-stats

*** 35,48 **** --- 35,57 ---- // The initial IHOP value relative to the target occupancy. double _initial_ihop_percent; // The target maximum occupancy of the heap. size_t _target_occupancy; + // Most recent complete mutator allocation period in seconds. + double _last_allocation_time_s; + // Amount of bytes allocated during _last_allocation_time_s. + size_t _last_allocated_bytes; + // Initialize an instance with the initial IHOP value in percent and the target // occupancy. The target occupancy is the number of bytes when marking should // be finished and reclaim started. G1IHOPControl(double initial_ihop_percent, size_t target_occupancy); + + // Most recent time from the end of the initial mark to the start of the first + // mixed gc. + virtual double last_marking_length_s() const = 0; public: virtual ~G1IHOPControl() { } // Get the current non-young occupancy at which concurrent marking should start. virtual size_t get_conc_mark_start_threshold() = 0;
*** 53,97 **** // allocation, e.g. any waste caused by TLAB allocation, space at the end of // humongous objects that can not be used for allocation, etc. // Together with the target occupancy, this additional buffer should contain the // difference between old gen size and total heap size at the start of reclamation, // and space required for that reclamation. ! virtual void update_allocation_info(double allocation_time_s, size_t allocated_bytes, size_t additional_buffer_size) = 0; // Update the time spent in the mutator beginning from the end of initial mark to // the first mixed gc. virtual void update_marking_length(double marking_length_s) = 0; ! virtual void print() = 0; }; // The returned concurrent mark starting occupancy threshold is a fixed value // relative to the maximum heap size. class G1StaticIHOPControl : public G1IHOPControl { - // Most recent complete mutator allocation period in seconds. - double _last_allocation_time_s; - // Amount of bytes allocated during _last_allocation_time_s. - size_t _last_allocated_bytes; // Most recent mutator time between the end of initial mark to the start of the // first mixed gc. double _last_marking_length_s; public: G1StaticIHOPControl(double ihop_percent, size_t target_occupancy); size_t get_conc_mark_start_threshold() { return (size_t) (_initial_ihop_percent * _target_occupancy / 100.0); } - virtual void update_allocation_info(double allocation_time_s, size_t allocated_bytes, size_t additional_buffer_size) { - assert(allocation_time_s >= 0.0, "Allocation time must be positive but is %.3f", allocation_time_s); - _last_allocation_time_s = allocation_time_s; - _last_allocated_bytes = allocated_bytes; - } - virtual void update_marking_length(double marking_length_s) { assert(marking_length_s > 0.0, "Marking length must be larger than zero but is %.3f", marking_length_s); _last_marking_length_s = marking_length_s; } - virtual void print(); #ifndef PRODUCT static void test(); #endif }; --- 62,97 ---- // allocation, e.g. any waste caused by TLAB allocation, space at the end of // humongous objects that can not be used for allocation, etc. // Together with the target occupancy, this additional buffer should contain the // difference between old gen size and total heap size at the start of reclamation, // and space required for that reclamation. ! virtual void update_allocation_info(double allocation_time_s, size_t allocated_bytes, size_t additional_buffer_size); // Update the time spent in the mutator beginning from the end of initial mark to // the first mixed gc. virtual void update_marking_length(double marking_length_s) = 0; ! virtual void print(); }; // The returned concurrent mark starting occupancy threshold is a fixed value // relative to the maximum heap size. class G1StaticIHOPControl : public G1IHOPControl { // Most recent mutator time between the end of initial mark to the start of the // first mixed gc. double _last_marking_length_s; + protected: + double last_marking_length_s() const { return _last_marking_length_s; } public: G1StaticIHOPControl(double ihop_percent, size_t target_occupancy); size_t get_conc_mark_start_threshold() { return (size_t) (_initial_ihop_percent * _target_occupancy / 100.0); } virtual void update_marking_length(double marking_length_s) { assert(marking_length_s > 0.0, "Marking length must be larger than zero but is %.3f", marking_length_s); _last_marking_length_s = marking_length_s; } #ifndef PRODUCT static void test(); #endif };
< prev index next >