
Hey all, I'm trying to profile my application, which makes use of MissingH. But when compiling with -prof -auto-all, I get the following error:
Language.hs:8:7: Could not find module `Data.String': Perhaps you haven't installed the profiling libraries for package MissingH-0.18.0? Use -v to see a list of the files searched for.
When compiling without those options, everything works just fine. I built missingh from source, and added -prof -auto-all to GHCPARMS, and did a ./setup configure,make,install and still no result. Does anyone know what could be wrong? I'd really like to keep using MissingH and having profiling support at the same time. Thanks, -chris

Hey, does anyone know about this? Resending as I got no replies (yet) ;) Thanks, -chris On 8 Jan, 2007, at 23:13 , Chris Eidhof wrote:
Hey all,
I'm trying to profile my application, which makes use of MissingH. But when compiling with -prof -auto-all, I get the following error:
Language.hs:8:7: Could not find module `Data.String': Perhaps you haven't installed the profiling libraries for package MissingH-0.18.0? Use -v to see a list of the files searched for.
When compiling without those options, everything works just fine. I built missingh from source, and added -prof -auto-all to GHCPARMS, and did a ./setup configure,make,install and still no result. Does anyone know what could be wrong? I'd really like to keep using MissingH and having profiling support at the same time.
Thanks, -chris
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

On 2007-01-11, Chris Eidhof
Hey,
does anyone know about this? Resending as I got no replies (yet) ;)
Just for the record, I have no idea; I've never really used profiling and couldn't figure out how to make it work in general (at least not in a short amount of time). Are you sure your problem is restricted to MissingH? I can't think of anything special about it that would throw off profiling. -- John

Hi John, On Jan 11, 2007, at 8:06 PM, John Goerzen wrote:
On 2007-01-11, Chris Eidhof
wrote: Hey,
does anyone know about this? Resending as I got no replies (yet) ;)
Just for the record, I have no idea; I've never really used profiling and couldn't figure out how to make it work in general (at least not in a short amount of time).
Are you sure your problem is restricted to MissingH? I can't think of anything special about it that would throw off profiling.
-- John
Does MissingH's cabal file have a line Ghc-Prof-Options: -prof -auto-all ? The rhs of the option is added to compiler command line when the --enable-library-profiling option is included to configure. Without this, the --enable-library-profiling switch doesn't do anything. (Arguably a bug that cabal silently does nothing instead of reporting an error.) Best Wishes, Greg

On Fri, Jan 12, 2007 at 08:10:47AM -0500, Gregory Wright wrote:
-- John
Does MissingH's cabal file have a line
Ghc-Prof-Options: -prof -auto-all
No, it doesn't. None of my Cabal files do. Could anyone confirm if this fixes it?
The rhs of the option is added to compiler command line when the --enable-library-profiling option is included to configure. Without this, the --enable-library-profiling switch doesn't do anything. (Arguably a bug that cabal silently does nothing instead of reporting an error.)
I'd argue that Cabal should make this a default. It seems silly to have to add this boilerplate code to every cabal file out there just to have a sensible default. Thanks for the info. -- John

Hi John, On Jan 12, 2007, at 10:25 AM, John Goerzen wrote:
On Fri, Jan 12, 2007 at 08:10:47AM -0500, Gregory Wright wrote:
-- John
Does MissingH's cabal file have a line
Ghc-Prof-Options: -prof -auto-all
No, it doesn't. None of my Cabal files do. Could anyone confirm if this fixes it?
The rhs of the option is added to compiler command line when the --enable-library-profiling option is included to configure. Without this, the --enable-library-profiling switch doesn't do anything. (Arguably a bug that cabal silently does nothing instead of reporting an error.)
I'd argue that Cabal should make this a default. It seems silly to have to add this boilerplate code to every cabal file out there just to have a sensible default.
Actually, for some reason my brain missed that your were talking about a library, not an application. As lemmih said, --enable-executable- profiling will make you a profiling library. If you are building an app however, unless you include a "Ghc-Prof-Options" something like the above, or add cost center annotations yourself, you just get a profile that tells you that Main took 100% of the time. Best, Greg
Thanks for the info.
-- John _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

