staging: android: ion: Add per-heap counters
authorAlexey Skidanov <alexey.skidanov@intel.com>
Tue, 9 Oct 2018 19:08:37 +0000 (22:08 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 9 Nov 2018 12:29:41 +0000 (04:29 -0800)
commit4073536c927421a8908490cf22ce912cb97d7f53
treed58c3abd41f4cc3086c87199e519eee4d008c301
parent91e24a4c4b26f842558fd4f95dc26f8f518f9e2c
staging: android: ion: Add per-heap counters

Heap statistics have been removed and currently even basics statistics
are missing.

This patch creates per heap debugfs directory /sys/kernel/debug/<heap_name>
and adds the following counters:
- the number of allocated buffers;
- the number of allocated bytes;
- the number of allocated bytes watermark.

Signed-off-by: Alexey Skidanov <alexey.skidanov@intel.com>
Acked-by: Laura Abbott <labbott@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/android/ion/ion.c
drivers/staging/android/ion/ion.h