Empty .prof file with Haskell program crashing (on Windows)
I am trying to diagnose an infinite loop in my program using profiling. Since I need to cancel a part of the program via Ctrl-C, the .prof file remains empty. From what I've read, the .prof file should work if the program does.
To check if the configuration was for my specific program, I wrote the following:
module Main (
main
) where
testInf = map (+1) [1..]
main = do
print (show testInf)
I am using Leksah and the following .cabal file is generated in the config:
name: tests
version: 0.0.1
cabal-version: >=1.2
build-type: Simple
license: AllRightsReserved
license-file: ""
description:
data-dir: ""
executable tests
build-depends: base -any
main-is: Main.hs
buildable: True
hs-source-dirs: src
ghc-options: -prof -auto-all
Then I start the program by running tests +RTS -p
. When I end the program with Crl-C, the .prof file is 0kb. If I change the program so that it doesn't run indefinitely, it generates a complete .prof file when it finishes.
Other information
- Kabbalah:
using version 1.16.0 of the Cabal library
- GHC:
Glasgow Haskell Compiler, Version 7.6.3, stage 2 booted by GHC version 7.4.1
+3
source to share
No one has answered this question yet
Check out similar questions: