提交 d7727789 编写于 作者: J johnc

6921087: G1: remove per-GC-thread expansion tables from the fine-grain remembered sets

Summary: Remove the per-thread expansion tables (PosParPRT) and associated expansion and compaction from the fine grain RSet entries. This code has been unused for a while.
Reviewed-by: johnc, brutisso
Contributed-by: NThomas Schatzl <thomas.schatzl@jku.at>
上级 c5915c64
...@@ -4750,9 +4750,6 @@ public: ...@@ -4750,9 +4750,6 @@ public:
_g1h->g1_policy()->record_thread_age_table(pss.age_table()); _g1h->g1_policy()->record_thread_age_table(pss.age_table());
_g1h->update_surviving_young_words(pss.surviving_young_words()+1); _g1h->update_surviving_young_words(pss.surviving_young_words()+1);
// Clean up any par-expanded rem sets.
HeapRegionRemSet::par_cleanup();
if (ParallelGCVerbose) { if (ParallelGCVerbose) {
MutexLocker x(stats_lock()); MutexLocker x(stats_lock());
pss.print_termination_stats(worker_id); pss.print_termination_stats(worker_id);
......
...@@ -53,6 +53,9 @@ ...@@ -53,6 +53,9 @@
develop(bool, G1TraceMarkStackOverflow, false, \ develop(bool, G1TraceMarkStackOverflow, false, \
"If true, extra debugging code for CM restart for ovflw.") \ "If true, extra debugging code for CM restart for ovflw.") \
\ \
develop(bool, G1TraceHeapRegionRememberedSet, false, \
"Enables heap region remembered set debug logs") \
\
diagnostic(bool, G1SummarizeConcMark, false, \ diagnostic(bool, G1SummarizeConcMark, false, \
"Summarize concurrent mark info") \ "Summarize concurrent mark info") \
\ \
......
/* /*
* Copyright (c) 2001, 2011, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2001, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -35,7 +35,7 @@ class G1CollectedHeap; ...@@ -35,7 +35,7 @@ class G1CollectedHeap;
class G1BlockOffsetSharedArray; class G1BlockOffsetSharedArray;
class HeapRegion; class HeapRegion;
class HeapRegionRemSetIterator; class HeapRegionRemSetIterator;
class PosParPRT; class PerRegionTable;
class SparsePRT; class SparsePRT;
// Essentially a wrapper around SparsePRTCleanupTask. See // Essentially a wrapper around SparsePRTCleanupTask. See
...@@ -79,15 +79,14 @@ class OtherRegionsTable VALUE_OBJ_CLASS_SPEC { ...@@ -79,15 +79,14 @@ class OtherRegionsTable VALUE_OBJ_CLASS_SPEC {
size_t _n_coarse_entries; size_t _n_coarse_entries;
static jint _n_coarsenings; static jint _n_coarsenings;
PosParPRT** _fine_grain_regions; PerRegionTable** _fine_grain_regions;
size_t _n_fine_entries; size_t _n_fine_entries;
#define SAMPLE_FOR_EVICTION 1 // Used to sample a subset of the fine grain PRTs to determine which
#if SAMPLE_FOR_EVICTION // PRT to evict and coarsen.
size_t _fine_eviction_start; size_t _fine_eviction_start;
static size_t _fine_eviction_stride; static size_t _fine_eviction_stride;
static size_t _fine_eviction_sample_size; static size_t _fine_eviction_sample_size;
#endif
SparsePRT _sparse_table; SparsePRT _sparse_table;
...@@ -98,21 +97,18 @@ class OtherRegionsTable VALUE_OBJ_CLASS_SPEC { ...@@ -98,21 +97,18 @@ class OtherRegionsTable VALUE_OBJ_CLASS_SPEC {
// Requires "prt" to be the first element of the bucket list appropriate // Requires "prt" to be the first element of the bucket list appropriate
// for "hr". If this list contains an entry for "hr", return it, // for "hr". If this list contains an entry for "hr", return it,
// otherwise return "NULL". // otherwise return "NULL".
PosParPRT* find_region_table(size_t ind, HeapRegion* hr) const; PerRegionTable* find_region_table(size_t ind, HeapRegion* hr) const;
// Find, delete, and return a candidate PosParPRT, if any exists, // Find, delete, and return a candidate PerRegionTable, if any exists,
// adding the deleted region to the coarse bitmap. Requires the caller // adding the deleted region to the coarse bitmap. Requires the caller
// to hold _m, and the fine-grain table to be full. // to hold _m, and the fine-grain table to be full.
PosParPRT* delete_region_table(); PerRegionTable* delete_region_table();
// If a PRT for "hr" is in the bucket list indicated by "ind" (which must // If a PRT for "hr" is in the bucket list indicated by "ind" (which must
// be the correct index for "hr"), delete it and return true; else return // be the correct index for "hr"), delete it and return true; else return
// false. // false.
bool del_single_region_table(size_t ind, HeapRegion* hr); bool del_single_region_table(size_t ind, HeapRegion* hr);
static jint _cache_probes;
static jint _cache_hits;
// Indexed by thread X heap region, to minimize thread contention. // Indexed by thread X heap region, to minimize thread contention.
static int** _from_card_cache; static int** _from_card_cache;
static size_t _from_card_cache_max_regions; static size_t _from_card_cache_max_regions;
...@@ -127,10 +123,6 @@ public: ...@@ -127,10 +123,6 @@ public:
// sense. // sense.
void add_reference(OopOrNarrowOopStar from, int tid); void add_reference(OopOrNarrowOopStar from, int tid);
void add_reference(OopOrNarrowOopStar from) {
return add_reference(from, 0);
}
// Removes any entries shown by the given bitmaps to contain only dead // Removes any entries shown by the given bitmaps to contain only dead
// objects. // objects.
void scrub(CardTableModRefBS* ctbs, BitMap* region_bm, BitMap* card_bm); void scrub(CardTableModRefBS* ctbs, BitMap* region_bm, BitMap* card_bm);
...@@ -233,14 +225,12 @@ public: ...@@ -233,14 +225,12 @@ public:
static jint n_coarsenings() { return OtherRegionsTable::n_coarsenings(); } static jint n_coarsenings() { return OtherRegionsTable::n_coarsenings(); }
/* Used in the sequential case. Returns "true" iff this addition causes // Used in the sequential case.
the size limit to be reached. */
void add_reference(OopOrNarrowOopStar from) { void add_reference(OopOrNarrowOopStar from) {
_other_regions.add_reference(from); _other_regions.add_reference(from, 0);
} }
/* Used in the parallel case. Returns "true" iff this addition causes // Used in the parallel case.
the size limit to be reached. */
void add_reference(OopOrNarrowOopStar from, int tid) { void add_reference(OopOrNarrowOopStar from, int tid) {
_other_regions.add_reference(from, tid); _other_regions.add_reference(from, tid);
} }
...@@ -253,15 +243,6 @@ public: ...@@ -253,15 +243,6 @@ public:
// entries for this region in other remsets. // entries for this region in other remsets.
void clear(); void clear();
// Forget any entries due to pointers from "from_hr".
void clear_incoming_entry(HeapRegion* from_hr) {
_other_regions.clear_incoming_entry(from_hr);
}
#if 0
virtual void cleanup() = 0;
#endif
// Attempt to claim the region. Returns true iff this call caused an // Attempt to claim the region. Returns true iff this call caused an
// atomic transition from Unclaimed to Claimed. // atomic transition from Unclaimed to Claimed.
bool claim_iter(); bool claim_iter();
...@@ -290,12 +271,6 @@ public: ...@@ -290,12 +271,6 @@ public:
// Initialize the given iterator to iterate over this rem set. // Initialize the given iterator to iterate over this rem set.
void init_iterator(HeapRegionRemSetIterator* iter) const; void init_iterator(HeapRegionRemSetIterator* iter) const;
#if 0
// Apply the "do_card" method to the start address of every card in the
// rem set. Returns false if some application of the closure aborted.
virtual bool card_iterate(CardClosure* iter) = 0;
#endif
// The actual # of bytes this hr_remset takes up. // The actual # of bytes this hr_remset takes up.
size_t mem_size() { size_t mem_size() {
return _other_regions.mem_size() return _other_regions.mem_size()
...@@ -322,10 +297,7 @@ public: ...@@ -322,10 +297,7 @@ public:
void print() const; void print() const;
// Called during a stop-world phase to perform any deferred cleanups. // Called during a stop-world phase to perform any deferred cleanups.
// The second version may be called by parallel threads after then finish
// collection work.
static void cleanup(); static void cleanup();
static void par_cleanup();
// Declare the heap size (in # of regions) to the HeapRegionRemSet(s). // Declare the heap size (in # of regions) to the HeapRegionRemSet(s).
// (Uses it to initialize from_card_cache). // (Uses it to initialize from_card_cache).
...@@ -367,7 +339,7 @@ class HeapRegionRemSetIterator : public CHeapObj { ...@@ -367,7 +339,7 @@ class HeapRegionRemSetIterator : public CHeapObj {
// Local caching of HRRS fields. // Local caching of HRRS fields.
const BitMap* _coarse_map; const BitMap* _coarse_map;
PosParPRT** _fine_grain_regions; PerRegionTable** _fine_grain_regions;
G1BlockOffsetSharedArray* _bosa; G1BlockOffsetSharedArray* _bosa;
G1CollectedHeap* _g1h; G1CollectedHeap* _g1h;
...@@ -404,8 +376,9 @@ class HeapRegionRemSetIterator : public CHeapObj { ...@@ -404,8 +376,9 @@ class HeapRegionRemSetIterator : public CHeapObj {
// Index of bucket-list we're working on. // Index of bucket-list we're working on.
int _fine_array_index; int _fine_array_index;
// Per Region Table we're doing within current bucket list. // Per Region Table we're doing within current bucket list.
PosParPRT* _fine_cur_prt; PerRegionTable* _fine_cur_prt;
/* SparsePRT::*/ SparsePRTIter _sparse_iter; /* SparsePRT::*/ SparsePRTIter _sparse_iter;
...@@ -435,12 +408,4 @@ public: ...@@ -435,12 +408,4 @@ public:
} }
}; };
#if 0
class CardClosure: public Closure {
public:
virtual void do_card(HeapWord* card_start) = 0;
};
#endif
#endif // SHARE_VM_GC_IMPLEMENTATION_G1_HEAPREGIONREMSET_HPP #endif // SHARE_VM_GC_IMPLEMENTATION_G1_HEAPREGIONREMSET_HPP
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册