[GHC] #9003: GHC eventlog: thread stop status codes modified (breaking ghc-events, threadscope, edentv)

GHC ghc-devs at haskell.org
Wed Apr 16 10:47:25 UTC 2014


#9003: GHC eventlog: thread stop status codes modified (breaking ghc-events,
threadscope, edentv)
-------------------------------+-------------------------------------------
        Reporter:  jberthold   |            Owner:  simonmar
            Type:  bug         |           Status:  new
        Priority:  normal      |        Milestone:  7.8.3
       Component:  Runtime     |          Version:  7.8.2
  System                       |         Keywords:
      Resolution:              |     Architecture:  Unknown/Multiple
Operating System:              |       Difficulty:  Easy (less than 1 hour)
  Unknown/Multiple             |       Blocked By:
 Type of failure:  Other       |  Related Tickets:
       Test Case:              |
        Blocking:              |
-------------------------------+-------------------------------------------

Comment (by ezyang):

 Here's another perspective: really this is just a bug in this function
 implementation:

 {{{
 INLINE_HEADER void traceEventStopThread(Capability          *cap
 STG_UNUSED,·
                                         StgTSO              *tso
 STG_UNUSED,·
                                         StgThreadReturnCode  status
 STG_UNUSED,
                                         StgWord32           info
 STG_UNUSED)
 {
     traceSchedEvent2(cap, EVENT_STOP_THREAD, tso, status, info);
     dtraceStopThread((EventCapNo)cap->no, (EventThreadID)tso->id,
                      (EventThreadStatus)status, (EventThreadID)info);
 }
 }}}

 We shouldn't cast from  `StgThreadReturnCode` to `EventThreadStatus`,
 really we should have some translation function from one to the other
 (coded in terms of the constants, so updating `Constants.h` works
 automatically).

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


More information about the ghc-tickets mailing list