[GHC] #10661: Regression: hp2ps reports `integer unexpected` on new style package keys

GHC ghc-devs at haskell.org
Sun Jul 19 19:20:52 UTC 2015


#10661: Regression: hp2ps reports `integer unexpected` on new style package keys
-------------------------------------+-------------------------------------
              Reporter:  thomie      |             Owner:
                  Type:  bug         |            Status:  new
              Priority:  high        |         Milestone:  7.12.1
             Component:  Profiling   |           Version:  7.11
              Keywords:              |  Operating System:  Unknown/Multiple
          Architecture:              |   Type of failure:  None/Unknown
  Unknown/Multiple                   |
             Test Case:              |        Blocked By:
  concurrent/prog002/concprog002     |
              Blocking:              |   Related Tickets:
Differential Revisions:              |
-------------------------------------+-------------------------------------
 hp2ps reports `integer unexpected` when run on a profile file created with
 HEAD. The profile file contains entries such as the following:

 {{{
 $ grep System.Random Test.hp
 9Kgekc9yEaLHLNUuw6paWL:System.Random.StdGen     24
 9Kgekc9yEaLHLNUuw6paWL:System.Random.StdGen     24
 9Kgekc9yEaLHLNUuw6paWL:System.Random.StdGen     24
 9Kgekc9yEaLHLNUuw6paWL:System.Random.StdGen     24
 }}}


 To reproduce, first install random (there might be a simpler way, but this
 one is required to run `make TEST=concprog002 WAY=threaded2_hT`, which is
 failing at the moment):

 {{{
 $ cabal install random==1.1 --with-ghc=ghc-7.11.20150711 -v0
 }}}

 Note the package key for random starts with a number:

 {{{
 $ ghc-pkg --package-db=.ghc/x86_64-linux-7.11.20150711/package.conf.d/
 describe random | grep key
 key: 9Kgekc9yEaLHLNUuw6paWL
 }}}

 Then create a heap profile for the following program with `-hT`, and try
 to run `hp2ps` on it:

 {{{
 $ cat Test.hs
 import System.Random
 main = sequence $ replicate 1000 (randomIO :: IO Int)

 $ ghc-7.11.20150711 Test.hs -rtsopts -fforce-recomp -v0

 $ ./Test +RTS -hT -i0.001

 $ hp2ps Test.hp
 hp2ps: Test.hp, line 12: integer unexpected
 }}}

 Note that in the profile file the entries for libraries like `base`, `ghc-
 prim` and `integer-gmp` don't contain package keys (maybe the entries for
 random shouldn't either?):
 {{{
  base:Data.Dynamic.Dynamic       24
  integer-gmp:GHC.Integer.Type.Jp#        16
  ghc-prim:GHC.Types.:    24
 }}}

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


More information about the ghc-tickets mailing list