[Haskell-cafe] call tree of cost centers in a .prof file

Marco Zocca zocca.marco at gmail.com
Sat Sep 5 20:49:55 UTC 2020


Hi all,

  I don't understand the tree-shaped visualizations produced by
profiteur, profiterole and ghc-prof-flamegraph .

Specifically, I initially thought that cost centers that are displayed
closer to the leaves would be due to calls higher up in the tree, but
that doesn't seem to be the case.

Example; I've produced this basic visualization with ghc-prof and
Data.Tree.drawTree (which mirrors qualitatively what flamegraph et al.
produce) :

MAIN 100.0
|
+- Main.trained 100.0
|  |
|  +- ER.ML.Classification.logreg 99.2
|  |  |
|  |  +- ER.ML.Classification.irls 96.4
|  |  |  |
|  |  |  +- ER.ML.Classification.hessianC 30.3
|  |  |  |  |
|  |  |  |  +- ER.Math.Matrix.outerD 30.3
|  |  |  |  |  |
|  |  |  |  |  `- Main.binMixtureData 29.8
|  |  |  |  |     |
|  |  |  |  |     +- ER.Math.Random.SplitMix.mvNormalSM 28.8
|  |  |  |  |     |  |
|  |  |  |  |     |  `- ER.Math.Matrix.matVec 28.2
|  |  |  |  |     |
|  |  |  |  |     `- ER.ML.Common.centerDataWMEC 1.0

It looks fine down to level 4 (trained calls logreg, which calls irls,
which calls hessianC, which calls outerD), and then it stops making
sense (binMixtureData is not ever called by outerD).

Could someone please shed some light on this?

Thank you in advance


More information about the Haskell-Cafe mailing list