< prev index next >

src/hotspot/share/runtime/sweeper.hpp

Print this page




  71   static CompiledMethodIterator _current;         // Current compiled method
  72   static int       _seen;                         // Nof. nmethod we have currently processed in current pass of CodeCache
  73 
  74   static volatile int  _sweep_started;            // Flag to control conc sweeper
  75   static volatile bool _should_sweep;             // Indicates if we should invoke the sweeper
  76   static volatile bool _force_sweep;              // Indicates if we should force a sweep
  77   static volatile int _bytes_changed;             // Counts the total nmethod size if the nmethod changed from:
  78                                                   //   1) alive       -> not_entrant
  79                                                   //   2) not_entrant -> zombie
  80   // Stat counters
  81   static long      _total_nof_methods_reclaimed;    // Accumulated nof methods flushed
  82   static long      _total_nof_c2_methods_reclaimed; // Accumulated nof C2-compiled methods flushed
  83   static size_t    _total_flushed_size;             // Total size of flushed methods
  84   static int       _hotness_counter_reset_val;
  85 
  86   static Tickspan  _total_time_sweeping;          // Accumulated time sweeping
  87   static Tickspan  _total_time_this_sweep;        // Total time this sweep
  88   static Tickspan  _peak_sweep_time;              // Peak time for a full sweep
  89   static Tickspan  _peak_sweep_fraction_time;     // Peak time sweeping one fraction
  90 
  91   static Monitor*  _stat_lock;
  92 
  93   static MethodStateChange process_compiled_method(CompiledMethod *nm);
  94   static void              release_compiled_method(CompiledMethod* nm);
  95 
  96   static void init_sweeper_log() NOT_DEBUG_RETURN;
  97   static bool wait_for_stack_scanning();
  98   static void sweep_code_cache();
  99   static void handle_safepoint_request();
 100   static void do_stack_scanning();
 101   static void possibly_sweep();
 102  public:
 103   static long traversal_count()              { return _traversals; }
 104   static int  total_nof_methods_reclaimed()  { return _total_nof_methods_reclaimed; }
 105   static const Tickspan total_time_sweeping()      { return _total_time_sweeping; }
 106   static const Tickspan peak_sweep_time()          { return _peak_sweep_time; }
 107   static const Tickspan peak_sweep_fraction_time() { return _peak_sweep_fraction_time; }
 108   static void log_sweep(const char* msg, const char* format = NULL, ...) ATTRIBUTE_PRINTF(2, 3);
 109 
 110 
 111 #ifdef ASSERT
 112   // Keep track of sweeper activity in the ring buffer




  71   static CompiledMethodIterator _current;         // Current compiled method
  72   static int       _seen;                         // Nof. nmethod we have currently processed in current pass of CodeCache
  73 
  74   static volatile int  _sweep_started;            // Flag to control conc sweeper
  75   static volatile bool _should_sweep;             // Indicates if we should invoke the sweeper
  76   static volatile bool _force_sweep;              // Indicates if we should force a sweep
  77   static volatile int _bytes_changed;             // Counts the total nmethod size if the nmethod changed from:
  78                                                   //   1) alive       -> not_entrant
  79                                                   //   2) not_entrant -> zombie
  80   // Stat counters
  81   static long      _total_nof_methods_reclaimed;    // Accumulated nof methods flushed
  82   static long      _total_nof_c2_methods_reclaimed; // Accumulated nof C2-compiled methods flushed
  83   static size_t    _total_flushed_size;             // Total size of flushed methods
  84   static int       _hotness_counter_reset_val;
  85 
  86   static Tickspan  _total_time_sweeping;          // Accumulated time sweeping
  87   static Tickspan  _total_time_this_sweep;        // Total time this sweep
  88   static Tickspan  _peak_sweep_time;              // Peak time for a full sweep
  89   static Tickspan  _peak_sweep_fraction_time;     // Peak time sweeping one fraction
  90 


  91   static MethodStateChange process_compiled_method(CompiledMethod *nm);
  92   static void              release_compiled_method(CompiledMethod* nm);
  93 
  94   static void init_sweeper_log() NOT_DEBUG_RETURN;
  95   static bool wait_for_stack_scanning();
  96   static void sweep_code_cache();
  97   static void handle_safepoint_request();
  98   static void do_stack_scanning();
  99   static void possibly_sweep();
 100  public:
 101   static long traversal_count()              { return _traversals; }
 102   static int  total_nof_methods_reclaimed()  { return _total_nof_methods_reclaimed; }
 103   static const Tickspan total_time_sweeping()      { return _total_time_sweeping; }
 104   static const Tickspan peak_sweep_time()          { return _peak_sweep_time; }
 105   static const Tickspan peak_sweep_fraction_time() { return _peak_sweep_fraction_time; }
 106   static void log_sweep(const char* msg, const char* format = NULL, ...) ATTRIBUTE_PRINTF(2, 3);
 107 
 108 
 109 #ifdef ASSERT
 110   // Keep track of sweeper activity in the ring buffer


< prev index next >