Mercurial > hg > truffle
comparison src/share/vm/code/codeCache.hpp @ 2491:0654ee04b214
Merge with OpenJDK.
author | Thomas Wuerthinger <thomas.wuerthinger@oracle.com> |
---|---|
date | Fri, 22 Apr 2011 15:30:53 +0200 |
parents | 6c97c830fb6f |
children | d2a62e0f25eb |
comparison
equal
deleted
inserted
replaced
2490:29246b1d2d3c | 2491:0654ee04b214 |
---|---|
1 /* | 1 /* |
2 * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. | 2 * Copyright (c) 1997, 2011, 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. |
120 static int nof_nmethods() { return _number_of_nmethods; } | 120 static int nof_nmethods() { return _number_of_nmethods; } |
121 | 121 |
122 // GC support | 122 // GC support |
123 static void gc_epilogue(); | 123 static void gc_epilogue(); |
124 static void gc_prologue(); | 124 static void gc_prologue(); |
125 static void verify_oops(); | |
125 // If "unloading_occurred" is true, then unloads (i.e., breaks root links | 126 // If "unloading_occurred" is true, then unloads (i.e., breaks root links |
126 // to) any unmarked codeBlobs in the cache. Sets "marked_for_unloading" | 127 // to) any unmarked codeBlobs in the cache. Sets "marked_for_unloading" |
127 // to "true" iff some code got unloaded. | 128 // to "true" iff some code got unloaded. |
128 static void do_unloading(BoolObjectClosure* is_alive, | 129 static void do_unloading(BoolObjectClosure* is_alive, |
129 OopClosure* keep_alive, | 130 OopClosure* keep_alive, |
145 static void print() PRODUCT_RETURN; // prints summary | 146 static void print() PRODUCT_RETURN; // prints summary |
146 static void print_internals(); | 147 static void print_internals(); |
147 static void verify(); // verifies the code cache | 148 static void verify(); // verifies the code cache |
148 static void print_trace(const char* event, CodeBlob* cb, int size = 0) PRODUCT_RETURN; | 149 static void print_trace(const char* event, CodeBlob* cb, int size = 0) PRODUCT_RETURN; |
149 static void print_bounds(outputStream* st); // Prints a summary of the bounds of the code cache | 150 static void print_bounds(outputStream* st); // Prints a summary of the bounds of the code cache |
151 static void log_state(outputStream* st); | |
150 | 152 |
151 // The full limits of the codeCache | 153 // The full limits of the codeCache |
152 static address low_bound() { return (address) _heap->low_boundary(); } | 154 static address low_bound() { return (address) _heap->low_boundary(); } |
153 static address high_bound() { return (address) _heap->high_boundary(); } | 155 static address high_bound() { return (address) _heap->high_boundary(); } |
154 | 156 |
156 static address first_address(); // first address used for CodeBlobs | 158 static address first_address(); // first address used for CodeBlobs |
157 static address last_address(); // last address used for CodeBlobs | 159 static address last_address(); // last address used for CodeBlobs |
158 static size_t capacity() { return _heap->capacity(); } | 160 static size_t capacity() { return _heap->capacity(); } |
159 static size_t max_capacity() { return _heap->max_capacity(); } | 161 static size_t max_capacity() { return _heap->max_capacity(); } |
160 static size_t unallocated_capacity() { return _heap->unallocated_capacity(); } | 162 static size_t unallocated_capacity() { return _heap->unallocated_capacity(); } |
161 static size_t largest_free_block() { return _heap->largest_free_block(); } | 163 static size_t largest_free_block(); |
162 static bool needs_flushing() { return unallocated_capacity() < CodeCacheFlushingMinimumFreeSpace; } | 164 static bool needs_flushing() { return largest_free_block() < CodeCacheFlushingMinimumFreeSpace; } |
163 | 165 |
164 static bool needs_cache_clean() { return _needs_cache_clean; } | 166 static bool needs_cache_clean() { return _needs_cache_clean; } |
165 static void set_needs_cache_clean(bool v) { _needs_cache_clean = v; } | 167 static void set_needs_cache_clean(bool v) { _needs_cache_clean = v; } |
166 static void clear_inline_caches(); // clear all inline caches | 168 static void clear_inline_caches(); // clear all inline caches |
167 | 169 |