
I tried reporting a Cabal bug via Trac, but I can't log in as guest/haskell. Alas. The bug is that "runhaskell Setup.hs --enable-library-profiling" doesn't imply -auto-all with ghc, so the profiled library contains only manual cost centres - in other words, it never shows up in profile output. The second bug is that the only way I can find to override or add compiler flags is to edit a .cabal file by hand. This makes it scarily easy to capture unintended flags when committing changes :-(

Bryan O'Sullivan wrote:
I tried reporting a Cabal bug via Trac, but I can't log in as guest/haskell. Alas.
The password is "haskell'" (note the final apostrophe). Isaac: maybe we should use a simpler password?
The bug is that "runhaskell Setup.hs --enable-library-profiling" doesn't imply -auto-all with ghc, so the profiled library contains only manual cost centres - in other words, it never shows up in profile output.
Not adding -auto-all is the right default; the intended usage is for building a profiled version of the library so that a user can profile their own application against it, not to profile the library itself. If you want to profile the library, add "ghc-options: -auto-all" to the .cabal file. When we have configurations you'll be able to make this optional, but for now just add it by hand to .cabal (and don't forget to remove it later).
The second bug is that the only way I can find to override or add compiler flags is to edit a .cabal file by hand. This makes it scarily easy to capture unintended flags when committing changes :-(
er. what I said above :) The technology that fixes this long-term shortcoming is designed (several times!) but sadly not implemented yet. If you use the Emacs darcsum mode, it's scarily easy to avoid committing things that you don't want to. darcsum is to command-line darcs as vi is to ed. Cheers, Simon

simonmarhaskell:
Bryan O'Sullivan wrote:
I tried reporting a Cabal bug via Trac, but I can't log in as guest/haskell. Alas.
The password is "haskell'" (note the final apostrophe). Isaac: maybe we should use a simpler password?
The bug is that "runhaskell Setup.hs --enable-library-profiling" doesn't imply -auto-all with ghc, so the profiled library contains only manual cost centres - in other words, it never shows up in profile output.
Not adding -auto-all is the right default; the intended usage is for building a profiled version of the library so that a user can profile their own application against it, not to profile the library itself.
If you want to profile the library, add "ghc-options: -auto-all" to the .cabal file. When we have configurations you'll be able to make this optional, but for now just add it by hand to .cabal (and don't forget to remove it later).
Should -auto-all be used for --enable-executable-profiling though? I think its missing there too, which seems wrong? -- Don

On Thu, 2007-01-25 at 21:35 +1100, Donald Bruce Stewart wrote:
If you want to profile the library, add "ghc-options: -auto-all" to the .cabal file. When we have configurations you'll be able to make this optional, but for now just add it by hand to .cabal (and don't forget to remove it later).
Should -auto-all be used for --enable-executable-profiling though? I think its missing there too, which seems wrong?
I would agree with that. Anyone want to send a patch? Duncan

Simon Marlow wrote:
Bryan O'Sullivan wrote:
I tried reporting a Cabal bug via Trac, but I can't log in as guest/haskell. Alas.
The password is "haskell'" (note the final apostrophe).
D'oh! Alas, the tick is practically invisible to me on the web page, and I had my prescription for glasses checked recently :-) I'll remember it's there, though.
Not adding -auto-all is the right default; the intended usage is for building a profiled version of the library so that a user can profile their own application against it, not to profile the library itself.
Fair enough. Do library maintainers normally use Cabal to do routine builds and rebuilds of their own libraries? If so, do people simply keep locally modified .cabal files around for this kind of thing? By the way, when I spent a bit more time poking around at this, I found that even adding -auto-all left me with empty cost centres in profile output for libraries (but not the main app) on x86_64, but everything was fine on i386. I'm unfamiliar enough with the territory that I don't know quite what to do with this piece of information. What would be useful for you to know if I were to file a bug?
If you use the Emacs darcsum mode, it's scarily easy to avoid committing things that you don't want to.
I'll be sure to check it out. Thank you.

Bryan O'Sullivan wrote:
Simon Marlow wrote:
Bryan O'Sullivan wrote:
I tried reporting a Cabal bug via Trac, but I can't log in as guest/haskell. Alas.
The password is "haskell'" (note the final apostrophe).
D'oh! Alas, the tick is practically invisible to me on the web page, and I had my prescription for glasses checked recently :-) I'll remember it's there, though.
Not adding -auto-all is the right default; the intended usage is for building a profiled version of the library so that a user can profile their own application against it, not to profile the library itself.
Fair enough. Do library maintainers normally use Cabal to do routine builds and rebuilds of their own libraries? If so, do people simply keep locally modified .cabal files around for this kind of thing?
By the way, when I spent a bit more time poking around at this, I found that even adding -auto-all left me with empty cost centres in profile output for libraries (but not the main app) on x86_64, but everything was fine on i386. I'm unfamiliar enough with the territory that I don't know quite what to do with this piece of information. What would be useful for you to know if I were to file a bug?
I can't imagine why this might happen... could you check with -v that the -auto-all flag is being passed to ghc as expected? If it is, then please file a GHC bug at http://hackage.haskell.org/trac/ghc. Otherwise it may be a Cabal bug, I guess. You definitely did 'setup configure' again, right? Cheers, Simon
participants (4)
-
Bryan O'Sullivan
-
dons@cse.unsw.edu.au
-
Duncan Coutts
-
Simon Marlow