【问题标题】:Show full names in GHC's heap profiler file在 GHC 的堆分析器文件中显示全名
【发布时间】:2021-10-21 10:27:53
【问题描述】:

我试图了解 GHC 的堆分析文件。但名称会缩短。

JOB "tutd -d db +RTS -h -s -p"
DATE "Thu Oct 21 09:02 2021"
SAMPLE_UNIT "seconds"
VALUE_UNIT "bytes"
BEGIN_SAMPLE 0.000000
END_SAMPLE 0.000000
BEGIN_SAMPLE 0.095057
(3622)decodeCurrent/Project...  96
(2781)parseArgs/opts/crRead...  48
(3824)calculateMerkleHash.d...  24
(2583)main      16
(2848)readGraphTransactionI...  48
(2843)openLockFile/setupDat...  16
(2782)parsePersistenceStrat...  16
(3606)validateMerkleHashes/...  32

有什么方法可以扩展吗?我在UserGuide/Profiling 中找不到它。

【问题讨论】:

    标签: haskell command command-line-interface ghc heap-profiling


    【解决方案1】:

    成本中心的全名在 dot prof 文件中。 查询号码可以获取更多信息。

    [nix-shell:~/...]# cat tutd.prof | grep 'COST CENTRE *MODULE\|2781\|2583\|2848'
    COST CENTRE                 MODULE                               SRC                                                       %time %alloc
    COST CENTRE                                                   MODULE                                          SRC                                                                 no.      entries  %time %alloc   %time %alloc
     main                                                         Main                                            tutd.hs:(85,1)-(109,70)                                             2583           0    0.0    0.0    99.9   99.9
         readGraphTransactionIdFileDigest                         ProjectM36.TransactionGraph.Persist             ProjectM36/TransactionGraph/Persist.hs:(205,1)-(207,53)             2848           1    0.0    0.0     0.0    0.0
                       parseArgs                                  Main                                            tutd.hs:(24,1)-(25,172)                                             2781           0    0.0    0.0     0.0    0.0
    

    【讨论】:

      猜你喜欢
      • 2017-02-23
      • 1970-01-01
      • 1970-01-01
      • 2017-09-19
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-04-13
      • 1970-01-01
      相关资源
      最近更新 更多