1 /* |
1 /* |
2 * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. |
7 * published by the Free Software Foundation. |
78 static void flush(); // flushes all CodeBlobs |
78 static void flush(); // flushes all CodeBlobs |
79 static bool contains(void *p); // returns whether p is included |
79 static bool contains(void *p); // returns whether p is included |
80 static void blobs_do(void f(CodeBlob* cb)); // iterates over all CodeBlobs |
80 static void blobs_do(void f(CodeBlob* cb)); // iterates over all CodeBlobs |
81 static void blobs_do(CodeBlobClosure* f); // iterates over all CodeBlobs |
81 static void blobs_do(CodeBlobClosure* f); // iterates over all CodeBlobs |
82 static void nmethods_do(void f(nmethod* nm)); // iterates over all nmethods |
82 static void nmethods_do(void f(nmethod* nm)); // iterates over all nmethods |
|
83 static void alive_nmethods_do(void f(nmethod* nm)); // iterates over all alive nmethods |
83 |
84 |
84 // Lookup |
85 // Lookup |
85 static CodeBlob* find_blob(void* start); |
86 static CodeBlob* find_blob(void* start); |
86 static nmethod* find_nmethod(void* start); |
87 static nmethod* find_nmethod(void* start); |
87 |
88 |
168 |
169 |
169 static bool needs_cache_clean() { return _needs_cache_clean; } |
170 static bool needs_cache_clean() { return _needs_cache_clean; } |
170 static void set_needs_cache_clean(bool v) { _needs_cache_clean = v; } |
171 static void set_needs_cache_clean(bool v) { _needs_cache_clean = v; } |
171 static void clear_inline_caches(); // clear all inline caches |
172 static void clear_inline_caches(); // clear all inline caches |
172 |
173 |
173 static nmethod* find_and_remove_saved_code(methodOop m); |
174 static nmethod* find_and_remove_saved_code(Method* m); |
174 static void remove_saved_code(nmethod* nm); |
175 static void remove_saved_code(nmethod* nm); |
175 static void speculatively_disconnect(nmethod* nm); |
176 static void speculatively_disconnect(nmethod* nm); |
176 |
177 |
177 // Deoptimization |
178 // Deoptimization |
178 static int mark_for_deoptimization(DepChange& changes); |
179 static int mark_for_deoptimization(DepChange& changes); |
179 #ifdef HOTSWAP |
180 #ifdef HOTSWAP |
180 static int mark_for_evol_deoptimization(instanceKlassHandle dependee); |
181 static int mark_for_evol_deoptimization(instanceKlassHandle dependee); |
181 #endif // HOTSWAP |
182 #endif // HOTSWAP |
182 |
183 |
183 static void mark_all_nmethods_for_deoptimization(); |
184 static void mark_all_nmethods_for_deoptimization(); |
184 static int mark_for_deoptimization(methodOop dependee); |
185 static int mark_for_deoptimization(Method* dependee); |
185 static void make_marked_nmethods_zombies(); |
186 static void make_marked_nmethods_zombies(); |
186 static void make_marked_nmethods_not_entrant(); |
187 static void make_marked_nmethods_not_entrant(); |
187 |
188 |
188 // tells how many nmethods have dependencies |
189 // tells how many nmethods have dependencies |
189 static int number_of_nmethods_with_dependencies(); |
190 static int number_of_nmethods_with_dependencies(); |