public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* gprof output question
@ 2014-02-20 23:42 MR ZenWiz
  2014-02-21 17:51 ` Tim Prince
  0 siblings, 1 reply; 3+ messages in thread
From: MR ZenWiz @ 2014-02-20 23:42 UTC (permalink / raw)
  To: gcc-help

In using gprof on a large C++ app, there are a number of functions in
the output that do not have any class name or parameters associated
with them.

In a thorough search of the app source, I cannot find any functions
defined with a particular name that shows up like this in the gprof
output.

How can I track down where these functions live?

In the call trace section, they show up as "spontaneous," so I can't
even tell from where they are called.

Any guidance would be most appreciated.

Thanks.

MR

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

* Re: gprof output question
  2014-02-20 23:42 gprof output question MR ZenWiz
@ 2014-02-21 17:51 ` Tim Prince
  2014-02-21 18:23   ` MR ZenWiz
  0 siblings, 1 reply; 3+ messages in thread
From: Tim Prince @ 2014-02-21 17:51 UTC (permalink / raw)
  To: gcc-help


On 2/20/2014 6:42 PM, MR ZenWiz wrote:
> In using gprof on a large C++ app, there are a number of functions in
> the output that do not have any class name or parameters associated
> with them.
>
> In a thorough search of the app source, I cannot find any functions
> defined with a particular name that shows up like this in the gprof
> output.
>
> How can I track down where these functions live?
>
> In the call trace section, they show up as "spontaneous," so I can't
> even tell from where they are called.
>
> Any guidance would be most appreciated.
>
> Thanks.
>
> MR
A function called from a source file not built with -pg or via a 
function pointer (so that the actual function isn't known at compile 
time) would likely produce a <spontaneous>.  It's also helpful to use 
-static linking.

-- 
Tim Prince

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

* Re: gprof output question
  2014-02-21 17:51 ` Tim Prince
@ 2014-02-21 18:23   ` MR ZenWiz
  0 siblings, 0 replies; 3+ messages in thread
From: MR ZenWiz @ 2014-02-21 18:23 UTC (permalink / raw)
  To: gcc-help

On Fri, Feb 21, 2014 at 9:51 AM, Tim Prince <n8tm@aol.com> wrote:
>
> On 2/20/2014 6:42 PM, MR ZenWiz wrote:
>>
>> In using gprof on a large C++ app, there are a number of functions in
>> the output that do not have any class name or parameters associated
>> with them.
>>
>> In a thorough search of the app source, I cannot find any functions
>> defined with a particular name that shows up like this in the gprof
>> output.
>>
>> How can I track down where these functions live?
>>
>> In the call trace section, they show up as "spontaneous," so I can't
>> even tell from where they are called.
>>
>> Any guidance would be most appreciated.
>>
>> Thanks.
>>
>> MR
>
> A function called from a source file not built with -pg or via a function
> pointer (so that the actual function isn't known at compile time) would
> likely produce a <spontaneous>.  It's also helpful to use -static linking.
>
The external libraries involved here are all statically linked.

That does help, though.  I've created a test version that uses a
different library and we'll see what happens.  Hopefully it will
confirm my diagnosis and we can move forward.

Thanks.

MR

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

end of thread, other threads:[~2014-02-21 18:23 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-02-20 23:42 gprof output question MR ZenWiz
2014-02-21 17:51 ` Tim Prince
2014-02-21 18:23   ` MR ZenWiz

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