Mobile/Fennec/Android/Profiling: Difference between revisions

Line 442: Line 442:
mylinux$ adb shell dmesg | grep oprofile
mylinux$ adb shell dmesg | grep oprofile
<6>[    2.772705] oprofile: using arm/armv7-ca9
<6>[    2.772705] oprofile: using arm/armv7-ca9
</nowiki>
Now everything appears to be working, but I cannot seem to collect samples!
<nowiki>
    root@android:/data/local # opcontrol --reset --kernel-range=0xc004d000,0xc0752000 --event=CPU_CYCLES:1 --setup --status --verbose-log=all --verbose
    list_events = 0
    setup = 1
    Configure /dev/oprofile/0/user (1)
    Configure /dev/oprofile/0/kernel (1)
    Configure /dev/oprofile/0/unit_mask (0)
    Configure /dev/oprofile/0/enabled (1)
    Configure /dev/oprofile/0/count (1)
    Configure /dev/oprofile/0/event (255)
    Configure /dev/oprofile/1/enabled (0)
    Configure /dev/oprofile/2/enabled (0)
    Configure /dev/oprofile/3/enabled (0)
    Configure /dev/oprofile/4/enabled (0)
    Starting oprofiled...
    command: oprofiled --session-dir=/data/oprofile --events=CPU_CYCLES:255:0:1:0:1:1 --no-vmlinux -r 0xc004d000,0xc0752000 --verbose=all
    Events: CPU_CYCLES:255:0:1:0:1:1
    Using 2.6+ OProfile kernel interface.
    Using log file /data/oprofile/samples/oprofiled.log
    Ready
    Driver directory: /dev/oprofile
    Session directory: /data/oprofile
    Counter 0:
        name: CPU_CYCLES
        count: 1
    Counter 1 disabled
    Counter 2 disabled
    Counter 3 disabled
    Counter 4 disabled
    oprofiled pid: 1528
    profiler is not running
      cpu1        0 samples received
      cpu1        0 samples lost overflow
      cpu1        0 samples invalid eip
      cpu1        0 backtrace aborted
      cpu0        0 samples received
      cpu0        0 samples lost overflow
      cpu0        0 samples invalid eip
      cpu0        0 backtrace aborted
   
    root@android:/data/local #
    root@android:/data/local # opcontrol --start
    root@android:/data/local # opcontrol --status --verbose
    list_events = 0
    setup = 0
    Driver directory: /dev/oprofile
    Session directory: /data/oprofile
    Counter 0:
        name: CPU_CYCLES
        count: 1
    Counter 1 disabled
    Counter 2 disabled
    Counter 3 disabled
    Counter 4 disabled
    oprofiled pid: 1528
    profiler is running
      cpu1        0 samples received
      cpu1        0 samples lost overflow
      cpu1        0 samples invalid eip
      cpu1        0 backtrace aborted
      cpu0        0 samples received
      cpu0        0 samples lost overflow
      cpu0        0 samples invalid eip
      cpu0        0 backtrace aborted
   
    root@android:/data/local # opcontrol --stop
    root@android:/data/local # ls -lR /data/oprofile
   
    /data/oprofile:
    -rw-rw-rw- root    root          724 2012-03-07 16:43 abi
    -rw-rw-rw- root    root            2 2012-03-07 16:46 complete_dump
    -rw-rw-rw- root    root            4 2012-03-07 16:43 lock
    prw-rw-rw- root    root              2012-03-07 16:43 opd_pipe
    drwxr-xr-x root    root              2012-03-07 16:43 samples
   
    /data/oprofile/samples:
    -rw-r--r-- root    root        57424 2012-03-07 16:46 oprofiled.log
    root@android:/data/local # tail /data/oprofile/samples/oprofiled.log
    ...
    CPU_SWITCH to 1
    CPU_SWITCH to 0
    CPU_SWITCH to 1
    CPU_SWITCH to 0
    CPU_SWITCH to 1
  </nowiki>
  </nowiki>


Confirmed users
1,759

edits