< prev index next >

src/share/vm/gc/g1/concurrentG1Refine.hpp

Print this page
rev 8362 : [mq]: hotspot
   1 /*
   2  * Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *
  23  */
  24 
  25 #ifndef SHARE_VM_GC_IMPLEMENTATION_G1_CONCURRENTG1REFINE_HPP
  26 #define SHARE_VM_GC_IMPLEMENTATION_G1_CONCURRENTG1REFINE_HPP
  27 
  28 #include "gc_implementation/g1/g1HotCardCache.hpp"
  29 #include "memory/allocation.hpp"
  30 #include "runtime/thread.hpp"
  31 #include "utilities/globalDefinitions.hpp"
  32 
  33 // Forward decl
  34 class ConcurrentG1RefineThread;
  35 class G1CollectedHeap;
  36 class G1HotCardCache;
  37 class G1RegionToSpaceMapper;
  38 class G1RemSet;
  39 class DirtyCardQueue;
  40 
  41 class ConcurrentG1Refine: public CHeapObj<mtGC> {
  42   ConcurrentG1RefineThread** _threads;
  43   uint _n_threads;
  44   uint _n_worker_threads;
  45  /*
  46   * The value of the update buffer queue length falls into one of 3 zones:
  47   * green, yellow, red. If the value is in [0, green) nothing is
  48   * done, the buffers are left unprocessed to enable the caching effect of the


  92   static uint thread_num();
  93 
  94   void print_worker_threads_on(outputStream* st) const;
  95 
  96   void set_green_zone(int x)  { _green_zone = x;  }
  97   void set_yellow_zone(int x) { _yellow_zone = x; }
  98   void set_red_zone(int x)    { _red_zone = x;    }
  99 
 100   int green_zone() const      { return _green_zone;  }
 101   int yellow_zone() const     { return _yellow_zone; }
 102   int red_zone() const        { return _red_zone;    }
 103 
 104   uint total_thread_num() const  { return _n_threads;        }
 105   uint worker_thread_num() const { return _n_worker_threads; }
 106 
 107   int thread_threshold_step() const { return _thread_threshold_step; }
 108 
 109   G1HotCardCache* hot_card_cache() { return &_hot_card_cache; }
 110 };
 111 
 112 #endif // SHARE_VM_GC_IMPLEMENTATION_G1_CONCURRENTG1REFINE_HPP
   1 /*
   2  * Copyright (c) 2001, 2015, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *
  23  */
  24 
  25 #ifndef SHARE_VM_GC_G1_CONCURRENTG1REFINE_HPP
  26 #define SHARE_VM_GC_G1_CONCURRENTG1REFINE_HPP
  27 
  28 #include "gc/g1/g1HotCardCache.hpp"
  29 #include "memory/allocation.hpp"
  30 #include "runtime/thread.hpp"
  31 #include "utilities/globalDefinitions.hpp"
  32 
  33 // Forward decl
  34 class ConcurrentG1RefineThread;
  35 class G1CollectedHeap;
  36 class G1HotCardCache;
  37 class G1RegionToSpaceMapper;
  38 class G1RemSet;
  39 class DirtyCardQueue;
  40 
  41 class ConcurrentG1Refine: public CHeapObj<mtGC> {
  42   ConcurrentG1RefineThread** _threads;
  43   uint _n_threads;
  44   uint _n_worker_threads;
  45  /*
  46   * The value of the update buffer queue length falls into one of 3 zones:
  47   * green, yellow, red. If the value is in [0, green) nothing is
  48   * done, the buffers are left unprocessed to enable the caching effect of the


  92   static uint thread_num();
  93 
  94   void print_worker_threads_on(outputStream* st) const;
  95 
  96   void set_green_zone(int x)  { _green_zone = x;  }
  97   void set_yellow_zone(int x) { _yellow_zone = x; }
  98   void set_red_zone(int x)    { _red_zone = x;    }
  99 
 100   int green_zone() const      { return _green_zone;  }
 101   int yellow_zone() const     { return _yellow_zone; }
 102   int red_zone() const        { return _red_zone;    }
 103 
 104   uint total_thread_num() const  { return _n_threads;        }
 105   uint worker_thread_num() const { return _n_worker_threads; }
 106 
 107   int thread_threshold_step() const { return _thread_threshold_step; }
 108 
 109   G1HotCardCache* hot_card_cache() { return &_hot_card_cache; }
 110 };
 111 
 112 #endif // SHARE_VM_GC_G1_CONCURRENTG1REFINE_HPP
< prev index next >