1.1 --- a/src/share/vm/gc_implementation/concurrentMarkSweep/freeList.hpp Tue Feb 26 15:57:49 2008 -0800 1.2 +++ b/src/share/vm/gc_implementation/concurrentMarkSweep/freeList.hpp Fri Feb 29 14:42:56 2008 -0800 1.3 @@ -38,6 +38,7 @@ 1.4 1.5 class FreeList VALUE_OBJ_CLASS_SPEC { 1.6 friend class CompactibleFreeListSpace; 1.7 + friend class printTreeCensusClosure; 1.8 FreeChunk* _head; // List of free chunks 1.9 FreeChunk* _tail; // Tail of list of free chunks 1.10 size_t _size; // Size in Heap words of each chunks 1.11 @@ -63,10 +64,11 @@ 1.12 protected: 1.13 void init_statistics(); 1.14 void set_count(ssize_t v) { _count = v;} 1.15 - void increment_count() { _count++; } 1.16 + void increment_count() { _count++; } 1.17 void decrement_count() { 1.18 _count--; 1.19 - assert(_count >= 0, "Count should not be negative"); } 1.20 + assert(_count >= 0, "Count should not be negative"); 1.21 + } 1.22 1.23 public: 1.24 // Constructor 1.25 @@ -159,6 +161,10 @@ 1.26 ssize_t desired() const { 1.27 return _allocation_stats.desired(); 1.28 } 1.29 + void set_desired(ssize_t v) { 1.30 + assert_proper_lock_protection(); 1.31 + _allocation_stats.set_desired(v); 1.32 + } 1.33 void compute_desired(float inter_sweep_current, 1.34 float inter_sweep_estimate) { 1.35 assert_proper_lock_protection(); 1.36 @@ -298,4 +304,8 @@ 1.37 // Verify that the chunk is in the list. 1.38 // found. Return NULL if "fc" is not found. 1.39 bool verifyChunkInFreeLists(FreeChunk* fc) const; 1.40 + 1.41 + // Printing support 1.42 + static void print_labels_on(outputStream* st, const char* c); 1.43 + void print_on(outputStream* st, const char* c = NULL) const; 1.44 };