Ií»ve done that before to run opcontrol on mips target and opreport on host x86 desktop (connected to target via nfs). The followings are the things that I needed to do that.
- Libbfd version installed on target and host should be same
- All the element of opd_header definition in libop/op_sample_file.h should be consistent between the two
- File name of the sample directory is used to generate hash key, so, I needed to modify file name (str) given to op_hash_string() in dbmanage.c for opreport against x86.
- Once Ií»ve done the above things, I got nfs synchronization problem, as a work around, I gave additional MS_INVALIDATE option in odb_sync() function in libdb/db_manage.c and added sfile_sync_files() right after complete_dump() in function opd_do_samples in daemon/init.c
It was an ugly hack to make it work and I doní»t have the sources now. The above was gotten from my note.
I used oprofile-0.9.3.
I hope I didní»t miss anything needed,
[mailto:email@example.com] On Behalf Of Donak, John
Sent: Thursday, June 26, 2008
Subject: Running oprofile on embedded systems
I am trying to run oprofile 0.9.3 on a small embedded linux-ppc system, with some success.
I was able to cross-compile it on my host (linux-x86) and get it running on my target (linux-ppc).
Given that my arch (MPC6260) has no performance counters, I am simply running it in timer mode. I can get opreport output, but with no symbol info.
My big issue is that since I do not have a lot of memory, binaries are built with symbol information stripped.
My goal is to collect the data on the target and analyze it (via opreport) on the host. The oprofile manual suggests this is possible, but I am having trouble getting this to work. The manual does not provide much detailed help here.
So, is the above possible? I hope that if the samples (with PC info) are collected on the target, then I can transfer them to the host and run opreport (host version) there – using the same binaries recompiled with symbol information – to get a full report with symbols.
Has anyone gotten this to work for their environment?