OSDN Git Service

Add memory allocation statistics to the Bluetooth dumpsys output
authorPavlin Radoslavov <pavlin@google.com>
Wed, 1 Feb 2017 11:55:33 +0000 (03:55 -0800)
committerPavlin Radoslavov <pavlin@google.com>
Wed, 1 Feb 2017 12:00:54 +0000 (04:00 -0800)
commit0b4f3f7efb2b64e931cea7460c742628b8d0b8c0
treebc471d7c9375a01df58f1e7b4e8a376fd5853ef3
parent494e53e904e8aecc28178fda5856071776b2caf0
Add memory allocation statistics to the Bluetooth dumpsys output

The following memory allocation statistics are added to
the "dumpsys bluetooth_manager" output.
Those are tracking the allocations that are using the OSI malloc mechanism:
osi_strdup() / osi_strndup() / osi_malloc() / osi_calloc() / osi_free()

Bluetooth Memory Allocation Statistics:
  Total allocated/free/used counts : 4063 / 3323 / 740
  Total allocated/free/used octets : 922460 / 607941 / 314519

Test: Running "adb shell dumpsys bluetooth_manager"
Change-Id: Ibe1d28ec3a2acfd87cfaa10e5902ef3b596e64a8
btif/src/bluetooth.cc
osi/include/allocator.h
osi/src/allocation_tracker.cc