public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* profile mode output analysis (call stacks to source code mapping)
       [not found] <r2gf4359c1e1005070707had0f090nc4a4d5ab06ac32a6@mail.gmail.com>
@ 2010-05-07 14:09 ` Karel Gardas
  2010-05-10 18:11   ` Silvius Rus
  0 siblings, 1 reply; 2+ messages in thread
From: Karel Gardas @ 2010-05-07 14:09 UTC (permalink / raw)
  To: gcc

Hello,

with recent fixes into profile mode I've succeed even using it for
MICO[1] on OpenSolaris platform. It seems only compilation to static
libraries is supported at the moment, but never mind my server run
generates something. As it provides some hints I'd like to more
closely analyze I would definitely like to find the place in the
source code to which the advices apply. Is there any tool which
translates call stacks to humans or is there any documentation/hint
how to use generated call stack information to find out appropriate
place in the source code?

Thanks!
Karel
[1]: www.mico.org

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: profile mode output analysis (call stacks to source code mapping)
  2010-05-07 14:09 ` profile mode output analysis (call stacks to source code mapping) Karel Gardas
@ 2010-05-10 18:11   ` Silvius Rus
  0 siblings, 0 replies; 2+ messages in thread
From: Silvius Rus @ 2010-05-10 18:11 UTC (permalink / raw)
  To: Karel Gardas; +Cc: gcc

On Fri, May 7, 2010 at 7:09 AM, Karel Gardas <gardask@gmail.com> wrote:
> with recent fixes into profile mode I've succeed even using it for
> MICO[1] on OpenSolaris platform.  Is there any tool which
> translates call stacks to humans or is there any documentation/hint
> how to use generated call stack information to find out appropriate
> place in the source code?

Mapping code addresses to function names and line numbers is system
dependent.  That's one reason why line numbers are not produced by the
profile mode directly.

If you are using binutils, this should give you precise line number
information for debug binaries.
addr2line -e <path_to_binary> addr1 addr2 ...

If you don't have debug information or the debug information is
imprecise, you should still be able to map addresses to function
names:
addr2line -f -e <path_to_binary> addr1 addr2 ...

Other useful addr2line options are -i (print inlined stacks) and -C
(demangle C++ names).

Silvius

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-05-10 18:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <r2gf4359c1e1005070707had0f090nc4a4d5ab06ac32a6@mail.gmail.com>
2010-05-07 14:09 ` profile mode output analysis (call stacks to source code mapping) Karel Gardas
2010-05-10 18:11   ` Silvius Rus

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).