114 |
114 |
115 static size_t bytes_allocated_in_freelists(); |
115 static size_t bytes_allocated_in_freelists(); |
116 static int allocated_segments(); |
116 static int allocated_segments(); |
117 static size_t freelists_length(); |
117 static size_t freelists_length(); |
118 |
118 |
|
119 static void set_scavenge_root_nmethods(nmethod* nm) { _scavenge_root_nmethods = nm; } |
|
120 static void prune_scavenge_root_nmethods(); |
|
121 static void unlink_scavenge_root_nmethod(nmethod* nm, nmethod* prev); |
|
122 |
119 public: |
123 public: |
120 // Initialization |
124 // Initialization |
121 static void initialize(); |
125 static void initialize(); |
122 |
126 |
123 // Allocation/administration |
127 // Allocation/administration |
151 // If "unloading_occurred" is true, then unloads (i.e., breaks root links |
155 // If "unloading_occurred" is true, then unloads (i.e., breaks root links |
152 // to) any unmarked codeBlobs in the cache. Sets "marked_for_unloading" |
156 // to) any unmarked codeBlobs in the cache. Sets "marked_for_unloading" |
153 // to "true" iff some code got unloaded. |
157 // to "true" iff some code got unloaded. |
154 static void do_unloading(BoolObjectClosure* is_alive, bool unloading_occurred); |
158 static void do_unloading(BoolObjectClosure* is_alive, bool unloading_occurred); |
155 static void asserted_non_scavengable_nmethods_do(CodeBlobClosure* f = NULL) PRODUCT_RETURN; |
159 static void asserted_non_scavengable_nmethods_do(CodeBlobClosure* f = NULL) PRODUCT_RETURN; |
156 static void scavenge_root_nmethods_do(CodeBlobClosure* f); |
160 |
|
161 // Apply f to every live code blob in scavengable nmethods. Prune nmethods |
|
162 // from the list of scavengable nmethods if f->fix_relocations() and a nmethod |
|
163 // no longer has scavengable oops. If f->fix_relocations(), then f must copy |
|
164 // objects to their new location immediately to avoid fixing nmethods on the |
|
165 // basis of the old object locations. |
|
166 static void scavenge_root_nmethods_do(CodeBlobToOopClosure* f); |
157 |
167 |
158 static nmethod* scavenge_root_nmethods() { return _scavenge_root_nmethods; } |
168 static nmethod* scavenge_root_nmethods() { return _scavenge_root_nmethods; } |
159 static void set_scavenge_root_nmethods(nmethod* nm) { _scavenge_root_nmethods = nm; } |
|
160 static void add_scavenge_root_nmethod(nmethod* nm); |
169 static void add_scavenge_root_nmethod(nmethod* nm); |
161 static void drop_scavenge_root_nmethod(nmethod* nm); |
170 static void drop_scavenge_root_nmethod(nmethod* nm); |
162 static void prune_scavenge_root_nmethods(); |
|
163 |
171 |
164 // Printing/debugging |
172 // Printing/debugging |
165 static void print(); // prints summary |
173 static void print(); // prints summary |
166 static void print_internals(); |
174 static void print_internals(); |
167 static void print_memory_overhead(); |
175 static void print_memory_overhead(); |