Gmail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
Cpu profiler: Nodes are not connected
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  11 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Raju Mohanapu  
View profile  
 More options Jun 22, 1:04 pm
From: Raju Mohanapu <raju.mohan...@gmail.com>
Date: Mon, 22 Jun 2009 10:04:40 -0700 (PDT)
Local: Mon, Jun 22 2009 1:04 pm
Subject: Cpu profiler: Nodes are not connected
Hello Folks,
I'm cpu-profiling a multi-threaded application on a linux 32 bit
machine.

The profiler captures about 1000 samples, but no two nodes on the
graph are connected.
In the textual version, "Percentage of profiling samples in this
function" & "Percentage of profiling samples in this function and its
callees" are same on every line.

I'm using ProfilerStart() and ProfilerStop() methods to trigger the
start & stop of profiling. The binary is linked with libprofiler.so.
It is definitely profiling all my threads.

The CPUPROFILE_FREQUENCY is set to 4000.

Any guess why its not able to link the method calls? Is that something
to do with stack unwind issues?

Appreciate your reply.

Thanks
Raju


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Craig Silverstein  
View profile  
 More options Jun 22, 2:23 pm
From: Craig Silverstein <csilv...@google.com>
Date: Mon, 22 Jun 2009 11:23:36 -0700
Local: Mon, Jun 22 2009 2:23 pm
Subject: Re: Cpu profiler: Nodes are not connected

} Any guess why its not able to link the method calls? Is that
} something to do with stack unwind issues?

It could be.  But on 32 bit machines, you'd expect stack unwinding to
work ok.

As an experiment, try commenting out the ProfilerStart/Stop calls, and
then running your binary with
   env CPUPROFILE=/var/tmp/whatever ./your_binary

Does that graph look any better?

craig


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Raju Mohanapu  
View profile  
 More options Jun 29, 5:09 am
From: Raju Mohanapu <raju.mohan...@gmail.com>
Date: Mon, 29 Jun 2009 02:09:56 -0700 (PDT)
Local: Mon, Jun 29 2009 5:09 am
Subject: Re: Cpu profiler: Nodes are not connected
Setting the CPUPROFILE didn't show any difference.

I had perftools 0.99 profiling successfully on few other multi-
threaded applications. So, I tried 0.99 build again on this one. And
to my surprise, the graph was perfect.

Any guess why an older build is good? Any specific configure/make
options that I should pay attention to in the new releases?

Thank you for your time

cheers
Raju

On Jun 22, 7:23 pm, Craig Silverstein <csilv...@google.com> wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Craig Silverstein  
View profile  
 More options Jun 29, 4:17 pm
From: Craig Silverstein <csilv...@google.com>
Date: Mon, 29 Jun 2009 13:17:51 -0700
Local: Mon, Jun 29 2009 4:17 pm
Subject: Re: [Opensource-perftools] Re: Cpu profiler: Nodes are not connected

} I had perftools 0.99 profiling successfully on few other multi-
} threaded applications. So, I tried 0.99 build again on this one. And
} to my surprise, the graph was perfect.

Weird.  Can you maybe include the generated profile files in these two
cases (0.99 and 1.3)?  I wonder if the list of symbols is different,
or they're just being resolved differently, or what.

craig


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Arnuschky  
View profile  
 More options Jul 7, 11:39 am
From: Arnuschky <arnusc...@xylon.de>
Date: Tue, 7 Jul 2009 08:39:08 -0700 (PDT)
Local: Tues, Jul 7 2009 11:39 am
Subject: Re: Cpu profiler: Nodes are not connected
Hi,

I have the same problem, but with both versions (1.3 and 0.99.1). I
get a long list of nodes, which are not connected. Single-thread
application with dynamic linking. I start pprof like this:

libtool --mode=execute pprof prog ./prog.prof

Any hints?

Arne

On Jun 29, 10:17 pm, Craig Silverstein <csilv...@google.com> wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Craig Silverstein  
View profile  
 More options Jul 7, 1:07 pm
From: Craig Silverstein <csilv...@google.com>
Date: Tue, 07 Jul 2009 10:07:26 -0700
Local: Tues, Jul 7 2009 1:07 pm
Subject: Re: [Opensource-perftools] Re: Cpu profiler: Nodes are not connected

} I have the same problem, but with both versions (1.3 and 0.99.1). I
} get a long list of nodes, which are not connected. Single-thread
} application with dynamic linking. I start pprof like this:
}
} libtool --mode=execute pprof prog ./prog.prof

Hmm, it could be any number of things.  What architecture are you on?
It may be you're on x86_64 and have compiled perftools to use frame
pointers, but the dynamic libraries don't have frame pointers.  What
do your profile files look like?

craig


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Arnuschky  
View profile  
 More options Jul 8, 5:25 am
From: Arnuschky <arnusc...@xylon.de>
Date: Wed, 08 Jul 2009 11:25:23 +0200
Local: Wed, Jul 8 2009 5:25 am
Subject: Re: [Opensource-perftools] Re: Cpu profiler: Nodes are not connected
Hi,

first, thanks for answering!

On Di, 2009-07-07 at 10:07 -0700, Craig Silverstein wrote:

> Hmm, it could be any number of things.  What architecture are you on?

Ah, totally forgot to include this information *blush*. I'm on x86,
Gentoo Linux (2.6.29-gentoo-r5).

