haskell - 通过 cabal 中的可执行文件分析库

标签 haskell profiling cabal

愚蠢的问题。我有一个带有 libraryexecutable 的 cabal 文件,我想用它来分析库,但我无法从我的库中看到成本中心(尽管我从其他模块中看到了一些,例如 GHC.IO.Encoding)。

这是我的 cabal 文件的简化版本

flag dev
  default: False
  manual: True

library
  exposed-modules:     Foo

  ghc-options:        -Wall
  ghc-prof-options:   -fprof-auto
  build-depends:       base

executable dev-example
  if !flag(dev)
    buildable: False

  ghc-options: -ddump-to-file -ddump-simpl -dsuppress-module-prefixes -dsuppress-uniques -ddump-core-stats -ddump-inlinings
  ghc-options: -O2  -rtsopts  
  ghc-prof-options: -fprof-auto


  hs-source-dirs: dev-example, ./
  main-is: Main.hs
  build-depends:       base

我一直在做什么

$ cabal configure -fdev  -w /usr/local/bin/ghc-7.6.3 --enable-library-profiling --enable-executable-profiling
$ cabal run dev-example -- +RTS -h -p

最佳答案

呃,问题只是我的库代码被内联(或至少标记为 INLINABLE)。

关于haskell - 通过 cabal 中的可执行文件分析库,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21844243/

相关文章:

linux - 什么是锁步采样?

javascript - 如何自动分析我页面的 JavaScript?

haskell - GHC 在 cabal 沙箱中找不到模块

performance - 减少 Haskell 程序中的垃圾收集暂停时间

Haskell -- 我应该如何避免头或尾,并采用模式匹配?

c - OProfile 警告 'dropping hyperspace sample' 是什么意思?

cabal - 在 Ubuntu 14.04 上升级 Cabal

haskell - 一个多模式 Haskell 可执行文件与共享库的单独可执行文件

haskell - 为什么 GHCi 在此错误消息中不显示多态类型?

haskell - 归纳证明两个函数定义相等