1.1 --- a/src/os/solaris/vm/dtraceJSDT_solaris.cpp Mon Aug 06 09:34:40 2012 -0700 1.2 +++ b/src/os/solaris/vm/dtraceJSDT_solaris.cpp Mon Aug 06 15:54:45 2012 -0400 1.3 @@ -1,5 +1,5 @@ 1.4 /* 1.5 - * Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved. 1.6 + * Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. 1.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 1.8 * 1.9 * This code is free software; you can redistribute it and/or modify it 1.10 @@ -626,45 +626,6 @@ 1.11 } 1.12 } 1.13 1.14 -/** 1.15 - * This prints out hex data in a 'windbg' or 'xxd' form, where each line is: 1.16 - * <hex-address>: 8 * <hex-halfword> <ascii translation> 1.17 - * example: 1.18 - * 0000000: 7f44 4f46 0102 0102 0000 0000 0000 0000 .DOF............ 1.19 - * 0000010: 0000 0000 0000 0040 0000 0020 0000 0005 .......@... .... 1.20 - * 0000020: 0000 0000 0000 0040 0000 0000 0000 015d .......@.......] 1.21 - * ... 1.22 - */ 1.23 -static void printDOFRawData(void* dof) { 1.24 - size_t size = ((dof_hdr_t*)dof)->dofh_loadsz; 1.25 - size_t limit = (size + 16) / 16 * 16; 1.26 - for (size_t i = 0; i < limit; ++i) { 1.27 - if (i % 16 == 0) { 1.28 - tty->print("%07x:", i); 1.29 - } 1.30 - if (i % 2 == 0) { 1.31 - tty->print(" "); 1.32 - } 1.33 - if (i < size) { 1.34 - tty->print("%02x", ((unsigned char*)dof)[i]); 1.35 - } else { 1.36 - tty->print(" "); 1.37 - } 1.38 - if ((i + 1) % 16 == 0) { 1.39 - tty->print(" "); 1.40 - for (size_t j = 0; j < 16; ++j) { 1.41 - size_t idx = i + j - 15; 1.42 - char c = ((char*)dof)[idx]; 1.43 - if (idx < size) { 1.44 - tty->print("%c", c >= 32 && c <= 126 ? c : '.'); 1.45 - } 1.46 - } 1.47 - tty->print_cr(""); 1.48 - } 1.49 - } 1.50 - tty->print_cr(""); 1.51 -} 1.52 - 1.53 static void printDOFHelper(dof_helper_t* helper) { 1.54 tty->print_cr("// dof_helper_t {"); 1.55 tty->print_cr("// dofhp_mod = \"%s\"", helper->dofhp_mod); 1.56 @@ -672,7 +633,8 @@ 1.57 tty->print_cr("// dofhp_dof = 0x%016llx", helper->dofhp_dof); 1.58 printDOF((void*)helper->dofhp_dof); 1.59 tty->print_cr("// }"); 1.60 - printDOFRawData((void*)helper->dofhp_dof); 1.61 + size_t len = ((dof_hdr_t*)helper)->dofh_loadsz; 1.62 + tty->print_data((void*)helper->dofhp_dof, len, true); 1.63 } 1.64 1.65 #else // ndef HAVE_DTRACE_H