66 static jlong _total_disconnect_time; // Total time cleaning code mem
67 static jlong _peak_disconnect_time; // Peak time cleaning code mem
68
69 static void process_nmethod(nmethod *nm);
70 static void release_nmethod(nmethod* nm);
71
72 static void log_sweep(const char* msg, const char* format = NULL, ...);
73 static bool sweep_in_progress();
74
75 public:
76 static long traversal_count() { return _traversals; }
77 static int number_of_flushes() { return _number_of_flushes; }
78 static int total_nof_methods_reclaimed() { return _total_nof_methods_reclaimed; }
79 static jlong total_time_sweeping() { return _total_time_sweeping; }
80 static jlong peak_sweep_time() { return _peak_sweep_time; }
81 static jlong peak_sweep_fraction_time() { return _peak_sweep_fraction_time; }
82 static jlong total_disconnect_time() { return _total_disconnect_time; }
83 static jlong peak_disconnect_time() { return _peak_disconnect_time; }
84
85 #ifdef ASSERT
86 // Keep track of sweeper activity in the ring buffer
87 static void record_sweep(nmethod* nm, int line);
88 static void report_events(int id, address entry);
89 static void report_events();
90 #endif
91
92 static void scan_stacks(); // Invoked at the end of each safepoint
93 static void sweep_code_cache(); // Concurrent part of sweep job
94 static void possibly_sweep(); // Compiler threads call this to sweep
95
96 static void notify(nmethod* nm) {
97 // Request a new sweep of the code cache from the beginning. No
98 // need to synchronize the setting of this flag since it only
99 // changes to false at safepoint so we can never overwrite it with false.
100 _resweep = true;
101 }
102
103 static void handle_full_code_cache(bool is_full); // Called by compilers who fail to allocate
104 static void speculative_disconnect_nmethods(bool was_full); // Called by vm op to deal with alloc failure
105 };
|
66 static jlong _total_disconnect_time; // Total time cleaning code mem
67 static jlong _peak_disconnect_time; // Peak time cleaning code mem
68
69 static void process_nmethod(nmethod *nm);
70 static void release_nmethod(nmethod* nm);
71
72 static void log_sweep(const char* msg, const char* format = NULL, ...);
73 static bool sweep_in_progress();
74
75 public:
76 static long traversal_count() { return _traversals; }
77 static int number_of_flushes() { return _number_of_flushes; }
78 static int total_nof_methods_reclaimed() { return _total_nof_methods_reclaimed; }
79 static jlong total_time_sweeping() { return _total_time_sweeping; }
80 static jlong peak_sweep_time() { return _peak_sweep_time; }
81 static jlong peak_sweep_fraction_time() { return _peak_sweep_fraction_time; }
82 static jlong total_disconnect_time() { return _total_disconnect_time; }
83 static jlong peak_disconnect_time() { return _peak_disconnect_time; }
84
85 #ifdef ASSERT
86 static bool is_sweeping(nmethod* which) { return _current == which; }
87 // Keep track of sweeper activity in the ring buffer
88 static void record_sweep(nmethod* nm, int line);
89 static void report_events(int id, address entry);
90 static void report_events();
91 #endif
92
93 static void scan_stacks(); // Invoked at the end of each safepoint
94 static void sweep_code_cache(); // Concurrent part of sweep job
95 static void possibly_sweep(); // Compiler threads call this to sweep
96
97 static void notify(nmethod* nm) {
98 // Request a new sweep of the code cache from the beginning. No
99 // need to synchronize the setting of this flag since it only
100 // changes to false at safepoint so we can never overwrite it with false.
101 _resweep = true;
102 }
103
104 static void handle_full_code_cache(bool is_full); // Called by compilers who fail to allocate
105 static void speculative_disconnect_nmethods(bool was_full); // Called by vm op to deal with alloc failure
106 };
|