From: <hai...@ya...> - 2005-04-08 17:27:18
|
Hi, I developed a program based on wxHaskell but it has serious performance problem. I want to rebuild wxHaskell with profiling support so that I can find how to improve the performance. But I am quite new to this library and don't know how to start. Anyone can give any advice or help? Thank you, Haitao ----- Forwarded message from Duncan Coutts <dun...@wo...> ----- Date: Fri, 08 Apr 2005 16:20:28 +0100 From: Duncan Coutts <dun...@wo...> Reply-To: Duncan Coutts <dun...@wo...> Subject: Re: [Haskell] how to use GHC's prof tools To: hai...@ya... On Fri, 2005-04-08 at 11:01 -0400, hai...@ya... wrote: > Hi, > > I developed a program based on wxHaskell but it has serious performance > problem. So I tried to compile the program using "-prof" in GHC. > > If I use "ghc --make -fglasgow-exts -package wx -prof Main.lhs", it > always reports that it cannot find modules defined in wxHaskell like > WXCore. However, if I compile it without the "-prof" option, it works > well and can generate "a.out". > > Anyone can give any help? The problem is that wxHaskell does not come with profiling versions of its libraries. You see, for GHC's profiling everything needs to be compiled with profiling support. This is because the profiling and non-profiling styles are not compatible, for example the profiling version adds extra hidden arguments to functions and various other things to actualy do the profiling. So for example the libraries that come with GHC itself have to copies, the profiling and non-porofiling verions. For many other libraries this is unfortunately not the case since the build infrastructure to produce two copies of everything is not so trivial to do (I think). You can probably rebuild wxHaskell with profiling support (though it may not be so trivial since the it changes the names of various files by adding _p extensions here and there so the build system may not like it). Ask about it on the wxHaskell list: wxh...@li... This leads onto a cabal feature request. Can we have a parameter to build profiling versions of libraries in addition to the normal version? Duncan ----- End forwarded message ----- |