
#12962: No automatic SCC annotations for functions marked INLINABLE -------------------------------------+------------------------------------- Reporter: MikolajKonarski | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Profiling | Version: 8.0.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: #12963 | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by MikolajKonarski): * related: => #12963 @@ -15,0 +15,4 @@ + + Edit: Ufortunately, the workaround by using `-fexpose-all-unfoldings` + turns out to be not acceptable for me, see #12963. I'm also no longer sure + about the last paragraph. New description: Judging from .prof files and the -xc and -prof callstacks, GHC adds no automatic SCC annotations for functions marked `INLINABLE`. The user's guide only mentions `INLINE`: https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/profiling.ht..., not `INLINABLE`. Is it a bug in documentation or implementation? In my case I managed to work around by using `-fexpose-all-unfoldings` instead of the tons of `INLINABLE` I was using before, but in general case, adding all the SCC annotations by hand seems prohibitive. e.g., in code that needs a lot of `INLINABLE` to enable specialization. Since `-fexpose-all-unfoldings` does not inhibit profiling and compiling with no optimization doesn't help recover it, the culprit is probably not the actual inlining or specialization, but rather handling of the `INLINABLE` pragma itself. Edit: Ufortunately, the workaround by using `-fexpose-all-unfoldings` turns out to be not acceptable for me, see #12963. I'm also no longer sure about the last paragraph. -- Comment: Ufortunately, the workaround by using `-fexpose-all-unfoldings` turns out to be not acceptable for me, see #12963. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12962#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler