Hi all:

This is a student who is using oprofile to do profiling on android phones, but I'm having some problem in post processing the samples. I can do opcontrol on phone well, and oprofile is collecting samples, but when I do opreport on my linux machine, the result seems to be wrong, i.e no matter what application or benchmark I run when I do profiling, the result is always like following:

CPU: invalid cpu type, speed 0 MHz (estimated)
Counted CPU_CYCLES events (Number of CPU cycles) with a unit mask of 0x00 (No unit mask) count 150000
samples  %        linenr info                 symbol name
228227   100.000  (no location information)   /no-vmlinux


The procedure I followed is:
1. build phone image that enabled oprofile feature and flash it to phone
2. adb shell
    opcontrol --setup
    opcontrol --quick
    opcontrol --start
    opcontrol --stop
    opcontrol --dump
3. adb pull /data/oprofile   (pull sample data to local machine)
4. run opimport_pull script, transforming the arm format to x86 format (the opimport_pul script is from http://omappedia.org/wiki/Android_Debugging)
5. under linux, run: opreport --session-dir=/myfolder  -p symbolpath



What confuses me is that it seems that sometimes the result is OK, as following:
CPU: invalid cpu type, speed 0 MHz (estimated)
Counted CPU_CYCLES events (Number of CPU cycles) with a unit mask of 0x00 (No unit mask) count 150000
CPU_CYCLES:150000|
  samples|      %|
------------------
   286125 33.6134 no-vmlinux
   256899 30.1800 libGLES_rhea.so
   143399 16.8463 libglb21tests.so
    82578  9.7011 libV3D_driver.so
    46896  5.5093 libc.so
     9803  1.1516 libdvm.so
     3774  0.4434 oprofiled
     2574  0.3024 libGLESv2.so
     2368  0.2782 libm.so
     2275  0.2673 libbinder.so
     2074  0.2436 libutils.so
     1520  0.1786 libglbenchmark.so
     1236  0.1452 libsurfaceflinger.so
     1223  0.1437 dalvik-jit-code-cache
     1181  0.1387 libskia.so
     1178  0.1384 libhwui.so
     1032  0.1212 libui.so
      962  0.1130 libgui.so
      906  0.1064 libcutils.so
      575  0.0675 libz.so
      569  0.0668 libEGL.so
      363  0.0426 libVCE_imageconv.so
      341  0.0401 libVCE_driver.so
      328  0.0385 libVCOS.so
      286  0.0336 libandroid_runtime.so
      126  0.0148 libGLESv1_CM.so
      102  0.0120 libGLES_android.so


But most of the time, it always has 100% no-vmlinux as result. I've been stuck on this for days and really hope you could help me out of this problem. Thank you in advance.


PS: I checked the sample numbers using "opcontrol --status" and the total samples by opreport, these two sometimes differ greatly, so I guess when opreport reports 100% no-vmlinux, it's actually only reporting the kernel samples. But I don't know how to fix this. Hope someone can help me with this issue. Thanks in advance.

BR


--
Ke Hu
EECS Department
University of Michigan, Ann Arbor