This is the mail archive of the
ecos-discuss@sourceware.org
mailing list for the eCos project.
Re: Issue with gprof
- From: Gary Thomas <gary at mlbassoc dot com>
- To: Picque Sébastien <S dot Picque at TELEVIC dot com>
- Cc: ecos-discuss at ecos dot sourceware dot org
- Date: Mon, 25 Jun 2007 08:24:53 -0600
- Subject: Re: [ECOS] Issue with gprof
- References: <A231E60AABF3F143B244E70FB6A3B65540B09B@nt-email.TELEVIC.COM>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Picque Sébastien wrote:
>
> Hi,
>
> I got a gmon.out from my target, but it seems to be impossible to extract the data.
> he gmon.out is received via tftp.
> When I run the command (under cygwin) : gprof gmon.out
> result : gprof: gmon.out : not in a.out format
>
> What does it mean ?
>
> gprof dhrystone
>
> no such file or directory
Look at how to run 'gprof':
$ gprof -h
Usage: gprof [-[abcDhilLsTvwxyz]] [-[ACeEfFJnNOpPqQZ][name]] [-I dirs]
[-d[num]] [-k from/to] [-m min-count] [-t table-length]
[--[no-]annotated-source[=name]] [--[no-]exec-counts[=name]]
[--[no-]flat-profile[=name]] [--[no-]graph[=name]]
[--[no-]time=name] [--all-lines] [--brief] [--debug[=level]]
[--function-ordering] [--file-ordering]
[--directory-path=dirs] [--display-unused-functions]
[--file-format=name] [--file-info] [--help] [--line] [--min-count=n]
[--no-static] [--print-path] [--separate-files]
[--static-call-graph] [--sum] [--table-length=len] [--traditional]
[--version] [--width=n] [--ignore-non-functions]
[--demangle[={none,auto,gnu,lucid,arm,hp,edg,gnu-v3,java,gnat,compaq}]]
[--no-demangle] [--demangler=dso:function] [@FILE]
[image-file] [profile-file...]
You need to provide it with both the executable program (eCos ELF application)
and the profile data. Something like:
$ gprof dhry gmon.out
Where 'dhry' is the name of the [ELF] program that you loaded and ran
on your platform, and 'gmon.out' is the profile result.
>
> Could somebody tell me what is wrong with it ? Moreover, by opening the gmon.out file (it looks to have almost every byte to 0)
The 'gmon.out' file is just a histogram of your program's
execution. Depending on how long it runs, the granularity
of your profile clock and how the profile was gathered (e.g.
the size of the "buckets"), you may see lots of 0's and only
a few values non-zero. Get 'gprof' to work and then see what
you're getting out.
- --
- ------------------------------------------------------------
Gary Thomas | Consulting for the
MLB Associates | Embedded world
- ------------------------------------------------------------
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org
iD8DBQFGf9A0maKbSsQGV8ARAht7AKCcU8pEUIq4+pj5vdgk8SfhGm08LgCgn6ic
O8KquaDnxMm0Q+GhiYQCdJA=
=x9DZ
-----END PGP SIGNATURE-----
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss