1

I'm trying to track down lost RAM in the Android kernel, and I see from the post below that the ION drivers keep track of this.

What is the concept behind “Lost RAM” which appears in Dumpsys meminfo?

Can someone tell me how to enable ION driver debugging so I can find my lost RAM?

Community
  • 1
  • 1
ckrugo
  • 49
  • 1
  • 5

1 Answers1

2

Benjamin Gaignard's Article on Linaro explains ION debugging as below (https://wiki.linaro.org/BenjaminGaignard/ion):

ION debug

ION provided a debugfs interface in /sys/kernel/debug/ion/ directory. Each heap has it own debugfs entry where clients memory usage is displayed: /sys/kernel/debug/ion/<<heap name>>

$ cat /sys/kernel/debug/ion/ion-heap-1 
          client              pid             size
        test_ion             2890            16384

Each client identify by pid have also a debugfs entry: /sys/kernel/debug/ion/<<pid>> where memory usage displayed.

$ cat /sys/kernel/debug/ion/2890 
       heap_name:    size_in_bytes
      ion-heap-1:    40960 11

Easy enough to wrap a script and periodically monitor the output.

pevik
  • 4,523
  • 3
  • 33
  • 44
ckrugo
  • 49
  • 1
  • 5