Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to profile a Haskell program without prof libraries?

Is it possible to time profile a Haskell program without installing the profiling libraries?

When I pass the -prof option to ghc, I always get errors like this one:

src/MyPKG/FooBlah.lhs:7:7:
    Could not find module `Data.Time.Calendar':
      Perhaps you haven't installed the profiling libraries for package `time-1.1.4'?
      Use -v to see a list of the files searched for.

I know that the solution is to install with cabal profile versions of the libraries, but sometimes this is a pain in the ass (sorry for the bad language).

I think it should be possible to profile my program and the calls that have no symbols should appear as ???? or something like that in the output.

like image 683
Zhen Avatar asked Jan 31 '12 18:01

Zhen


1 Answers

No, it's not possible. Building for profiling changes the representation and function calls have extra parameters to keep track of the profiling data.

You have to install the profiling libraries to use GHC's profiler, even if it's a pain in the rear.

like image 141
Daniel Fischer Avatar answered Oct 22 '22 06:10

Daniel Fischer