[GHC] #4414: scc001 fails: one SCC entered 0 times; another not mentioned when optimisation is on

GHC cvs-ghc at haskell.org
Wed Oct 27 11:02:34 EDT 2010


#4414: scc001 fails: one SCC entered 0 times; another not mentioned when
optimisation is on
---------------------------------+------------------------------------------
    Reporter:  igloo             |        Owner:  simonmar    
        Type:  bug               |       Status:  new         
    Priority:  normal            |    Milestone:  7.0.2       
   Component:  Profiling         |      Version:  6.12.3      
    Keywords:                    |     Testcase:              
   Blockedby:                    |   Difficulty:              
          Os:  Unknown/Multiple  |     Blocking:              
Architecture:  Unknown/Multiple  |      Failure:  None/Unknown
---------------------------------+------------------------------------------

Comment(by simonmar):

 Replying to [comment:5 igloo]:
 > I'm not sure I follow. Having the counts in the `.prof` file is
 convenient. Why can't the profiler do what hpc does to get it?

 We could make cost centres behave like HPC ticks and thus get reliable
 entry counts, but the downside is that it adds overhead.  Adding overhead
 is fine, except that it adds overhead in a non-uniform way, and thus
 distorts the profile.  If you inline a function and it gets almost
 completely optimised away, you really don't want to have the SCCs stick
 around just for the purposes of counting entries.  Ideally profiling
 should stay out of the way of the optimiser as far as possible.  HPC has
 slightly different goals, because it is not primarily a profiler.

 So we have a few options:

  * get the entry counts right
  * don't do entry counts at all
  * make a best effort to get entry counts, but don't compromise
 optimisation

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


More information about the Glasgow-haskell-bugs mailing list