new llvm IR callbr instruction useful for proc-point splitting?

Ben Gamari ben at well-typed.com
Thu Dec 12 19:04:54 UTC 2019


Simon Peyton Jones <simonpj at microsoft.com> writes:

> Thanks Kavon.
>
> What news of CpsCall in LLVM?  That seems crucial.
>
> I didn’t know of an effort to use a different SP register. I seriously
> doubt that, with GHC’s use of zillions of small, heap-allocated stacks
> that move around during GHC, we’ll be able to leverage profiling or
> debugging tools in a serious way. But perhaps I need education.
>
I don't see there being a problem here:

 * DWARF debugging information is expressive enough to capture GHC's
   underflow frame concept, so unwinding across stack
   chunks shouldn't be problematic.

 * The fact that the stacks move shouldn't be a problem since
   either:

    * You are using gdb, which must pause the process to look at the stack
      anyways

    * You are using statistical sampling profiling (e.g. perf on Linux)
      which pauses the thread being sampled while capturing the stack
      state.

      If you sample during a GC then you won't capture any Haskell stack
      chunks so the fact that stacks might move isn't problematic; if
      you sample during mutator execution then the stack is guaranteed to
      be stationary.

Cheers,

- Ben

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 487 bytes
Desc: not available
URL: <http://mail.haskell.org/pipermail/ghc-devs/attachments/20191212/f315290c/attachment.sig>


More information about the ghc-devs mailing list