comparison src/share/vm/code/codeCache.cpp @ 1748:3e8fbc61cee8

6978355: renaming for 6961697 Summary: This is the renaming part of 6961697 to keep the actual changes small for review. Reviewed-by: kvn, never
author twisti
date Wed, 25 Aug 2010 05:27:54 -0700
parents 2a47bd84841f
children 1e9a9d2e6509
comparison
equal deleted inserted replaced
1747:53dbe853fb3a 1748:3e8fbc61cee8
74 total_size += cb->size(); 74 total_size += cb->size();
75 header_size += cb->header_size(); 75 header_size += cb->header_size();
76 relocation_size += cb->relocation_size(); 76 relocation_size += cb->relocation_size();
77 if (cb->is_nmethod()) { 77 if (cb->is_nmethod()) {
78 nmethod* nm = cb->as_nmethod_or_null(); 78 nmethod* nm = cb->as_nmethod_or_null();
79 code_size += nm->code_size(); 79 code_size += nm->insts_size();
80 stub_size += nm->stub_size(); 80 stub_size += nm->stub_size();
81 81
82 scopes_oop_size += nm->oops_size(); 82 scopes_oop_size += nm->oops_size();
83 scopes_data_size += nm->scopes_data_size(); 83 scopes_data_size += nm->scopes_data_size();
84 scopes_pcs_size += nm->scopes_pcs_size(); 84 scopes_pcs_size += nm->scopes_pcs_size();
85 } else { 85 } else {
86 code_size += cb->instructions_size(); 86 code_size += cb->code_size();
87 } 87 }
88 } 88 }
89 }; 89 };
90 90
91 91
208 if (cb->is_adapter_blob()) { 208 if (cb->is_adapter_blob()) {
209 _number_of_adapters++; 209 _number_of_adapters++;
210 } 210 }
211 211
212 // flush the hardware I-cache 212 // flush the hardware I-cache
213 ICache::invalidate_range(cb->instructions_begin(), cb->instructions_size()); 213 ICache::invalidate_range(cb->content_begin(), cb->content_size());
214 } 214 }
215 215
216 216
217 void CodeCache::flush() { 217 void CodeCache::flush() {
218 assert_locked_or_safepoint(CodeCache_lock); 218 assert_locked_or_safepoint(CodeCache_lock);
802 if(nm->is_unloaded()) { nmethodUnloaded++; } 802 if(nm->is_unloaded()) { nmethodUnloaded++; }
803 if(nm->is_native_method()) { nmethodNative++; } 803 if(nm->is_native_method()) { nmethodNative++; }
804 804
805 if(nm->method() != NULL && nm->is_java_method()) { 805 if(nm->method() != NULL && nm->is_java_method()) {
806 nmethodJava++; 806 nmethodJava++;
807 if(nm->code_size() > maxCodeSize) { 807 if (nm->insts_size() > maxCodeSize) {
808 maxCodeSize = nm->code_size(); 808 maxCodeSize = nm->insts_size();
809 } 809 }
810 } 810 }
811 } else if (cb->is_runtime_stub()) { 811 } else if (cb->is_runtime_stub()) {
812 runtimeStubCount++; 812 runtimeStubCount++;
813 } else if (cb->is_deoptimization_stub()) { 813 } else if (cb->is_deoptimization_stub()) {
828 828
829 for (cb = first(); cb != NULL; cb = next(cb)) { 829 for (cb = first(); cb != NULL; cb = next(cb)) {
830 if (cb->is_nmethod()) { 830 if (cb->is_nmethod()) {
831 nmethod* nm = (nmethod*)cb; 831 nmethod* nm = (nmethod*)cb;
832 if(nm->is_java_method()) { 832 if(nm->is_java_method()) {
833 buckets[nm->code_size() / bucketSize]++; 833 buckets[nm->insts_size() / bucketSize]++;
834 } 834 }
835 } 835 }
836 } 836 }
837 tty->print_cr("Code Cache Entries (total of %d)",total); 837 tty->print_cr("Code Cache Entries (total of %d)",total);
838 tty->print_cr("-------------------------------------------------"); 838 tty->print_cr("-------------------------------------------------");
894 int number_of_oop_maps = 0; 894 int number_of_oop_maps = 0;
895 int map_size = 0; 895 int map_size = 0;
896 FOR_ALL_BLOBS(p) { 896 FOR_ALL_BLOBS(p) {
897 if (p->is_alive()) { 897 if (p->is_alive()) {
898 number_of_blobs++; 898 number_of_blobs++;
899 code_size += p->instructions_size(); 899 code_size += p->code_size();
900 OopMapSet* set = p->oop_maps(); 900 OopMapSet* set = p->oop_maps();
901 if (set != NULL) { 901 if (set != NULL) {
902 number_of_oop_maps += set->size(); 902 number_of_oop_maps += set->size();
903 map_size += set->heap_size(); 903 map_size += set->heap_size();
904 } 904 }
905 } 905 }
906 } 906 }
907 tty->print_cr("OopMaps"); 907 tty->print_cr("OopMaps");
908 tty->print_cr(" #blobs = %d", number_of_blobs); 908 tty->print_cr(" #blobs = %d", number_of_blobs);