Detecting Page Faults on Android via ADB

56 views Asked by At

So I have been focusing on detecting the page faults for an android device and its individual processes via ADB. So far, I have been able to extract somewhat raw information via

adb shell dumpsys cpuinfo

Although this provides granular data with respect to each process, the time period is however not fixed based on which major and minor page faults are collected.

Is there any similar command that I can utilise to get a consistent information with regards to page-faults ? For example:

adb shell dumpsys procstats

procstats allows you to extract aggregated information for past n seconds or whatever time period suits you.

I have tried sampling this information via Perfetto, however its trace files are limited to provide information only with regards to complete device rather than individual processes. (I may be wrong as I have not dived deep into the tool and used its sql queries).

Small Update

Apparently the reading the file

proc/{id}/stat

gives me the major and minor faults too.

1

There are 1 answers

0
Shaju Mathew On

Would adb shell cat /proc/* be of use to you? (& grep for what you need - but you'll need adb root)