On Nov 17, 2009, at 4:43 PM, jobhunts02@aol.com wrote:

On Nov 17, 2009, at 9:23 AM, jobhunts02@aol.com wrote:

By looking at EIP values, I can see that samples are being collected for my test module.  In the function get_file in daemon/opd_sfile.c which is called after issuing the opcontrol --shutdown command, I can see trans->pc values that correspond to the EIP values of samples collected for my test module but no new sample file is created for these samples.

Since I can see the samples are there for my test module, why isn't a sample file created for the test module samples?

When get_file is called for the samples for my test module, the file it gets is /var/lib/oprofile/samples//current/{kern}/no-vmlinux/{dep}/{kern}/no-vmlinux/TIMER.0.0.all.all.all, which has a nonzero count.  Thus, no sample file is created for my test module.


Why would samples for my test module result in getting the sample file for no-vmlinux?

I put vmlinux.PRO_MOD on my board.  Looking at opreport output for the same sampling, the results look inconsistent.


Running /usr/bin/opreport gave:


Eclipse # /usr/bin/opreport

CPU: CPU with timer interrupt, speed 0 MHz (estimated)

Profiling through timer interrupt


  samples|      %|


     7703 93.3923 vmlinux.PRO_MOD

      464  5.6256 libc-2.6.so

       26  0.3152 oprofiled

       19  0.2304EclipseMSW.elf.NOV8

       17  0.2061 busybox-1.15.2.mtab

       15  0.1819 ld-2.6.so

        3  0.0364 snmpd

        1  0.0121 libEclipsePai.so



If 7703 samples is 93.3923 %, then total samples = 8248.



My test module is in the /root directory.  Running /usr/bin/opreport -c --image-path=/root gave:


/usr/bin/opreport -c --image-path=/root

CPU: CPU with timer interrupt, speed 0 MHz (estimated)

Profiling through timer interrupt

samples  %        app name                 symbol name


1343     38.0993  vmlinux.PRO_MOD          __delay

  1343     100.000  vmlinux.PRO_MOD          __delay [self]


464      13.1631  libc-2.6.so              /lib/libc-2.6.so

  464      100.000  libc-2.6.so              /lib/libc-2.6.so [self]


267       7.5745  vmlinux.PRO_MOD          memset

  267      100.000  vmlinux.PRO_MOD          memset [self]


100       2.8369  vmlinux.PRO_MOD          memcpy

  100      100.000  vmlinux.PRO_MOD          memcpy [self]


83        2.3546  vmlinux.PRO_MOD          cfi_amdstd_write_buffers

  83       100.000  vmlinux.PRO_MOD          cfi_amdstd_write_buffers [self]


61        1.7305  vmlinux.PRO_MOD          deflate_fast

  61       100.000  vmlinux.PRO_MOD          deflate_fast [self]






If 1343 samples is 38.0993 %, then total samples = 3525.



Are these results inconsistent or am I mistaken?






On Nov 12, 2009, at 3:42 PM, jobhunts02@aol.com wrote:

Could the fact that I am following the instructions below be an issue as far as sampling inserted kernel modules?  Of course, samples for other than the kernel modules seem to be stored just fine. 

  • If running from an image in the internal jffs2 file system, you will need to mount another file system to store the samples. Below are examples of the commands to set that up. You will need to modify for local conditions.

mkdir /var/lib/oprofile

mount -t ramfs none /var/lib/oprofile