Mike Craig | 6 Nov 19:48 2012
Picon

Profiling a project with cabal and cabal-dev

Hi all,

So I've been working on a project and I'd like to run it with profiling to diagnose the performance hotspots. It's a cabal project and I've been using cabal-dev for sandboxing. Normally I would just run `cabal-dev install` to get everything built and the executables "installed" in ./cabal-dev/bin. Since I want to compile with profiling, I tried this:

$ cabal-dev install enable-executable-profiling

The build fails with an error log that includes something like "Perhaps you haven't installed the profiling libraries for package `http-types-0.7.3.0.1'?" If I then try ...

$ cabal-dev install -p --reinstall --force-reinstalls http-types-0.7.3.0.1

... I find myself walking down the dependency tree. (http-types -> case-insensitive -> hashable -> etc.) Presumably this would eventually walk me out of the sandbox and I would be reinstalling the base libraries in my sandbox with profiling enabled.

This doesn't seem right. (And if it is right, it doesn't seem like I should have to do it manually, package by package.) What am I doing wrong?

Cheers,
Mike
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe <at> haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
Erik Hesselink | 6 Nov 23:39 2012
Picon

Re: Profiling a project with cabal and cabal-dev

I think this is just the way it works currently, since cabal only tracks the installed package and version, but not if profiling was enabled. I always have my ~/.cabal/config set to install profiling libraries to avoid this problem. That doesn't help you now though. The easiest thing to do is probably to remove your sandbox and start from a blank slate.

Erik



On Tue, Nov 6, 2012 at 7:48 PM, Mike Craig <mkscrg <at> gmail.com> wrote:
Hi all,

So I've been working on a project and I'd like to run it with profiling to diagnose the performance hotspots. It's a cabal project and I've been using cabal-dev for sandboxing. Normally I would just run `cabal-dev install` to get everything built and the executables "installed" in ./cabal-dev/bin. Since I want to compile with profiling, I tried this:

$ cabal-dev install enable-executable-profiling

The build fails with an error log that includes something like "Perhaps you haven't installed the profiling libraries for package `http-types-0.7.3.0.1'?" If I then try ...

$ cabal-dev install -p --reinstall --force-reinstalls http-types-0.7.3.0.1

... I find myself walking down the dependency tree. (http-types -> case-insensitive -> hashable -> etc.) Presumably this would eventually walk me out of the sandbox and I would be reinstalling the base libraries in my sandbox with profiling enabled.

This doesn't seem right. (And if it is right, it doesn't seem like I should have to do it manually, package by package.) What am I doing wrong?

Cheers,
Mike

_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe <at> haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe <at> haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
Mike Craig | 7 Nov 06:00 2012
Picon

Re: Profiling a project with cabal and cabal-dev

Got it. Thanks for the info, Erik. I've updated my cabal config and reinstalled some of the global packages, and the world seems much less bleak! :)


Mike



On Tue, Nov 6, 2012 at 5:39 PM, Erik Hesselink <hesselink <at> gmail.com> wrote:
I think this is just the way it works currently, since cabal only tracks the installed package and version, but not if profiling was enabled. I always have my ~/.cabal/config set to install profiling libraries to avoid this problem. That doesn't help you now though. The easiest thing to do is probably to remove your sandbox and start from a blank slate.

Erik


On Tue, Nov 6, 2012 at 7:48 PM, Mike Craig <mkscrg <at> gmail.com> wrote:
Hi all,

So I've been working on a project and I'd like to run it with profiling to diagnose the performance hotspots. It's a cabal project and I've been using cabal-dev for sandboxing. Normally I would just run `cabal-dev install` to get everything built and the executables "installed" in ./cabal-dev/bin. Since I want to compile with profiling, I tried this:

$ cabal-dev install enable-executable-profiling

The build fails with an error log that includes something like "Perhaps you haven't installed the profiling libraries for package `http-types-0.7.3.0.1'?" If I then try ...

$ cabal-dev install -p --reinstall --force-reinstalls http-types-0.7.3.0.1

... I find myself walking down the dependency tree. (http-types -> case-insensitive -> hashable -> etc.) Presumably this would eventually walk me out of the sandbox and I would be reinstalling the base libraries in my sandbox with profiling enabled.

This doesn't seem right. (And if it is right, it doesn't seem like I should have to do it manually, package by package.) What am I doing wrong?

Cheers,
Mike

_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe <at> haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe



_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe <at> haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
Albert Y. C. Lai | 10 Nov 18:32 2012
Picon

Re: Profiling a project with cabal and cabal-dev

On 12-11-07 12:00 AM, Mike Craig wrote:
> Got it. Thanks for the info, Erik. I've updated my cabal config and
> reinstalled some of the global packages, and the world seems much less
> bleak! :)

The good news is that whatever comes with GHC comes with profiling, you 
do not need to reinstall them.

The bad news is that you have reinstalled them, and that is a latent 
disaster.

http://www.vex.net/~trebla/haskell/sicp.xhtml#pigeon

Gmane