> It may be you're on x86_64 and have compiled perftools to use frame
> pointers, but the dynamic libraries don't have frame pointers.

No, I compiled it without any special flags -- just the standard set
used by gentoo:

./configure --prefix=/usr --build=i686-pc-linux-gnu  
        --host=i686-pc-linux-gnu --mandir=/usr/share/man
        --infodir=/usr/share/info --datadir=/usr/share
        --sysconfdir=/etc --localstatedir=/var/lib

> What do your profile files look like?

Well, I don't really know what you mean by that. The output is always
the same, a list of nodes:

Total: 126907 samples
   36502  28.8%  28.8%    36502  28.8% monstartup
   13256  10.4%  39.2%    13256  10.4% mcount
    6564   5.2%  44.4%     6564   5.2% swarmanoid::C3DMath::intersects
    5043   4.0%  48.4%     5043   4.0% __i686.get_pc_thunk.bx
    4964   3.9%  52.3%     4964   3.9% h_errno
    4868   3.8%  56.1%     4868   3.8% _init
    3990   3.1%  59.2%     3990   3.1% _nv000125gl
    3660   2.9%  62.1%     3660   2.9% swarmanoid::CVector3::CVector3
     ..     ..    ..

I sent the profile in case you want to have a look at it.

Regards,
Arne


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Craig Silverstein  
View profile  
 More options Jul 8, 1:09 pm
From: Craig Silverstein <csilv...@google.com>
Date: Wed, 08 Jul 2009 10:09:25 -0700
Local: Wed, Jul 8 2009 1:09 pm
Subject: Re: [Opensource-perftools] Re: Cpu profiler: Nodes are not connected
Thank you for sending the profile file my way.  I looked at it, and
indeed, it shows a bunch (thousands) of unconnected nodes.  It's
almost like you weren't able to propertly get a stack trace.

What happens when you try to create a heap profile?  Does that work
any better?  If so, then the problem is with the cpu-profiler specific
code, perhaps getting the PC (did you see any errors regarding that
when you built the perftools package)?  If heap profile doesn't work
either, then the problem is more likely to be with getstracktrace or
similar.

Have you tried running the unittests that come with the package?  Do
they all pass?

craig


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Arnuschky  
View profile  
 More options Jul 10, 5:12 am
From: Arnuschky <arnusc...@xylon.de>
Date: Fri, 10 Jul 2009 11:12:19 +0200
Local: Fri, Jul 10 2009 5:12 am
Subject: Re: [Opensource-perftools] Re: Cpu profiler: Nodes are not connected
Hello,

> What happens when you try to create a heap profile?  Does that work
> any better?  

No, worse actually. I get the following error:
"Hooked allocator frame not found, returning empty trace"

> If so, then the problem is with the cpu-profiler specific
> code, perhaps getting the PC (did you see any errors regarding that
> when you built the perftools package)?  If heap profile doesn't work
> either, then the problem is more likely to be with getstracktrace or
> similar.

This seems to be the case. Might this be a problem with my global build
options on gentoo? I've got:

        CFLAGS="-march=prescott -O2 -pipe -fomit-frame-pointer"
        CXXFLAGS="${CFLAGS}"
        MAKEOPTS="-j5"
        CHOST="i686-pc-linux-gnu"

> Have you tried running the unittests that come with the package?  Do
> they all pass?

I rebuild 1.3, no errors at all. I ran the following unittests:

        heap-checker-death_unittest.sh
        heap-checker_unittest.sh
        heap-profiler_unittest.sh
        maybe_threads_unittest.sh
        profiler_unittest.sh

All of them passed. Might this have something todo with the dynamic
library loading we employ in our program? It's a very modular piece of
software, and we load almost all functionality as dynamic libraries
configured by an xml.

Additionally, the two largest nodes in the output are "monstartup" and
"mcount". These are usually used with gprof profiling support, right? I
disabled all -pg flags, they still show up. Does this have anything to
do with it or are you using the same methods for profiling?

Sorry, I really have no clue about the inner workings of this stuff.

Cheers,
Arne


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Craig Silverstein  
View profile  
 More options Jul 10, 2:42 pm
From: Craig Silverstein <csilv...@google.com>
Date: Fri, 10 Jul 2009 11:42:54 -0700
Local: Fri, Jul 10 2009 2:42 pm
Subject: Re: [Opensource-perftools] Re: Cpu profiler: Nodes are not connected

} Might this be a problem with my global build options on gentoo? I've
} got:
}         CFLAGS="-march=prescott -O2 -pipe -fomit-frame-pointer"

That would definitely do it!  Without frame pointers, you can't get
any useful stack trace information.  If you can rebuild with frame
pointers, you should be in much better shape for these tools.

craig


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Arnuschky  
View profile  
 More options Jul 14, 6:09 am
From: Arnuschky <arnusc...@xylon.de>
Date: Tue, 14 Jul 2009 12:09:00 +0200
Subject: Re: [Opensource-perftools] Re: Cpu profiler: Nodes are not connected
That did the trick, thanks! In the end, I just used my other Linux box
(Ubuntu), and it's fine.

Just a note concerning the .debs: I had to manually install graphviz,
apparently it's not listed in the debs dependencies.

Thanks
arne

On Fr, 2009-07-10 at 11:42 -0700, Craig Silverstein wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google