comparison src/share/vm/code/codeCache.hpp @ 1930:2d26b0046e0d

Merge.
author Thomas Wuerthinger <wuerthinger@ssw.jku.at>
date Tue, 30 Nov 2010 14:53:30 +0100
parents 1e9a9d2e6509
children f95d63e2154a
comparison
equal deleted inserted replaced
1484:6b7001391c97 1930:2d26b0046e0d
1 /* 1 /*
2 * Copyright 1997-2008 Sun Microsystems, Inc. All Rights Reserved. 2 * Copyright (c) 1997, 2010, 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.
14 * 14 *
15 * You should have received a copy of the GNU General Public License version 15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation, 16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 * 18 *
19 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, 19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * CA 95054 USA or visit www.sun.com if you need additional information or 20 * or visit www.oracle.com if you need additional information or have any
21 * have any questions. 21 * questions.
22 * 22 *
23 */ 23 */
24 24
25 // The CodeCache implements the code cache for various pieces of generated 25 // The CodeCache implements the code cache for various pieces of generated
26 // code, e.g., compiled java methods, runtime stubs, transition frames, etc. 26 // code, e.g., compiled java methods, runtime stubs, transition frames, etc.
41 // so that the generated assembly code is always there when it's needed. 41 // so that the generated assembly code is always there when it's needed.
42 // This may cause memory leak, but is necessary, for now. See 4423824, 42 // This may cause memory leak, but is necessary, for now. See 4423824,
43 // 4422213 or 4436291 for details. 43 // 4422213 or 4436291 for details.
44 static CodeHeap * _heap; 44 static CodeHeap * _heap;
45 static int _number_of_blobs; 45 static int _number_of_blobs;
46 static int _number_of_adapters;
47 static int _number_of_nmethods;
46 static int _number_of_nmethods_with_dependencies; 48 static int _number_of_nmethods_with_dependencies;
47 static bool _needs_cache_clean; 49 static bool _needs_cache_clean;
48 static nmethod* _scavenge_root_nmethods; // linked via nm->scavenge_root_link() 50 static nmethod* _scavenge_root_nmethods; // linked via nm->scavenge_root_link()
49 static nmethod* _saved_nmethods; // linked via nm->saved_nmethod_look() 51 static nmethod* _saved_nmethods; // linked via nm->saved_nmethod_look()
50 52
100 // Iteration 102 // Iteration
101 static CodeBlob* first(); 103 static CodeBlob* first();
102 static CodeBlob* next (CodeBlob* cb); 104 static CodeBlob* next (CodeBlob* cb);
103 static CodeBlob* alive(CodeBlob *cb); 105 static CodeBlob* alive(CodeBlob *cb);
104 static nmethod* alive_nmethod(CodeBlob *cb); 106 static nmethod* alive_nmethod(CodeBlob *cb);
107 static nmethod* first_nmethod();
108 static nmethod* next_nmethod (CodeBlob* cb);
105 static int nof_blobs() { return _number_of_blobs; } 109 static int nof_blobs() { return _number_of_blobs; }
110 static int nof_adapters() { return _number_of_adapters; }
111 static int nof_nmethods() { return _number_of_nmethods; }
106 112
107 // GC support 113 // GC support
108 static void gc_epilogue(); 114 static void gc_epilogue();
109 static void gc_prologue(); 115 static void gc_prologue();
110 // If "unloading_occurred" is true, then unloads (i.e., breaks root links 116 // If "unloading_occurred" is true, then unloads (i.e., breaks root links
129 // Printing/debugging 135 // Printing/debugging
130 static void print() PRODUCT_RETURN; // prints summary 136 static void print() PRODUCT_RETURN; // prints summary
131 static void print_internals(); 137 static void print_internals();
132 static void verify(); // verifies the code cache 138 static void verify(); // verifies the code cache
133 static void print_trace(const char* event, CodeBlob* cb, int size = 0) PRODUCT_RETURN; 139 static void print_trace(const char* event, CodeBlob* cb, int size = 0) PRODUCT_RETURN;
140 static void print_bounds(outputStream* st); // Prints a summary of the bounds of the code cache
134 141
135 // The full limits of the codeCache 142 // The full limits of the codeCache
136 static address low_bound() { return (address) _heap->low_boundary(); } 143 static address low_bound() { return (address) _heap->low_boundary(); }
137 static address high_bound() { return (address) _heap->high_boundary(); } 144 static address high_bound() { return (address) _heap->high_boundary(); }
138 145