[GHC] #16045: improve dwarf support on OSX

GHC ghc-devs at haskell.org
Thu Dec 13 03:00:46 UTC 2018


#16045: improve dwarf support on OSX
--------------------------------------+---------------------------------
           Reporter:  carter          |             Owner:  (none)
               Type:  bug             |            Status:  new
           Priority:  normal          |         Milestone:
          Component:  Compiler        |           Version:  8.7
           Keywords:                  |  Operating System:  MacOS X
       Architecture:  x86_64 (amd64)  |   Type of failure:  None/Unknown
          Test Case:                  |        Blocked By:
           Blocking:                  |   Related Tickets:
Differential Rev(s):                  |         Wiki Page:
--------------------------------------+---------------------------------
 currently

 1) we dont have stack unwinding support on OSX (libDwarf is ELF format
 only)

 2) the current way dwarf data is generated on OSX / for macho triggers
 some segment issue  when linking base into a libbase archive, when g1 or
 g2 is set , but not when g0 is set. that is, even if we had a macho
 unwinding library for use with GHC, currently we can't even unwind base if
 we wanted to

 3) currently the stgcrun.c code for darwin/unix envs when build on OSX,
 can't be built with GCC, because of some mismatch in how llvm vs gcc
 flavored tools on osx handle dwarf. This means this file, IF we had
 unwinding support, would need to be built with clang (apple or llvm
 flavored).

 3 a)HOWEVER: on OSX the threaded RTS (when built with clang) is ~15%
 slower than the same built with GCC.

 3 b) so ideally, in a future world with unwinding on OSX, tweaking the
 build system to make sure that the STGCRUN.c code it always built with
 clang, or some other fix, that still permits a GCC built RTS OR otherwise
 does a fix to that GC rts perf issue, would be ideal

 Theres a few different action items here, and some of them are quite
 messy, but they all need to be done for decent perf and debugging
 experiences on OSX to be in the GHC future!

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


More information about the ghc-tickets mailing list