[GHC] #8275: Loopification breaks profiling

GHC ghc-devs at haskell.org
Thu Sep 19 19:52:49 CEST 2013


#8275: Loopification breaks profiling
----------------------------------------+----------------------------------
        Reporter:  jstolarek            |            Owner:  jstolarek
            Type:  bug                  |           Status:  new
        Priority:  highest              |        Milestone:
       Component:  Profiling            |          Version:  7.7
      Resolution:                       |         Keywords:
Operating System:  Unknown/Multiple     |     Architecture:
 Type of failure:  Building GHC failed  |  Unknown/Multiple
       Test Case:                       |       Difficulty:  Unknown
        Blocking:  8298                 |       Blocked By:
                                        |  Related Tickets:
----------------------------------------+----------------------------------

Comment (by ezyang):

 If the C-- dump is too large, minimize the test case! Then you can look at
 each of the phases and see which one is inserting the extra stack check.
 It sounds like you have almost figured it out though.

 As for whether or not the LDV code needs to be done again, it depends on
 whether node (R1) changes when looping. If it does, yes, you need to run
 the LDV code, since the closure needs to be marked as used. Otherwise it
 will be idempotent, and you only need to run it once.

 This also reminds me, please make sure loopification interacts properly
 with `-falways-yields` (which guarantees that Haskell code will eventually
 yields); it sounds like either loopification must be disabled if always-
 yields is enabled, or the loop-back needs to insert a heap check for
 preemption purposes. And if a loop can be preempted, then the era can
 change, and yes, you need to run the LDV check after the preemption.

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



More information about the ghc-tickets mailing list