src/share/vm/runtime/sweeper.hpp
Index
Unified diffs
Context diffs
Sdiffs
Patch
New
Old
Previous File
Next File
hotspot Cdiff src/share/vm/runtime/sweeper.hpp
src/share/vm/runtime/sweeper.hpp
Print this page
*** 47,59 ****
// we have to wait until the next marking phase has completed. If a not-entrant
// nmethod was NOT marked as active, it can be converted to 'zombie' state. To safely
// remove the nmethod, all inline caches (IC) that point to the the nmethod must be
// cleared. After that, the nmethod can be evicted from the code cache. Each nmethod's
// state change happens during separate sweeps. It may take at least 3 sweeps before an
! // nmethod's space is freed. Sweeping is currently done by compiler threads between
! // compilations or at least each 5 sec (NmethodSweepCheckInterval) when the code cache
! // is full.
class NMethodSweeper : public AllStatic {
static long _traversals; // Stack scan count, also sweep ID.
static long _total_nof_code_cache_sweeps; // Total number of full sweeps of the code cache
static long _time_counter; // Virtual time used to periodically invoke sweeper
--- 47,57 ----
// we have to wait until the next marking phase has completed. If a not-entrant
// nmethod was NOT marked as active, it can be converted to 'zombie' state. To safely
// remove the nmethod, all inline caches (IC) that point to the the nmethod must be
// cleared. After that, the nmethod can be evicted from the code cache. Each nmethod's
// state change happens during separate sweeps. It may take at least 3 sweeps before an
! // nmethod's space is freed.
class NMethodSweeper : public AllStatic {
static long _traversals; // Stack scan count, also sweep ID.
static long _total_nof_code_cache_sweeps; // Total number of full sweeps of the code cache
static long _time_counter; // Virtual time used to periodically invoke sweeper
*** 62,72 ****
static int _seen; // Nof. nmethod we have currently processed in current pass of CodeCache
static int _flushed_count; // Nof. nmethods flushed in current sweep
static int _zombified_count; // Nof. nmethods made zombie in current sweep
static int _marked_for_reclamation_count; // Nof. nmethods marked for reclaim in current sweep
- static volatile int _sweep_fractions_left; // Nof. invocations left until we are completed with this pass
static volatile int _sweep_started; // Flag to control conc sweeper
static volatile bool _should_sweep; // Indicates if we should invoke the sweeper
static volatile int _bytes_changed; // Counts the total nmethod size if the nmethod changed from:
// 1) alive -> not_entrant
// 2) not_entrant -> zombie
--- 60,69 ----
*** 83,94 ****
static Tickspan _peak_sweep_fraction_time; // Peak time sweeping one fraction
static int process_nmethod(nmethod *nm);
static void release_nmethod(nmethod* nm);
! static bool sweep_in_progress();
static void sweep_code_cache();
public:
static long traversal_count() { return _traversals; }
static int total_nof_methods_reclaimed() { return _total_nof_methods_reclaimed; }
static const Tickspan total_time_sweeping() { return _total_time_sweeping; }
--- 80,95 ----
static Tickspan _peak_sweep_fraction_time; // Peak time sweeping one fraction
static int process_nmethod(nmethod *nm);
static void release_nmethod(nmethod* nm);
! static void init_sweeper_log() NOT_DEBUG_RETURN;
! static bool wait_for_stack_scanning();
static void sweep_code_cache();
+ static void handle_safepoint_request();
+ static void do_stack_scanning();
+ static void possibly_sweep();
public:
static long traversal_count() { return _traversals; }
static int total_nof_methods_reclaimed() { return _total_nof_methods_reclaimed; }
static const Tickspan total_time_sweeping() { return _total_time_sweeping; }
*** 104,114 ****
static void report_events(int id, address entry);
static void report_events();
#endif
static void mark_active_nmethods(); // Invoked at the end of each safepoint
! static void possibly_sweep(); // Compiler threads call this to sweep
static int hotness_counter_reset_val();
static void report_state_change(nmethod* nm);
static void possibly_enable_sweeper();
static void possibly_flush(nmethod* nm);
--- 105,116 ----
static void report_events(int id, address entry);
static void report_events();
#endif
static void mark_active_nmethods(); // Invoked at the end of each safepoint
! static void sweeper_loop();
! static void notify(int code_blob_type); // Possibly start the sweeper thread.
static int hotness_counter_reset_val();
static void report_state_change(nmethod* nm);
static void possibly_enable_sweeper();
static void possibly_flush(nmethod* nm);
src/share/vm/runtime/sweeper.hpp
Index
Unified diffs
Context diffs
Sdiffs
Patch
New
Old
Previous File
Next File