< prev index next >

src/hotspot/share/runtime/sweeper.cpp

Print this page

        

@@ -162,12 +162,10 @@
 Tickspan NMethodSweeper::_total_time_sweeping;                 // Accumulated time sweeping
 Tickspan NMethodSweeper::_total_time_this_sweep;               // Total time this sweep
 Tickspan NMethodSweeper::_peak_sweep_time;                     // Peak time for a full sweep
 Tickspan NMethodSweeper::_peak_sweep_fraction_time;            // Peak time sweeping one fraction
 
-Monitor* NMethodSweeper::_stat_lock = new Monitor(Mutex::special, "Sweeper::Statistics", true, Monitor::_safepoint_check_sometimes);
-
 class MarkActivationClosure: public CodeBlobClosure {
 public:
   virtual void do_code_blob(CodeBlob* cb) {
     assert(cb->is_nmethod(), "CodeBlob should be nmethod");
     nmethod* nm = (nmethod*)cb;

@@ -576,11 +574,11 @@
   assert(_current.end(), "must have scanned the whole cache");
 
   const Ticks sweep_end_counter = Ticks::now();
   const Tickspan sweep_time = sweep_end_counter - sweep_start_counter;
   {
-    MutexLockerEx mu(_stat_lock, Mutex::_no_safepoint_check_flag);
+    MutexLockerEx mu(NMethodSweeper_stat_lock, Mutex::_no_safepoint_check_flag);
     _total_time_sweeping  += sweep_time;
     _total_time_this_sweep += sweep_time;
     _peak_sweep_fraction_time = MAX2(sweep_time, _peak_sweep_fraction_time);
     _total_flushed_size += freed_memory;
     _total_nof_methods_reclaimed += flushed_count;
< prev index next >