title: Can you extract the value of strings from an IBM PHD java heap dump?
body: <p>I have a PHD format heap dump from an IBM jvm and I wish to examine the values of some strings. With the Sun JVM's binary hprof dumps this is possible, but I haven't been able to recover this information from an IBM dump.</p>
  
  <p>I've tried:</p>
  
  <ol>
  <li>Eclipse Memory Analyzer (0.8.0.200906170940) with IBM's DTFJ Portal Heap Dump Reader (1.3.0.200903241644)</li>
  <li>IBM Support Assistant (3.1.0.00) with Memory Dump Diagnostic for Java (2.0.0.3b)</li>
  <li>Running "strings" over the dump file</li>
  <li>Converting to text dump with com.ibm.jvm.ras.findroots.PrintHeapdump from svcdump.jar found in mdd4j (2.0.0.3b)</li>
  </ol>
  
  <p>In the Eclipse Memory Analyzer I can view the char array inside a String, but all the entries in the array are zero. I also can't see any of the primitive attributes on any objects.</p>
  
  <p>IBM hint that they do store the values of primitive types at <a href="http://www-01.ibm.com/support/docview.wss?rs=180&amp;uid=swg21190476" rel="nofollow noreferrer">http://www-01.ibm.com/support/docview.wss?rs=180&amp;uid=swg21190476</a></p>
  
  <blockquote>
    <p>This was made possible by using a Java DataOutputStream class which allows the output of Java primitive data types in a portable binary format.</p>
  </blockquote>
  
  <p>I'm using Java 5.0:</p>
  
  <pre>
  2XHOSLEVEL     OS Level         : AIX 5.3
  2XHCPUS        Processors -
  3XHCPUARCH       Architecture   : ppc64
  3XHNUMCPUS       How Many       : 8
  1CIJAVAVERSION J2RE 5.0 IBM J9 2.3 AIX ppc64-64 build j9vmap6423-20070426
  1CIVMVERSION   VM build 20070420_12448_BHdSMr
  </pre>