I am running Linux 2.6.31 and enabled Oprofile support in kernel image, and run simple testing as follow,

 

# opcontrol --init

#

# opcontrol --vmlinux=/root/vmlinux-initrd-7468b0-opf

#

# opcontrol --separate=kernel

#

# opcontrol --event=CYCLES:5000

#

# opcontrol --status

Daemon not running

Event 0: CYCLES:5000:0:1:1

Separate options: library kernel

vmlinux file: /root/vmlinux-initrd-7468b0-opf

Image filter: none

Call-graph depth: 0

#

#

# opcontrol --start

/bin/opcontrol: line 1081: echo: write error: Invalid argument

Using 2.6+ OProfile kernel interface.

Reading module info.

Using log file /var/lib/oprofile/samples/oprofiled.log

Daemon started.

Profiler running.

#

#

# opcontrol --stop

Stopping profiling.

#

#

# opreport --symbols

Overflow stats not available

warning: /bin/bash could not be found.

warning: /bin/busybox could not be found.

warning: /bin/ophelp could not be found.

warning: /bin/oprofiled could not be found.

warning: /lib/ld-uClibc-0.9.29.so could not be found.

warning: /lib/libdl-0.9.29.so could not be found.

warning: /lib/libgcc_s.so.1 could not be found.

warning: /lib/libuClibc-0.9.29.so could not be found.

warning: /root/vmlinux-initrd-7468b0-opf could not be found.

CPU: Broadcom BMIPS3300, speed 405 MHz (estimated)

Counted CYCLES events (Processor cycles (PClock)) with a unit mask of 0x00 (No unit mask) count 5000

samples  %        image name               app name                 symbol name

389217   62.4515  vmlinux-initrd-7468b0-opf vmlinux-initrd-7468b0-opf /root/vmlinux-initrd-7468b0-opf

159935   25.6622  oprofiled                oprofiled                /bin/oprofiled

18333     2.9416  bash                     bash                     /bin/bash

16124     2.5872  vmlinux-initrd-7468b0-opf busybox                  /root/vmlinux-initrd-7468b0-opf

12276     1.9697  vmlinux-initrd-7468b0-opf bash                     /root/vmlinux-initrd-7468b0-opf

7200      1.1553  vmlinux-initrd-7468b0-opf oprofiled                /root/vmlinux-initrd-7468b0-opf

7139      1.1455  ld-uClibc-0.9.29.so      busybox                  /lib/ld-uClibc-0.9.29.so

4908      0.7875  libuClibc-0.9.29.so      bash                     /lib/libuClibc-0.9.29.so

2663      0.4273  vmlinux-initrd-7468b0-opf ophelp                   /root/vmlinux-initrd-7468b0-opf

1319      0.2116  ld-uClibc-0.9.29.so      ophelp                   /lib/ld-uClibc-0.9.29.so

1282      0.2057  busybox                  busybox                  /bin/busybox

1185      0.1901  libuClibc-0.9.29.so      busybox                  /lib/libuClibc-0.9.29.so

555       0.0891  ld-uClibc-0.9.29.so      bash                     /lib/ld-uClibc-0.9.29.so

462       0.0741  libuClibc-0.9.29.so      oprofiled                /lib/libuClibc-0.9.29.so

369       0.0592  libuClibc-0.9.29.so      ophelp                   /lib/libuClibc-0.9.29.so

208       0.0334  ophelp                   ophelp                   /bin/ophelp

40        0.0064  libgcc_s.so.1            bash                     /lib/libgcc_s.so.1

11        0.0018  libgcc_s.so.1            ophelp                   /lib/libgcc_s.so.1

5        8.0e-04  libdl-0.9.29.so          bash                     /lib/libdl-0.9.29.so

 

WHY there is warning while all files can be located???

warning: /root/vmlinux-initrd-7468b0-opf could not be found.

 

Is that the reason why no symbol info was dumped?

 

How to fix it?

 

Thanks,

Jian