1

I'm generating the PowerProflie file and the Systrace file to get the energy consumption of an Android Application, but I found that the number of cpu cores is different between the two files.

I'm using this command line for Systrace:

python C:/Users/BJI/AppData/Local/Android/Sdk/platform-tools/systrace/systrace.py freq idle -o C:/Users/BJI/Desktop/systrace

and for PowerProfile :

java -jar apktool_2.2.2.jar if framework-res.apk
java -jar apktool_2.2.2.jar d framework-res.apk

then I get the power_profile.xml from this folder: framework-res/res/xml/
this is a part of the PowerProfile file I've got :

<array name="cpu.clusters.cores">
    <value>4</value>
</array>
<array name="cpu.speeds.cluster0">
    <value>850000</value>
    <value>918000</value>
    <value>987000</value>
    <value>1056000</value>
    <value>1125000</value>
    <value>1216000</value>
    <value>1308000</value>
    <value>1400000</value>
    <value>1466000</value>
    <value>1533000</value>
    <value>1633000</value>
    <value>1700000</value>
    <value>1767000</value>
    <value>1834000</value>
    <value>1917000</value>
    <value>2001000</value>
</array>
<array name="cpu.active.cluster0">
    <value>9.3</value>
    <value>9.3</value>
    <value>10.6</value>
    <value>11.6</value>
    <value>13.3</value>
    <value>15.0</value>
    <value>17.2</value>
    <value>20.2</value>
    <value>22.8</value>
    <value>26.3</value>
    <value>27.4</value>
    <value>29.7</value>
    <value>30.2</value>
    <value>32.1</value>
    <value>33.9</value>
    <value>38.5</value>
</array>
<item name="cpu.idle">4.1</item>

and this is a part of my Systrace file :

<idle>-0     (-----) [005] dn.1 51825.602907: cpu_idle: state=4294967295 cpu_id=5
<idle>-0     (-----) [006] d..1 51825.602915: cpu_idle: state=0 cpu_id=6
ipi_cpu_dvfs_rt-251   (  251) [005] .... 51825.602942: cpu_frequency: state=900000 cpu_id=0
  <idle>-0     (-----) [004] dn.1 51825.602989: cpu_idle: state=4294967295 cpu_id=4
ipi_cpu_dvfs_rt-251   (  251) [005] .... 51825.602994: cpu_frequency: state=900000 cpu_id=1
ipi_cpu_dvfs_rt-251   (  251) [005] .... 51825.603000: cpu_frequency: state=900000 cpu_id=2
ipi_cpu_dvfs_rt-251   (  251) [005] .... 51825.603003: cpu_frequency: state=900000 cpu_id=3
  <idle>-0     (-----) [005] d..1 51825.603034: cpu_idle: state=0 cpu_id=5
  <idle>-0     (-----) [004] d..1 51825.603100: cpu_idle: state=0 cpu_id=4
  <idle>-0     (-----) [007] d..1 51825.610061: cpu_idle: state=4294967295 cpu_id=7

As you can see in the power profile file I have 4 cpu cores (cpu.clusters.cores=4) but in Systrace file I have 8 cpu cores (cpu_id=0-7) and most of cpu frequencies (cpu_frequency) in Systrace file doesn't exist in powerprofile file (cpu.speeds.cluster0) so I can't get the energy consumed, Please let me know if you have any solution for this.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.