comparison src/share/vm/gc_implementation/concurrentMarkSweep/binaryTreeDictionary.hpp @ 1145:e018e6884bd8

6631166: CMS: better heuristics when combatting fragmentation Summary: Autonomic per-worker free block cache sizing, tunable coalition policies, fixes to per-size block statistics, retuned gain and bandwidth of some feedback loop filters to allow quicker reactivity to abrupt changes in ambient demand, and other heuristics to reduce fragmentation of the CMS old gen. Also tightened some assertions, including those related to locking. Reviewed-by: jmasa
author ysr
date Wed, 23 Dec 2009 09:23:54 -0800
parents d1605aabd0a1
children c18cbe5936b8
comparison
equal deleted inserted replaced
1111:44f61c24ddab 1145:e018e6884bd8
40 friend class TreeChunk; 40 friend class TreeChunk;
41 friend class BinaryTreeDictionary; 41 friend class BinaryTreeDictionary;
42 friend class AscendTreeCensusClosure; 42 friend class AscendTreeCensusClosure;
43 friend class DescendTreeCensusClosure; 43 friend class DescendTreeCensusClosure;
44 friend class DescendTreeSearchClosure; 44 friend class DescendTreeSearchClosure;
45 TreeList* _parent;
46 TreeList* _left;
47 TreeList* _right;
48 45
49 protected: 46 protected:
50 TreeList* parent() const { return _parent; } 47 TreeList* parent() const { return _parent; }
51 TreeList* left() const { return _left; } 48 TreeList* left() const { return _left; }
52 TreeList* right() const { return _right; } 49 TreeList* right() const { return _right; }
79 TreeChunk* head_as_TreeChunk(); 76 TreeChunk* head_as_TreeChunk();
80 77
81 // Returns the first available chunk in the free list as a pointer 78 // Returns the first available chunk in the free list as a pointer
82 // to a TreeChunk. 79 // to a TreeChunk.
83 TreeChunk* first_available(); 80 TreeChunk* first_available();
81
82 // Returns the block with the largest heap address amongst
83 // those in the list for this size; potentially slow and expensive,
84 // use with caution!
85 TreeChunk* largest_address();
84 86
85 // removeChunkReplaceIfNeeded() removes the given "tc" from the TreeList. 87 // removeChunkReplaceIfNeeded() removes the given "tc" from the TreeList.
86 // If "tc" is the first chunk in the list, it is also the 88 // If "tc" is the first chunk in the list, it is also the
87 // TreeList that is the node in the tree. removeChunkReplaceIfNeeded() 89 // TreeList that is the node in the tree. removeChunkReplaceIfNeeded()
88 // returns the possibly replaced TreeList* for the node in 90 // returns the possibly replaced TreeList* for the node in
252 // this size than desired) for size "size". 254 // this size than desired) for size "size".
253 bool coalDictOverPopulated(size_t size); 255 bool coalDictOverPopulated(size_t size);
254 // Methods called at the beginning of a sweep to prepare the 256 // Methods called at the beginning of a sweep to prepare the
255 // statistics for the sweep. 257 // statistics for the sweep.
256 void beginSweepDictCensus(double coalSurplusPercent, 258 void beginSweepDictCensus(double coalSurplusPercent,
257 float sweep_current, 259 float inter_sweep_current,
258 float sweep_estimate); 260 float inter_sweep_estimate,
261 float intra_sweep_estimate);
259 // Methods called after the end of a sweep to modify the 262 // Methods called after the end of a sweep to modify the
260 // statistics for the sweep. 263 // statistics for the sweep.
261 void endSweepDictCensus(double splitSurplusPercent); 264 void endSweepDictCensus(double splitSurplusPercent);
262 // Return the largest free chunk in the tree. 265 // Return the largest free chunk in the tree.
263 FreeChunk* findLargestDict() const; 266 FreeChunk* findLargestDict() const;
267 // Reset statistics for all the lists in the tree. 270 // Reset statistics for all the lists in the tree.
268 void clearTreeCensus(void); 271 void clearTreeCensus(void);
269 // Print the statistcis for all the lists in the tree. Also may 272 // Print the statistcis for all the lists in the tree. Also may
270 // print out summaries. 273 // print out summaries.
271 void printDictCensus(void) const; 274 void printDictCensus(void) const;
275 void print_free_lists(outputStream* st) const;
272 276
273 // For debugging. Returns the sum of the _returnedBytes for 277 // For debugging. Returns the sum of the _returnedBytes for
274 // all lists in the tree. 278 // all lists in the tree.
275 size_t sumDictReturnedBytes() PRODUCT_RETURN0; 279 size_t sumDictReturnedBytes() PRODUCT_RETURN0;
276 // Sets the _returnedBytes for all the lists in the tree to zero. 280 // Sets the _returnedBytes for all the lists in the tree to zero.