Open niteria opened 8 years ago
I suspect it's because it was created with -P
instead of -p
.
Thanks for the report. Apparently the SRC
column has been added (since GHC 8?). I've fixed it in my ghc-time-alloc-prof library, which is meant for a replacement for the parser in tkyprof
. I think I had a branch which replaces the parser but I need time to remember where I was.
For the time being, you can try the dump
command in ghc-time-alloc-prof
. The UI isn't good at all but it's kind of usable.
Sort by time:
% stack exec dump -- haddock.prof.txt
MAIN.MAIN:716 (100.0,0.0,100.0,0.0)
|
+- GHC.runGhc:1432 (100.0,0.0,100.0,0.0)
| |
| +- GHC.withCleanupSession:1439 (99.9,19.6,99.9,24.3)
| | |
| | +- GHC.typecheckModule:1723 (57.8,0.1,50.3,0.1)
| | | |
| | | +- HscMain.Typecheck-Rename:1724 (57.8,0.0,50.2,0.0)
| | | | |
| | | | `- TcRnDriver.tcRnModule:1727 (57.8,0.3,50.2,0.2)
| | | | |
| | | | +- TcRnDriver.withTcPlugins:1732 (57.5,0.0,50.1,0.0)
| | | | | |
| | | | | +- TcRnDriver.tcRnModuleTcRnM:1735 (57.5,0.0,50.1,0.0)
| | | | | | |
| | | | | | +- TcRnDriver.tcRnSrcDecls:1870 (39.7,0.0,22.7,0.0)
...
Who calls it:
% stack exec dump -- haddock.prof.txt tcRnModuleTcRnM TcRnDriver
Callee {calleeName = "tcRnModuleTcRnM", calleeModule = "TcRnDriver", calleeEntries = 468, calleeTime = 0.0, calleeAlloc = 0.0, calleeTicks = Just 0, calleeBytes = Just 0}
CallSite {callSiteCostCentre = CostCentre {costCentreName = "withTcPlugins", costCentreModule = "TcRnDriver", costCentreSrc = Just "compiler/typecheck/TcRnDriver.hs:(2502,1)-(2518,31)", costCentreNo = 1732, costCentreEntries = 468, costCentreIndTime = 0.0, costCentreIndAlloc = 0.0, costCentreInhTime = 57.5, costCentreInhAlloc = 50.1, costCentreTicks = Just 1, costCentreBytes = Just 29952}, callSiteContribEntries = 0, callSiteContribTime = 0.0, callSiteContribAlloc = 0.0, callSiteContribTicks = Just 12, callSiteContribBytes = Just 835016}
CallSite {callSiteCostCentre = CostCentre {costCentreName = "withTcPlugins", costCentreModule = "TcRnDriver", costCentreSrc = Just "compiler/typecheck/TcRnDriver.hs:(2502,1)-(2518,31)", costCentreNo = 2148, costCentreEntries = 0, costCentreIndTime = 0.0, costCentreIndAlloc = 0.0, costCentreInhTime = 0.0, costCentreInhAlloc = 0.0, costCentreTicks = Just 0, costCentreBytes = Just 0}, callSiteContribEntries = 0, callSiteContribTime = 0.0, callSiteContribAlloc = 0.0, callSiteContribTicks = Just 0, callSiteContribBytes = Just 0}
CallSite {callSiteCostCentre = CostCentre {costCentreName = "CAF", costCentreModule = "TcRnDriver", costCentreSrc = Just "<entire-module>", costCentreNo = 864, costCentreEntries = 0, costCentreIndTime = 0.0, costCentreIndAlloc = 0.0, costCentreInhTime = 0.0, costCentreInhAlloc = 0.0, costCentreTicks = Just 0, costCentreBytes = Just 48}, callSiteContribEntries = 0, callSiteContribTime = 0.0, callSiteContribAlloc = 0.0, callSiteContribTicks = Just 0, callSiteContribBytes = Just 0}
CallSite {callSiteCostCentre = CostCentre {costCentreName = "tcRnModule", costCentreModule = "TcRnDriver", costCentreSrc = Just "compiler/typecheck/TcRnDriver.hs:(133,1)-(159,45)", costCentreNo = 1727, costCentreEntries = 468, costCentreIndTime = 0.3, costCentreIndAlloc = 0.2, costCentreInhTime = 57.8, costCentreInhAlloc = 50.2, costCentreTicks = Just 213, costCentreBytes = Just 114853928}, callSiteContribEntries = 468, callSiteContribTime = 0.0, callSiteContribAlloc = 0.0, callSiteContribTicks = Just 1, callSiteContribBytes = Just 117168}
Thanks for the quick response. I think I've tried ghc-time-alloc-prof
from Hackage and got the same error. I will try the github repo. The think I want to eventually achieve is to compute a difference between two profiles. Your library looks like a good fit.
I got this error while trying to load: haddock.prof.txt
The profile was produced with GHC 8.