Closing the loop on this, the formats are different because 1.0.3 has more tags for the data that is included in the dump. hprof-conv mostly converts these to the UNKNOWN tag. This can be seen in the source here: https://github.com/android/platform_dalvik/blob/master/tools/hprof-conv/HprofConv.c#L492
The extra tags are listed here: https://github.com/android/platform_dalvik/blob/master/tools/hprof-conv/HprofConv.c#L76 On the dalvik side they are defined here: https://gitorious.org/0xdroid/dalvik/source/b7fdbab46f67253caa15f2cc9d37be295239e075:vm/hprof/Hprof.h I haven't found a great explanation of what all the tags mean. On Sunday, September 7, 2014 3:42:54 PM UTC-4, David Cameron wrote: > > Oh yes, the link to the hprof spec: > [1] https://java.net/downloads/heap-snapshot/hprof-binary-format.html > > On Sunday, September 7, 2014 3:42:12 PM UTC-4, David Cameron wrote: >> >> To set the stage: I'm wrestling with OutOfMemoryExceptions, and beginning >> to suspect heap fragmentation as the root cause. >> >> I know that the hprof files dumped from the monitor tool are a slightly >> different format (JAVA PROFILE 1.0.3) from the "standard" java hprofs (JAVA >> PROFILE 1.0.2). I know that hprof-conv can convert a 1.0.3 formatted hprof >> to a 1.0.2 formatted hprof. I also think I've found a spec for the binary >> 1.0.2 format [1]. However, I was curious about the 1.0.3 format and have >> just done some searching, but haven't been able to find anything describing >> it on the developers.android.com site or the AOSP site at >> source.android.com. Is the 1.0.3 format documented and described >> anywhere? >> >> I have looked at both YourKit and MAT to analyze the heap dumps, but >> neither of them address fragmentation at all. I guess fragmentation is >> not much of an issue for server and desktop jvms. The hprof format >> appears to contain address information, so some kind of fragmentation >> analysis should be possible. I read that ART's GC will also eventually be a >> compacting collector, which is good news! In the meantime I'd like to try >> to use the address information in the hprof files to estimate heap >> fragmentation. >> >> >> Dave >> > -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups "Android Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.