On 1/12/07, Gregory Wright
Hi John,
On Jan 11, 2007, at 8:06 PM, John Goerzen wrote:
On 2007-01-11, Chris Eidhof
wrote: Hey,
does anyone know about this? Resending as I got no replies (yet) ;)
Just for the record, I have no idea; I've never really used profiling and couldn't figure out how to make it work in general (at least not in a short amount of time).
Are you sure your problem is restricted to MissingH? I can't think of anything special about it that would throw off profiling.
-- John
Does MissingH's cabal file have a line
Ghc-Prof-Options: -prof -auto-all
?
The rhs of the option is added to compiler command line when the --enable-library-profiling option is included to configure. Without this, the --enable-library-profiling switch doesn't do anything. (Arguably a bug that cabal silently does nothing instead of reporting an error.)
Cabal will build a profiling version of the library whether or not you have ghc-prof-options. Using '-auto-all' only adds more cost centres which you most likely don't want (unless you're working on the library itself). One might argue, however, that the convenience of having --enable-library-profiling on by default is worth the doubled build time. -- Cheers, Lemmih

On Thu, 11 Jan 2007, Chris Eidhof
On 8 Jan, 2007, at 23:13 , Chris Eidhof wrote:
I'm trying to profile my application, which makes use of MissingH. But when compiling with -prof -auto-all, I get the following error:
Language.hs:8:7: Could not find module `Data.String': Perhaps you haven't installed the profiling libraries for package MissingH-0.18.0? Use -v to see a list of the files searched for.
Use Cabal to compile and install the profiling libraries. There is a flag called --enable-profiling, or something like that. If you use GHC you will get two libraries, one without profiling, and one with, but that is a technical detail that Cabal takes care of. Just use the flag, and things should work. -- /NAD

The typical way to add profiling support to a Cabal lib is to add -p at configure time (ie "runhaskell Setup.hs configure -p"). Have you tried this? Cheers, Spencer Janssen On Jan 8, 2007, at 4:13 PM, Chris Eidhof wrote:
Hey all,
I'm trying to profile my application, which makes use of MissingH. But when compiling with -prof -auto-all, I get the following error:
Language.hs:8:7: Could not find module `Data.String': Perhaps you haven't installed the profiling libraries for package MissingH-0.18.0? Use -v to see a list of the files searched for.
When compiling without those options, everything works just fine. I built missingh from source, and added -prof -auto-all to GHCPARMS, and did a ./setup configure,make,install and still no result. Does anyone know what could be wrong? I'd really like to keep using MissingH and having profiling support at the same time.
Thanks, -chris
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Thanks, this works! I had to build all the other libraries that are required with profiling support too. I also wrote it down on the MissingH wiki, see http://software.complete.org/missingh/wiki/Profiling -chris On 12 Jan, 2007, at 4:08 , Spencer Janssen wrote:
The typical way to add profiling support to a Cabal lib is to add - p at configure time (ie "runhaskell Setup.hs configure -p"). Have you tried this?
Cheers, Spencer Janssen
On Jan 8, 2007, at 4:13 PM, Chris Eidhof wrote:
Hey all,
I'm trying to profile my application, which makes use of MissingH. But when compiling with -prof -auto-all, I get the following error:
Language.hs:8:7: Could not find module `Data.String': Perhaps you haven't installed the profiling libraries for package MissingH-0.18.0? Use -v to see a list of the files searched for.
When compiling without those options, everything works just fine. I built missingh from source, and added -prof -auto-all to GHCPARMS, and did a ./setup configure,make,install and still no result. Does anyone know what could be wrong? I'd really like to keep using MissingH and having profiling support at the same time.
Thanks, -chris
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

On 2007-01-12, Chris Eidhof
Thanks, this works! I had to build all the other libraries that are required with profiling support too. I also wrote it down on the MissingH wiki, see http://software.complete.org/missingh/wiki/Profiling
Thanks for documenting that on the wiki -- I think you are the first contributor to it. -- John
participants (6)
-
Chris Eidhof
-
Gregory Wright
-
John Goerzen
-
Lemmih
-
Nils Anders Danielsson
-
Spencer Janssen