-prof, -threaded, and -N

Lars Kuhtz haskell at kuhtz.eu
Wed Jun 3 05:20:53 UTC 2015


Hi,

The behavior of the -N flag (without argument) with the profiling runtime seems inconsistent compared to the behavior without profiling. The following program

```
module Main where

import GHC.Conc

main :: IO ()
main = print numCapabilities
```

when compiled with `ghc -threaded -fforce-recomp Prof.hs` and run as `./Prof +RTS -N` prints `2` on my machine. When the same program is compiled with `ghc -threaded -fforce-recomp -prof Prof.hs` and executed as `./Prof +RTS -N` it prints `1`.

When an argument is provided to `-N` (e.g. `./Prof +RTS -N2`) the profiling and non-profiling versions behave the same.

I tested this with GHC-7.10.1 but I think that I already observed the same behavior with GHC-7.8.

Is this inconsistency intended?

Lars


More information about the Glasgow-haskell-users mailing list