Hi All,

I try to use oprofile to profile my application, but I got an error when I retrieve the result using opreport.

The following was what I did and output:
rm /var/lib/oprofile/samples/oprofiled.log
rm -rf /var/oprofile/sameples/current/
opcontrol --init
opcontrol --setup --no-vmlinux
opcontrol --start-daemon -V
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 timer
BUF_SIZE default value
BUF_WATERSHED default value
CPU_BUF_SIZE default value
SEPARATE_LIB 0
SEPARATE_KERNEL 0
SEPARATE_THREAD 0
SEPARATE_CPU 0
CALLGRAPH 0
VMLINUX none
KERNEL_RANGE
XENIMAGE none
XEN_RANGE
executing oprofiled --session-dir=/var/lib/oprofile --separate-lib=0 --separate-kernel=0 --separate-thread=0 --separate-cpu=0 --events= --no-vmlinux --verbose=all
Using 2.6+ OProfile kernel interface.
Using log file /var/lib/oprofile/samples/oprofiled.log
Daemon started.
opcontrol --start -V
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 timer
BUF_SIZE default value
BUF_WATERSHED default value
CPU_BUF_SIZE default value
SEPARATE_LIB 0
SEPARATE_KERNEL 0
SEPARATE_THREAD 0
SEPARATE_CPU 0
CALLGRAPH 0
VMLINUX none
KERNEL_RANGE
XENIMAGE none
XEN_RANGE
Profiler running.
opcontrol --dump
opcontrol --stop
Stopping profiling.
opreport
opreport error: Invalid sample file, bad magic number: /var/lib/oprofile/samples/current/{kern}/no-vmlinux/{dep}/{kern}/no-vmlinux/TIMER.0.0.all.all.all

I don't understand why opreport says the sample file is invalid and bad magic number.
I also noticed that CPUTYPE is timer. I expected to see that CPUTYPE is ARM since I'm using ARM processor.

My platform info:
CPU: at91sam9261 (ARM processor)
OS: Linux2.6.28
oprofile: 0.9.6

Can anyone let me know how to fix that problem?
Thanks in advance,

youyisi