
Hi list, I'm currently working on a pretty simple Haskell program to manipulate memory dumps taken from an embedded environment. The memory dumps are 64MB in length, so I manipulate them using Don Stuart's Fast Packed String library, as it supports mmapped files. I'm a relative Haskell newbie, so unsurprisingly my first attempt has dreadful performance (30% of time spent in GC), and I want to do some profiling to find out why. The difficulty is that I seem to be unable to produce a profiling-enabled version of the FPS library, which means that my application cannot be compiled with profiling enabled. I notice that most of the GHC libraries seem to come with both profiling and non-profiling versions enabled. Does anyone know how I can create both profiling and non-profiling version of FPS? As a matter of interest (feature request), why doesn't Cabal build profiling and non-profiling libraries as a matter of course, given that you can't link non-profiling code with profiling-enabled code? Thanks in advance Jeremy

With a recent snapshot of Cabal you can build a profiled version of any library as follows (including for FPS): $ ./Setup.hs configure -p You'll then see ./Setup.hs build build the lib twice, once with and once without profiling. /usr/bin/ar: creating dist/build/libHSfps-0.1.a /usr/bin/ar: creating dist/build/libHSfps-0.1_p.a I'm using $ ghc-pkg list Cabal /home/dons/lib/ghc-6.4.1/package.conf: Cabal-1.1.4 Cheers, Don jeremy.odonoghue:
Hi list, I'm currently working on a pretty simple Haskell program to manipulate memory dumps taken from an embedded environment. The memory dumps are 64MB in length, so I manipulate them using Don Stuart's Fast Packed String library, as it supports mmapped files. I'm a relative Haskell newbie, so unsurprisingly my first attempt has dreadful performance (30% of time spent in GC), and I want to do some profiling to find out why. The difficulty is that I seem to be unable to produce a profiling-enabled version of the FPS library, which means that my application cannot be compiled with profiling enabled. I notice that most of the GHC libraries seem to come with both profiling and non-profiling versions enabled. Does anyone know how I can create both profiling and non-profiling version of FPS? As a matter of interest (feature request), why doesn't Cabal build profiling and non-profiling libraries as a matter of course, given that you can't link non-profiling code with profiling-enabled code? Thanks in advance Jeremy
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
participants (2)
-
dons@cse.unsw.edu.au
-
Jeremy O'Donoghue