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

src/share/vm/memory/threadLocalAllocBuffer.cpp

Print this page
rev 2694 : imported patch headers_only


  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 "utilities/copy.hpp"
  32 #ifdef TARGET_OS_FAMILY_linux
  33 # include "thread_linux.inline.hpp"
  34 #endif
  35 #ifdef TARGET_OS_FAMILY_solaris
  36 # include "thread_solaris.inline.hpp"
  37 #endif
  38 #ifdef TARGET_OS_FAMILY_windows
  39 # include "thread_windows.inline.hpp"
  40 #endif



  41 
  42 // Thread-Local Edens support
  43 
  44 // static member initialization
  45 unsigned         ThreadLocalAllocBuffer::_target_refills = 0;
  46 GlobalTLABStats* ThreadLocalAllocBuffer::_global_stats   = NULL;
  47 
  48 void ThreadLocalAllocBuffer::clear_before_allocation() {
  49   _slow_refill_waste += (unsigned)remaining();
  50   make_parsable(true);   // also retire the TLAB
  51 }
  52 
  53 void ThreadLocalAllocBuffer::accumulate_statistics_before_gc() {
  54   global_stats()->initialize();
  55 
  56   for(JavaThread *thread = Threads::first(); thread; thread = thread->next()) {
  57     thread->tlab().accumulate_statistics();
  58     thread->tlab().initialize_statistics();
  59   }
  60 




  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 "utilities/copy.hpp"
  32 #ifdef TARGET_OS_FAMILY_linux
  33 # include "thread_linux.inline.hpp"
  34 #endif
  35 #ifdef TARGET_OS_FAMILY_solaris
  36 # include "thread_solaris.inline.hpp"
  37 #endif
  38 #ifdef TARGET_OS_FAMILY_windows
  39 # include "thread_windows.inline.hpp"
  40 #endif
  41 #ifdef TARGET_OS_FAMILY_bsd
  42 # include "thread_bsd.inline.hpp"
  43 #endif
  44 
  45 // Thread-Local Edens support
  46 
  47 // static member initialization
  48 unsigned         ThreadLocalAllocBuffer::_target_refills = 0;
  49 GlobalTLABStats* ThreadLocalAllocBuffer::_global_stats   = NULL;
  50 
  51 void ThreadLocalAllocBuffer::clear_before_allocation() {
  52   _slow_refill_waste += (unsigned)remaining();
  53   make_parsable(true);   // also retire the TLAB
  54 }
  55 
  56 void ThreadLocalAllocBuffer::accumulate_statistics_before_gc() {
  57   global_stats()->initialize();
  58 
  59   for(JavaThread *thread = Threads::first(); thread; thread = thread->next()) {
  60     thread->tlab().accumulate_statistics();
  61     thread->tlab().initialize_statistics();
  62   }
  63 


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