1

我试图了解 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中找不到它。

4

1 回答 1

0

成本中心的全名在 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
于 2021-10-23T02:50:15.560 回答