Allow more information in bitmap ashmem filenames
Bug: 369619160
Flag: com.android.graphics.hwui.flags.bitmap_ashmem_long_name
This CL allows more information in bitmap ashmem filenames, e.g.
$ adb shell lsof | grep 'ashmem.*bitmap'
system_server 1505 system mem unknown /dev/ashmem/bitmap/writeblob-id_173400011-472x472-size_891136-com.google.android.googlequicksearchbox:search (deleted)
system_server 1505 system mem unknown /dev/ashmem/bitmap/allocate-id_273400014-126x126-size_63504-com.google.android.googlequicksearchbox:search (deleted)
system_server 1505 system mem unknown /dev/ashmem/bitmap/allocate-id_247000010-50x63-size_12600-com.android.phone (deleted)
ndroid.systemui 2155 u0_a238 mem unknown /dev/ashmem/bitmap/writeblob-id_173400011-472x472-size_891136-com.google.android.googlequicksearchbox:search (deleted)
ndroid.systemui 2155 u0_a238 mem unknown /dev/ashmem/bitmap/allocate-id_214800058-192x192-size_147456-com.google.android.as (deleted)
The long filename will tell us:
* callsite - where the ashmem bitmap is created, `allocate` means
in Bitmap::allocateAshmemBitmap where an ashmem backed bitmap is
directly allocated, or `writeblob` in writeBlob() where existing
bitmap is turned to an ashmem backed one
* id - unique to the bitmap, this can also be used to associated to
the bitmap in a heapdump with the same `mId` field
* dimension - width x height
* size - size of the bitmap in bytes
* origin - the process where the bitmap was created
Change-Id: I7bbb7003d0a0abe62e2008bd708760b6f4e2f8b6
4 files changed