From: "Frank Ch. Eigler" <fche@redhat.com>
To: Scott Dattalo <scott@dattalo.com>
Cc: sid@sources.redhat.com
Subject: Re: Profiling
Date: Tue, 25 Jun 2002 18:37:00 -0000 [thread overview]
Message-ID: <20020625213720.A14440@redhat.com> (raw)
In-Reply-To: <Pine.LNX.4.44.0206251651490.17961-100000@ruckus.brouhaha.com>; from scott@dattalo.com on Tue, Jun 25, 2002 at 05:03:05PM -0700
Hi -
On Tue, Jun 25, 2002 at 05:03:05PM -0700, Scott Dattalo wrote:
> I'm trying to collect profile info on my ARM-based application. [...]
> connect-pin main perform-activity -> gprof sample
> connect-pin main stopping -> gprof store
The "perform-activity" pin may signal infrequently compared to
CPU instruction rates, so you will get a relatively low sample rate.
You could connect that gprof sample pin from another source, such as
the scheduler's CPU-bound NNN-output signal.
> [...]
> Now when I run gprof:
> $ gprof --flat-profile gmon.out
> I get the error:
> gprof: gmon.out: not in a.out format
This is a simple gprof usage error. gprof implicitly looks for the
file named gmon.out, but it doesn't know what *target executable* to
relate it to. gprof needs to process the executable in order to
extract its symbol table, so that the PC sample addresses in gmon.out
can become sensible. So, all you need to do is build the cross-gprof,
and run
arm-elf-gprof file.exe
By the way, the "--flat-profile" option is not always needed any more,
as sid can collect call-graph profiling information from cooperating
cpu models. (They need to drive a special c-call from subroutine
call semantics.) I don't recall if the ARM cpu model includes the
few lines of code for this. If you're interested in fuller profiling,
I'd be happy to give pointers for completing that few-minute job.
> Hmm. After reading the gprof docs, I added -pg to my CFLAGS options in my
> make files. [...]
Right - this requests gcc to instrument the target code.
sid can profile uninstrumented target code.
(In some cases, sid can execute -pg-instrumented code and
produce a gmon.out file, but this requires many more pieces
of target software, and has some different properties.)
- FChE
next prev parent reply other threads:[~2002-06-26 1:37 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-06-25 17:03 Profiling Scott Dattalo
2002-06-25 18:37 ` Frank Ch. Eigler [this message]
2002-06-25 19:01 ` Profiling Scott Dattalo
2002-06-25 19:08 ` Profiling Frank Ch. Eigler
2002-06-26 10:41 ` Profiling Scott Dattalo
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=20020625213720.A14440@redhat.com \
--to=fche@redhat.com \
--cc=scott@dattalo.com \
--cc=sid@sources.redhat.com \
/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).