src/os/solaris/vm/dtraceJSDT_solaris.cpp
Index
Unified diffs
Context diffs
Sdiffs
Wdiffs
Patch
New
Old
Previous File
Next File
*** old/src/os/solaris/vm/dtraceJSDT_solaris.cpp Thu Jul 26 17:35:27 2012
--- new/src/os/solaris/vm/dtraceJSDT_solaris.cpp Thu Jul 26 17:35:27 2012
*** 624,680 ****
--- 624,642 ----
tty->print_cr("// [Section #%d]", i);
printDOFSection(dof, sec);
}
}
/**
* This prints out hex data in a 'windbg' or 'xxd' form, where each line is:
* <hex-address>: 8 * <hex-halfword> <ascii translation>
* example:
* 0000000: 7f44 4f46 0102 0102 0000 0000 0000 0000 .DOF............
* 0000010: 0000 0000 0000 0040 0000 0020 0000 0005 .......@... ....
* 0000020: 0000 0000 0000 0040 0000 0000 0000 015d .......@.......]
* ...
*/
static void printDOFRawData(void* dof) {
size_t size = ((dof_hdr_t*)dof)->dofh_loadsz;
size_t limit = (size + 16) / 16 * 16;
for (size_t i = 0; i < limit; ++i) {
if (i % 16 == 0) {
tty->print("%07x:", i);
}
if (i % 2 == 0) {
tty->print(" ");
}
if (i < size) {
tty->print("%02x", ((unsigned char*)dof)[i]);
} else {
tty->print(" ");
}
if ((i + 1) % 16 == 0) {
tty->print(" ");
for (size_t j = 0; j < 16; ++j) {
size_t idx = i + j - 15;
char c = ((char*)dof)[idx];
if (idx < size) {
tty->print("%c", c >= 32 && c <= 126 ? c : '.');
}
}
tty->print_cr("");
}
}
tty->print_cr("");
}
static void printDOFHelper(dof_helper_t* helper) {
tty->print_cr("// dof_helper_t {");
tty->print_cr("// dofhp_mod = \"%s\"", helper->dofhp_mod);
tty->print_cr("// dofhp_addr = 0x%016llx", helper->dofhp_addr);
tty->print_cr("// dofhp_dof = 0x%016llx", helper->dofhp_dof);
printDOF((void*)helper->dofhp_dof);
tty->print_cr("// }");
! printDOFRawData((void*)helper->dofhp_dof);
! size_t len = ((dof_hdr_t*)helper)->dofh_loadsz;
+ tty->print_data((void*)helper->dofhp_dof, len, true);
}
#else // ndef HAVE_DTRACE_H
// Get here if we're not building on at least Solaris 10
src/os/solaris/vm/dtraceJSDT_solaris.cpp
Index
Unified diffs
Context diffs
Sdiffs
Wdiffs
Patch
New
Old
Previous File
Next File