Re: Shark woes
Re: Shark woes
- Subject: Re: Shark woes
- From: Rick Altherr <email@hidden>
- Date: Mon, 16 Jul 2007 17:21:01 -0700
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
_______________________________________________
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
References: | |
| >Shark woes (From: Keith Wiley <email@hidden>) |