Lines Matching refs:cb

92   void add(CodeBlob* cb) {
94 total_size += cb->size();
95 header_size += cb->header_size();
96 relocation_size += cb->relocation_size();
97 if (cb->is_nmethod()) {
98 nmethod* nm = cb->as_nmethod_or_null();
106 code_size += cb->code_size();
130 CodeBlob* CodeCache::next(CodeBlob* cb) {
132 return (CodeBlob*)_heap->next(cb);
136 CodeBlob* CodeCache::alive(CodeBlob *cb) {
138 while (cb != NULL && !cb->is_alive()) cb = next(cb);
139 return cb;
143 nmethod* CodeCache::alive_nmethod(CodeBlob* cb) {
145 while (cb != NULL && (!cb->is_alive() || !cb->is_nmethod())) cb = next(cb);
146 return (nmethod*)cb;
151 CodeBlob* cb = first();
152 while (cb != NULL && !cb->is_nmethod()) {
153 cb = next(cb);
155 return (nmethod*)cb;
158 nmethod* CodeCache::next_nmethod (CodeBlob* cb) {
160 cb = next(cb);
161 while (cb != NULL && !cb->is_nmethod()) {
162 cb = next(cb);
164 return (nmethod*)cb;
175 CodeBlob* cb = NULL;
178 cb = (CodeBlob*)_heap->allocate(size);
179 if (cb != NULL) break;
192 print_trace("allocation", cb, size);
193 return cb;
196 void CodeCache::free(CodeBlob* cb) {
200 print_trace("free", cb);
201 if (cb->is_nmethod()) {
203 if (((nmethod *)cb)->has_dependencies()) {
207 if (cb->is_adapter_blob()) {
212 _heap->deallocate(cb);
219 void CodeCache::commit(CodeBlob* cb) {
222 if (cb->is_nmethod()) {
224 if (((nmethod *)cb)->has_dependencies()) {
228 if (cb->is_adapter_blob()) {
233 ICache::invalidate_range(cb->content_begin(), cb->content_size());
268 CodeBlob *cb = find_blob(start);
269 assert(cb == NULL || cb->is_nmethod(), "did not find an nmethod");
270 return (nmethod*)cb;
313 FOR_ALL_ALIVE_BLOBS(cb) {
314 f->do_code_blob(cb);
317 if (cb->is_nmethod())
318 ((nmethod*)cb)->verify_scavenge_root_oops();
423 FOR_ALL_ALIVE_BLOBS(cb) {
424 if (cb->is_nmethod()) {
425 nmethod *nm = (nmethod*)cb;
436 FOR_ALL_ALIVE_BLOBS(cb) {
438 if (cb->is_nmethod()) {
439 nmethod *nm = (nmethod*)cb;
447 if (call_f) f_or_null->do_code_blob(cb);
539 FOR_ALL_ALIVE_BLOBS(cb) {
540 if (cb->is_nmethod()) {
541 nmethod *nm = (nmethod*)cb;
559 FOR_ALL_ALIVE_BLOBS(cb) {
560 if (cb->is_nmethod()) {
561 nmethod *nm = (nmethod*)cb;
806 void CodeCache::print_trace(const char* event, CodeBlob* cb, int size) {
809 if (size == 0) size = cb->size();
810 tty->print_cr("CodeCache %s: addr: " INTPTR_FORMAT ", size: 0x%x", event, cb, size);
831 CodeBlob *cb;
832 for (cb = first(); cb != NULL; cb = next(cb)) {
834 if (cb->is_nmethod()) {
835 nmethod* nm = (nmethod*)cb;
860 } else if (cb->is_runtime_stub()) {
862 } else if (cb->is_deoptimization_stub()) {
864 } else if (cb->is_uncommon_trap_stub()) {
866 } else if (cb->is_adapter_blob()) {
868 } else if (cb->is_buffer_blob()) {
878 for (cb = first(); cb != NULL; cb = next(cb)) {
879 if (cb->is_nmethod()) {
880 nmethod* nm = (nmethod*)cb;