thuxnder / androiddevice.info

Android app collecting device information and submiting it to www.androiddevice.info
GNU General Public License v2.0
53 stars 15 forks source link

CPU Type Distribution statistics could be improved #2

Open ssvb opened 9 years ago

ssvb commented 9 years ago

The /proc/cpuinfo file in linux (cpuRaw information in the database) usually contains the "CPU implementer" and "CPU part" information. Using some simple rules, this information could be decoded into a human readable CPU micro-architecture name, such as Cortex-A5 / Cortex-A7 / Cortex-A8 / etc.

Moreover, the processors from ARM may have different revisions, typically denoted as rXpY (X - major, Y - minor revision), where X is stored in the "CPU variant" and Y is in "CPU revision".

For example, this database entry: http://www.androiddevice.info/submission/14084/show could be decoded as "ARM Cortex-A8 r2p2" instead of "ARMv7 rev 2 (v7l)". The ISA revision, such as "ARMv7" could be also kept, but it is a little bit redundant (knowing the exact CPU type, we know which instructions it supports).

Here is one example of a script, which is doing such CPU information decoding - https://gist.github.com/dword1511/8262223

ssvb commented 9 years ago

Here is also a link to the ARM documentation, which confirms the CPU revisions naming convention - http://infocenter.arm.com/help/topic/com.arm.doc.ddi0344k/ch01s09s13.html

The parts of this "Main ID Register" are used to populate /proc/cpuifo. The information about the "Main ID Register" values for the other processors can be found in the same online ARM documentation.