A bit more...

>>stat (and others) do not really seem to be the problem. Darcs spends the
>>most time waiting, spending roughly 96% of the time in __semwait_signal,
>>most probably because of read_nocancel and select.

> How do we find out what this means?  What's this __semwait_signal?

Pieter on #macdev also said that the semaphore is probably being used
for the read_nocancel and the select.

OK then where do we go from here?  Miserable is my low-level ignorance
with undergrad CSE381 but a distant memory [1].

Whipping out /Advanced Programming in the UNIX Environment/, I see that
there may be a concept of IO Multiplexing to grasp, and that the
select() function

 * takes a set of descriptors you're interested in
 * waits until a descriptor is ready
 * returns which descriptors are ready

OK... but what's the wider context here?  What's causing these select()
to be called and why?

And what's this read_nocancel?

>>the call numbers, __semwait_signal is called very rarely, compared to
>>the calls to read, mmap, etc.

Hmm...

> OK, this bears highlighting:
> 
>  * that's 8 minutes out of 9 minutes fetching ghc locally in __semwait_signal
>  * a function which is called less than 6000 times (cf. 87000 stat)

Err, hang on, that 8 minutes out of 9 number is bogus, sorry!

I had dumbly plugged in "4474726631771 nanoseconds in minutes" into
Google's converter tool but missed a digit.  With the new 74 minute
number, that can't mean what I assumed it meant.  Then what do these
times correspond to?
 
> So this smells like the right kind of fishy.  Is this the kind of thing
> we may be able to just poke and suddenly find ourselves with dramatic
> improvements on OS X?

> Could the fancy graphical developer tools from Apple help with this at
> all?

Would the DTrace probles in GHC 6.13 help us to gain any insight?
* http://hackage.haskell.org/trac/ghc/wiki/DTrace

How about Instruments and Shark?
* http://justtesting.org/profiling-garbage-collection-in-haskell-with
* 
http://developer.apple.com/mac/library/DOCUMENTATION/DeveloperTools/Conceptual/InstrumentsUserGuide/Introduction/Introduction.html
* http://www.jonathansaggau.com/blog/2008/09/using_shark_and_custom_dtrace.html 

[1] And if you happen to be in an undergraduate university setting
    taking a similar class <http://www.seas.upenn.edu/~cse381/>, pay
    more attention! It seems 1998-Eric's effort was woefully inadequate.

-- 
Eric Kow <http://www.nltg.brighton.ac.uk/home/Eric.Kow>
For a faster response, please try +44 (0)1273 64 2905.

Attachment: signature.asc
Description: Digital signature

_______________________________________________
darcs-users mailing list
darcs-users@darcs.net
http://lists.osuosl.org/mailman/listinfo/darcs-users

Reply via email to