[Haskell] Re: Probably a trivial thing for people knowing Haskell

Friedrich frido at q-software-solutions.de
Tue Oct 21 09:04:26 EDT 2008


Well I never have tried to profile here's my first try. 
I compiled with

ghc --make -O -prof -auto-all chk_dwlds.hs


I've run the program with:
./chk_dwlds \+RTS -p \-RTS

and got this .prof file
	Tue Oct 21 15:01 2008 Time and Allocation Profiling Report  (Final)

	   chk_dwlds +RTS -p -RTS

	total time  =       19.62 secs   (981 ticks @ 20 ms)
	total alloc = 19,090,366,024 bytes  (excludes profiling overheads)

COST CENTRE                    MODULE               %time %alloc

run_file                       Main                  67.2   96.5
check_line                     Main                  31.5    2.5
sumcount                       Main                   1.3    1.0


                                                                                               individual    inherited
COST CENTRE              MODULE                                               no.    entries  %time %alloc   %time %alloc

MAIN                     MAIN                                                   1           0   0.0    0.0   100.0  100.0
 main                    Main                                                 238           1   0.0    0.0   100.0  100.0
  sumcount               Main                                                 242           1   0.0    0.0     0.0    0.0
  run_file               Main                                                 241        1764  67.2   96.5   100.0  100.0
   check_line            Main                                                 244     1944781  31.5    2.5    31.5    2.5
   sumcount              Main                                                 243        1764   1.3    1.0     1.3    1.0
  main                   Main                                                 247           0   0.0    0.0     0.0    0.0
   filter_reg            Main                                                 248           0   0.0    0.0     0.0    0.0
 CAF                     Main                                                 232          10   0.0    0.0     0.0    0.0
  check_line             Main                                                 246           2   0.0    0.0     0.0    0.0
  regexp                 Main                                                 245           1   0.0    0.0     0.0    0.0
  main                   Main                                                 239           0   0.0    0.0     0.0    0.0
   filter_reg            Main                                                 240           2   0.0    0.0     0.0    0.0
 CAF                     Text.Read.Lex                                        209           8   0.0    0.0     0.0    0.0
 CAF                     GHC.Read                                             204           1   0.0    0.0     0.0    0.0
 CAF                     GHC.Float                                            203           3   0.0    0.0     0.0    0.0
 CAF                     GHC.Int                                              198           1   0.0    0.0     0.0    0.0
 CAF                     GHC.Handle                                           184           7   0.0    0.0     0.0    0.0
 CAF                     System.Posix.Internals                               168           7   0.0    0.0     0.0    0.0
 CAF                     System.Directory                                     125           1   0.0    0.0     0.0    0.0

Regards
Friedrich



More information about the Haskell mailing list