Ticket #6131 (closed bug: fixed)
-fprof-auto adds cost centers to INLINE functions
| Reported by: | akio | Owned by: | |
|---|---|---|---|
| Priority: | high | Milestone: | 7.4.3 |
| Component: | Profiling | Version: | 7.4.2-rc1 |
| Keywords: | Cc: | ||
| Operating System: | Linux | Architecture: | x86_64 (amd64) |
| Type of failure: | Incorrect result at runtime | Difficulty: | Unknown |
| Test Case: | profiling/should_run/profinline001 | Blocked By: | |
| Blocking: | Related Tickets: |
Description
According to the Section 5.2 of User's Guide, -fprof-auto should add cost centers only to functions that are not marked INLINE. However GHC 7.4 doesn't respect this.
A simple example:
foo :: Integer -> Integer
foo x = x + 100
{-# INLINE foo #-}
main = print $ loop (10000000::Int) 10000000000000000000000
where
loop 0 x = x
loop n x = loop (n-1) (foo x)
Compile and run this like:
% ghc -prof -fprof-auto -O2 test.hs % ./test +RTS -p % grep foo test.prof
And you will see 'foo' is listed as a cost center.
This happens with GHC 7.4.1 and 7.4.2-rc1
Change History
Note: See
TracTickets for help on using
tickets.
