Есть необходимость узнать, на каких именно вычислениях программа тратит основное рабочее время.
Как подключить профайлер к своей программе? Как поддержать профилирование во всех подключаемых модулях?
$> ghc -prof -auto-all -o Main ./BooleanMatrix.hs -v
Glasgow Haskell Compiler, Version 6.12.3, for Haskell 98, stage 2 booted by GHC version 6.12.3
Using binary package database: /usr/lib/ghc-6.12.3/package.conf.d/package.cache
Using binary package database: /home/ilukinykh/.ghc/i386-linux-6.12.3/package.conf.d/package.cache
hiding package base-3.0.3.2 to avoid conflict with later version base-4.2.0.2
hiding package Cabal-1.8.0.6 to avoid conflict with later version Cabal-1.10.2.0
wired-in package ghc-prim mapped to ghc-prim-0.2.0.0-9df3bd825ad17ca739e158c880a25b11
wired-in package integer-gmp mapped to integer-gmp-0.2.0.1-72436e28c79d056c87cc0d2d2f9f3773
wired-in package base mapped to base-4.2.0.2-10bdacb430274706a59728e237e2bfb3
wired-in package rts mapped to builtin_rts
wired-in package haskell98 mapped to haskell98-1.0.1.1-4d2891ad99eae334ff8234bcfbddce06
wired-in package template-haskell mapped to template-haskell-2.4.0.1-bf08798b1934e4d6a3f903f58e0d5159
wired-in package dph-seq mapped to dph-seq-0.4.0-1df951f78b4efbc84e2534bab253505d
wired-in package dph-par mapped to dph-par-0.4.0-436308af1d9725eae22b56265f6035ec
Hsc static flags: -fscc-profiling -static
Created temporary directory: /tmp/ghc18094_0
*** Checking old interface for main:Main:
*** Parser:
*** Renamer/typechecker:
BooleanMatrix.hs:1:0:
Failed to load interface for `Prelude':
Perhaps you haven't installed the profiling libraries for package `base'?
locations searched:
Prelude.hi
Prelude.hi-boot
/usr/lib/ghc-6.12.3/base-4.2.0.2/Prelude.p_hi
*** Deleting temp files:
Deleting: /tmp/ghc18094_0/ghc18094_0.s
Warning: deleting non-existent /tmp/ghc18094_0/ghc18094_0.s
*** Deleting temp dirs:
Deleting: /tmp/ghc18094_0