diff src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.hpp @ 14909:4ca6dc0799b6

Backout jdk9 merge
author Gilles Duboscq <duboscq@ssw.jku.at>
date Tue, 01 Apr 2014 13:57:07 +0200
parents 63a4eb8bcd23
children 89152779163c
line wrap: on
line diff
--- a/src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.hpp	Tue Apr 01 14:09:03 2014 +0200
+++ b/src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.hpp	Tue Apr 01 13:57:07 2014 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2013, 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.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -58,7 +58,7 @@
   HeapWord* _ptr;
   size_t    _word_size;
   size_t    _refillSize;
-  size_t    _allocation_size_limit;  // Largest size that will be allocated
+  size_t    _allocation_size_limit;  // largest size that will be allocated
 
   void print_on(outputStream* st) const;
 };
@@ -116,14 +116,14 @@
 
   PromotionInfo _promoInfo;
 
-  // Helps to impose a global total order on freelistLock ranks;
+  // helps to impose a global total order on freelistLock ranks;
   // assumes that CFLSpace's are allocated in global total order
   static int   _lockRank;
 
-  // A lock protecting the free lists and free blocks;
+  // a lock protecting the free lists and free blocks;
   // mutable because of ubiquity of locking even for otherwise const methods
   mutable Mutex _freelistLock;
-  // Locking verifier convenience function
+  // locking verifier convenience function
   void assert_locked() const PRODUCT_RETURN;
   void assert_locked(const Mutex* lock) const PRODUCT_RETURN;
 
@@ -131,13 +131,12 @@
   LinearAllocBlock _smallLinearAllocBlock;
 
   FreeBlockDictionary<FreeChunk>::DictionaryChoice _dictionaryChoice;
-  AFLBinaryTreeDictionary* _dictionary;    // Pointer to dictionary for large size blocks
+  AFLBinaryTreeDictionary* _dictionary;    // ptr to dictionary for large size blocks
 
-  // Indexed array for small size blocks
   AdaptiveFreeList<FreeChunk> _indexedFreeList[IndexSetSize];
-
-  // Allocation strategy
-  bool       _fitStrategy;        // Use best fit strategy
+                                       // indexed array for small size blocks
+  // allocation stategy
+  bool       _fitStrategy;      // Use best fit strategy.
   bool       _adaptive_freelists; // Use adaptive freelists
 
   // This is an address close to the largest free chunk in the heap.
@@ -158,7 +157,7 @@
 
   // Extra stuff to manage promotion parallelism.
 
-  // A lock protecting the dictionary during par promotion allocation.
+  // a lock protecting the dictionary during par promotion allocation.
   mutable Mutex _parDictionaryAllocLock;
   Mutex* parDictionaryAllocLock() const { return &_parDictionaryAllocLock; }
 
@@ -276,26 +275,26 @@
   }
 
  protected:
-  // Reset the indexed free list to its initial empty condition.
+  // reset the indexed free list to its initial empty condition.
   void resetIndexedFreeListArray();
-  // Reset to an initial state with a single free block described
+  // reset to an initial state with a single free block described
   // by the MemRegion parameter.
   void reset(MemRegion mr);
   // Return the total number of words in the indexed free lists.
   size_t     totalSizeInIndexedFreeLists() const;
 
  public:
-  // Constructor
+  // Constructor...
   CompactibleFreeListSpace(BlockOffsetSharedArray* bs, MemRegion mr,
                            bool use_adaptive_freelists,
                            FreeBlockDictionary<FreeChunk>::DictionaryChoice);
-  // Accessors
+  // accessors
   bool bestFitFirst() { return _fitStrategy == FreeBlockBestFitFirst; }
   FreeBlockDictionary<FreeChunk>* dictionary() const { return _dictionary; }
   HeapWord* nearLargestChunk() const { return _nearLargestChunk; }
   void set_nearLargestChunk(HeapWord* v) { _nearLargestChunk = v; }
 
-  // Set CMS global values.
+  // Set CMS global values
   static void set_cms_values();
 
   // Return the free chunk at the end of the space.  If no such
@@ -306,7 +305,7 @@
 
   void set_collector(CMSCollector* collector) { _collector = collector; }
 
-  // Support for parallelization of rescan and marking.
+  // Support for parallelization of rescan and marking
   const size_t rescan_task_size()  const { return _rescan_task_size;  }
   const size_t marking_task_size() const { return _marking_task_size; }
   SequentialSubTasksDone* conc_par_seq_tasks() {return &_conc_par_seq_tasks; }
@@ -347,7 +346,7 @@
   // Resizing support
   void set_end(HeapWord* value);  // override
 
-  // Mutual exclusion support
+  // mutual exclusion support
   Mutex* freelistLock() const { return &_freelistLock; }
 
   // Iteration support
@@ -371,7 +370,7 @@
   // If the iteration encounters an unparseable portion of the region,
   // terminate the iteration and return the address of the start of the
   // subregion that isn't done.  Return of "NULL" indicates that the
-  // iteration completed.
+  // interation completed.
   virtual HeapWord*
        object_iterate_careful_m(MemRegion mr,
                                 ObjectClosureCareful* cl);
@@ -394,11 +393,11 @@
   size_t block_size_nopar(const HeapWord* p) const;
   bool block_is_obj_nopar(const HeapWord* p) const;
 
-  // Iteration support for promotion
+  // iteration support for promotion
   void save_marks();
   bool no_allocs_since_save_marks();
 
-  // Iteration support for sweeping
+  // iteration support for sweeping
   void save_sweep_limit() {
     _sweep_limit = BlockOffsetArrayUseUnallocatedBlock ?
                    unallocated_block() : end();
@@ -458,7 +457,7 @@
 
   FreeChunk* allocateScratch(size_t size);
 
-  // Returns true if either the small or large linear allocation buffer is empty.
+  // returns true if either the small or large linear allocation buffer is empty.
   bool       linearAllocationWouldFail() const;
 
   // Adjust the chunk for the minimum size.  This version is called in
@@ -478,18 +477,18 @@
   void      addChunkAndRepairOffsetTable(HeapWord* chunk, size_t size,
               bool coalesced);
 
-  // Support for decisions regarding concurrent collection policy.
+  // Support for decisions regarding concurrent collection policy
   bool should_concurrent_collect() const;
 
-  // Support for compaction.
+  // Support for compaction
   void prepare_for_compaction(CompactPoint* cp);
   void adjust_pointers();
   void compact();
-  // Reset the space to reflect the fact that a compaction of the
+  // reset the space to reflect the fact that a compaction of the
   // space has been done.
   virtual void reset_after_compaction();
 
-  // Debugging support.
+  // Debugging support
   void print()                            const;
   void print_on(outputStream* st)         const;
   void prepare_for_verify();
@@ -501,7 +500,7 @@
   // i.e. either the binary tree dictionary, the indexed free lists
   // or the linear allocation block.
   bool verify_chunk_in_free_list(FreeChunk* fc) const;
-  // Verify that the given chunk is the linear allocation block.
+  // Verify that the given chunk is the linear allocation block
   bool verify_chunk_is_linear_alloc_block(FreeChunk* fc) const;
   // Do some basic checks on the the free lists.
   void check_free_list_consistency()      const PRODUCT_RETURN;
@@ -517,7 +516,7 @@
     size_t sumIndexedFreeListArrayReturnedBytes();
     // Return the total number of chunks in the indexed free lists.
     size_t totalCountInIndexedFreeLists() const;
-    // Return the total number of chunks in the space.
+    // Return the total numberof chunks in the space.
     size_t totalCount();
   )