public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
From: Gary Thomas <gary@mlbassoc.com>
To: "Picque Sébastien" <S.Picque@TELEVIC.com>
Cc: ecos-discuss@ecos.sourceware.org
Subject: Re: [ECOS] Issue with gprof
Date: Tue, 26 Jun 2007 06:54:00 -0000	[thread overview]
Message-ID: <467FD035.9020304@mlbassoc.com> (raw)
In-Reply-To: <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

      reply	other threads:[~2007-06-25 14:25 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-26  2:00 Picque Sébastien
2007-06-26  6:54 ` Gary Thomas [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=467FD035.9020304@mlbassoc.com \
    --to=gary@mlbassoc.com \
    --cc=S.Picque@TELEVIC.com \
    --cc=ecos-discuss@ecos.sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).