8232232: G1RemSetSummary::_rs_threads_vtimes is not initialized to zero
Fix error in "Concurrent refinement threads times" in GC log and cleanup. Reviewed-by: tschatzl, kbarrett
This commit is contained in:
parent
db097ae201
commit
7e6ebde13c
src/hotspot/share/gc/g1
@ -487,7 +487,7 @@ G1RemSet::G1RemSet(G1CollectedHeap* g1h,
|
||||
G1CardTable* ct,
|
||||
G1HotCardCache* hot_card_cache) :
|
||||
_scan_state(new G1RemSetScanState()),
|
||||
_prev_period_summary(),
|
||||
_prev_period_summary(false),
|
||||
_g1h(g1h),
|
||||
_ct(ct),
|
||||
_g1p(_g1h->policy()),
|
||||
@ -1404,7 +1404,7 @@ void G1RemSet::print_periodic_summary_info(const char* header, uint period_count
|
||||
if ((G1SummarizeRSetStatsPeriod > 0) && log_is_enabled(Trace, gc, remset) &&
|
||||
(period_count % G1SummarizeRSetStatsPeriod == 0)) {
|
||||
|
||||
G1RemSetSummary current(this);
|
||||
G1RemSetSummary current;
|
||||
_prev_period_summary.subtract_from(¤t);
|
||||
|
||||
Log(gc, remset) log;
|
||||
@ -1421,7 +1421,7 @@ void G1RemSet::print_summary_info() {
|
||||
Log(gc, remset, exit) log;
|
||||
if (log.is_trace()) {
|
||||
log.trace(" Cumulative RS summary");
|
||||
G1RemSetSummary current(this);
|
||||
G1RemSetSummary current;
|
||||
ResourceMark rm;
|
||||
LogStream ls(log.trace());
|
||||
current.print_on(&ls);
|
||||
|
@ -81,8 +81,7 @@ double G1RemSetSummary::rs_thread_vtime(uint thread) const {
|
||||
return _rs_threads_vtimes[thread];
|
||||
}
|
||||
|
||||
G1RemSetSummary::G1RemSetSummary() :
|
||||
_rem_set(NULL),
|
||||
G1RemSetSummary::G1RemSetSummary(bool should_update) :
|
||||
_total_mutator_refined_cards(0),
|
||||
_total_concurrent_refined_cards(0),
|
||||
_num_coarsenings(0),
|
||||
@ -91,17 +90,10 @@ G1RemSetSummary::G1RemSetSummary() :
|
||||
_sampling_thread_vtime(0.0f) {
|
||||
|
||||
memset(_rs_threads_vtimes, 0, sizeof(double) * _num_vtimes);
|
||||
}
|
||||
|
||||
G1RemSetSummary::G1RemSetSummary(G1RemSet* rem_set) :
|
||||
_rem_set(rem_set),
|
||||
_total_mutator_refined_cards(0),
|
||||
_total_concurrent_refined_cards(0),
|
||||
_num_coarsenings(0),
|
||||
_num_vtimes(G1ConcurrentRefine::max_num_threads()),
|
||||
_rs_threads_vtimes(NEW_C_HEAP_ARRAY(double, _num_vtimes, mtGC)),
|
||||
_sampling_thread_vtime(0.0f) {
|
||||
update();
|
||||
if (should_update) {
|
||||
update();
|
||||
}
|
||||
}
|
||||
|
||||
G1RemSetSummary::~G1RemSetSummary() {
|
||||
|
@ -36,8 +36,6 @@ class G1RemSetSummary {
|
||||
private:
|
||||
friend class GetRSThreadVTimeClosure;
|
||||
|
||||
G1RemSet* _rem_set;
|
||||
|
||||
size_t _total_mutator_refined_cards;
|
||||
size_t _total_concurrent_refined_cards;
|
||||
|
||||
@ -57,8 +55,7 @@ private:
|
||||
void update();
|
||||
|
||||
public:
|
||||
G1RemSetSummary();
|
||||
G1RemSetSummary(G1RemSet* remset);
|
||||
G1RemSetSummary(bool should_update = true);
|
||||
|
||||
~G1RemSetSummary();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user