Re: Shark woes
Re: Shark woes
- Subject: Re: Shark woes
- From: Rick Altherr <email@hidden>
- Date: Wed, 18 Jul 2007 14:13:36 -0700
Shark just does a fork()/exec() to launch the process. stdout and
stderr are inherited from Shark. That means that both of them should
end up in the console log. If you want to get something more direct,
you can launch Shark in Terminal by running:
/Developer/Applications/Performance Tools/Shark.app/Contents/MacOS/Shark
Then all the stdout/stderr should go right to the terminal.
As I said earlier, I'm betting that your app is looking for data
files by relative path. That means that the working directory needs
to be specified correctly. Since you were having problems with the
working directory earlier, I'm guessing that this is still the
problem. What path is Shark telling you is an invalid working
directory?
--
Rick Altherr
Architecture and Performance Group
email@hidden
On Jul 18, 2007, at 1:34 PM, Keith Wiley wrote:
Where in Console would I see the std out from a Shark run? I don't
see anything in the console log or the system log. The output has
to be going SOMEwhere. Where the heck did it go? I really need to
figure out why a Shark run behaves differently (runs much much
faster) than an Xcode debugger run. The output files that should
be generated don't appear anywhere on the computer (a good
indication of why the Shark run is so fast, it probably crashed),
the std out is missing...I need to see the output to find the
problem. What am I supposed to do here?
...frustrated...
On Jul 17, 2007, at 9:44 AM, Rick Altherr wrote:
Stdin and stderr aren't explicitly set up so they are likely to
route to Console.app. I'm not sure why it thinks the initial
working directory is invalid. Do you have an example of what the
working directory is being set to?
--
Rick Altherr
Architecture and Performance Group
email@hidden
On Jul 17, 2007, at 9:11 AM, Keith Wiley wrote:
Okay, but why does it always claim the initial setting for the
working directory is invalid?
Where does standard out and standard err go during a Shark run.
Again, I can't find these terms in the Shark help. As described
below, a Shark run of my program goes very quickly, so it is not
performing a lot of the computation involved. I'm guessing it's
bailing, perhaps because it can't find a file, but I can't see
any error messages.
Thanks.
On Jul 16, 2007, at 5:21 PM, Rick Altherr wrote:
The working directory is the directory that your application
executes in. Thus, when you start executing with your working
directory as /tmp and you try to open a file name "foo", you
really open /tmp/foo. The working directory is simply the
directory used when a relative path is provided to file system
calls. By default, the working directory is the directory where
the executable exists. For an OS X app, this will be the
location of the actual executable in the .app bundle structure
(i.e. /Applications/MyApp.app/Contents/MacOS/).
I'm betting that your app is referencing a relative path to a
data file and is failing to find it since the working directory
isn't being set to the proper path.
We definitely need to document what the working directory is
better.
--
Rick Altherr
Architecture and Performance Group
email@hidden
On Jul 16, 2007, at 4:54 PM, Keith Wiley wrote:
When I launch Shark using the "Launch Using Performance Tool"
submenu, two windows appear, one titled "Shark" and one titled
"Launch Process". The Launch Process always has a message in
the lower left corner that says "Invalid path to working
directory". There is a place in that window where I can assign
a different working directory, but I have no idea what I'm
supposed to put here. The shark documentation has no
explanation of this parameter (the word "working" only occurs
twice in the docs and neither instance relates to this issue).
So I assign some arbitrary directory and the message always
invariably goes away, even if I assign the directory that was
already assigned when I launched Shark, but this undims the OK
button, so I've tried it that way, I've tried other
directories, all kinds of stuff. So I hit he OK button. Shark
does its thing. What I don't understand is, if I run the
program from the command line it takes fair amount of time to
run, about 153 seconds. Likewise, if I run the program from
Xcode, but without Shark, it runs for the same amount of time
and produces the same standard I/O. However, when I run it
using Shark, it zips through in a couple of seconds, so it is
not performing the same computation.
I am unsure where to observe the standard output during a Shark
run and I don't have any theories as to why a Shark run clearly
performs a subset of my computation, as if some path or
something is lost and the program effectively bails. I can't
really tell what's going on because I don't where the output
went. Where does the standard output go during a Shark run?
Any help on any of these issues?
Thank you.
__________________________________________________________________
______
Keith Wiley email@hidden http://
www.cs.unm.edu/~kwiley
"I do not feel obliged to believe that the same God who has
endowed us
with sense, reason, and intellect has intended us to forgo
their use."
-- Galileo Galilei
__________________________________________________________________
______
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40apple.com
This email sent to email@hidden
____________________________________________________________________
____
Keith Wiley email@hidden http://
www.cs.unm.edu/~kwiley
"I used to be with it, but then they changed what it was. Now,
what I'm
with isn't it, and what's it seems weird and scary to me."
-- Abe (Grandpa) Simpson
____________________________________________________________________
____
______________________________________________________________________
__
Keith Wiley email@hidden http://
www.cs.unm.edu/~kwiley
"Luminous beings are we, not this crude matter."
-- Yoda
______________________________________________________________________
__
_______________________________________________
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