--- a/hotspot/src/share/vm/gc/g1/heapRegionRemSet.cpp Wed Nov 04 23:45:21 2015 -0800
+++ b/hotspot/src/share/vm/gc/g1/heapRegionRemSet.cpp Fri Nov 06 06:13:00 2015 +0100
@@ -462,16 +462,6 @@
"Must be in range.");
if (G1HRRSUseSparseTable &&
_sparse_table.add_card(from_hrm_ind, card_index)) {
- if (G1RecordHRRSOops) {
- HeapRegionRemSet::record(_hr, from);
- if (G1TraceHeapRegionRememberedSet) {
- gclog_or_tty->print(" Added card " PTR_FORMAT " to region "
- "[" PTR_FORMAT "...) for ref " PTR_FORMAT ".\n",
- align_size_down(uintptr_t(from),
- CardTableModRefBS::card_size),
- p2i(_hr->bottom()), p2i(from));
- }
- }
if (G1TraceHeapRegionRememberedSet) {
gclog_or_tty->print_cr(" added card to sparse table.");
}
@@ -531,17 +521,6 @@
assert(prt != NULL, "Inv");
prt->add_reference(from);
-
- if (G1RecordHRRSOops) {
- HeapRegionRemSet::record(_hr, from);
- if (G1TraceHeapRegionRememberedSet) {
- gclog_or_tty->print("Added card " PTR_FORMAT " to region "
- "[" PTR_FORMAT "...) for ref " PTR_FORMAT ".\n",
- align_size_down(uintptr_t(from),
- CardTableModRefBS::card_size),
- p2i(_hr->bottom()), p2i(from));
- }
- }
assert(contains_reference(from), "We just added it!");
}
@@ -1071,99 +1050,6 @@
return false;
}
-
-
-OopOrNarrowOopStar* HeapRegionRemSet::_recorded_oops = NULL;
-HeapWord** HeapRegionRemSet::_recorded_cards = NULL;
-HeapRegion** HeapRegionRemSet::_recorded_regions = NULL;
-int HeapRegionRemSet::_n_recorded = 0;
-
-HeapRegionRemSet::Event* HeapRegionRemSet::_recorded_events = NULL;
-int* HeapRegionRemSet::_recorded_event_index = NULL;
-int HeapRegionRemSet::_n_recorded_events = 0;
-
-void HeapRegionRemSet::record(HeapRegion* hr, OopOrNarrowOopStar f) {
- if (_recorded_oops == NULL) {
- assert(_n_recorded == 0
- && _recorded_cards == NULL
- && _recorded_regions == NULL,
- "Inv");
- _recorded_oops = NEW_C_HEAP_ARRAY(OopOrNarrowOopStar, MaxRecorded, mtGC);
- _recorded_cards = NEW_C_HEAP_ARRAY(HeapWord*, MaxRecorded, mtGC);
- _recorded_regions = NEW_C_HEAP_ARRAY(HeapRegion*, MaxRecorded, mtGC);
- }
- if (_n_recorded == MaxRecorded) {
- gclog_or_tty->print_cr("Filled up 'recorded' (%d).", MaxRecorded);
- } else {
- _recorded_cards[_n_recorded] =
- (HeapWord*)align_size_down(uintptr_t(f),
- CardTableModRefBS::card_size);
- _recorded_oops[_n_recorded] = f;
- _recorded_regions[_n_recorded] = hr;
- _n_recorded++;
- }
-}
-
-void HeapRegionRemSet::record_event(Event evnt) {
- if (!G1RecordHRRSEvents) return;
-
- if (_recorded_events == NULL) {
- assert(_n_recorded_events == 0
- && _recorded_event_index == NULL,
- "Inv");
- _recorded_events = NEW_C_HEAP_ARRAY(Event, MaxRecordedEvents, mtGC);
- _recorded_event_index = NEW_C_HEAP_ARRAY(int, MaxRecordedEvents, mtGC);
- }
- if (_n_recorded_events == MaxRecordedEvents) {
- gclog_or_tty->print_cr("Filled up 'recorded_events' (%d).", MaxRecordedEvents);
- } else {
- _recorded_events[_n_recorded_events] = evnt;
- _recorded_event_index[_n_recorded_events] = _n_recorded;
- _n_recorded_events++;
- }
-}
-
-void HeapRegionRemSet::print_event(outputStream* str, Event evnt) {
- switch (evnt) {
- case Event_EvacStart:
- str->print("Evac Start");
- break;
- case Event_EvacEnd:
- str->print("Evac End");
- break;
- case Event_RSUpdateEnd:
- str->print("RS Update End");
- break;
- }
-}
-
-void HeapRegionRemSet::print_recorded() {
- int cur_evnt = 0;
- Event cur_evnt_kind = Event_illegal;
- int cur_evnt_ind = 0;
- if (_n_recorded_events > 0) {
- cur_evnt_kind = _recorded_events[cur_evnt];
- cur_evnt_ind = _recorded_event_index[cur_evnt];
- }
-
- for (int i = 0; i < _n_recorded; i++) {
- while (cur_evnt < _n_recorded_events && i == cur_evnt_ind) {
- gclog_or_tty->print("Event: ");
- print_event(gclog_or_tty, cur_evnt_kind);
- gclog_or_tty->cr();
- cur_evnt++;
- if (cur_evnt < MaxRecordedEvents) {
- cur_evnt_kind = _recorded_events[cur_evnt];
- cur_evnt_ind = _recorded_event_index[cur_evnt];
- }
- }
- gclog_or_tty->print("Added card " PTR_FORMAT " to region [" PTR_FORMAT "...]"
- " for ref " PTR_FORMAT ".\n",
- p2i(_recorded_cards[i]), p2i(_recorded_regions[i]->bottom()),
- p2i(_recorded_oops[i]));
- }
-}
-
void HeapRegionRemSet::reset_for_cleanup_tasks() {
SparsePRT::reset_for_cleanup_tasks();
}