John,
 
Thanks for the info.
 
I am looking at a scenario to parse the sample database and generate reports on a machine that does not have OProfile. Profiling will be run on one host, the samples will be moved to another host and then parsed.
 
So could the binary sample data files in isolation give me all the profiling information?
 
- Ravi

John Levon <levon@movementarian.org> wrote:
On Wed, Apr 27, 2005 at 04:58:34AM +0100, ravi kanth wrote:

> 1. Can we parse the binary sample files using any other language instead of using opreport?

You can use libdb in the oprofile source. Note that both the file format
and the library interface may change at will, they are not stable APIs
or ABIs.

> 2. Are there any tools doing this?

There are no public users that I know of. Some people have private
implementations.

Why do you want to do it yourself?

> 3. What is the format of the binary files?

Use libdb. Then use the iterator. The odb_key_t value is:

- for normal sample files: the *file* offset of the sample
- for callgraph files:
(the *file* offset of the caller << 32 | the *file* offset of the callee)

the odb_value_t is the number of samples at that location.

regards
john

Yahoo! India Matrimony: Find your life partner online.