How to setup Oprofile for iMX53 (ARM Cortex-A8) -blog archive

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to setup Oprofile for iMX53 (ARM Cortex-A8) -blog archive

634 Views
J_Eastlack
Contributor I

In timer mode

  1. Setting up the kernel with LTIB
    $ ./ltib -p kernel -c -f       //Configures the kernel package only and forces a kernel rebuild
  2. Select the kernel modules when GUI based editor appears
    General Setup ---> Select [*] Profiling Support
    General Setup ---> Select <*> OProfile system profiling 
    Kernel Hacking ---> Select [*] Kernel Debugging
    <Exit>
    <Exit> and Save will start the build

Note: do not select performance counters and monitoring support for time mode. i.e.:

General Setup ---> Kernel Performance Events And Counters  ---> [ ] Kernel performance events and counters
  1. Find the new kernel
    // The new kernel image (uImage) is put in ../ltib/rootfs/boot/
  2. Copy the new kernel image to SD card
    $ sudo dd if=uImage of=/dev/sdx bs=512 seek=2048 &sync
  3. Copy the vmlinux image to the /boot directory of the target rootfs
    $ sudo mount -l /dev/sdx1 /media/sdcard
    $ sudo cp vmlinux /media/sdcard/boot/vmlinux

On i.MX53 target

  1. Change the name of vmlinux to vmlinux-'uname -r'
    $ cd /boot
    $ sudo cp vmlinux vmlinux-'uname -r'
    $ cd ~
  2. Install oprofile (on ubuntu)
    $ sudo apt-get install oprofile
  3. Run oprofile
    $ sudo opcontrol --init
    $ sudo opcontrol --vmlinux=/boot/vmlinux-'uname -r'
    $ sudo opcontrol --start
    $ sudo opcontrol --status
    // do stuff 
    $ sudo opcontrol --dump
    $ sudo opcontrol --stop
  4. Run opreport
    $ sudo opreport --symbols
Tags (1)
0 Kudos
0 Replies