Okay, so you're a reviewer, you want to know what an Android device is doing. You think, oh, I'll use random tool X that runs on the device and see what it says about the device's clockspeeds at various points in time.
No, stop. Just stop. You're wasting your time, you'll be wasting my time when I read your review, and nobody will be happy.
Instead, use the tool I do when I'm working on Android performance: developer.android.com/tools/help/systrace.html
"What's systrace," you ask? Systrace is basically a cool wrapper around both Linux ftrace (kernel-level tracing events) and a user-mode component called atrace that allow you to get a TOTALLY SWEET timeline view of everything that is happening on the system. Okay, maybe not everything, but we keep adding more tracepoints so we can figure things out (and eventually those make their way to you).
So get Android Studio and use it. Or better yet, check out aosp_master and use it from external/chromium-trace, because that is probably a newer version than what it is in Android Studio.
Once you have it, plug in your Android device. Open a terminal, and try
./systrace.py sched freq idle input -b 8192 -t 10 -o hats.html
Hit enter, tap around on the screen for ten seconds or so, then when it says that bats.html has been written, open that file up. Whoa, it's everything that was running on every core (sched), the clockspeed of every core (freq), the cstate of every core (idle), and markers for when it received input events (input)! You can figure a ton of stuff out by looking at these traces in the right environments, and they mean way more than looking at CPU frequencies in isolation (as CPU frequencies don't matter particularly much because if that CPU is deep idling, then it's not drawing that much power). Why is this better than something that just samples the clockspeeds? Because it's not sampling. Every time something is scheduled on a core, or the clockspeed changes, or the idle state changes, the kernel writes an event to the log. You won't miss anything.
If you want more excessive detail, workq is a good one, as it will tell you what the kernel worker threads are doing, although that one requires root.
If you're really snazzy, you can figure out how to kick off systrace, disconnect the device, then write the log out later just to make sure that there are no thermal impacts from charging or that the governor settings didn't change while the device was charging or things like that.
Also look at governor settings at /sys/devices/system/cpu (especially the cpufreq subdirectory). Read up on the interactive governor in the kernel documentation. Look at how the governors are configured in the init.rc files on the device (that's generally where they're set up, FYI). If you're on 5X/6P, open /dev/cpuset and marvel at the brave new world of devices that actually try to explicitly support big.LITTLE.
Pretty much everything you need to figure out how an Android device is there and doesn't require source. Source will help (and you should look at kernel source if you're interested at all in architectural quirks), but systrace and the various sysfs settings make almost everything very, very obvious.
love,
yr pal that wants more interesting mobile device reviews
No, stop. Just stop. You're wasting your time, you'll be wasting my time when I read your review, and nobody will be happy.
Instead, use the tool I do when I'm working on Android performance: developer.android.com/tools/help/systrace.html
"What's systrace," you ask? Systrace is basically a cool wrapper around both Linux ftrace (kernel-level tracing events) and a user-mode component called atrace that allow you to get a TOTALLY SWEET timeline view of everything that is happening on the system. Okay, maybe not everything, but we keep adding more tracepoints so we can figure things out (and eventually those make their way to you).
So get Android Studio and use it. Or better yet, check out aosp_master and use it from external/chromium-trace, because that is probably a newer version than what it is in Android Studio.
Once you have it, plug in your Android device. Open a terminal, and try
./systrace.py sched freq idle input -b 8192 -t 10 -o hats.html
Hit enter, tap around on the screen for ten seconds or so, then when it says that bats.html has been written, open that file up. Whoa, it's everything that was running on every core (sched), the clockspeed of every core (freq), the cstate of every core (idle), and markers for when it received input events (input)! You can figure a ton of stuff out by looking at these traces in the right environments, and they mean way more than looking at CPU frequencies in isolation (as CPU frequencies don't matter particularly much because if that CPU is deep idling, then it's not drawing that much power). Why is this better than something that just samples the clockspeeds? Because it's not sampling. Every time something is scheduled on a core, or the clockspeed changes, or the idle state changes, the kernel writes an event to the log. You won't miss anything.
If you want more excessive detail, workq is a good one, as it will tell you what the kernel worker threads are doing, although that one requires root.
If you're really snazzy, you can figure out how to kick off systrace, disconnect the device, then write the log out later just to make sure that there are no thermal impacts from charging or that the governor settings didn't change while the device was charging or things like that.
Also look at governor settings at /sys/devices/system/cpu (especially the cpufreq subdirectory). Read up on the interactive governor in the kernel documentation. Look at how the governors are configured in the init.rc files on the device (that's generally where they're set up, FYI). If you're on 5X/6P, open /dev/cpuset and marvel at the brave new world of devices that actually try to explicitly support big.LITTLE.
Pretty much everything you need to figure out how an Android device is there and doesn't require source. Source will help (and you should look at kernel source if you're interested at all in architectural quirks), but systrace and the various sysfs settings make almost everything very, very obvious.
love,
yr pal that wants more interesting mobile device reviews