[GHC] #15604: Profiling RTS flag `-po` does not work

GHC ghc-devs at haskell.org
Wed Sep 5 08:06:13 UTC 2018


#15604: Profiling RTS flag `-po` does not work
-------------------------------------+-------------------------------------
           Reporter:  osa1           |             Owner:  (none)
               Type:  bug            |            Status:  new
           Priority:  normal         |         Milestone:  8.6.1
          Component:  Profiling      |           Version:  8.5
           Keywords:                 |  Operating System:  Unknown/Multiple
       Architecture:                 |   Type of failure:  None/Unknown
  Unknown/Multiple                   |
          Test Case:                 |        Blocked By:
           Blocking:                 |   Related Tickets:
Differential Rev(s):                 |         Wiki Page:
-------------------------------------+-------------------------------------
 The RTS flag documentation says this about `-po`:

 {{{
 empty:   -p         Time/allocation profile in tree format
 empty:              (output file <output prefix>.prof)
 empty:   -po<file>  Override profiling output file name prefix (program
 name by default)
 }}}

 However it current doesn't work as advertised in 8.4 and HEAD. When I use
 `-po<file>` no file is generated. Reproducer:

 {{{
 $ cat empty.hs
 main = return ()
 $ ghc-stage2 empty.hs -fforce-recomp -rtsopts -prof
 [1 of 1] Compiling Main             ( empty.hs, empty.o )
 Linking empty ...
 $ ./empty +RTS -poprof
 $ ls | grep prof
 $
 }}}

 Just `-p` works:

 {{{
 $ ./empty +RTS -p
 $ ls | grep prof
 empty.prof
 $
 }}}

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


More information about the ghc-tickets mailing list