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">
<array name="cpu.speeds.cluster0">
<array name="cpu.active.cluster0">
<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.


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.