Hi,
 
I encoutered one problem when I tried to run oprofile on PowerPC (P2020) board.
The information is "
/work/myBinutils/bin/opreport
Overflow stats not available
/work/myBinutils/bin/opreport error: Invalid sample file, bad magic number: /var/lib/oprofile/samples/current/{kern}/no-vmlinux/{dep}/{kern}/no-vmlinux/CPU_CLK.10000.0.0.0.0
".

This is one part of the oprofile.log.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
oprofiled started Thu Jan  1 00:15:48 1970
kernel pointer size: 4
Read buffer of 109217 entries.
CPU_SWITCH to 0
CPU_SWITCH to 0
...
KERNEL_ENTER_SWITCH to kernel
CTX_SWITCH to tid 1463, tgid 1463, cookie df414440(/bin/busybox)
Opening "/var/lib/oprofile/samples//current/{root}//bin/busybox/{dep}/{kern}/no-vmlinux/CPU_CLK.10000.0.1463.1463.0"
oprofiled: open of /var/lib/oprofile/samples//current/{root}//bin/busybox/{dep}/{kern}/no-vmlinux/CPU_CLK.10000.0.1463.1463.0 failed: Invalid argument
Sample 0xc0010250(0): kern (name no-vmlinux, 0x0-0x0), app /bin/busybox(df414440)
Opening "/var/lib/oprofile/samples//current/{root}//bin/busybox/{dep}/{kern}/no-vmlinux/CPU_CLK.10000.0.1463.1463.0"
oprofiled: open of /var/lib/oprofile/samples//current/{root}//bin/busybox/{dep}/{kern}/no-vmlinux/CPU_CLK.10000.0.1463.1463.0 failed: Invalid argument
Sample 0xc003ba00(0): kern (name no-vmlinux, 0x0-0x0), app /bin/busybox(df414440)
Opening "/var/lib/oprofile/samples//current/{root}//bin/busybox/{dep}/{kern}/no-vmlinux/CPU_CLK.10000.0.1463.1463.0"
oprofiled: open of /var/lib/oprofile/samples//current/{root}//bin/busybox/{dep}/{kern}/no-vmlinux/CPU_CLK.10000.0.1463.1463.0 failed: Invalid argument
Sample 0xc00dc188(0): kern (name no-vmlinux, 0x0-0x0), app /bin/busybox(df414440)
Opening "/var/lib/oprofile/samples//current/{root}//bin/busybox/{dep}/{kern}/no-vmlinux/CPU_CLK.10000.0.1463.1463.0"
oprofiled: open of /var/lib/oprofile/samples//current/{root}//bin/busybox/{dep}/{kern}/no-vmlinux/CPU_CLK.10000.0.1463.1463.0 failed: Invalid argument
Sample 0xc000fe24(0): kern (name no-vmlinux, 0x0-0x0), app /bin/busybox(df414440)
......
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
The following packages were used.
1) oprofile 0.9.6
2) binutils 2.19
3) popt     1.7
They were cross-compiled for PowerPC on Host Ubuntu 8.04 running on VMWare 6.5.2.
 
The following is the procedure I ran the oprofile.
rm /var/lib/oprofile/samples/oprofiled.log
rm -rf /var/oprofile/sameples/current/
rm -f /etc/mtab
opcontrol --init
touch /etc/mtab
echo "nodev /dev/oprofile oprofilefs rw 0 0" > /etc/mtab
opcontrol --init
opcontrol --setup --no-vmlinux --event=CPU_CLK:10000:0:1:1
opcontrol --start-daemon -V
opcontrol --start -V
opcontrol --dump
opcontrol --stop
opreport
 
There were some lines that showed on screen.
Parameters used:
SESSION_DIR /var/lib/oprofile
LOCK_FILE /var/lib/oprofile/lock
SAMPLES_DIR /var/lib/oprofile/samples
CURRENT_SAMPLES_DIR /var/lib/oprofile/samples/current
CPUTYPE ppc/e500
BUF_SIZE default value
BUF_WATERSHED default value
CPU_BUF_SIZE default value
SEPARATE_LIB 1
SEPARATE_KERNEL 1
SEPARATE_THREAD 1
SEPARATE_CPU 1
CALLGRAPH 0
VMLINUX none
KERNEL_RANGE
XENIMAGE none
XEN_RANGE
Detected stale lock file. Removing.
executing oprofiled --session-dir=/var/lib/oprofile --separate-lib=1 --separate-kernel=1 --separate-thread=1 --separate-cpu=1 --events=CPU_CLK:1:0:10000:0:1:1, --no-vmlinux --verbose=all
Events: CPU_CLK:1:0:10000:0:1:1,
Using 2.6+ OProfile kernel interface.
Using log file /var/lib/oprofile/samples/oprofiled.log
Daemon started.
/////////////////////////
Parameters used:
SESSION_DIR /var/lib/oprofile
LOCK_FILE /var/lib/oprofile/lock
SAMPLES_DIR /var/lib/oprofile/samples
CURRENT_SAMPLES_DIR /var/lib/oprofile/samples/current
CPUTYPE ppc/e500
BUF_SIZE default value
BUF_WATERSHED default value
CPU_BUF_SIZE default value
SEPARATE_LIB 1
SEPARATE_KERNEL 1
SEPARATE_THREAD 1
SEPARATE_CPU 1
CALLGRAPH 0
VMLINUX none
KERNEL_RANGE
XENIMAGE none
XEN_RANGE
Profiler running. 
 
Any information is appreciated.
 
Best regards
 
Ty