Hi All,

I am trying to run oprofile on an embedded arm platform, the details are as follows:
Kernel Version:                 2.6.17 (it has been customised)
OProfile version:         0.9.4
Target Toolchain:         arm-xscale-linux-gnu

The commands I am using to run oprofile are as follows:
(Note: Italics indicates output / from oprofiled / opreport)

Configure / start oprofile:
ash opcontrol --init
using arm/xscale2
ash opcontrol --no-vmlinux --image=/mnt/spa-terminal-test-stripped --event=CPU_CYCLES:10000:0:1:1
Using 2.6+ OProfile kernel interface.
Using log file /mnt/samples/oprofiled.log
Daemon started.
Profiler running.
ash opcontrol --start
Profiler running.

Run my program

Stop / Shutdown oprofile:
ash opcontrol --stop
ash opcontrol --dump
ash opcontrol --shutdown

Running opreport gives the following errors
opreport --accumulated --callgraph --debug-info --symbols
        Error: header.magic = [80 80 80 80], OPD_MAGIC = DAE

opreport error: Invalid sample file, bad magic number:

(Note: I added some extra code to display the expected magic number and the values held in header.magic)

Further inspection revealed that the input file (CPU_CYCLES.10000.0.all.all.all) is filled with NULLs

The file: oprofiled.log contains the following:
oprofiled started Thu Aug  6 17:00:50 2009
kernel pointer size: 4
oprofiled: open of /mnt/samples//current/{root}//mnt/spa-terminal-test-stripped/CPU_CYCLES.10000.0.all.all.all failed: Invalid argument
oprofiled: open of /mnt/samples//current/{root}//mnt/spa-terminal-test-stripped/CPU_CYCLES.10000.0.all.all.all failed: Invalid argument
// --------------
Repeats for most of the file, followed by....
// ---------------
Thu Aug  6 17:04:43 2009

Nr. sample dumps: 41
Nr. non-backtrace samples: 1245235
Nr. kernel samples: 1025437
Nr. lost samples (no kernel/user): 0
Nr. lost kernel samples: 0
Nr. incomplete code structs: 6
Nr. samples lost due to sample file open failure: 6687
Nr. samples lost due to no permanent mapping: 0
Nr. event lost due to buffer overflow: 2081823
Nr. samples lost due to no mapping: 4306
Nr. backtraces skipped due to no file mapping: 0
Nr. samples lost due to no mm: 0
Nr. samples lost cpu buffer overflow: 67940
Nr. samples received: 2334860
Nr. backtrace aborted: 0
oprofiled stopped Thu Aug  6 17:04:43 2009

I am unsure of how to proceed  or where the problem may lie. Any suggestions would be greatly appreciated.


This email and any attached files contains company confidential information which may be legally privileged. It is intended only for the person(s) or entity to which it is addressed and solely for the purposes set forth therein. If you are not the intended recipient or have received this email in error please notify the sender by return, delete it from your system and destroy any local copies. It is strictly forbidden to use the information in this email including any attachment or part thereof including copying, disclosing, distributing, amending or using for any other purpose.

In addition the sender excludes all liabilities (whether tortious or common law) for damage or breach arising or related to this email including but not limited to viruses and libel.
SELEX Communications Limited is a Private Limited Company registered in England and Wales under Company Number 964533 and whose Registered Office is Lambda House, Christopher Martin Rd, Basildon, SS14 3EL. England.