Reputation: 587
I know there is a nice feature which you can view the actual Bitmap from heap dump prior to Android Studio 3, but seems gone.
Ref
Upvotes: 4
Views: 1128
Reputation: 587
Got an answer from Android Studio team's profiler lead:
The “view bitmap” feature is still there (for Android 5.0 to 7.1): in heap dump, when you select a Bitmap (or related) class and then an instance, you'll see an extra tab titled “Bitmap Preview” in the instance details panel (next to the “References” tab). That has the bitmap you want.
However, there's a caveat: At some time during the Oreo (Android 8.0) timeframe, there was a change to Android's HPROF serialization to NOT include the bitmap contents. The reason is technical: HPROF is a snapshot of the Java heap, not the native heap, but bitmap contents actually reside within the native heap. In essence, older Android versions were breaking the spec in order to provide a convenience, and this "loop hole" has since been closed.
It’s definitely on our to-do list to investigate ways to foreground that information once again in Oreo and newer Android versions.
Upvotes: 6