#5282: Bizarre results from -P profiler on OS X
---------------------------------+------------------------------------------
    Reporter:  bos               |        Owner:                             
        Type:  bug               |       Status:  new                        
    Priority:  high              |    Milestone:  7.2.1                      
   Component:  Runtime System    |      Version:  7.0.3                      
    Keywords:                    |     Testcase:                             
   Blockedby:                    |   Difficulty:                             
          Os:  Unknown/Multiple  |     Blocking:                             
Architecture:  x86_64 (amd64)    |      Failure:  Incorrect result at runtime
---------------------------------+------------------------------------------

Comment(by simonmar):

 So the single-threaded RTS uses a CPU timer (that is, the signals are
 generated every 20ms of CPU time), whereas the multi-threaded RTS uses a
 wall-clock timer.  This is explained in a comment at the top of
 source:rts/posix/Itimer.c (the comment says "Major bogosity", but I now
 think that's overstating it a bit, it's been this way for ever).

 So perhaps on Mac OS X the CPU time signals are occurring at predictable
 places, whereas wall-clock signals are more accurate.  It would be
 unfortunate if we had to switch to using the wall-clock timer, because
 it's less accurate for profiling (periods when the process is descheduled
 introduce noise into the results).

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/5282#comment:15>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler

_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to