This is the mail archive of the
sid@sources.redhat.com
mailing list for the SID project.
Profiling
- From: Scott Dattalo <scott at dattalo dot com>
- To: sid at sources dot redhat dot com
- Date: Tue, 25 Jun 2002 17:03:05 -0700 (PDT)
- Subject: Profiling
I'm trying to collect profile info on my ARM-based application. I followed
the directions on the SID web page regarding profiling. Basically, I added
the two options "--gprof" and "--trace-counter" to the arm-elf-sid
invocation. I also created a .conf script. According to the SID
documentation, the two lines:
connect-pin main perform-activity -> gprof sample
connect-pin main stopping -> gprof store
should be in the .conf file. I tried the conf file with and without these
lines.
Now when I run the simulator (arm-elf-gdb which is built from the Insight
5.2 sources), connect to sid, simulate, and exit, the file gmon.out is
created. Cool.
Now when I run gprof:
$ gprof --flat-profile gmon.out
I get the error:
gprof: gmon.out: not in a.out format
Hmm. After reading the gprof docs, I added -pg to my CFLAGS options in my
make files. Unfortunately, there is no profile library with which I can
link. So my project doesn't build. Bummer.
Question: How *do* you profile? Do I need to build an arm-elf-gprof? Is
there some other gprof option I need to add? Did I misunderstand the SID
instructions?
Scott