Re: Shark not profiling correctly on command-line tool
Re: Shark not profiling correctly on command-line tool
- Subject: Re: Shark not profiling correctly on command-line tool
- From: Rick Altherr <email@hidden>
- Date: Thu, 19 Feb 2009 12:29:58 -0800
On Feb 19, 2009, at 11:49 AM, Wade Williams wrote:
I've got a command-line tool (written in straight C) that Shark is
not generating any samples for.
The tool was built with -g -O0. It runs as root since it attaches
to port 80 and it stays attached to the terminal that started it.
When I try to run Shark against it, I get:
ERROR:
No samples taken. [CHUDDataSource]
What configuration are you trying to use? If you use something like
Time Profile on a process that isn't actively doing anything (i.e. not
using any CPU cycles), then it won't be sampled. So a process solely
listening for traffic on a socket will do this. A Time Profile (All
Thread States) on the other hand will sample the process even if it is
idle or blocked and thus will return samples.
If I restart the machine I can get it to actually produce some
output for 1 or 2 attempts, but the output has only 1 line that says
"Unknown library". After 1 or 2 tries, Shark goes back to "No
samples taken. [CHUDDataSource]".
This sounds very much like your app isn't doing anything and thus we
get sporadic samples when the OS does some minor bookkeeping.
I have used the CHUD remover to remove CHUD and reinstalled the
latest version from Developer connection. The Shark version is
4.6.1 (227). The Mac in question is a MacBook Pro 2.3Ghz Core 2 Duo
running 10.5.6.
Any thoughts?
Have your app do something when you go to sample it.
Thanks,
Wade
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
@apple.com
This email sent to email@hidden
--
Rick Altherr
Architecture and Performance Group
email@hidden
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden