src/share/vm/memory/threadLocalAllocBuffer.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File hotspot Sdiff src/share/vm/memory

src/share/vm/memory/threadLocalAllocBuffer.cpp

Print this page




  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 #include "precompiled.hpp"
  26 #include "memory/genCollectedHeap.hpp"
  27 #include "memory/resourceArea.hpp"
  28 #include "memory/threadLocalAllocBuffer.inline.hpp"
  29 #include "memory/universe.inline.hpp"
  30 #include "oops/oop.inline.hpp"
  31 #include "runtime/thread.inline.hpp"
  32 #include "utilities/copy.hpp"
  33 


  34 // Thread-Local Edens support
  35 
  36 // static member initialization
  37 size_t           ThreadLocalAllocBuffer::_max_size       = 0;
  38 unsigned         ThreadLocalAllocBuffer::_target_refills = 0;
  39 GlobalTLABStats* ThreadLocalAllocBuffer::_global_stats   = NULL;
  40 
  41 void ThreadLocalAllocBuffer::clear_before_allocation() {
  42   _slow_refill_waste += (unsigned)remaining();
  43   make_parsable(true);   // also retire the TLAB
  44 }
  45 
  46 void ThreadLocalAllocBuffer::accumulate_statistics_before_gc() {
  47   global_stats()->initialize();
  48 
  49   for (JavaThread *thread = Threads::first(); thread != NULL; thread = thread->next()) {
  50     thread->tlab().accumulate_statistics();
  51     thread->tlab().initialize_statistics();
  52   }
  53 




  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 #include "precompiled.hpp"
  26 #include "memory/genCollectedHeap.hpp"
  27 #include "memory/resourceArea.hpp"
  28 #include "memory/threadLocalAllocBuffer.inline.hpp"
  29 #include "memory/universe.inline.hpp"
  30 #include "oops/oop.inline.hpp"
  31 #include "runtime/thread.inline.hpp"
  32 #include "utilities/copy.hpp"
  33 
  34 PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC
  35 
  36 // Thread-Local Edens support
  37 
  38 // static member initialization
  39 size_t           ThreadLocalAllocBuffer::_max_size       = 0;
  40 unsigned         ThreadLocalAllocBuffer::_target_refills = 0;
  41 GlobalTLABStats* ThreadLocalAllocBuffer::_global_stats   = NULL;
  42 
  43 void ThreadLocalAllocBuffer::clear_before_allocation() {
  44   _slow_refill_waste += (unsigned)remaining();
  45   make_parsable(true);   // also retire the TLAB
  46 }
  47 
  48 void ThreadLocalAllocBuffer::accumulate_statistics_before_gc() {
  49   global_stats()->initialize();
  50 
  51   for (JavaThread *thread = Threads::first(); thread != NULL; thread = thread->next()) {
  52     thread->tlab().accumulate_statistics();
  53     thread->tlab().initialize_statistics();
  54   }
  55 


src/share/vm/memory/threadLocalAllocBuffer.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File