Cabal compiling with profiling

I have a patch from Arthur Baars to build profiling libraries for GHC. I'm wondering how people think it should be integrated? Should we have a --prof option that JUST builds profiling libraries, or which builds both non profiling and profiling? I know that the makefile system has some "ways" that I think are related to profiling. Should we have something more flexible, or is --prof or --with-prof flexible enough? peace, isaac

We need something more general in VSHaskell. Usually each project in
the Visual Studio environment has two configurations "Debug" and
"Release" but the user can define his own configurations. The only
difference between each configuration is in the command line switches
passed to the compiler. For Haskell projects this mean that each
configuration will have different HookedBuildInfo associated. The
profiling can be implemented in this more general framework if we add
"Profiling" configuration. I still don't have clear design for
configurations in Cabal. My first thought was that I can do this on
top of hooks API but I am not sure whether it will be flexible enough.
Cheers,
Krasimir
On 4/19/05, Isaac Jones
I have a patch from Arthur Baars to build profiling libraries for GHC. I'm wondering how people think it should be integrated? Should we have a --prof option that JUST builds profiling libraries, or which builds both non profiling and profiling? I know that the makefile system has some "ways" that I think are related to profiling. Should we have something more flexible, or is --prof or --with-prof flexible enough?
peace,
isaac _______________________________________________ Libraries mailing list Libraries@haskell.org http://www.haskell.org/mailman/listinfo/libraries

Krasimir Angelov
We need something more general in VSHaskell. Usually each project in the Visual Studio environment has two configurations "Debug" and "Release" but the user can define his own configurations. The only difference between each configuration is in the command line switches passed to the compiler.
Or to the configure step?
For Haskell projects this mean that each configuration will have different HookedBuildInfo associated. The profiling can be implemented in this more general framework if we add "Profiling" configuration. I still don't have clear design for configurations in Cabal. My first thought was that I can do this on top of hooks API but I am not sure whether it will be flexible enough.
Can you flesh this out a bit? What do you mean by "configurations in cabal"? What are the issues that you're facing with the hooks? We need good feedback on the hooks. peace, isaac

What I have in mind is to have multiple .buildinfo files. One for each
configuration. For example <pkg>.buildinfo.debug &
<pkg>.buildinfo.release. Each hook can check for a specific
--config=<..> command line option and will load the appropriate
.buildinfo file. The disadvantage here is that in this way I need to
maintain multiple files in addition to the central .cabal file.
Another trouble is that with hooks API I cann't change the destination
directory where the .hi and .o files are created. They all will go to
dist/build while I need to keep them separated.
It would be simpler if the Cabal library was aware of this
configurations. In this case the configuration descriptions can be
moved to .cabal file. We can have few predefined configurations like
"Debug", "Release", "Profiling", ... which are always with predefined
options. For Debug we can add -DDEBUG option to GHC, for Release -O
option and maybe -split-obj and for Profiling -prof option. Of course
we have to leave the user to change the default options and he have to
be able to define its own configurations.
Cheers,
Krasimir
On 4/19/05, Isaac Jones
Krasimir Angelov
writes: We need something more general in VSHaskell. Usually each project in the Visual Studio environment has two configurations "Debug" and "Release" but the user can define his own configurations. The only difference between each configuration is in the command line switches passed to the compiler.
Or to the configure step?
For Haskell projects this mean that each configuration will have different HookedBuildInfo associated. The profiling can be implemented in this more general framework if we add "Profiling" configuration. I still don't have clear design for configurations in Cabal. My first thought was that I can do this on top of hooks API but I am not sure whether it will be flexible enough.
Can you flesh this out a bit? What do you mean by "configurations in cabal"? What are the issues that you're facing with the hooks? We need good feedback on the hooks.
peace,
isaac

On Mon, Apr 18, 2005 at 07:24:56PM -0700, Isaac Jones wrote:
I have a patch from Arthur Baars to build profiling libraries for GHC. I'm wondering how people think it should be integrated? Should we have a --prof option that JUST builds profiling libraries, or which builds both non profiling and profiling? I know that the makefile system has some "ways" that I think are related to profiling. Should we have something more flexible, or is --prof or --with-prof flexible enough?
It would be nice to allow binary package distributors to be able to create foo and foo-prof packages for large libraries easily, rather than having to bundle everything in one or split files out "by hand". This is more important as more variants are supported, obviously. Thanks Ian
participants (3)
-
Ian Lynagh
-
Isaac Jones
-
Krasimir Angelov