< prev index next >
src/jdk.hotspot.agent/solaris/native/libsaproc/saproc.cpp
Print this page
@@ -661,17 +661,20 @@
THROW_NEW_DEBUGGER_EXCEPTION_(errMsg, 1);
}
if (_libsaproc_debug) {
for (int m = 0; m < NUM_CDS_REGIONS; m++) {
+ if (!pheader->_space[m]._is_heap_region &&
+ !pheader->_space[m]._is_bitmap_region) {
jlong mapping_offset = pheader->_space[m]._mapping_offset;
- jlong baseAddress = (mapping_offset == 0) ? 0 : (mapping_offset + (jlong)sharedBaseAddress);
+ jlong baseAddress = mapping_offset + (jlong)sharedBaseAddress;
print_debug("shared file offset %d mapped at 0x%lx, size = %ld, read only? = %d\n",
pheader->_space[m]._file_offset, baseAddress,
pheader->_space[m]._used, pheader->_space[m]._read_only);
}
}
+ }
// FIXME: For now, omitting other checks such as VM version etc.
// store class archive file fd and map header in debugger object fields
dbg->env->SetIntField(this_obj, classes_jsa_fd_ID, fd);
@@ -1067,15 +1070,17 @@
for (int m = 0; m < NUM_CDS_REGIONS; m++) {
// We can skip the non-read-only maps. These are mapped as MAP_PRIVATE
// and hence will be read by libproc. Besides, the file copy may be
// stale because the process might have modified those pages.
- if (pheader->_space[m]._read_only) {
+ if (pheader->_space[m]._read_only &&
+ !pheader->_space[m]._is_heap_region &&
+ !pheader->_space[m]._is_bitmap_region) {
jlong mapping_offset = (jlong) (uintptr_t) pheader->_space[m]._mapping_offset;
jlong baseAddress = mapping_offset + (jlong)sharedBaseAddress;
size_t usedSize = pheader->_space[m]._used;
- if (mapping_offset != 0 && address >= baseAddress && address < (baseAddress + usedSize)) {
+ if (address >= baseAddress && address < (baseAddress + usedSize)) {
// the given address falls in this shared metadata area
print_debug("found shared map at 0x%lx\n", (long) baseAddress);
// If more data is asked than actually mapped from file, we need to zero fill
< prev index next >