Skip to content

SCC call-stack from `error` missing call-sites

For some reason the -prof stack that error attaches only includes the top-level CAF. This is with the default build settings (which I believe are the release settings?)

$ cat Foo.hs
main = print (foo [1])
foo xs = tail (tail xs)

$ ./inplace/bin/ghc-stage2 --make -prof -fprof-auto-calls Foo.hs
[1 of 1] Compiling Main             ( Foo.hs, Foo.o ) [flags changed]
Linking Foo ...

$ ./Foo
Foo: Prelude.tail: empty list
CallStack (from -prof):
  GHC.List.CAF (<entire-module>)

I would expect to at least see the call-site of foo (if not also tail) in the stack.

Trac metadata
Trac field Value
Version 8.0.1-rc1
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component Profiling
Test case
Differential revisions
BlockedBy
Related
Blocking
CC simonmar
Operating system
Architecture
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information