简体   繁体   中英

What is the difference between android and standard hprof file?

Recently I am doing some researches on Android hprof file analysis. But the relevant documents seem to be less than I expected. I can only get standard binary format of hprof file in documents of Oracle.

In haha library (now called leakcanary), I saw some segments, such as Heap Summary and CPU Sampling, was omitted in parsing.

So I wonder where I can find detailed information about these differences between android and standard hprof file.

The differences are not documented anywhere. The haha library was a repackaging of heap dump parsers sources, LeakCanary now has its own heap analyzer.

If you look at the difference between https://bitbucket.org/vshor/mat/src/default/ and https://github.com/joebowbeer/andromat you'll see what was necessary to make early versions of HAHA work on Android. That's summarized in this commit: https://github.com/square/haha/commit/65138abda1fab0ea9c10b05e7bdbe1cf54d0041b

Shark , the new LeakCanary heap dump analyzer, works with both JVM heap dumps and Android heap dumps so you could look at the sources

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM