根据GHC 7.10.1和cabal 1.23进行分析的程序是什么?

时间:2015-06-10 11:29:46

标签: haskell profiling ghc cabal-install

根据GHC 7.10.1和cabal 1.23进行分析的建议程序是什么?来自GHC和cabal-install的与性能分析相关的错误和警告消息非常不一致。

  1. 尝试使用性能分析运行可执行文件,然后告诉您:

    $ prediction-interactive +RTS -p
    
    prediction-interactive: the flag -p requires the program to be built with -prof
    
  2. -prof放入您的cabal文件中,然后告诉您:

    $ cabal build
    
    Warning: 'ghc-options: -prof' is not necessary and will lead to problems when
    used on a library. Use the configure flag --enable-library-profiling and/or
    --enable-executable-profiling.
    
  3. 遵循该建议(并从cabal文件中删除-prof),并告知您:

    $ cabal configure --enable-executable-profiling
    
    Resolving dependencies...
    Configuring creatur-wains-prediction-1.0...
    Warning: The flag --enable-executable-profiling is deprecated. Please use
    --enable-profiling instead.
    
  4. 按照这个建议,你被告知:

    $ cabal configure --enable-profiling
    
    Resolving dependencies...
    Configuring creatur-wains-prediction-1.0...
    
    $ cabal build
    
    . . .
    Installing executable(s) in
    /home/eamybut/nosync/sandboxes/prediction-wains/bin
    Installed creatur-wains-prediction-1.0
    
    $ prediction-interactive +RTS -p
    
    prediction-interactive: the flag -p requires the program to be built with -prof
    
  5. 捂脸!

    编辑:在步骤4中添加了cabal版本。

0 个答案:

没有答案