< prev index next >
src/hotspot/share/code/codeHeapState.cpp
Print this page
*** 2082,2094 ****
ast->print_cr("--------------------------------------------------------------------");
ast->print_cr("Address range [%p,%p), " SIZE_FORMAT "k", low_bound+ix*granule_size, low_bound+(ix+granules_per_line)*granule_size, granules_per_line*granule_size/(size_t)K);
ast->print_cr("--------------------------------------------------------------------");
STRINGSTREAM_FLUSH_LOCKED("")
}
for (unsigned int is = 0; is < granule_size; is+=(unsigned int)seg_size) {
CodeBlob* this_blob = (CodeBlob *)(heap->find_start(low_bound+ix*granule_size+is));
! if ((this_blob != NULL) && (this_blob != last_blob)) {
if (!name_in_addr_range) {
name_in_addr_range = true;
ast->fill_to(51);
ast->print("%9s", "compiler");
ast->fill_to(61);
--- 2082,2102 ----
ast->print_cr("--------------------------------------------------------------------");
ast->print_cr("Address range [%p,%p), " SIZE_FORMAT "k", low_bound+ix*granule_size, low_bound+(ix+granules_per_line)*granule_size, granules_per_line*granule_size/(size_t)K);
ast->print_cr("--------------------------------------------------------------------");
STRINGSTREAM_FLUSH_LOCKED("")
}
+ // Only check granule if it contains at least one blob.
+ unsigned int nBlobs = StatArray[ix].t1_count + StatArray[ix].t2_count + StatArray[ix].tx_count +
+ StatArray[ix].stub_count + StatArray[ix].dead_count;
+ if (nBlobs > 0 ) {
for (unsigned int is = 0; is < granule_size; is+=(unsigned int)seg_size) {
+ // heap->find_start() is safe. Only working with _segmap. Returns NULL or void*. Returned CodeBlob may be uninitialized.
CodeBlob* this_blob = (CodeBlob *)(heap->find_start(low_bound+ix*granule_size+is));
! bool blob_initialized = (this_blob != NULL) &&
! ((char*)this_blob + this_blob->header_size() == (char*)(this_blob->relocation_begin())) &&
! ((char*)this_blob + CodeBlob::align_code_offset(this_blob->header_size() + this_blob->relocation_size()) == (char*)(this_blob->content_begin()));
! if (blob_initialized && (this_blob != last_blob)) {
if (!name_in_addr_range) {
name_in_addr_range = true;
ast->fill_to(51);
ast->print("%9s", "compiler");
ast->fill_to(61);
*** 2101,2111 ****
ast->fill_to(19);
ast->print("(+" PTR32_FORMAT ")", (unsigned int)((char*)this_blob-low_bound));
ast->fill_to(33);
//---< print size, name, and signature (for nMethods) >---
! const char *blob_name = this_blob->name();
nmethod* nm = this_blob->as_nmethod_or_null();
blobType cbType = noType;
if (segment_granules) {
cbType = (blobType)StatArray[ix].type;
} else {
--- 2109,2124 ----
ast->fill_to(19);
ast->print("(+" PTR32_FORMAT ")", (unsigned int)((char*)this_blob-low_bound));
ast->fill_to(33);
//---< print size, name, and signature (for nMethods) >---
! // this_blob->name() could return NULL if no name is given to CTOR. Inlined, maybe not visible on stack
! const char* blob_name = this_blob->name();
! if (blob_name == 0) {
! blob_name = "<unavailable>";
! }
! // this_blob->as_nmethod_or_null() is safe. Inlined, maybe not visible on stack.
nmethod* nm = this_blob->as_nmethod_or_null();
blobType cbType = noType;
if (segment_granules) {
cbType = (blobType)StatArray[ix].type;
} else {
*** 2143,2152 ****
--- 2156,2168 ----
ast->fill_to(82+6);
ast->print("%s", blob_name);
}
STRINGSTREAM_FLUSH_LOCKED("\n")
last_blob = this_blob;
+ } else if (!blob_initialized && (this_blob != NULL)) {
+ last_blob = this_blob;
+ }
}
}
}
STRINGSTREAM_FLUSH_LOCKED("\n\n")
}
< prev index next >