JDK-4747238 : HPROF: 1.4 hprof dump doesnt work with HAT
  • Type: Bug
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 1.4.0
  • Priority: P5
  • Status: Closed
  • Resolution: Duplicate
  • OS: generic
  • CPU: generic
  • Submitted: 2002-09-13
  • Updated: 2002-09-18
  • Resolved: 2002-09-18
Related Reports
Duplicate :  
Description
it seems starting from 1.4.0, the hprof dump doesnt not work with
HAT (heap analysis tool), HAT complains about OutOfMemoryError
when parsing the heap dump
the reason for the problem seems to be a change to request a
class load inside the brach processing HPROF_GC_OBJ_ARRAY_DUMP

Comments
EVALUATION ###@###.### 2002-09-13 As usual, Mandy is right! The fix for 4508003 modified the logic used during construction of the HPROF_GC_OBJ_ARRAY_DUMP record type to request a CLASS_LOAD event when needed. The change allows the class name to be displayed in text output format, but it scrambles the output stream in binary output format (format=b). The logic that Mandy changed is only needed in the text output code path so it should be possible to rearrange the code to only make the CLASS_LOAD event request when doing text output as opposed to binary format. While this would solve the immediate HPROF_GC_OBJ_ARRAY_DUMP record corruption problem, it may introduce another problem. The HPROF_GC_OBJ_ARRAY_DUMP record will contain a reference to a class that hasn't been "defined" yet. However, it appears from perusing the hprof output that CLS entries quite often come after objects that refer to them. Finally, this bug appears to be a duplicate of an older and higher priority bug: 4719788 2/2 HPROF: java -Xrunhprof:format=b produces malformed binary dumps It also complains about bad "OBJ_ARRAY headers" (0x22) which happens to match the code for HPROF_GC_OBJ_ARRAY_DUMP.
11-06-2004

PUBLIC COMMENTS .
10-06-2004