src/share/vm/runtime/sweeper.hpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File
*** old/src/share/vm/runtime/sweeper.hpp	Thu Nov  7 12:05:04 2013
--- new/src/share/vm/runtime/sweeper.hpp	Thu Nov  7 12:05:04 2013

*** 52,76 **** --- 52,76 ---- // 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 _time_counter; // Virtual time used to periodically invoke sweeper + static long _last_sweep; // Value of _traversals when the last sweep happened static nmethod* _current; // Current nmethod 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_count; // Nof. nmethods marked for reclaim in current sweep ! static int _marked_for_reclamation_count; // Nof. nmethods marked for reclaim in current sweep ! static volatile int _invocations; // No. of invocations left until we are completed with this pass ! static volatile int _invocations; // Nof. invocations left until we are completed with this pass static volatile int _sweep_started; // Flag to control conc sweeper //The following are reset in mark_active_nmethods and synchronized by the safepoint static bool _request_mark_phase; // Indicates that a change has happend and we need another mark pahse, // always checked and reset at a safepoint so memory will be in sync. static int _locked_seen; // Number of locked nmethods encountered during the scan static int _not_entrant_seen_on_stack; // Number of not entrant nmethod were are still on stack + 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 + // 3) zombie -> marked_for_reclamation // Stat counters static int _total_nof_methods_reclaimed; // Accumulated nof methods flushed static jlong _total_time_sweeping; // Accumulated time sweeping static jlong _total_time_this_sweep; // Total time this sweep static jlong _peak_sweep_time; // Peak time for a full sweep
*** 79,91 **** --- 79,88 ---- static int process_nmethod(nmethod *nm); static void release_nmethod(nmethod* nm); static bool sweep_in_progress(); static void sweep_code_cache(); static void request_nmethod_marking() { _request_mark_phase = true; } static void reset_nmethod_marking() { _request_mark_phase = false; } static bool need_marking_phase() { return _request_mark_phase; } static int _hotness_counter_reset_val; public: static long traversal_count() { return _traversals; }
*** 107,121 **** --- 104,111 ---- static void mark_active_nmethods(); // Invoked at the end of each safepoint static void possibly_sweep(); // Compiler threads call this to sweep static int sort_nmethods_by_hotness(nmethod** nm1, nmethod** nm2); static int hotness_counter_reset_val(); static void notify() { // Request a new sweep of the code cache from the beginning. No // need to synchronize the setting of this flag since it only // changes to false at safepoint so we can never overwrite it with false. request_nmethod_marking(); } }; #endif // SHARE_VM_RUNTIME_SWEEPER_HPP

src/share/vm/runtime/sweeper.hpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File